Re: ANN: Dogelog Player 1.0.0

2022-07-29 Thread Mostowski Collapse
Sofar we have resisted in adding a Next or Abort button to any of our Dogelog Player HTML pages. Behind the lack of these buttons is a method of exploring sequence meta-predicates and what they could do for user interfaces. Here is a little new article about the topic: Enumerating Solutions with

Re: ANN: Dogelog, Invitation to the Moon!

2021-12-18 Thread Mostowski Collapse
ource code can be found. - Blogging: As an alternative to Gist, we are now reporting on medium.com/@janburse_2989 about the developments in the Dogelog player. We also use twitter.com/dogelogch and www.facebook.com/groups/dogelog for short messages. Have Fun! #StaySafe Jan Burse, 18.12.2021

Re: Get a Joke in Python

2021-10-28 Thread Mostowski Collapse
QA engineer walks into a bar. Orders a beer. Orders 0 beers. Orders 9 beers. Orders a lizard. Orders -1 beers. Orders a sfdeljknesv. LoL joel.d...@gmail.com schrieb am Mittwoch, 27. Oktober 2021 um 21:00:29 UTC+2: > Get a Joke in Python. Pyjokes - is a python library / module for one

Re: XML Considered Harmful

2021-09-24 Thread Mostowski Collapse
Or then use cryptographic methods to protect your XML file when in transit. Like encryption and/or signatures. Mostowski Collapse schrieb am Freitag, 24. September 2021 um 15:46:27 UTC+2: > BTW: I think its problematic to associate Java with XML. > Michael F. Stemper schrieb am Dienst

Re: XML Considered Harmful

2021-09-24 Thread Mostowski Collapse
BTW: I think its problematic to associate Java with XML. Michael F. Stemper schrieb am Dienstag, 21. September 2021 um 20:12:33 UTC+2: > On the prolog thread, somebody posted a link to: > The above linke is very old, from 2004, and might

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

2021-09-20 Thread Mostowski Collapse
and Python, both being dynamic programming languages. Mostowski Collapse schrieb am Montag, 20. September 2021 um 14:43:01 UTC+2: > Also I am not a C programmer. The last time I was programming C > was 30 years ago. I am mostly a Java programmer the recent years. > Dogelog Runtime ado

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

2021-09-20 Thread Mostowski Collapse
The sweep_trail() is not an issue. There must be a bottleneck somewhere else in Python. The sweep_trail() respectively the paremt call gc() only takes a very small fraction of the runtime: Check the "gc" timing, the bottleneck is somewhere else? Mostowski Collapse schrieb am F

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

2021-09-20 Thread Mostowski Collapse
wrong with the simgle linked list as it stands, since it has O(n) sweep_trail(). It uses a litte more storage than an array would do. Mostowski Collapse wrote: What would be maybe possible, is to scan the trail from the other side, and use a first pass to determine the new size, and use a second

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

2021-09-20 Thread Mostowski Collapse
. But sweep_trail() has nothing to do with freeing objects manually, its the anti-thesis to freeing objects manually, its a Prolog garbage collector after all! Mostowski Collapse schrieb am Montag, 20. September 2021 um 14:36:01 UTC+2: > The sweep_trail() is not an issue. There m

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

2021-09-20 Thread Mostowski Collapse
. If you don't clean up the trail, you exhaust the memory after a few minutes or seconds. Greg Ewing schrieb: On Mon, Sep 20, 2021 at 3:19 AM Mostowski Collapse wrote: On the other hand if I would use the trigger from Python, I possibly would need a double linked list, to remove an element

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

2021-09-20 Thread Mostowski Collapse
rail, since I dont see any utility in investing too much time with the Prolog garbage collection of Dogelog runtime. It is only a small share of the execution time: Mostowski Collapse schrieb am Freitag, 17. September 2021 um 10:58:57 U

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

2021-09-20 Thread Mostowski Collapse
. Mostowski Collapse schrieb am Sonntag, 19. September 2021 um 22:02:41 UTC+2: > Also I nowhere wrote that I would use doubly-linked list or > a set of objects. The trail is neither, its a single linked list. I > also refer directly to objects, I do not need the trail to refer >

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

