It becomes more and more evident that the Logtalk transpiler
is utter nonsense. Because it doesn't solve the dynamic meta
space problem so well. In Dogelog runtime I have now proof
that it is possible to have a dynamic meta space mostly
written in Prolog itself dealing with both static predicates and
dynamic predicates access and modification. I also use transpiler
technology, bot only for bootstrapping a small part of the
Prolog systems. Unfortunately Dogelog runtime is not yet
object oriented. So there is no proof of concept yet, that
we can do a dynamic meta space for an object oriented
Prolog system as well. But I am working on it. So big question
is, am I yet allowed to call Logtalk nonsense?
As usual SWI-Prolog discourse does censor my "nonsense".
So they have not yet grown up? Well there are also only
like 3 participants now on SWI-Prolog discourse. LoL
Maybe if they would allow the word "nonsense" they would
have a larger crowd? One discourse that is quite active, is users.rust-lang.org, they have so many posts each day, I
cannot keep up in any way. Thats nearly impossible, so if I
am lucky I randomly pick up something interesting. And it
seems they don't censor "nonsense", there are currently:
50+ results for nonsense
https://users.rust-lang.org/search?q=nonsense
LAMO!
Mostowski Collapse schrieb am Donnerstag, 9. September 2021 um 14:48:08 UTC+2:
It becomes more and more evident that the Logtalk transpiler
is utter nonsense. Because it doesn't solve the dynamic meta
space problem so well. In Dogelog runtime I have now proof
that it is possible to have a dynamic meta space mostly
written in Prolog itself dealing with both static predicates and
dynamic predicates access and modification. I also use transpiler
technology, bot only for bootstrapping a small part of the
Prolog systems. Unfortunately Dogelog runtime is not yet
object oriented. So there is no proof of concept yet, that
we can do a dynamic meta space for an object oriented
Prolog system as well. But I am working on it. So big question
is, am I yet allowed to call Logtalk nonsense?
As usual SWI-Prolog discourse does censor my "nonsense".
So they have not yet grown up? Well there are also only
like 3 participants now on SWI-Prolog discourse. LoL
Maybe if they would allow the word "nonsense" they would
have a larger crowd? One discourse that is quite active, is users.rust-lang.org, they have so many posts each day, I
cannot keep up in any way. Thats nearly impossible, so if I
am lucky I randomly pick up something interesting. And it
seems they don't censor "nonsense", there are currently:
50+ results for nonsense
https://users.rust-lang.org/search?q=nonsense
LAMO!
Mostowski Collapse schrieb am Donnerstag, 9. September 2021 um 14:48:08 UTC+2:
It becomes more and more evident that the Logtalk transpiler
is utter nonsense. Because it doesn't solve the dynamic meta
space problem so well. In Dogelog runtime I have now proof
that it is possible to have a dynamic meta space mostly
written in Prolog itself dealing with both static predicates and
dynamic predicates access and modification. I also use transpiler
technology, bot only for bootstrapping a small part of the
Prolog systems. Unfortunately Dogelog runtime is not yet
object oriented. So there is no proof of concept yet, that
we can do a dynamic meta space for an object oriented
Prolog system as well. But I am working on it. So big question
is, am I yet allowed to call Logtalk nonsense?
Logtalk nonsense can always be topped by other Logtalk
nonsense. Interesting test case:
test(lgt_unbounded_sqrt_01, error(evaluation_error(float_overflow))) :-
_ is sqrt(7^7^7).
How long does it take to compute 7^7^7 in Trealla?
?- time(_ is 7^7^7).
Time elapsed 0,325 secs
true.
How long does it take in SWI-Prolog:
?- time(_ is 7^7^7).
% 1 inferences, 0.013 CPU in 0.014 seconds (87% CPU, 79 Lips)
true.
LoL
Mostowski Collapse schrieb am Freitag, 10. September 2021 um 11:24:40 UTC+2:
I wonder how Logtalk runs test cases towards it back-ends. For
example the Trealla back-end. Please Logtalk nonsense try this:
% echo $LANG
de_CH.UTF-8
% trealla/tpl
Trealla Prolog (c) Infradig 2020-2021, v1.13.4-2-g266e8
?- X is float(30000000000000)-30000000000000000.
X = -2.0,997e+16.
?- X = -2.0,997e+16.
Error: syntax error parsing number, line 0, ''
LoL
I wonder how Logtalk runs test cases towards it back-ends. For
example the Trealla back-end. Please Logtalk nonsense try this:
% echo $LANG
de_CH.UTF-8
% trealla/tpl
Trealla Prolog (c) Infradig 2020-2021, v1.13.4-2-g266e8
?- X is float(30000000000000)-30000000000000000.
X = -2.0,997e+16.
?- X = -2.0,997e+16.
Error: syntax error parsing number, line 0, ''
LoL
Here is an easier test case for overflow. If you know IEEE floats
a little bit, and your Prolog system provides them, try this:
In Trealla, yeah the float display bug is gone:
Trealla Prolog (c) Infradig 2020-2021, v1.13.5-1-g36f32
?- X is float(1<<1023).
X = 8.98846567431158e+307.
?- X is float(1<<1024).
uncaught exception: error(evaluation_error(float_overflow),float/1)
true.
Unfortunately there is still a parsing error:
?- X = 8.98846567431158e+307.
Error: syntax error parsing number, line 0, ''
true.
So cannot close this ticket.
The Logtalk nonsense with 7^7^7 is from here: https://github.com/LogtalkDotOrg/logtalk3/blob/09e996f53e561e8f2cfacb7ccf73562a60d319e9/tests/prolog/unbounded/tests.lgt#L260
I would expect testing parsing/unparsing before testing overflow.
Mostowski Collapse schrieb am Samstag, 11. September 2021 um 02:53:31 UTC+2:
Logtalk nonsense can always be topped by other Logtalk
nonsense. Interesting test case:
test(lgt_unbounded_sqrt_01, error(evaluation_error(float_overflow))) :-
_ is sqrt(7^7^7).
How long does it take to compute 7^7^7 in Trealla?
?- time(_ is 7^7^7).
Time elapsed 0,325 secs
true.
How long does it take in SWI-Prolog:
?- time(_ is 7^7^7).
% 1 inferences, 0.013 CPU in 0.014 seconds (87% CPU, 79 Lips)
true.
LoL
Mostowski Collapse schrieb am Freitag, 10. September 2021 um 11:24:40 UTC+2:
I wonder how Logtalk runs test cases towards it back-ends. For
example the Trealla back-end. Please Logtalk nonsense try this:
% echo $LANG
de_CH.UTF-8
% trealla/tpl
Trealla Prolog (c) Infradig 2020-2021, v1.13.4-2-g266e8
?- X is float(30000000000000)-30000000000000000.
X = -2.0,997e+16.
?- X = -2.0,997e+16.
Error: syntax error parsing number, line 0, ''
LoL
Logtalk nonsense can always be topped by other Logtalk
nonsense. Interesting test case:
test(lgt_unbounded_sqrt_01, error(evaluation_error(float_overflow))) :-
_ is sqrt(7^7^7).
How long does it take to compute 7^7^7 in Trealla?
?- time(_ is 7^7^7).
Time elapsed 0,325 secs
true.
How long does it take in SWI-Prolog:
?- time(_ is 7^7^7).
% 1 inferences, 0.013 CPU in 0.014 seconds (87% CPU, 79 Lips)
true.
LoL
Mostowski Collapse schrieb am Freitag, 10. September 2021 um 11:24:40 UTC+2:
I wonder how Logtalk runs test cases towards it back-ends. For
example the Trealla back-end. Please Logtalk nonsense try this:
% echo $LANG
de_CH.UTF-8
% trealla/tpl
Trealla Prolog (c) Infradig 2020-2021, v1.13.4-2-g266e8
?- X is float(30000000000000)-30000000000000000.
X = -2.0,997e+16.
?- X = -2.0,997e+16.
Error: syntax error parsing number, line 0, ''
LoL
Interesting find the Chrome JavaScript arithmetic is quite
fast, it is between Traella and SWI-Prolog. I get:
Dogelog Runtime, Prolog to the Moon, 0.9.5
?- time(_ is 7^7^7).
% Wall 36 ms, trim 0 ms
https://www.dogelog.ch/
And as a bonus I can also display it, using X is 7^7^7 instead
of _ is 7^7^7. Using the browser as output is quite robust. On the
other hand, the Mac Console for SWI-Prolog crashes on my side:
The Dogelog Runtime can compute 7^7^7 quite fast AND can display it: https://gist.github.com/jburse/f4e774ebb15cac722238b26b1a620f84#gistcomment-3889281
SWI-Prolog can compute 7^7^7 ultra fast but CANNOT display it: https://gist.github.com/jburse/f4e774ebb15cac722238b26b1a620f84#gistcomment-3889282
Mostowski Collapse schrieb am Samstag, 11. September 2021 um 02:53:31 UTC+2:
Logtalk nonsense can always be topped by other Logtalk
nonsense. Interesting test case:
test(lgt_unbounded_sqrt_01, error(evaluation_error(float_overflow))) :-
_ is sqrt(7^7^7).
How long does it take to compute 7^7^7 in Trealla?
?- time(_ is 7^7^7).
Time elapsed 0,325 secs
true.
How long does it take in SWI-Prolog:
?- time(_ is 7^7^7).
% 1 inferences, 0.013 CPU in 0.014 seconds (87% CPU, 79 Lips)
true.
LoL
Mostowski Collapse schrieb am Freitag, 10. September 2021 um 11:24:40 UTC+2:
I wonder how Logtalk runs test cases towards it back-ends. For
example the Trealla back-end. Please Logtalk nonsense try this:
% echo $LANG
de_CH.UTF-8
% trealla/tpl
Trealla Prolog (c) Infradig 2020-2021, v1.13.4-2-g266e8
?- X is float(30000000000000)-30000000000000000.
X = -2.0,997e+16.
?- X = -2.0,997e+16.
Error: syntax error parsing number, line 0, ''
LoL
Ever seen Logtalk sandboxed? Ha Ha, it has so many loop
holes, you can just call whatever you want from the
target Prolog system, like for example exec('rm -R /'). On
the other hand Dogelog runtime is not a source to source
translator, but a dynamic Prolog system, it takes a Prolog
text and prepares it for execution from within a host
language. If the host language is a sandbox, like a browser
web page with JavaScript, it will execute there and
profit from the existing sandbox there. listing/[0,1] works
also, it will not show the world, only the user predicates
and user clauses. On the other hand listing/[0,1] in SWISH
is broken, this example doesn't work anymore for
some reasons. Maybe a form of bit rot?
listing(apple_stock_price/2).
Unknown procedure: apple_stock_price/2 (DWIM could not correct goal) https://swish.swi-prolog.org/example/data_source.swinb
Mostowski Collapse schrieb am Samstag, 11. September 2021 um 03:19:01 UTC+2:
Interesting find the Chrome JavaScript arithmetic is quite
fast, it is between Traella and SWI-Prolog. I get:
Dogelog Runtime, Prolog to the Moon, 0.9.5
?- time(_ is 7^7^7).
% Wall 36 ms, trim 0 ms
https://www.dogelog.ch/
And as a bonus I can also display it, using X is 7^7^7 instead
of _ is 7^7^7. Using the browser as output is quite robust. On the
other hand, the Mac Console for SWI-Prolog crashes on my side:
The Dogelog Runtime can compute 7^7^7 quite fast AND can display it: https://gist.github.com/jburse/f4e774ebb15cac722238b26b1a620f84#gistcomment-3889281
SWI-Prolog can compute 7^7^7 ultra fast but CANNOT display it: https://gist.github.com/jburse/f4e774ebb15cac722238b26b1a620f84#gistcomment-3889282
Mostowski Collapse schrieb am Samstag, 11. September 2021 um 02:53:31 UTC+2:
Logtalk nonsense can always be topped by other Logtalk
nonsense. Interesting test case:
test(lgt_unbounded_sqrt_01, error(evaluation_error(float_overflow))) :-
_ is sqrt(7^7^7).
How long does it take to compute 7^7^7 in Trealla?
?- time(_ is 7^7^7).
Time elapsed 0,325 secs
true.
How long does it take in SWI-Prolog:
?- time(_ is 7^7^7).
% 1 inferences, 0.013 CPU in 0.014 seconds (87% CPU, 79 Lips)
true.
LoL
Mostowski Collapse schrieb am Freitag, 10. September 2021 um 11:24:40 UTC+2:
I wonder how Logtalk runs test cases towards it back-ends. For
example the Trealla back-end. Please Logtalk nonsense try this:
% echo $LANG
de_CH.UTF-8
% trealla/tpl
Trealla Prolog (c) Infradig 2020-2021, v1.13.4-2-g266e8
?- X is float(30000000000000)-30000000000000000.
X = -2.0,997e+16.
?- X = -2.0,997e+16.
Error: syntax error parsing number, line 0, ''
LoL
Future work
Arm–twist Prolog implementers for better
support for rational terms and tabling https://logtalk.org/papers/colp2012/coinduction_colp2012_slides.pdf
Ha Ha, LogNonsenseTalk at its best:
Future work
Arm–twist Prolog implementers for better
support for rational terms and tabling https://logtalk.org/papers/colp2012/coinduction_colp2012_slides.pdf
Ok, here is a suggestion. Propose a (@<)/2 for rational terms.
Then talk again.
(@<) can be useful for tabling tries. So I guess LogNonsenseTalk
work about co-induction was highly influenced by the following
seminal paper in logic programming dating back to the 70s:
How to Levitate
https://www.youtube.com/watch?v=z2I5J1ArmeM
LMAO!
Mostowski Collapse schrieb am Dienstag, 4. April 2023 um 10:05:18 UTC+2:
Ha Ha, LogNonsenseTalk at its best:
Future work
Arm–twist Prolog implementers for better
support for rational terms and tabling https://logtalk.org/papers/colp2012/coinduction_colp2012_slides.pdf
Ok, here is a suggestion. Propose a (@<)/2 for rational terms.
Then talk again.
Other Levitating experts on the scene: Ulrich Neumerkel
and Markus Triska. It is now the year 2023, and they
still discuss number_chars/3:
number_chars/2 sometimes yields wrong results https://github.com/mthom/scryer-prolog/issues/1773
Whereas their Scryer Prolog cannot do correctly
(@<) on rational trees aka cyclic terms. It even never
comes to their mind, to apply KISS principle
to the number_chars/3 problem, and instead
read the requirement for what number_chars/3
accepts to read it as "integer" where:
integer (* 6.4 *)
= [ layout text sequence (* 6.4.1 *) ] ,
integer token (* 6.4.4 *) ;
Why not simply strip down the relevant production
requirement for number_chars/3 "integer token" only,
or maybe something even simpler, and forget about
all the layout nonsense? Most programming languages
do it this way. Just checkout parseInteger() or parseFloat()
across languages such as Java, JavaScript, Python etc..
No language designer is so debilated to include in the integer
or float syntax layout or comments. This happens only when
you have Levitating experts on the scene.
LoL
Mostowski Collapse schrieb am Dienstag, 4. April 2023 um 10:10:56 UTC+2:
(@<) can be useful for tabling tries. So I guess LogNonsenseTalk
work about co-induction was highly influenced by the following
seminal paper in logic programming dating back to the 70s:
How to Levitate
https://www.youtube.com/watch?v=z2I5J1ArmeM
LMAO!
Mostowski Collapse schrieb am Dienstag, 4. April 2023 um 10:05:18 UTC+2:
Ha Ha, LogNonsenseTalk at its best:
Future work
Arm–twist Prolog implementers for better
support for rational terms and tabling https://logtalk.org/papers/colp2012/coinduction_colp2012_slides.pdf
Ok, here is a suggestion. Propose a (@<)/2 for rational terms.
Then talk again.
This blog post has a nice easter egg at the end. https://www.philipzucker.com/harrop-checkpoint/
Elaborating on it I get the following:
/* File comvars2.p */
:- op(1200, xfy, =>).
:- op(1150, fx, hypo).
term_expansion((:- hypo(F/N)), (H :- shift(in(H)))) :-
functor(H, F, N).
(A => B) :-
reset(B, in(C), Cont),
(Cont == 0 -> true; (C = A; shift(in(C))), Cont).
Here is test case of embedded implication backtracking:
:- hypo p/1.
?- reset((p(1) => p(2) => p(X)), in(_), Cont), Cont==0.
X = 2,
Cont = 0 ;
X = 1,
Cont = 0 ;
false.
As a last note, thanks for all your publicity
on Logtalk. There's true in the saying that
there isn't such thing as bad publicity!
Ha Ha, twice nonsense doesn't give something Ok.
Now Logtalk has this implemention:
variant(Term1, Term2) :-
\+ \+ subsumes_term(Term1, Term2),
\+ \+ subsumes_term(Term2, Term1). https://github.com/LogtalkDotOrg/logtalk3/blob/master/library/types/term.lgt#L102
Spot the 2 errors. Here are the errors:
Error 1: There is no need for garbage collection \+ \+ in
subsumes_term/2. It does already undo its bindings.
Thats the difference between subsumes/2 and subsumes_term/2,
that subsumes_term/2 does not leave some bindings,
is only a test predicate.
See also here:
On success, the bindings are undone. https://www.swi-prolog.org/pldoc/man?predicate=subsumes_term/2
Error 2: According to Ulrich Neumerkels account
here this is only half correct. There is a copy_term/2
missing:
variant_correct(A, B) :-
copy_term(A, AC),
subsumes_term(AC, B),
subsumes_term(B, AC). https://www.complang.tuwien.ac.at/ulrich/iso-prolog/built-in_predicates
The Quintus Prolog User's Manual describes a method that predates
the idea of resource bundles, as found for example Java. It not only predates that idea, it also shows a different idea. It goes on:
"By default, generate_message/3 sends the
message term through the English message
generator, messages(’english/QU_messages’)."
The misery is then this advice:
To have all messages printed in another language, the basic steps are as follows
1. Take a copy of ‘QU_messages.pl’ and translate all the messages.
2. Test the translated ‘QU_messages.pl’ and then install it
in the Quintus Prolog directory hierarchy.
3. Install or re-install Quintus Prolog to get a version that uses the translated messages.
So there is no locale parameter in the runtime? And there is
no extension mechanism, you need to go into the system folders
and change them? And you cannot build applications, libraries
or systems that offer multiple languages, have bundled multiple
languages. Why, is there not enough memory on the disk
and in the RAM? LoL
Mild Shock schrieb am Freitag, 28. Juli 2023 um 13:58:06 UTC+2:
Thats probably the most brain damaged nonsense I
have ever seen. Whats the programming pattern?
Inverted control, which inverted again?
Printing messages and asking questions https://logtalk.org/manuals/userman/printing.html
Nobody uses such nonsense in practice. Neither
Python, nor JavaScript, provide something as absurd
as this "framework". Its kind of a perverted logging
framework, that lacks Internationalization/Localization.
And the bad news is, it goes really back to Quintus Prolog,
you find it here in this documentation:
Quintus Prolog User’s Manual https://quintus.sics.se/isl/quintus/pdf/quintus.pdf
But its not something that somebody would use in a
modern application. The most horrible section in the
Quintus Prolog User's Manual is the idea to
translate DCG. What can go wrong? You need to
understand the syntax and semantics of DCG to do that.
Ever found a translator that can massage DCGs?
Thats probably the most brain damaged nonsense I
have ever seen. Whats the programming pattern?
Inverted control, which inverted again?
Printing messages and asking questions https://logtalk.org/manuals/userman/printing.html
Nobody uses such nonsense in practice. Neither
Python, nor JavaScript, provide something as absurd
as this "framework". Its kind of a perverted logging
framework, that lacks Internationalization/Localization.
And the bad news is, it goes really back to Quintus Prolog,
you find it here in this documentation:
Quintus Prolog User’s Manual https://quintus.sics.se/isl/quintus/pdf/quintus.pdf
But its not something that somebody would use in a
modern application. The most horrible section in the
Quintus Prolog User's Manual is the idea to
translate DCG. What can go wrong? You need to
understand the syntax and semantics of DCG to do that.
Ever found a translator that can massage DCGs?
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 293 |
Nodes: | 16 (2 / 14) |
Uptime: | 221:02:20 |
Calls: | 6,623 |
Calls today: | 5 |
Files: | 12,171 |
Messages: | 5,318,040 |