Replies: 8 comments 5 replies
-
I tend to be skeptical of tabling and that's why I haven't put much effort into it. Maybe because all the promotional examples i've seen just take naively written Prolog and make it seemingly efficient, whereas a better implementation in Prolog will be even faster. For example naive Finonacci:
... don't even bother trying to run fib(2000,F) with it. vs. well written:
which is much faster than the tabled version (about 10s on my machine). Maybe there are compelling use-cases for tabling though. |
Beta Was this translation helpful? Give feedback.
-
So, I did some "software archaeology", I compiled "Feb 29, 2024" v0.9.4 from the Releases: https://github.com/mthom/scryer-prolog/archive/refs/tags/v0.9.4.zip And with "my" naive, but tabled version, I have my futuristic number back:
I hate numbers, and it's not 0.008 s, but with a naive Fibonacci program, isn't it beautiful, in itself? :-) |
Beta Was this translation helpful? Give feedback.
-
And, for example, using a naive Fibonacci definition in/with Racket:
As I see it, provocatively, of course, there is some future for more declarative/direct definitions; in Prolog, or elsewhere. |
Beta Was this translation helpful? Give feedback.
-
Oh, mea culpa... at least for
And with But, I'm not saying that tabling with |
Beta Was this translation helpful? Give feedback.
-
What's the secret sauce with Datalog, auto-memoization? |
Beta Was this translation helpful? Give feedback.
-
With an example from here: Where I changed
But with
|
Beta Was this translation helpful? Give feedback.
-
Now with I can do |
Beta Was this translation helpful? Give feedback.
-
Tabling news! :-) Markus @triska fixed another problem e74f05a Now, at least at this moment it seems to me, Thank you very much. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
“[T]hat is why I am a mathematician, I hate numbers.” in The Story of COMAL [a programming language] told by Børge Christensen
Not a mathematician, but I know something about hating numbers and yet seeing something very interesting, important and beautiful in things like category theory.
Today, in my computer, I found a file
fib.pl
with this text:I fell in love with a modern Prolog, and especially with Scryer, because of https://github.com/triska/the-power-of-prolog
Because of
pio
andclpz
library. Because of definite clause grammars;dif/2
& the bi-directional company…Because strings are lists of characters, not numbers. Because Scryer was fast and memory consumption great (small) in context of my own (strings/text) computations. Because I’m a naive programmer: almost a non-programmer, and Scryer was so friendly to me.
And when I learned about tabling, I loved Scryer even more.
fib(2000,F).
The love letter. The F as 418 numbers/characters I loved.Sometimes, I want to go back, to the future.
Beta Was this translation helpful? Give feedback.
All reactions