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

2021-08-19 Thread Mostowski Collapse
Thats a factor 37.8 faster! I tested the a variant of the Albufeira instructions Prolog VM aka ZIP, which was also the inspiration for SWI-Prolog. Open Source: The Python Version of the Dogelog Runtime https://github.com/jburse/dogelog-moon/tree/main/devel/runtimepy The Python Test Harness http

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 N//2

Re: what to do with multiple BOMs

2021-08-19 Thread Richard Damon
By the rules of Unicode, that character, if not the very first character of the file, should be treated as a “zero-width non-breaking space”, it is NOT a BOM character there. It’s presence in the files is almost certainly an error, and being caused by broken software or software processing file

Re: what to do with multiple BOMs

2021-08-19 Thread MRAB
On 2021-08-19 14:07, Robin Becker wrote: Channeling unicode text experts and xml people: I have xml entity with initial bytes ff fe ff fe which the file command says is UTF-16, little-endian text. I agree, but what should be done about the additional BOM. A test output made many years ago seem

Re: some problems for an introductory python test

2021-08-19 Thread Hope Rouselle
Chris Angelico writes: > On Tue, Aug 17, 2021 at 3:51 AM Hope Rouselle > wrote: >> >> Chris Angelico writes: >> >> Wow, I kinda feel the same as you here. I think this justifies >> >> perhaps >> >> using a hardware solution. (Crazy idea?! Lol.) >> > >> > uhhh Yes. Very crazy idea. Can

Re: on perhaps unloading modules?

2021-08-19 Thread Hope Rouselle
Martin Di Paola writes: > This may not answer your question but it may provide an alternative > solution. > > I had the same challenge that you an year ago so may be my solution will > work for you too. > > Imagine that you have a Markdown file that *documents* the expected > results. > > This

Re: on perhaps unloading modules?

2021-08-19 Thread Hope Rouselle
Chris Angelico writes: > On Tue, Aug 17, 2021 at 4:02 AM Greg Ewing > wrote: >> The second best way would be to not use import_module, but to >> exec() the student's code. That way you don't create an entry in >> sys.modules and don't have to worry about somehow unloading the >> module. > > I wo

what to do with multiple BOMs

2021-08-19 Thread Robin Becker
Channeling unicode text experts and xml people: I have xml entity with initial bytes ff fe ff fe which the file command says is UTF-16, little-endian text. I agree, but what should be done about the additional BOM. A test output made many years ago seems to keep the extra BOM. The xml context