126 karma · joined Jul 5, 2023 (3y ago) · 23 submissions
comment 5mo ago · link · parent
Repo is here if anyone wants to have a look: https://github.com/deosjr/unreal-talk
And a browser-based version can be found here: https://deosjr.github.io/dynamicland/live
comment 6mo ago · link · parent
comment 6mo ago · link · parent
So I forked the calculator and added a Prolog wrapper so I could find solutions to battles based on the team of Pokemon that I caught. https://github.com/deosjr/runbuncalc/blob/master/main.pl
My runs died pretty early, but there are some notes here as I was implementing that are fun to read. I implemented each battle as a test case and let my solver find a solution, then amended the plan and commented on what actually happened. For example: https://github.com/deosjr/runbuncalc/blob/master/run10.pl#L2...
comment 1y ago · link · parent
I've made a lot of progress recently working on my own homebrew version, running it in the browser in order to share it with people. Planning to take some time soon to take another stab at the real (physical) thing.
Progress so far: https://deosjr.github.io/dynamicland/
comment 1y ago · link · parent
I cycle between learning about scheme macro hygiene and implementing more and more realtalk/dynamicland demos and trying to grok the programming model. Doing this in the browser is a weird but fun constraint that makes things shareable.
My latest project is a wikipedia explorer: https://deosjr.github.io/dynamicland/wiki.html
comment 1y ago · link · parent
Latest on my project, in case you want to try it out: https://deosjr.github.io/dynamicland/whiskers.html
comment 1y ago · link · parent
If you thought this was cool, wait until you see what I ended up using it for: https://deosjr.github.io/dynamicland/ I personally think this is much cooler :) But it needs some more explaining before I can broadly share, I think.
Now that I have you here, a question: am I correct in thinking that in Hoot, eval in the browser does not currently work with macros?
comment 1y ago · link · parent
Coming from Prolog I'd like to get closer to the original if possible :)
comment 1y ago · link · parent
Should've probably been a bit more clear on the dl-find syntax; I find it just as unacceptable as you do. It is the result of laziness: my intended use of this minimal Datalog does not include any querying whatsoever but abuses fixpoint analysis for side-effects (see https://github.com/deosjr/deosjr.github.io/blob/master/dynam... which I intend to go over in a future post). I initially had it working like you described but butchered it for the above and haven't repaired it yet (see https://github.com/deosjr/whistle?tab=readme-ov-file#datalog). This version relied on some monstrous eval-hacking using a homebrew Lisp, which I've mostly cleaned up now in this version (https://github.com/deosjr/whistle/blob/main/datalog/datalog.... is a crime, for example).
The semantics are indeed limited to binary relations atm, which I agree is the main thing that disqualifies this as a proper Datalog. iirc the tutorial on Datalog that I based this implementation on only handled triples as well so I stopped there, but extending to N-ary relations is on my list to look into for sure.
comment 1y ago · link · parent
comment 1y ago · link · parent
Runs in the browser using Hoot (https://spritely.institute/hoot/) which compiles Guile Scheme to WebAssembly.
14.
Datalog in miniKanren(deosjr.github.io ↗)
134 points · by deosjr · 1y ago · 17 comments
comment 1y ago · link · parent
Knowing how to implement a small logic programming language from scratch really feels like a superpower sometimes.
comment 1y ago · link · parent
Be sure to check out the lispmachine folder; its essentially a fork I made after finishing the course. It implements a Lisp on the nand-gate level :)
comment 2y ago · link · parent
comment 2y ago · link · parent
comment 2y ago · link · parent
So I built my own Lisp machine based on the nand2tetris architecture, with lisp instructions supported on the simulated chip level. I'm currently in the progress of doing a writeup of the project, you can see my attempts here if you are interested: https://deosjr.github.io/
I have an almost working version of a REPL running on the machine now, including garbage collection and parsing Lisp with Lisp and passing the output to an eval function written in assembly (the operating system, if you will).
comment 3y ago · link · parent
Here's a version in Go instead: https://github.com/deosjr/GenGeo/blob/master/gen/lindenmayer... Which renders into: https://github.com/deosjr/GenGeo/blob/83c77f9433e569b30f71b3... (see Algorithmic Beauty of Plants for way more examples)
comment 3y ago · link · parent
Only dependency is on openCV through GoCV, otherwise pure Go. Supports a webcam/beamer setup. Uses Lisp for scripting instead of Lua (see https://github.com/deosjr/elephanttalk/blob/main/cmd/elephan...).
It's a lot slower/less mature than paperprograms, but it does attempt to implement the wish/claim/when model using a homebrew datalog implementation :)