Logic Programming in Go
summary
Logic programming gets embedded in Go as a ~1000-line Gominikanren implementation that uses channels instead of lists for streams and leverages Go concurrency to run goals. It implements the unification primitives hop/rewrite/unify and constructors like equals, conj, disj and exists, and runs queries backwards. A regex generator example actually produces matching expressions and strings but causes explosive parallelism — observed up to 50k goroutines while producing ~90 results — so it works but is highly inefficient. Gominikanren source is on GitHub.
AI-written summary · about
chapters (5)
related talks
46mFunctional Programming with Go
46mGoing Loopy: Iteration in Go
01h 04mAn Introduction to Functional Programming in Go
29mVerifying Concurrent Go Code in Coq with Goose
39mIs Go A Good Language to Build Compilers?
26mGo is Boring... And That's Fantastic!
01h 24mAn Introduction To Go Lang
44mImpossible Go!