2021-09-20 Thread Mostowski Collapse
ag, 20. September 2021 um 13:49:49 UTC+2: > On 2021-09-20 04:33:39 +1000, Chris Angelico wrote: > > On Mon, Sep 20, 2021 at 3:19 AM Mostowski Collapse > > wrote: > > > Question to Chris Angelico: If I stay with my > > > sweep_trail(), which is the periodical

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

2021-09-20 Thread Mostowski Collapse
ndas also builds a language on top of Python. > > Is there some pope that says this wouldn't be > allowed, I dont think so, otherwise sympy, pandas, etc.. > > wouldn't exist. I dont understand your argument. > > Chris Angelico schrieb: > > On Mon, Sep 20, 2021 at 3:

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

2021-09-20 Thread Mostowski Collapse
But I dont see any utility in investing too much time with the Prolog garbage collection of Dogelog runtime. It is only a small share of the execution time: Mostowski Collapse schrieb am Freitag, 17. September 2021 um 10:58:57 UTC+2

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

2021-09-20 Thread Mostowski Collapse
at 3:19 AM Mostowski Collapse wrote: I am refering to: Greg Ewing schrieb: > where [w] is a weak reference object. Then you could periodically > scan the trail looking for dead weakref objects and remove the > corresponding [*] node from the list. > > You can also a

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

2021-09-19 Thread Mostowski Collapse
goal invocations, that didn't record a choice point. The Prolog garbage collection can compact the trail before backjumping happens. So that Prolog search has more space available. Mostowski Collapse schrieb am Sonntag, 19. September 2021 um 10:51:03 UTC+2: > I am refering to: > > G

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

2021-09-19 Thread Mostowski Collapse
19, 2021 at 11:46 AM Mostowski Collapse wrote: Yeah, it seems weak references could indeed spare me mark_term(). But then I am stil left with sweep_trail(). I did not yet measure what takes more time mark_term() or sweep_trail(). The displayed "gc" is the sum of both. From what I have see

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

2021-09-18 Thread Mostowski Collapse
Ewing schrieb am Samstag, 18. September 2021 um 05:49:37 UTC+2: > On 17/09/21 7:56 am, Mostowski Collapse wrote: > > The trail in Dogelog > > Runtime is a single linked list: > > > > -->[ A ]-->[ B ]-->[ C ]--> > > > > Now if B becomes unu

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

2021-09-17 Thread Mostowski Collapse
lVM is now 7x times faster than Standard Python, so this is inconclusive. Mostowski Collapse schrieb am Freitag, 17. September 2021 um 10:58:57 UTC+2: > The Prolog garbage collection that does > the movement on the variable trail is only > a very small fraction of the runtime. >

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

2021-09-17 Thread Mostowski Collapse
some other Variable object or a local or a global Python variable, or a Compound. This is then all courtesy of the host language to decide reachability. Chris Angelico schrieb: On Fri, Sep 17, 2021 at 7:17 AM Mostowski Collapse wrote: About Exceptions: Thats just building ISO core standard Prolo

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

2021-09-17 Thread Mostowski Collapse
er GC rate. But I did not yet measure new version 0.9.6. Mostowski Collapse schrieb: No its cooperative. Usually objects do get garbage collected by the native garbage collector of the host language in Dogelog runtime. The Prolog garbage collection is only to help the host language garbage coll

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

2021-09-17 Thread Mostowski Collapse
s in Python cheap or expensive? Are they like in Java, some code annotation, or like in Go programming language pushing some panic handler? Greg Ewing schrieb: On 16/09/21 4:23 am, Mostowski Collapse wrote: I really wonder why my Python implementation is a factor 40 slower than my JavaScript implemen

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

2021-09-16 Thread Mostowski Collapse
ations from a more primitive language. > -Original Message- > From: Python-list On > Behalf Of Mostowski Collapse > Sent: Thursday, September 16, 2021 3:59 PM > To: pytho...@python.org > Subject: Re: ANN: Dogelog Runtime, Prolog to the Moon (2021) > > Here is a chall

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

2021-09-16 Thread Mostowski Collapse
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 Donnerstag, 16. September 2021 um 21:59:05 UTC+2: > Here is a challenge for Python. > Can Python solve

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

2021-09-16 Thread Mostowski Collapse
Here is a challenge for Python. Can Python solve Sudoku? Mostowski Collapse wrote: 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

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

