• ANN: Dogelog Runtime, Prolog to the Moon (2021)

    From Mostowski Collapse@21:1/5 to Mostowski Collapse on Wed Jun 9 14:59:29 2021
    Ha Ha, AI is going servers:

    HumanE AI Net Virtual Lab - Unimore, 2021 https://www.youtube.com/watch?v=KvcK5V48jx0

    Whats the result, some payed service?
    Dogelog will be client, and payed through

    dogecoins of course. Just joking.

    Mostowski Collapse schrieb:
    Dear All,

    Ok a simple mark and sweep works, and
    a simple trigger mechanism does the job:

    ANN: Dogelog Runtime, Prolog to the Moon (2021) https://qiita.com/j4n_bur53/items/17f86429745426bd14fd

    And we are 10x times faster than TauProlog! LoL

    Best Regards

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mostowski Collapse@21:1/5 to Mostowski Collapse on Sat Jun 12 17:01:42 2021
    BTW: Dogelog got its first official manual: https://github.com/jburse/dogelog-moon/blob/main/manual/package.pdf

    Enjoy!

    Mostowski Collapse schrieb am Sonntag, 13. Juni 2021 um 01:59:38 UTC+2:
    Hi

    Thomas 'PointedEars' Lahn was thinking hard and then lamented:

    Thomas 'PointedEars' Lahn schrieb am Samstag, 12. Juni 2021 um 22:24:13 UTC+2:
    Also, you cannot expect everyone to know what you are advertising, or visit the Web site (if any) to find out. So one can reasonably expect that you first say what it *is* that you are advertising.

    It is what it is, and it was already explained in this thread.
    Its the same thing like TauProlog. So guess what it is?

    LoL

    Bye
    Mostowski Collapse schrieb am Sonntag, 2. Mai 2021 um 23:05:58 UTC+2:
    Dear All,

    Ok a simple mark and sweep works, and
    a simple trigger mechanism does the job:

    ANN: Dogelog Runtime, Prolog to the Moon (2021) https://qiita.com/j4n_bur53/items/17f86429745426bd14fd

    And we are 10x times faster than TauProlog! LoL

    Best Regards

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mostowski Collapse@21:1/5 to Thomas 'PointedEars' Lahn on Sat Jun 12 16:59:34 2021
    Hi

    Thomas 'PointedEars' Lahn was thinking hard and then lamented:

    Thomas 'PointedEars' Lahn schrieb am Samstag, 12. Juni 2021 um 22:24:13 UTC+2:
    Also, you cannot expect everyone to know what you are advertising, or visit the Web site (if any) to find out. So one can reasonably expect that you first say what it *is* that you are advertising.

    It is what it is, and it was already explained in this thread.
    Its the same thing like TauProlog. So guess what it is?

    LoL

    Bye

    Mostowski Collapse schrieb am Sonntag, 2. Mai 2021 um 23:05:58 UTC+2:
    Dear All,

    Ok a simple mark and sweep works, and
    a simple trigger mechanism does the job:

    ANN: Dogelog Runtime, Prolog to the Moon (2021) https://qiita.com/j4n_bur53/items/17f86429745426bd14fd

    And we are 10x times faster than TauProlog! LoL

    Best Regards

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mostowski Collapse@21:1/5 to Mostowski Collapse on Thu Jun 17 01:45:01 2021
    Preview: Dogelog can be embedded in stackoverflow. (Jekejeke) https://stackoverflow.com/a/67990574/502187

    Mostowski Collapse schrieb am Sonntag, 13. Juni 2021 um 02:01:46 UTC+2:
    BTW: Dogelog got its first official manual: https://github.com/jburse/dogelog-moon/blob/main/manual/package.pdf

    Enjoy!
    Mostowski Collapse schrieb am Sonntag, 13. Juni 2021 um 01:59:38 UTC+2:
    Hi

    Thomas 'PointedEars' Lahn was thinking hard and then lamented:

    Thomas 'PointedEars' Lahn schrieb am Samstag, 12. Juni 2021 um 22:24:13 UTC+2:
    Also, you cannot expect everyone to know what you are advertising, or visit
    the Web site (if any) to find out. So one can reasonably expect that you first say what it *is* that you are advertising.

    It is what it is, and it was already explained in this thread.
    Its the same thing like TauProlog. So guess what it is?

    LoL

    Bye
    Mostowski Collapse schrieb am Sonntag, 2. Mai 2021 um 23:05:58 UTC+2:
    Dear All,

    Ok a simple mark and sweep works, and
    a simple trigger mechanism does the job:

    ANN: Dogelog Runtime, Prolog to the Moon (2021) https://qiita.com/j4n_bur53/items/17f86429745426bd14fd

    And we are 10x times faster than TauProlog! LoL

    Best Regards

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mostowski Collapse@21:1/5 to Mostowski Collapse on Wed Jun 23 14:57:46 2021
    Since (->)/2 inlining works, Dogelog is now old enough for its
    own group. Dogelog got its own Facebook Group!

    https://www.facebook.com/groups/dogelog

    Mostowski Collapse schrieb:

    Preview: Dogelog can be embedded in stackoverflow. (Jekejeke) https://stackoverflow.com/a/67990574/502187

    Mostowski Collapse schrieb am Sonntag, 2. Mai 2021 um 23:05:58 UTC+2:
    Dear All,

    Ok a simple mark and sweep works, and
    a simple trigger mechanism does the job:

    ANN: Dogelog Runtime, Prolog to the Moon (2021) https://qiita.com/j4n_bur53/items/17f86429745426bd14fd

    And we are 10x times faster than TauProlog! LoL

    Best Regards

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mostowski Collapse@21:1/5 to Mostowski Collapse on Fri Jun 25 04:00:56 2021
    The new Android Store/Emulator inside Windows 11
    is probably an anachronism, flogging a dead horse.

    It seems JavaScript is everywhere, even Artificial
    Intelligence becomes cookie cutting:

    I built a Distance Matrix Routing App in React! https://www.youtube.com/watch?v=43jfFU4FJZo

    Mostowski Collapse schrieb am Mittwoch, 23. Juni 2021 um 14:57:55 UTC+2:
    Since (->)/2 inlining works, Dogelog is now old enough for its
    own group. Dogelog got its own Facebook Group!

    https://www.facebook.com/groups/dogelog

    Mostowski Collapse schrieb:

    Preview: Dogelog can be embedded in stackoverflow. (Jekejeke) https://stackoverflow.com/a/67990574/502187
    Mostowski Collapse schrieb am Sonntag, 2. Mai 2021 um 23:05:58 UTC+2:
    Dear All,

    Ok a simple mark and sweep works, and
    a simple trigger mechanism does the job:

    ANN: Dogelog Runtime, Prolog to the Moon (2021) https://qiita.com/j4n_bur53/items/17f86429745426bd14fd

    And we are 10x times faster than TauProlog! LoL

    Best Regards

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mostowski Collapse@21:1/5 to Mostowski Collapse on Fri Jun 25 05:02:00 2021
    Something like this might do the job in the future,
    and replace Android and iOS apps. Dunno?

    https://www.w3.org/TR/miniapp-lifecycle/

    Mostowski Collapse schrieb am Freitag, 25. Juni 2021 um 13:01:01 UTC+2:
    The new Android Store/Emulator inside Windows 11
    is probably an anachronism, flogging a dead horse.

    It seems JavaScript is everywhere, even Artificial
    Intelligence becomes cookie cutting:

    I built a Distance Matrix Routing App in React! https://www.youtube.com/watch?v=43jfFU4FJZo
    Mostowski Collapse schrieb am Mittwoch, 23. Juni 2021 um 14:57:55 UTC+2:
    Since (->)/2 inlining works, Dogelog is now old enough for its
    own group. Dogelog got its own Facebook Group!

    https://www.facebook.com/groups/dogelog

    Mostowski Collapse schrieb:

    Preview: Dogelog can be embedded in stackoverflow. (Jekejeke) https://stackoverflow.com/a/67990574/502187
    Mostowski Collapse schrieb am Sonntag, 2. Mai 2021 um 23:05:58 UTC+2:
    Dear All,

    Ok a simple mark and sweep works, and
    a simple trigger mechanism does the job:

    ANN: Dogelog Runtime, Prolog to the Moon (2021) https://qiita.com/j4n_bur53/items/17f86429745426bd14fd

    And we are 10x times faster than TauProlog! LoL

    Best Regards

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mostowski Collapse@21:1/5 to All on Sat Jul 10 16:50:20 2021
    Noice! One less problem:
    **Bringing Unicode to Prolog (Dogelog Runtime)**

    Was checking out what Logtalk does. They have Prolog text here:

    https://github.com/LogtalkDotOrg/logtalk3/tree/master/library/unicode_data/unicode_categories

    These Prolog texts contain facts like:

    unicode_category_(0x00AD, 'Cf').
    unicode_category_(0x0600, 'Cf').
    unicode_category_(0x0601, 'Cf').
    unicode_category_(0x0602, 'Cf').
    unicode_category_(0x0603, 'Cf').
    unicode_category_(0x0604, 'Cf').
    unicode_category_(0x06DD, 'Cf').
    unicode_category_(0x070F, 'Cf').
    Etc...

    This might be feasible standalone, but if we want to deliver JavaScript files over the wire into the browser, its possibly not a good idea to have
    facts with 1114111 entries. So we made a little Unicode compressor:

    compression took 109 ms

    pool.size()*PARA_SIZE= 8384
    pool2.size()*BLOCK_SIZE= 3072
    MAX_BLOCK= 1088
    Total= 12544

    The compression ratio is 1%. The 1114111 entries boil down
    to 12544 entries. See also:

    Preview: Unicode general categories Prolog API. (Jekejeke) https://gist.github.com/jburse/03c9b3cec528288d5c29c3d8bbb986c2#gistcomment-3808667

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mostowski Collapse@21:1/5 to Mostowski Collapse on Mon Jul 12 01:04:38 2021
    More progress in the Unicode domain, so that we can
    leave Unicode behind and move to other things. Unicode
    code points, that they can represent a numeric value.

    Some exotic and not so exotic examples are seen here:

    unicode_numerical_value(0x0D75, 0.75, 3/4). % No MALAYALAM FRACTION THREE QUARTERS
    unicode_numerical_value(0x096C, 6.0, 6). % Nd DEVANAGARI DIGIT SIX unicode_numerical_value(0x216E, 500.0, 500). % Nl ROMAN NUMERAL FIVE HUNDRED

    We decided to replicate the Character.digit() API from Java. This API
    only returns numeric values that are integer and that are between 0 and 35. Otherwise the API returns -1.

    Can we compress like before? Yes!

    Without Numeric With Numeric
    pool.size()*PARA_SIZE= 8384 8416
    pool2.size()*BLOCK_SIZE= 3072 3072
    MAX_BLOCK= 1088 1088
    Total= 12544 12576

    See also:

    Preview: Unicode numeric values Prolog API. (Jekejeke) https://twitter.com/dogelogch/status/1414493706124767237

    Or if you are not on Twitter, but on Facebook:

    Preview: Unicode numeric values Prolog API. (Jekejeke) https://www.facebook.com/groups/dogelog

    Mostowski Collapse schrieb am Sonntag, 11. Juli 2021 um 01:50:25 UTC+2:
    Noice! One less problem:
    **Bringing Unicode to Prolog (Dogelog Runtime)**

    Was checking out what Logtalk does. They have Prolog text here:

    https://github.com/LogtalkDotOrg/logtalk3/tree/master/library/unicode_data/unicode_categories

    These Prolog texts contain facts like:

    unicode_category_(0x00AD, 'Cf').
    unicode_category_(0x0600, 'Cf').
    unicode_category_(0x0601, 'Cf').
    unicode_category_(0x0602, 'Cf').
    unicode_category_(0x0603, 'Cf').
    unicode_category_(0x0604, 'Cf').
    unicode_category_(0x06DD, 'Cf').
    unicode_category_(0x070F, 'Cf').
    Etc...

    This might be feasible standalone, but if we want to deliver JavaScript files over the wire into the browser, its possibly not a good idea to have
    facts with 1114111 entries. So we made a little Unicode compressor:

    compression took 109 ms

    pool.size()*PARA_SIZE= 8384
    pool2.size()*BLOCK_SIZE= 3072
    MAX_BLOCK= 1088
    Total= 12544

    The compression ratio is 1%. The 1114111 entries boil down
    to 12544 entries. See also:

    Preview: Unicode general categories Prolog API. (Jekejeke) https://gist.github.com/jburse/03c9b3cec528288d5c29c3d8bbb986c2#gistcomment-3808667

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mostowski Collapse@21:1/5 to All on Mon Aug 2 09:48:01 2021
    Dear All,

    Teaching Dogelog more tricks. From now on you don't
    need to use (:-)/2 together with write/1 and friends.
    There is a new (?-)/2, and you can for example input:

    append([], X, X).
    append([X|Y], Z, [X|T]) :- append(Y, Z, T).

    ?- limit(2,offset(1,append(X, Y, [1,2,3]))).

    It will then automatically show:

    X = [1], Y = [2, 3];
    X = [1, 2], Y = [3]

    See also:

    Preview: Unattended Dogelog query answers. (Jekejeke) https://twitter.com/dogelogch/status/1422206395798204422

    Preview: Unattended Dogelog query answers. (Jekejeke) https://www.facebook.com/groups/dogelog

    Have Fun!

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mostowski Collapse@21:1/5 to Mostowski Collapse on Wed Aug 11 08:28:06 2021
    It seems JavaScript gives us all we need. We use two different
    file name normalization depending on whether the Dogelog
    runtime runs inside a browser or from within node.js:

    - Inside node.js:
    We perform file name normalization as follows:

    res = fs.realpathSync(url);

    - Inside a browser:
    We perform file name normalization as follows:

    let request = new XMLHttpRequest();
    request.open('HEAD', url, false);
    request.send();
    res = request.responseURL;

    The predicate absolute_file_name/2 is not found in the ISO
    core standard. We use the absolute file name to log what has
    been loaded. There is also a new predicate current_source/1

    to inspect this log. See also:

    Preview: Predicate ensure_loaded/1 for Dogelog runtime. (Jekejeke) https://twitter.com/dogelogch/status/1425216777890451456

    Preview: Predicate ensure_loaded/1 for Dogelog runtime. (Jekejeke) https://www.facebook.com/groups/dogelog

    Mostowski Collapse schrieb am Montag, 2. August 2021 um 18:48:07 UTC+2:
    Dear All,

    Teaching Dogelog more tricks. From now on you don't
    need to use (:-)/2 together with write/1 and friends.
    There is a new (?-)/2, and you can for example input:

    append([], X, X).
    append([X|Y], Z, [X|T]) :- append(Y, Z, T).

    ?- limit(2,offset(1,append(X, Y, [1,2,3]))).

    It will then automatically show:

    X = [1], Y = [2, 3];
    X = [1, 2], Y = [3]

    See also:

    Preview: Unattended Dogelog query answers. (Jekejeke) https://twitter.com/dogelogch/status/1422206395798204422

    Preview: Unattended Dogelog query answers. (Jekejeke) https://www.facebook.com/groups/dogelog

    Have Fun!

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mostowski Collapse@21:1/5 to All on Thu Aug 12 10:40:36 2021
    There are rumors, that Forth was prototyped in Prolog,
    similar like Erlang was born. In some astronomic observatory
    in Argentina they found this fragment:

    forth([Op|Rest]) --> word(Op), forth(Rest).
    forth([]) --> [].

    word(+), [Result] --> [Number1, Number2], {Result is Number1+Number2}.
    word(*), [Result] --> [Number1, Number2], {Result is Number1*Number2}. word(Number), [Number] --> {number(Number)}.

    ?- forth([5,3,+,7,2,+,*],[],X).
    X = [72] .

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mostowski Collapse@21:1/5 to Mostowski Collapse on Thu Aug 12 10:42:58 2021
    Bug the Dogelog runtime does not yet have DCG.
    This is an open ticket, dunno yet when it gets closed:

    Will need DCG for Dogelog self compilation #2 https://github.com/jburse/dogelog-moon/issues/2

    What is DCG:

    There is a special notation called definite clause grammars (DCGs). https://en.wikipedia.org/wiki/Prolog_syntax_and_semantics#Definite_clause_grammars

    Mostowski Collapse schrieb am Donnerstag, 12. August 2021 um 19:40:40 UTC+2:
    There are rumors, that Forth was prototyped in Prolog,
    similar like Erlang was born. In some astronomic observatory
    in Argentina they found this fragment:

    forth([Op|Rest]) --> word(Op), forth(Rest).
    forth([]) --> [].

    word(+), [Result] --> [Number1, Number2], {Result is Number1+Number2}. word(*), [Result] --> [Number1, Number2], {Result is Number1*Number2}. word(Number), [Number] --> {number(Number)}.

    ?- forth([5,3,+,7,2,+,*],[],X).
    X = [72] .

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mostowski Collapse@21:1/5 to All on Sat Aug 14 06:04:50 2021
    The Dogelog runtime progressed over the last weeks. The milestones
    were ensure_loaded/1 for ISO core standard conforming Prolog texts,
    and unattended query answerer and recently first argument indexing.

    Despite all this progress we have the feeling that the real potential
    of the Dogelog runtime has not yet been demonstrated. Namely that
    the cross compiler opens the door to many new platforms and not

    only the JavaScript platform. So here are some first beginnings:

    Python Version of Dogelog Runtime machine https://twitter.com/dogelogch/status/1426528779707502592

    Python Version of Dogelog Runtime machine https://www.facebook.com/groups/dogelog

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mostowski Collapse@21:1/5 to Mostowski Collapse on Thu Sep 2 09:38:28 2021
    More best kept secrets of Prolog: Pattern Matching

    Everybody loves pattern matching. Languages
    like Python, release 3.10, even provide it
    now. There is now a match/case statement

    in Python. But Prolog users will scratch their
    head. Will my if-then-else be as fast as a
    imperative switch jump table lookup?

    Dogelog runtime has stepped up its game
    concerning pattern matching. It now provides
    ECLiPSe Prolog disjunction and if-then-else

    indexing. Take this example:

    ?- [user].
    foo(X,Y) :- X=baz, Y=2; X=bar -> Y=1.

    SWI-Prolog leaves a choice point, so no
    clause indexing used:

    /* SWI-Prolog 8.3.26 */
    ?- foo(baz,Z).
    Z = 2 ; %%% Spurious Choice Point
    false.

    Dogelog doesn't leave a choice point, since
    it can index the disjunction and if-then-else:

    /* Dogelog Runtime 0.9.3 */
    ?- foo(baz,Z).
    Z = 2. %%% No Choice Point

    See also:

    Preview: Dogelog disjunction and if-then-else indexing. (Jekejeke) https://twitter.com/dogelogch/status/1433446729974796293

    Preview: Dogelog disjunction and if-then-else indexing. (Jekejeke) https://www.facebook.com/groups/dogelog

    Mostowski Collapse schrieb am Samstag, 14. August 2021 um 15:04:55 UTC+2:
    The Dogelog runtime progressed over the last weeks. The milestones
    were ensure_loaded/1 for ISO core standard conforming Prolog texts,
    and unattended query answerer and recently first argument indexing.

    Despite all this progress we have the feeling that the real potential
    of the Dogelog runtime has not yet been demonstrated. Namely that
    the cross compiler opens the door to many new platforms and not

    only the JavaScript platform. So here are some first beginnings:

    Python Version of Dogelog Runtime machine https://twitter.com/dogelogch/status/1426528779707502592

    Python Version of Dogelog Runtime machine https://www.facebook.com/groups/dogelog

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mostowski Collapse@21:1/5 to All on Sun Sep 5 05:13:58 2021
    We finally sat down and implemented eval_term(). The new
    eval_term() routine makes our Prolog based implementation of is/2
    obsolete. The old realization did use (=..)/2 in two places

    and call/1. The new implementation bypasses Prolog and
    directly uses host language means. We tested the new version
    of Dogelog runtime agains the current Scryer-Prolog version:

    Preview: Dogelog Runtime beats Scryer Prolog by 30%. (Jekejeke) https://twitter.com/dogelogch/status/1434318760064790530

    Preview: Dogelog Runtime beats Scryer Prolog by 30%. (Jekejeke) https://www.facebook.com/groups/dogelog

    Although this is an encouraging result, it has also its drawbacks.
    One might wish that a (=..)/2 and call/1 based implementation is
    fast enough. Also a Prolog based implementation has the

    advantage that it works with user defined predicates as evaluable
    functions as well. We had a bridge in Jekejeke Prolog to allow that.
    A next step is to bring this bridge also to Dogelog runtime, so that

    user defined evaluable functions become possible as well.
    Or invent something new to have the cake and eat it too.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mostowski Collapse@21:1/5 to Mostowski Collapse on Mon Sep 13 17:09:41 2021
    Meanwhile maintaining a JavaScript and
    Python version in parallel.

    The Standard Python version of Dogelog runtime
    is annoyingly slow. So we gave it a try with
    andother Python, and it was 6x times faster.

    We could test GraalVM. We worked around the missing
    match in Python 3.8 by replacing it with if-then-else.
    Performance is a little better, we find:

    /* Standard Python Version, Warm Run */
    ?- time(fibo(23,X)).
    % Wall 3865 ms, gc 94 ms, 71991 lips
    X = 46368.

    /* GraalVM Python Version, Warm Warm Run */
    ?- time(fibo(23,X)).
    % Wall 695 ms, gc 14 ms, 400356 lips
    X = 46368.

    See also:

    JDK 1.8 GraalVM Python is 6x faster than Standard Python https://twitter.com/dogelogch/status/1437395917167112193

    JDK 1.8 GraalVM Python is 6x faster than Standard Python https://www.facebook.com/groups/dogelog

    Mostowski Collapse wrote:
    Dear All,

    Ok a simple mark and sweep works, and
    a simple trigger mechanism does the job:

    ANN: Dogelog Runtime, Prolog to the Moon (2021) https://qiita.com/j4n_bur53/items/17f86429745426bd14fd

    And we are 10x times faster than TauProlog! LoL

    Best Regards

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mostowski Collapse@21:1/5 to Mostowski Collapse on Wed Sep 15 16:11:39 2021
    I am not testing this use-case. But a related
    use-case might highlight why speed did never
    hurt anybody.

    Lets say you program a flying drone with Python,
    and the measurement is from the drone sensor
    and communication systems.

    Lets say you are using the idle time between
    measurements for some complex planning. It
    is then not true that you have anyway

    to wait for the measurement.

    Hope this helps!

    BTW: If somebody knows another Python implementation
    I am happy to test this implementation as well.
    I am assuming that the standard Python python.exe

    I tested amounts to CPython? Not sure. And the
    GraalVM is practically the same as JPython? Not
    sure either.

    Opinion: Anyone who is counting on Python for truly fast compute
    speed is probably using Python for the wrong purpose. Here, we use
    Python to control Test Equipment, to set up the equipment and ask for a measurement, get it, and proceed to the next measurement; and at the end produce a nice formatted report. If we wrote the test script in C or
    Rust or whatever it could not run substantially faster because it is communicating with the test equipment, setting it up and waiting for
    responses, and that is where the vast majority of the time goes.
    Especially if the measurement result requires averaging it can take a
    while. In my opinion this is an ideal use for Python, not just because
    the speed of Python is not important, but also because we can easily
    find people who know Python, who like coding in Python, and will join
    the company to program in Python ... and stay with us.
    --- Joseph S.

    Mostowski Collapse schrieb:
    Meanwhile maintaining a JavaScript and
    Python version in parallel.

    The Standard Python version of Dogelog runtime
    is annoyingly slow. So we gave it a try with
    andother Python, and it was 6x times faster.

    We could test GraalVM. We worked around the missing
    match in Python 3.8 by replacing it with if-then-else.
    Performance is a little better, we find:

    /* Standard Python Version, Warm Run */
    ?- time(fibo(23,X)).
    % Wall 3865 ms, gc 94 ms, 71991 lips
    X = 46368.

    /* GraalVM Python Version, Warm Warm Run */
    ?- time(fibo(23,X)).
    % Wall 695 ms, gc 14 ms, 400356 lips
    X = 46368.

    See also:

    JDK 1.8 GraalVM Python is 6x faster than Standard Python https://twitter.com/dogelogch/status/1437395917167112193

    JDK 1.8 GraalVM Python is 6x faster than Standard Python https://www.facebook.com/groups/dogelog

    Mostowski Collapse wrote:
    Dear All,

    Ok a simple mark and sweep works, and
    a simple trigger mechanism does the job:

    ANN: Dogelog Runtime, Prolog to the Moon (2021)
    https://qiita.com/j4n_bur53/items/17f86429745426bd14fd

    And we are 10x times faster than TauProlog! LoL

    Best Regards


    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Julio Di Egidio@21:1/5 to Julio Di Egidio on Wed Sep 15 08:49:01 2021
    On Wednesday, 15 September 2021 at 17:46:15 UTC+2, Julio Di Egidio wrote:
    On Wednesday, 15 September 2021 at 16:11:48 UTC+2, Mostowski Collapse wrote:

    Opinion: Anyone who is counting on Python for truly fast compute
    speed is probably using Python for the wrong purpose.
    You just don't know anything about this environment: those who need fast computation rather use *libraries* where all the performance critical parts are written in native code... and that's pretty customary in Python.

    That doesn't mean Python is flawless, indeed (IMO) it isn't in so many ways: to the point that, for more professional solutions in the maths/statistics realms in particular, people rather use R: yet, the primary reason is not so not so much performance
    but really the solidity/structure of the language per se...

    Good grief, I thought we were in comp-lang-python... You are indeed just *off-topic* here: I mean, an announcement for a JS-based engine is welcome, but you posting your Python implementation diary in this group is as off-topic as it can be.

    *Plonk*

    Julio

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Julio Di Egidio@21:1/5 to Mostowski Collapse on Wed Sep 15 08:46:10 2021
    On Wednesday, 15 September 2021 at 16:11:48 UTC+2, Mostowski Collapse wrote:

    Opinion: Anyone who is counting on Python for truly fast compute
    speed is probably using Python for the wrong purpose.

    You just don't know anything about this environment: those who need fast computation rather use *libraries* where all the performance critical parts are written in native code... and that's pretty customary in Python.

    That doesn't mean Python is flawless, indeed (IMO) it isn't in so many ways: to the point that, for more professional solutions in the maths/statistics realms in particular, people rather use R: yet, the primary reason is not so not so much performance
    but really the solidity/structure of the language per se...

    Julio

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mostowski Collapse@21:1/5 to Julio Di Egidio on Wed Sep 15 18:49:06 2021
    I am having a cross language problem.

    I really wonder why my Python implementation
    is a factor 40 slower than my JavaScript implementation.
    Structurally its the same code.

    You can check yourself:

    Python Version: https://github.com/jburse/dogelog-moon/blob/main/devel/runtimepy/machine.py

    JavaScript Version: https://github.com/jburse/dogelog-moon/blob/main/devel/runtime/machine.js

    Its the same while, if-then-else, etc.. its the same
    classes Variable, Compound etc.. Maybe I could speed
    it up by some details. For example to create an array
    of length n, I use in Python:

    temp = [NotImplemented] * code[pos]
    pos += 1

    Whereas in JavaScript I use, also
    in exec_build2():

    temp = new Array(code[pos++]);

    So I hear Guido doesn't like ++. So in Python I use +=
    and a separate statement as a workaround. But otherwise,
    what about the creation of an array,

    is the the idiom [_] * _ slow? I am assuming its
    compiled away. Or does it really first create an
    array of size 1 and then enlarge it?

    Julio Di Egidio wrote:
    On Wednesday, 15 September 2021 at 17:46:15 UTC+2, Julio Di Egidio wrote:
    On Wednesday, 15 September 2021 at 16:11:48 UTC+2, Mostowski Collapse wrote: >>
    Opinion: Anyone who is counting on Python for truly fast compute
    speed is probably using Python for the wrong purpose.
    You just don't know anything about this environment: those who need fast computation rather use *libraries* where all the performance critical parts are written in native code... and that's pretty customary in Python.

    That doesn't mean Python is flawless, indeed (IMO) it isn't in so many ways: to the point that, for more professional solutions in the maths/statistics realms in particular, people rather use R: yet, the primary reason is not so not so much
    performance but really the solidity/structure of the language per se...

    Good grief, I thought we were in comp-lang-python... You are indeed just *off-topic* here: I mean, an announcement for a JS-based engine is welcome, but you posting your Python implementation diary in this group is as off-topic as it can be.

    *Plonk*

    Julio


    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mostowski Collapse@21:1/5 to Mostowski Collapse on Thu Sep 16 13:27:36 2021
    A friend just sent me a Web Sudoku made with Dogelog Runtime https://gist.github.com/jburse/c85297e97091caf22d306dd8c8be12fe#gistcomment-3895696

    LoL

    Mostowski Collapse schrieb am Mittwoch, 15. September 2021 um 18:49:11 UTC+2:
    I am having a cross language problem.

    I really wonder why my Python implementation
    is a factor 40 slower than my JavaScript implementation.
    Structurally its the same code.

    You can check yourself:

    Python Version: https://github.com/jburse/dogelog-moon/blob/main/devel/runtimepy/machine.py

    JavaScript Version: https://github.com/jburse/dogelog-moon/blob/main/devel/runtime/machine.js

    Its the same while, if-then-else, etc.. its the same
    classes Variable, Compound etc.. Maybe I could speed
    it up by some details. For example to create an array
    of length n, I use in Python:

    temp = [NotImplemented] * code[pos]
    pos += 1

    Whereas in JavaScript I use, also
    in exec_build2():

    temp = new Array(code[pos++]);

    So I hear Guido doesn't like ++. So in Python I use +=
    and a separate statement as a workaround. But otherwise,
    what about the creation of an array,

    is the the idiom [_] * _ slow? I am assuming its
    compiled away. Or does it really first create an
    array of size 1 and then enlarge it?
    Julio Di Egidio wrote:
    On Wednesday, 15 September 2021 at 17:46:15 UTC+2, Julio Di Egidio wrote:
    On Wednesday, 15 September 2021 at 16:11:48 UTC+2, Mostowski Collapse wrote:

    Opinion: Anyone who is counting on Python for truly fast compute
    speed is probably using Python for the wrong purpose.
    You just don't know anything about this environment: those who need fast computation rather use *libraries* where all the performance critical parts are written in native code... and that's pretty customary in Python.

    That doesn't mean Python is flawless, indeed (IMO) it isn't in so many ways: to the point that, for more professional solutions in the maths/statistics realms in particular, people rather use R: yet, the primary reason is not so not so much
    performance but really the solidity/structure of the language per se...

    Good grief, I thought we were in comp-lang-python... You are indeed just *off-topic* here: I mean, an announcement for a JS-based engine is welcome, but you posting your Python implementation diary in this group is as off-topic as it can be.

    *Plonk*

    Julio


    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mostowski Collapse@21:1/5 to Mostowski Collapse on Thu Sep 16 14:48:20 2021
    The new release 0.9.6 is quite speedy:

    "Maailman vaikein" 850002400720000009004000000000107002305000900040000000000080070017000000000036040
    time(solve(Puzzle))
    % Wall 41354 ms, gc 520 ms, 3143029 lips
    in Browser

    See also:

    Preview: New para/1 instruction for Dogelog runtime. (Jekejeke) https://twitter.com/dogelogch/status/1438586282502983682

    Preview: New para/1 instruction for Dogelog runtime. (Jekejeke) https://www.facebook.com/groups/dogelog

    Mostowski Collapse schrieb am Donnerstag, 16. September 2021 um 22:27:41 UTC+2:
    A friend just sent me a Web Sudoku made with Dogelog Runtime https://gist.github.com/jburse/c85297e97091caf22d306dd8c8be12fe#gistcomment-3895696

    LoL
    Mostowski Collapse schrieb am Mittwoch, 15. September 2021 um 18:49:11 UTC+2:
    I am having a cross language problem.

    I really wonder why my Python implementation
    is a factor 40 slower than my JavaScript implementation.
    Structurally its the same code.

    You can check yourself:

    Python Version: https://github.com/jburse/dogelog-moon/blob/main/devel/runtimepy/machine.py

    JavaScript Version: https://github.com/jburse/dogelog-moon/blob/main/devel/runtime/machine.js

    Its the same while, if-then-else, etc.. its the same
    classes Variable, Compound etc.. Maybe I could speed
    it up by some details. For example to create an array
    of length n, I use in Python:

    temp = [NotImplemented] * code[pos]
    pos += 1

    Whereas in JavaScript I use, also
    in exec_build2():

    temp = new Array(code[pos++]);

    So I hear Guido doesn't like ++. So in Python I use +=
    and a separate statement as a workaround. But otherwise,
    what about the creation of an array,

    is the the idiom [_] * _ slow? I am assuming its
    compiled away. Or does it really first create an
    array of size 1 and then enlarge it?
    Julio Di Egidio wrote:
    On Wednesday, 15 September 2021 at 17:46:15 UTC+2, Julio Di Egidio wrote:
    On Wednesday, 15 September 2021 at 16:11:48 UTC+2, Mostowski Collapse wrote:

    Opinion: Anyone who is counting on Python for truly fast compute
    speed is probably using Python for the wrong purpose.
    You just don't know anything about this environment: those who need fast computation rather use *libraries* where all the performance critical parts are written in native code... and that's pretty customary in Python.

    That doesn't mean Python is flawless, indeed (IMO) it isn't in so many ways: to the point that, for more professional solutions in the maths/statistics realms in particular, people rather use R: yet, the primary reason is not so not so much
    performance but really the solidity/structure of the language per se...

    Good grief, I thought we were in comp-lang-python... You are indeed just *off-topic* here: I mean, an announcement for a JS-based engine is welcome, but you posting your Python implementation diary in this group is as off-topic as it can be.

    *Plonk*

    Julio


    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mostowski Collapse@21:1/5 to All on Sun Sep 19 13:28:17 2021
    Do you say Python should not be used to implement
    such things? In my opinion, Python has a high potential
    to implement Prolog, because it has also ast.parse()

    and compile(). But I do not yet have a showcase that uses
    these features of Python to compile Prolog. I dont work 24/7
    and I cannot clone myself. Currently the Prolog code is interpreted.

    I have a prototype where Prolog code is compiled into JavaScript,
    but I did not yet try this approach with Python. Here you see how
    JavaScript closures are generated, a first prototype:

    const alt4 = make_defined([new Clause(1, [0, 0], function(
    display, actual, cont) {return(new Compound(".", [new Compound(
    "==", [deref(actual.args[0]), "end_of_file"]), new Compound(
    ".", [new Compound("$CUT", [deref(display[0])]), cont
    ])]))}, 0, undefined), new Clause(1, [0, 0], function(
    display, actual, cont) {return(new Compound(".", [new Compound( "expand_include", [deref(actual.args[0]), deref(actual.args[1]
    ), display[0] = new Variable()]), new Compound(".",
    [new Compound("handle_term", [deref(display[0])]), new Compound(
    ".", ["fail", cont])])]))}, -1, undefined)]);

    add("next_term", 1, new Clause(2, [0], function(display, actual,
    cont) {return(new Compound(".", [new Compound("read_term", [deref(actual.args[0]), display[0] = new Variable(),
    new Compound(".", [new Compound("variable_names", [
    display[1] = new Variable()]), "[]"])]), new Compound(
    ".", [new Compound(alt4, [deref(display[0]), deref(
    display[1])]), cont])]))}, -1, undefined));

    https://github.com/jburse/dogelog-moon/issues/184

    Will do the same for Python in the next weeks. Then later this approach
    will be combined with a few planned optimizations. So far got a 25%
    speed increase for JavaScript with this new compilation scheme, but

    there is no official release out yet, that features this approach. And
    there should be much more in it, also for Python.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From John Harris@21:1/5 to Mostowski Collapse on Mon Sep 20 18:11:44 2021
    On 19/09/2021 21:28, Mostowski Collapse wrote:

    <snip>
    const alt4 = make_defined([new Clause(1, [0, 0], function(
    display, actual, cont) {return(new Compound(".", [new Compound(
    "==", [deref(actual.args[0]), "end_of_file"]), new Compound(
    ".", [new Compound("$CUT", [deref(display[0])]), cont
    ])]))}, 0, undefined), new Clause(1, [0, 0], function(
    display, actual, cont) {return(new Compound(".", [new Compound( "expand_include", [deref(actual.args[0]), deref(actual.args[1]
    ), display[0] = new Variable()]), new Compound(".",
    [new Compound("handle_term", [deref(display[0])]), new Compound(
    ".", ["fail", cont])])]))}, -1, undefined)]);

    add("next_term", 1, new Clause(2, [0], function(display, actual,
    cont) {return(new Compound(".", [new Compound("read_term", [deref(actual.args[0]), display[0] = new Variable(),
    new Compound(".", [new Compound("variable_names", [
    display[1] = new Variable()]), "[]"])]), new Compound(
    ".", [new Compound(alt4, [deref(display[0]), deref(
    display[1])]), cont])]))}, -1, undefined));
    <snip>

    Please don't show us unreadable code.

    John

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mostowski Collapse@21:1/5 to John Harris on Mon Sep 20 11:04:35 2021
    Its not supposed to be readable. Its machine generated.

    John Harris schrieb am Montag, 20. September 2021 um 19:11:49 UTC+2:
    On 19/09/2021 21:28, Mostowski Collapse wrote:

    <snip>
    const alt4 = make_defined([new Clause(1, [0, 0], function(
    display, actual, cont) {return(new Compound(".", [new Compound(
    "==", [deref(actual.args[0]), "end_of_file"]), new Compound(
    ".", [new Compound("$CUT", [deref(display[0])]), cont
    ])]))}, 0, undefined), new Clause(1, [0, 0], function(
    display, actual, cont) {return(new Compound(".", [new Compound( "expand_include", [deref(actual.args[0]), deref(actual.args[1]
    ), display[0] = new Variable()]), new Compound(".",
    [new Compound("handle_term", [deref(display[0])]), new Compound(
    ".", ["fail", cont])])]))}, -1, undefined)]);

    add("next_term", 1, new Clause(2, [0], function(display, actual,
    cont) {return(new Compound(".", [new Compound("read_term", [deref(actual.args[0]), display[0] = new Variable(),
    new Compound(".", [new Compound("variable_names", [
    display[1] = new Variable()]), "[]"])]), new Compound(
    ".", [new Compound(alt4, [deref(display[0]), deref(
    display[1])]), cont])]))}, -1, undefined));
    <snip>

    Please don't show us unreadable code.

    John

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mostowski Collapse@21:1/5 to Mostowski Collapse on Mon Sep 20 15:16:32 2021
    Woa! There is some competition for JavaScript and
    node.exe. PyPy is faster! Faster than GraalVM. Now
    I get for my usual Python benchmark, figures in
    milliseconds:

    Standard GraalVM PyPy
    170'996 28'523 9'755

    Not bad. Only like 2x times slower than node.exe.
    Now imaging I can realize the ast.parse() and
    compile() idea as well! (Made an experiment
    today, testing some corner with evaluation)

    BTW: Here the full results. Was using:
    pypy3.7-v7.3.5-win64\pypy3.exe

    Test Standard GraalVM PyPy
    nrev 20'389 3'611 1'254
    crypt 17'103 3'248 960
    deriv 20'808 3'111 1'250
    poly 17'518 3'045 1'149
    qsort 20'191 3'243 1'127
    tictac 13'761 2'469 783
    queens 17'691 3'242 1'024
    query 6'161 1'155 313
    mtak 17'209 2'300 907
    perfect 20'165 3'099 988
    calc N/A N/A N/A
    Total 170'996 28'523 9'755

    Mostowski Collapse schrieb am Montag, 20. September 2021 um 20:04:42 UTC+2:
    Its not supposed to be readable. Its machine generated.
    John Harris schrieb am Montag, 20. September 2021 um 19:11:49 UTC+2:
    On 19/09/2021 21:28, Mostowski Collapse wrote:

    <snip>
    const alt4 = make_defined([new Clause(1, [0, 0], function(
    display, actual, cont) {return(new Compound(".", [new Compound(
    "==", [deref(actual.args[0]), "end_of_file"]), new Compound(
    ".", [new Compound("$CUT", [deref(display[0])]), cont
    ])]))}, 0, undefined), new Clause(1, [0, 0], function(
    display, actual, cont) {return(new Compound(".", [new Compound( "expand_include", [deref(actual.args[0]), deref(actual.args[1]
    ), display[0] = new Variable()]), new Compound(".",
    [new Compound("handle_term", [deref(display[0])]), new Compound(
    ".", ["fail", cont])])]))}, -1, undefined)]);

    add("next_term", 1, new Clause(2, [0], function(display, actual,
    cont) {return(new Compound(".", [new Compound("read_term", [deref(actual.args[0]), display[0] = new Variable(),
    new Compound(".", [new Compound("variable_names", [
    display[1] = new Variable()]), "[]"])]), new Compound(
    ".", [new Compound(alt4, [deref(display[0]), deref(
    display[1])]), cont])]))}, -1, undefined));
    <snip>

    Please don't show us unreadable code.

    John

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mostowski Collapse@21:1/5 to Mostowski Collapse on Thu Sep 23 09:39:52 2021
    That I get censored on Python pipermail, is possibly an
    out burst of taking Python too literal, like here:

    Monty Python - She's a witch!
    https://www.youtube.com/watch?v=zrzMhU_4m-g

    But we can turn this into a FLiP, a Logical Framework in Python exercise:

    "There are ways of telling whether she's a witch."
    "What do you do with witches?" "Burn them!"
    Ax.(Witch(x) -> Burn(x)) (1) Given
    "Why do witches burn?" "'Cause they're made of wood!"
    Ax.(Wood(x) -> Witch(x)) (2) Given
    "How do we tell if she's made of wood?" "Does wood sink in water?" "It floats!" Ax.(Floats(x) -> Wood(x)) (3) Given
    "What also floats in water?" "A duck!"
    Floats(duck) (4) Given
    "Exactly! So, logically ..."
    "If she weights the same as a duck, she's made of wood!"
    Ax.Ay.((Floats(x) & (weight(x) = weight(y))) -> Floats(y)) (5) Given
    "We shall use my largest scales. ... Remove the supports!"
    weight(duck) = weight(girl) (6) Given
    Ay.((Floats(duck) & (weight(duck) = weight(y))) -> Floats(y)) (7) A-Elimination (5)
    (Floats(duck) & (weight(duck) = weight(girl))) -> Floats(girl) (8) A-Elimination (7)
    Floats(duck) & (weight(duck) = weight(girl)) (9) And-Introduction (4) (6) Floats(girl) (10) Implication-Elimination (Modus Ponens) (8) (9) Floats(girl) -> Wood(girl) (11) A-Elimination (3)
    Wood(girl) (12) Implication-Elimination (Modus Ponens) (11) (10) "A witch! A witch!"
    Wood(girl) -> Witch(girl) (13) A-Elimination (2)
    Witch(girl) (14) Implication-Elimination (Modus Ponens) (13) (12) "Burn her! Burn!"
    Witch(girl) -> Burn(girl) (15) A-Elimination (1)
    Burn(girl) (16) Implication-Elimination (Modus Ponens) (15) (14) http://staff.washington.edu/jon/flip/www/witch.html

    Mostowski Collapse schrieb am Donnerstag, 23. September 2021 um 18:19:53 UTC+2:
    A nice project could now be to redo this one,
    see how the prover would perform:

    FLiP, a Logical Framework in Python http://staff.washington.edu/jon/flip/www/index.html

    The prover is listed here:

    Proof checkers - Joseph Vidal-Rosset https://www.vidal-rosset.net/proof_checkers.html

    Ha Ha, the prover was just right in front of my nose
    all the time. But before venturing into such a quest,
    need to add occurs check to the Dogelog runtime.

    I had some very good dynamic optimization for
    occurs check in Jekejeke Prolog, but for Dogelog
    runtime everything is new, need to figure out what

    optimizations could be applied there. There is a ticket
    for occurs check already on GitHub:

    Bring occurs check to Dogelog runtime #143 https://github.com/jburse/dogelog-moon/issues/143
    Mostowski Collapse schrieb am Dienstag, 21. September 2021 um 00:16:38 UTC+2:
    Woa! There is some competition for JavaScript and
    node.exe. PyPy is faster! Faster than GraalVM. Now
    I get for my usual Python benchmark, figures in
    milliseconds:

    Standard GraalVM PyPy
    170'996 28'523 9'755

    Not bad. Only like 2x times slower than node.exe.
    Now imaging I can realize the ast.parse() and
    compile() idea as well! (Made an experiment
    today, testing some corner with evaluation)

    BTW: Here the full results. Was using:
    pypy3.7-v7.3.5-win64\pypy3.exe

    Test Standard GraalVM PyPy
    nrev 20'389 3'611 1'254
    crypt 17'103 3'248 960
    deriv 20'808 3'111 1'250
    poly 17'518 3'045 1'149
    qsort 20'191 3'243 1'127
    tictac 13'761 2'469 783
    queens 17'691 3'242 1'024
    query 6'161 1'155 313
    mtak 17'209 2'300 907
    perfect 20'165 3'099 988
    calc N/A N/A N/A
    Total 170'996 28'523 9'755
    Mostowski Collapse schrieb am Montag, 20. September 2021 um 20:04:42 UTC+2:
    Its not supposed to be readable. Its machine generated.
    John Harris schrieb am Montag, 20. September 2021 um 19:11:49 UTC+2:
    On 19/09/2021 21:28, Mostowski Collapse wrote:

    <snip>
    const alt4 = make_defined([new Clause(1, [0, 0], function(
    display, actual, cont) {return(new Compound(".", [new Compound(
    "==", [deref(actual.args[0]), "end_of_file"]), new Compound(
    ".", [new Compound("$CUT", [deref(display[0])]), cont
    ])]))}, 0, undefined), new Clause(1, [0, 0], function(
    display, actual, cont) {return(new Compound(".", [new Compound( "expand_include", [deref(actual.args[0]), deref(actual.args[1]
    ), display[0] = new Variable()]), new Compound(".",
    [new Compound("handle_term", [deref(display[0])]), new Compound(
    ".", ["fail", cont])])]))}, -1, undefined)]);

    add("next_term", 1, new Clause(2, [0], function(display, actual, cont) {return(new Compound(".", [new Compound("read_term", [deref(actual.args[0]), display[0] = new Variable(),
    new Compound(".", [new Compound("variable_names", [
    display[1] = new Variable()]), "[]"])]), new Compound(
    ".", [new Compound(alt4, [deref(display[0]), deref(
    display[1])]), cont])]))}, -1, undefined));
    <snip>

    Please don't show us unreadable code.

    John

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mostowski Collapse@21:1/5 to Mostowski Collapse on Thu Sep 23 09:19:48 2021
    A nice project could now be to redo this one,
    see how the prover would perform:

    FLiP, a Logical Framework in Python http://staff.washington.edu/jon/flip/www/index.html

    The prover is listed here:

    Proof checkers - Joseph Vidal-Rosset https://www.vidal-rosset.net/proof_checkers.html

    Ha Ha, the prover was just right in front of my nose
    all the time. But before venturing into such a quest,
    need to add occurs check to the Dogelog runtime.

    I had some very good dynamic optimization for
    occurs check in Jekejeke Prolog, but for Dogelog
    runtime everything is new, need to figure out what

    optimizations could be applied there. There is a ticket
    for occurs check already on GitHub:

    Bring occurs check to Dogelog runtime #143 https://github.com/jburse/dogelog-moon/issues/143

    Mostowski Collapse schrieb am Dienstag, 21. September 2021 um 00:16:38 UTC+2:
    Woa! There is some competition for JavaScript and
    node.exe. PyPy is faster! Faster than GraalVM. Now
    I get for my usual Python benchmark, figures in
    milliseconds:

    Standard GraalVM PyPy
    170'996 28'523 9'755

    Not bad. Only like 2x times slower than node.exe.
    Now imaging I can realize the ast.parse() and
    compile() idea as well! (Made an experiment
    today, testing some corner with evaluation)

    BTW: Here the full results. Was using:
    pypy3.7-v7.3.5-win64\pypy3.exe

    Test Standard GraalVM PyPy
    nrev 20'389 3'611 1'254
    crypt 17'103 3'248 960
    deriv 20'808 3'111 1'250
    poly 17'518 3'045 1'149
    qsort 20'191 3'243 1'127
    tictac 13'761 2'469 783
    queens 17'691 3'242 1'024
    query 6'161 1'155 313
    mtak 17'209 2'300 907
    perfect 20'165 3'099 988
    calc N/A N/A N/A
    Total 170'996 28'523 9'755
    Mostowski Collapse schrieb am Montag, 20. September 2021 um 20:04:42 UTC+2:
    Its not supposed to be readable. Its machine generated.
    John Harris schrieb am Montag, 20. September 2021 um 19:11:49 UTC+2:
    On 19/09/2021 21:28, Mostowski Collapse wrote:

    <snip>
    const alt4 = make_defined([new Clause(1, [0, 0], function(
    display, actual, cont) {return(new Compound(".", [new Compound(
    "==", [deref(actual.args[0]), "end_of_file"]), new Compound(
    ".", [new Compound("$CUT", [deref(display[0])]), cont
    ])]))}, 0, undefined), new Clause(1, [0, 0], function(
    display, actual, cont) {return(new Compound(".", [new Compound( "expand_include", [deref(actual.args[0]), deref(actual.args[1]
    ), display[0] = new Variable()]), new Compound(".",
    [new Compound("handle_term", [deref(display[0])]), new Compound(
    ".", ["fail", cont])])]))}, -1, undefined)]);

    add("next_term", 1, new Clause(2, [0], function(display, actual,
    cont) {return(new Compound(".", [new Compound("read_term", [deref(actual.args[0]), display[0] = new Variable(),
    new Compound(".", [new Compound("variable_names", [
    display[1] = new Variable()]), "[]"])]), new Compound(
    ".", [new Compound(alt4, [deref(display[0]), deref(
    display[1])]), cont])]))}, -1, undefined));
    <snip>

    Please don't show us unreadable code.

    John

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mostowski Collapse@21:1/5 to Mostowski Collapse on Fri Sep 24 06:19:04 2021
    In reference to: https://groups.google.com/g/comp.lang.python/c/-F7dLYmN9sM/m/lN1rwbIgAgAJ

    Mark Lawrence is also not visible on pipermail? Ha Ha, thats
    the problem with this censoring, its like cherry picking, allmost
    like the aledged organ trade in republic of china, We now

    have the case that somebody picked up some link via another
    Python channel, like the uncensored google groups, but on the
    pipermail channel even the original link is not visible.

    The annoying thing nowadays, you don't get an email anymore
    that tells you "We are sorry, but we have banned you", this would
    be too flattering and possibly make you famous, it all works now

    under the hood as reported here:

    What Are Shadowbans?
    Shadowbans block a user or individual pieces of content
    without letting the offending user know they’ve been blocked. https://builtin.com/marketing/shadowban

    I must admit, I have applauded when Donald Trump was
    banned from twitter, but this "management" of programming
    language groups gets ridiculous.

    Mostowski Collapse schrieb am Donnerstag, 23. September 2021 um 18:39:58 UTC+2:
    That I get censored on Python pipermail, is possibly an
    out burst of taking Python too literal, like here:

    Monty Python - She's a witch!
    https://www.youtube.com/watch?v=zrzMhU_4m-g

    But we can turn this into a FLiP, a Logical Framework in Python exercise:

    "There are ways of telling whether she's a witch."
    "What do you do with witches?" "Burn them!"
    Ax.(Witch(x) -> Burn(x)) (1) Given
    "Why do witches burn?" "'Cause they're made of wood!"
    Ax.(Wood(x) -> Witch(x)) (2) Given
    "How do we tell if she's made of wood?" "Does wood sink in water?" "It floats!"
    Ax.(Floats(x) -> Wood(x)) (3) Given
    "What also floats in water?" "A duck!"
    Floats(duck) (4) Given
    "Exactly! So, logically ..."
    "If she weights the same as a duck, she's made of wood!"
    Ax.Ay.((Floats(x) & (weight(x) = weight(y))) -> Floats(y)) (5) Given
    "We shall use my largest scales. ... Remove the supports!"
    weight(duck) = weight(girl) (6) Given
    Ay.((Floats(duck) & (weight(duck) = weight(y))) -> Floats(y)) (7) A-Elimination (5)
    (Floats(duck) & (weight(duck) = weight(girl))) -> Floats(girl) (8) A-Elimination (7)
    Floats(duck) & (weight(duck) = weight(girl)) (9) And-Introduction (4) (6) Floats(girl) (10) Implication-Elimination (Modus Ponens) (8) (9) Floats(girl) -> Wood(girl) (11) A-Elimination (3)
    Wood(girl) (12) Implication-Elimination (Modus Ponens) (11) (10)
    "A witch! A witch!"
    Wood(girl) -> Witch(girl) (13) A-Elimination (2)
    Witch(girl) (14) Implication-Elimination (Modus Ponens) (13) (12)
    "Burn her! Burn!"
    Witch(girl) -> Burn(girl) (15) A-Elimination (1)
    Burn(girl) (16) Implication-Elimination (Modus Ponens) (15) (14) http://staff.washington.edu/jon/flip/www/witch.html
    Mostowski Collapse schrieb am Donnerstag, 23. September 2021 um 18:19:53 UTC+2:
    A nice project could now be to redo this one,
    see how the prover would perform:

    FLiP, a Logical Framework in Python http://staff.washington.edu/jon/flip/www/index.html

    The prover is listed here:

    Proof checkers - Joseph Vidal-Rosset https://www.vidal-rosset.net/proof_checkers.html

    Ha Ha, the prover was just right in front of my nose
    all the time. But before venturing into such a quest,
    need to add occurs check to the Dogelog runtime.

    I had some very good dynamic optimization for
    occurs check in Jekejeke Prolog, but for Dogelog
    runtime everything is new, need to figure out what

    optimizations could be applied there. There is a ticket
    for occurs check already on GitHub:

    Bring occurs check to Dogelog runtime #143 https://github.com/jburse/dogelog-moon/issues/143
    Mostowski Collapse schrieb am Dienstag, 21. September 2021 um 00:16:38 UTC+2:
    Woa! There is some competition for JavaScript and
    node.exe. PyPy is faster! Faster than GraalVM. Now
    I get for my usual Python benchmark, figures in
    milliseconds:

    Standard GraalVM PyPy
    170'996 28'523 9'755

    Not bad. Only like 2x times slower than node.exe.
    Now imaging I can realize the ast.parse() and
    compile() idea as well! (Made an experiment
    today, testing some corner with evaluation)

    BTW: Here the full results. Was using:
    pypy3.7-v7.3.5-win64\pypy3.exe

    Test Standard GraalVM PyPy
    nrev 20'389 3'611 1'254
    crypt 17'103 3'248 960
    deriv 20'808 3'111 1'250
    poly 17'518 3'045 1'149
    qsort 20'191 3'243 1'127
    tictac 13'761 2'469 783
    queens 17'691 3'242 1'024
    query 6'161 1'155 313
    mtak 17'209 2'300 907
    perfect 20'165 3'099 988
    calc N/A N/A N/A
    Total 170'996 28'523 9'755
    Mostowski Collapse schrieb am Montag, 20. September 2021 um 20:04:42 UTC+2:
    Its not supposed to be readable. Its machine generated.
    John Harris schrieb am Montag, 20. September 2021 um 19:11:49 UTC+2:
    On 19/09/2021 21:28, Mostowski Collapse wrote:

    <snip>
    const alt4 = make_defined([new Clause(1, [0, 0], function( display, actual, cont) {return(new Compound(".", [new Compound( "==", [deref(actual.args[0]), "end_of_file"]), new Compound(
    ".", [new Compound("$CUT", [deref(display[0])]), cont
    ])]))}, 0, undefined), new Clause(1, [0, 0], function(
    display, actual, cont) {return(new Compound(".", [new Compound( "expand_include", [deref(actual.args[0]), deref(actual.args[1]
    ), display[0] = new Variable()]), new Compound(".",
    [new Compound("handle_term", [deref(display[0])]), new Compound( ".", ["fail", cont])])]))}, -1, undefined)]);

    add("next_term", 1, new Clause(2, [0], function(display, actual, cont) {return(new Compound(".", [new Compound("read_term", [deref(actual.args[0]), display[0] = new Variable(),
    new Compound(".", [new Compound("variable_names", [
    display[1] = new Variable()]), "[]"])]), new Compound(
    ".", [new Compound(alt4, [deref(display[0]), deref(
    display[1])]), cont])]))}, -1, undefined));
    <snip>

    Please don't show us unreadable code.

    John

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)