2021-09-16 Thread Mostowski Collapse
to be able to adapt. Chris Angelico wrote: On Fri, Sep 17, 2021 at 3:20 AM Mostowski Collapse wrote: Compound is not used for boxing. Integers and floats are represented directly. Also integers are not mapped to floats. But maybe compound could be a little flattened, "Boxing" in this c

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

2021-09-16 Thread Mostowski Collapse
ticles how they optimize access like .functor. Chris Angelico schrieb am Donnerstag, 16. September 2021 um 00:02:54 UTC+2: > On Thu, Sep 16, 2021 at 7:59 AM Mostowski Collapse wrote: > > > > BTW: I could already make it faster, by not repeatedly > > accessing .ar

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

2021-09-15 Thread Mostowski Collapse
ms, 328236 lips % Wall 33810 ms, gc 980 ms, 284108 lips DFS schrieb am Mittwoch, 15. September 2021 um 23:15:07 UTC+2: > On 9/15/2021 12:23 PM, Mostowski Collapse wrote: > > I really wonder why my Python implementation > > is a factor 40 slower than my JavaScript implementa

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

2021-09-15 Thread Mostowski Collapse
the Python GC. Or it was because my Laptop went into screen black? And throttled the CPU. Not sure. Mostowski Collapse schrieb am Mittwoch, 15. September 2021 um 23:13:12 UTC+2: > Ok you suggested: > >>>items = [1,2,3,4,5,6,7,8,9,0] > >>>for item in items[:-1]: > >>

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

2021-09-15 Thread Mostowski Collapse
print(x) ... a b >>> foo = ["a"] >>> for x in foo[:-1]: ... print(x) ... Oki Doki Mostowski Collapse schrieb am Mittwoch, 15. September 2021 um 23:10:50 UTC+2: > And how do you only iterate over n-1 elements? > I don't need a loop over all eleme

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

2021-09-15 Thread Mostowski Collapse
And how do you only iterate over n-1 elements? I don't need a loop over all elements. With array slicing? Someting like: for item in items[0:len(items)-2]: ___print(item) Or with negative slicing indexes? Problem is my length can be equal to one. And when I have length equal to one, the

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

2021-09-15 Thread Mostowski Collapse
But the end-result is still very weak: % Wall 33810 ms, gc 980 ms, 284108 lips This is below 1 million LIPS. The JavaScript version of Dogelog does currently around 2 million LIPS. And SWI-Prolog can do around 20 million LIPS. Mostowski Collapse schrieb am Mittwoch, 15. September 2021 um 23

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

2021-09-15 Thread Mostowski Collapse
What could be slow, repeatedly requesting the "args" field. Maybe I should do: help = term.args i = 0 while i < len(help) - 1: mark_term(help[i]) i += 1 term = help[i] Mostowski Collapse schrieb am Mittwoch, 15. September 2021 um 20:48:31 UTC+2: > And how do you iterate

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

2021-09-15 Thread Mostowski Collapse
the code. You need to make some cold runs before you see kicking it being fast. Mostowski Collapse schrieb am Mittwoch, 15. September 2021 um 20:48:31 UTC+2: > And how do you iterate over the first n-1 elements > of a list with n elements? This is what my code does: > i = 0 > while i <

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

2021-09-15 Thread Mostowski Collapse
uot;] >>> i = 0 >>> while i < len(foo) - 1: ... print("mark_term", foo[i]) ... i += 1 ... mark_term a mark_term b >>> foo = foo[i] >>> foo 'c' alister schrieb am Mittwoch, 15. September 2021 um 20:41:12 UTC+2: > On

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

2021-09-15 Thread Mostowski Collapse
There is a further problem with this: > for i,term in enumerate(term.args): > mark_term(term.args[i]) It should read: for i,help in enumerate(term.args): mark_term(help) But then i isn't need. Mostowski Collapse schrieb am Mittwoch, 15. September 2021 um 20:22:50 UTC+2: &g

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

2021-09-15 Thread Mostowski Collapse
Well I would be more than happy if an experienced programmer can fine tune my code. My programming experience in Python is only 4 weeks. Mostowski Collapse schrieb am Dienstag, 14. September 2021 um 14:56:35 UTC+2: > The test harness, test cases and individual > results for all test

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

2021-09-15 Thread Mostowski Collapse
ept for the last one one. alister schrieb am Mittwoch, 15. September 2021 um 20:17:23 UTC+2: > On Wed, 15 Sep 2021 18:23:10 +0200, Mostowski Collapse wrote: > > > I really wonder why my Python implementation is a factor 40 slower than > > my JavaScript implementation. > > Str

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

2021-09-15 Thread Mostowski Collapse
lue, then Python get() will probably be quite slow. Since usually exceptions are slow. Chris Angelico schrieb am Mittwoch, 15. September 2021 um 19:27:13 UTC+2: > On Thu, Sep 16, 2021 at 3:17 AM Mostowski Collapse > wrote: > > > > I really wonder why my Python implementat

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

2021-09-15 Thread Mostowski Collapse
it really first create an array of size 1 and then enlarge it? Julio Di Egidio wrote: On Wednesday, 15 September 2021 at 15:37:19 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

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

2021-09-15 Thread Mostowski Collapse
Oops "speed did never hurt anybody". Don't be evil, I am talking about unarmed drones. See also: Drone Programming With Python Course https://www.youtube.com/watch?v=LmEcyQnfpDA Mostowski Collapse schrieb: I am not testing this use-case. But a related use-case might highlight why

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

2021-09-15 Thread Mostowski Collapse
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

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

2021-09-14 Thread Mostowski Collapse
/f4e774ebb15cac722238b26b1a620f84#gistcomment-3890013 But this is all only a moment in time. The Prolog interpreter itself is evolving, and the programming languages also, so this is a moving target. Benchmark results will look different tomorrow. Mostowski Collapse wrote: I am testing a Prolog interpreter written in Python

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

2021-09-14 Thread Mostowski Collapse
results for all test cases are found here: And we could test GraalVM Python, results are from 14.09.2021, tested with Dogelog Runtime 0.9.5, Python Version: https://gist.github.com/jburse/f4e774ebb15cac722238b26b1a620f84#gistcomment-3892587 Terry Reedy wrote: On 9/13/2021 8:46 AM, Mostowski Collapse

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

2021-09-13 Thread Mostowski Collapse
://twitter.com/dogelogch/status/1437395917167112193 JDK 1.8 GraalVM Python is 6x faster than Standard Python https://www.facebook.com/groups/dogelog Mostowski Collapse schrieb: Yesterday we went into a little programming binge, despite there was a free parade in Zurich. We could now already implement

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

2021-09-02 Thread Mostowski Collapse
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

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

2021-08-26 Thread Mostowski Collapse
Having fun with a new attended query answerer for the Dogelog runtime. It can be bottled into a single Python file, no server roundtrip, just ISO core Prolog in one Python file, requires Python 3.10: >python.exe toplevel.py Dogelog Runtime, Prolog to the Moon, 0.9.3 (c) 1985-2021, XLOG

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

2021-08-23 Thread Mostowski Collapse
The world is getting ridiculous. termux seems to not anymore be supported by Google Play because of some Android 10 issues? On the other hand there is this gem: TI 84 Plus CE Python Edition Unboxing https://www.youtube.com/watch?v=LVxP_Fki8Fc LoL Mostowski Collapse schrieb: Yesterday we went

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

2021-08-20 Thread Mostowski Collapse
We = Me and my cat named socrates The cat is a very good programmer: def meow(): print("meow meow, Prolog is not only SWI-Prolog") Julio Di Egidio schrieb: On Sunday, 15 August 2021 at 14:43:42 UTC+2, Mostowski Collapse wrote: Yesterday we went into a little programming b

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

2021-08-19 Thread Mostowski Collapse
https://gist.github.com/jburse/bf6c01c7524f2611d606cb88983da9d6#file-test-py Mostowski Collapse schrieb: Woa! The JavaScript JIT compiler is quite impressive. I now ported Dogelog runtime to Python as well, so that I can compare JavaScript and Python, and tested without clause indexing: between(L

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

2021-08-19 Thread Mostowski Collapse
Woa! The JavaScript JIT compiler is quite impressive. I now ported Dogelog runtime to Python as well, so that I can compare JavaScript and Python, and tested without clause indexing: between(L,H,L) :- L =< H. between(L,H,X) :- L < H, Y is L+1, between(Y,H,X). setup :- between(1,255,N), M is

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

2021-08-16 Thread Mostowski Collapse
Yesterday we went into a little programming binge, despite there was a free parade in Zurich. We could now already implement a transpiler that targets Python. We simply took the transpiler main.p that targets JavaScript and moded it into a new transpiler mainpy.p that targets Python. The code is