#miniKanren

Paul Gallaghertardate@ruby.social
2026-03-10

Taking a quick look at #miniKanren for logic programming (specifically the implementation embedded in Clojure)..

codingkata.tardate.com/minikan

2026-02-04

@screwlisp @kentpitman regarding the discussion we had after the #LispyGopherClimate show ended, MiniKanren is logic programming language embedded in Scheme (sort-of like a Prolog implemented in Scheme and coded with S-expressions), and you can use machine leaning methods like neural networks to guide the search tree of the goal solver mechanism. This paper is an example of what I was talking about.

Even before LLMs were invented, MiniKanren was able to do program synthesis using purely symbolic logic. They developed a prototype called Barliman where you would provide example input->output pairs as constraints, and using a constraint solver, could generalize those examples to a function that generates any output for any input. As a simple example, you could give it the following input-output pairs:

  1. () -> ()
  2. (a) () -> (a)
  3. () (a) -> (a)
  4. (a) (a) -> (a a)

…and the constraint solver could determine that you are trying to implement the append function for lists and write the code automatically — without LLMs, using purely symbolic logic.

As you might expect, the solver could be very slow, or even diverge (never returning an answer). The paper I mentioned above talks about using neural networks to try to guide the constraint solver to improve the performance and usefulness of the results returned by the solver.

Now imagine applying this technique to other domains besides code generation or optimization, for example, auto-completion, or cache pre-fetching, and building it into a programmable computing environment like Emacs. You could have a tool like “Cursor,” but instead of using LLMs, it uses classical computing and constraint solvers, while taking a fraction of the amount of energy that LLMs use.

#tech #software #AI #LLM #MachineLearning #NeuralNetwork #ConstraintLogic #ConstraintSolver #LogicProgramming #Prolog #MiniKanren #Emacs #Lisp #Scheme #SchemeLang #ProgramSynthesis

Sam Phillips :verifiablebike:samphillips@teh.entar.net
2025-11-02

Status: reading piles of #minikanren papers, as one does on a Sunday.

2025-04-15

The #Haskell #Unfolder is two years old! Join us for a new episode tomorrow, 2025-04-16, at 1830 UTC, live on YouTube. This time, the topic is logic programming with typedKanren, which is a typed version of #miniKanren embedded into Haskell.

youtube.com/watch?v=ukk5JDRYQS

Panicz Maciej GodekPaniczGodek@functional.cafe
2025-03-07

If you're interested in #Scheme, #Lisp, #MiniKanren or #LogicProgramming, I wholeheartedly recommend William Byrd's 'From Bronze to GM' youtube series:
youtube.com/@williamebyrd

2024-10-21

I'm learning about relational programming and writing my notes at

wip.jroi.dev/relational-progra

As always, these notes are work-in-progress :)

#programming #ukanren #minikanren

Jeremy 🇨🇦thatgeoguy@coales.co
2024-04-02

So to jump on my soapbox about this whole #xz thing: it has become my personal mission at work to say that bash is not good enough, after being seriously burned by it in production.

Now, I am fully on-board the bandwagon of writing my release "scripts" in #Rust. To be specific, I am hoping that I eventually get to the point where I have built a tool where I can do the entire release process end-to-end with very strong types. Does this fix the problem with #xz? No! But I can see many ways it reduces the scope.

The only other language I'd be interested in using if I wasn't doing this in Rust? #miniKanren, hands down. But that's not feasible today without a lot of bootstrapping, and Rust gives me a lot out of the gate even if I have to solve the deployment problem before I can deploy the tool that I want to use to solve the deployment problem. Fortunately, this is well-trod ground.

hackers.town/@zwol/11219906125

blake shaw 🇵🇸rml@functional.cafe
2023-11-07

I'm a book learner. I feel like I can learn anything that there is at least one incredible book dedicated to, but without literature I can sink my teeth into, I will never succeed in picking up a new skill distinct from those I already possess.

TLDR: looking for a genuinely good #CSS book that gets into the meaty bits and doesn't treat the reader like toddler.

Around the time of covid, I decided I was going to tear down my react website that I hated ever since it went up, and build it with just HTML & CSS. So I did what any yak shaver would do, and built an ad-hoc CSS preprocessor in #Scheme, without knowing anything about modern CSS. And it worked well enough at first, but in the process I started to learn about all the new features of CSS (I'm not a webdev), and so I figured I should first dive in and then design a DSL that enables "Graphic Design By Wishful Thinkful", originally intending to use #miniKanren for relational styling & generative design patterns. But every CSS book I tried was simply "do this example and another one, and another, accumulate lots of examples without any insight into CSS design strategy", and my AuDHD can't handle that — I need something worth fixating on or I'm doomed. And thus I've gone without a website for years, and accumulated lots of blog entries in my zettlekasten which I still have yet to share.

But I also can't let go of the idea of creating a system that would make a JS-free website enjoyable for *me* to maintain, and I've always found writing CSS to be painfully tedious and time consuming, a google oriented configuration process, while I also recognize how powerful it is.

And I also have genuine aesthetic/design skills! I've been hired to create installations for Hermes, Adidas, Nike, and countless others, all around the world. My "art" has been shown at the Venice Biennale, Art Basel, and countless major venues from Pioneer Works to the Brooklyn Museum (before public funds became illegal to grant to BDS activists, and I subsequently dropped out of an art world that will readily obey and tally the State's red lines we cross and work to keep us in check, excluding not only BDS activists but also Marxist-Leninists, Korean unification activists and other uncompromising dissidents). But I havent found any good book that makes CSS interesting, although I believe that it genuinely is.

So what is the best resource for getting deep with modern CSS? Does it even exist?! I feel like it must.

blake shaw 🇵🇸rml@functional.cafe
2023-09-18

wreckto-verso: experiments with the #verse calculus in #minikanren from Will Byrd

(here using #chez #scheme)
github.com/webyrd/wreckto-vers

blake shaw 🇵🇸rml@functional.cafe
2023-08-24

#Algol, #C, #Java et al: deontology
#Scheme, #Lisp, etc: metaontology
#Haskell, #ML, etc: ontology

#Prolog, #Minikanren: phenomenology

badtuplebadtuple
2023-06-30

We've got and ...but what about macroKanren? WumboKanren‽

The minimalist everything-is-an-x aesthetic is cool, but it really gets in the way of letting the relational logic paradigm bloom. I'm curious what patterns arise when you allow syntax, sugar, and convenient extended semantics.

Trades off simplicity, but lifts patterns up from the mechanics. Reify how we think about things. I bet relational programming would grow some cool ones.

blake shaw 🇵🇸rml@functional.cafe
2023-05-27

While I probably only hack on #miniKanren in 2-3 day sessions every 12 months or so — really just exploring — every time I do I can't help but be amazed by the amount of tools that are obviously incredibly powerful for programmers, but that we honestly don't know how to use yet. I don't know if I have ever personally come across an idea that convinced me beyond a doubt that its full of truly novel concepts waiting to be elaborated, tools that we simply don't know how to effecively progam with yet but certainly have tons to offer. Just look at Will Byrd, Nada Amin, and Matt White, every year they seem to have an agenda of problems to solve for which theres no consensus on methods for effective use. and they for the more part seem so busy grappling with the larger set of languages that fall out of the bottom of miniKanren that the question of how to get that power into the hands of average programmers effectively remains hugely under researched. How does a programmer not see that and become at least mildly interested? Especially when you learn that the most fundamental ideas of the language that provide you with a great deal of that power require only about ~30 lines of scheme? sad that only tiny corners of this planet offer support to such research.

2023-05-16

Looking forward to seeing everyone at GopherCon UK again. Last time was great, so I can't wait for 17 August 2023

I was lucky enough to get my talk accepted about Logic Programming in Go.

#gopherconuk #minikanren

See the schedule here: gophercon.co.uk/schedule/

blake shaw 🇵🇸rml@functional.cafe
2023-02-22

@ramin_hal9001 yeah I bet its going to be cool, I imagine procedural content generation is a major reason for prioritizing logic programming, which with someone like SPJ thinking through, it could be really game changer.

Ive noticed that #miniKanren is able to express hierarchies of relations in a way that feels like a functional take on oop classes, it would interesting if Verse has a fresh take on using LP in that space as well.

Ultimately I think logic programming is probably the mind blowing and under explored style of programming, definitely a train I will try to hop on early

2023-01-30

Maybe this is a general #miniKanren principle. It's already well-known that "recursion goes at the end"; if a goal structurally recurses, then it should do as much work as possible first. Perhaps, in addition, "outputs go before inputs"; if we want to invert total functions or compute their fibers, then we should do as much work on the outputs as possible before examining the inputs.

2023-01-28

Here's a #categorytheory puzzle. I have some functions. I'm evaluating those functions at outputs and computing possible inputs using some relational #miniKanren code.

I realized that, if I want to search for possible inputs to a composition (comp f g) : X → Z, then I need to search for inputs to g : Y → Z and f : X → Y, *in that order*. This makes sense, at least for functions. That's not the puzzle.

2022-11-29

I'm suddenly excited about #AdventOfCode2022. Since I've had a change of job this year and that came with a new tech stack, (which I'm still kind of learning) I'm going to use #typescript as a default this time.

Thing is, when it comes to the obvious search problems should I stick with Prolog or spend the last evening of November porting my #Kotlin #MiniKanren to Typescript?

github.com/neilgall/KotlinKanr

Jeremy 🇨🇦thatgeoguy@coales.co
2021-08-29

Put in some effort this weekend to release #miniKanren v.1.2.0 for CHICKEN @scheme

The docs are a lot better now, we have tests, and it works on both CHICKEN 4 and 5!

wiki.call-cc.org/eggref/5/mini

2021-04-24

The ELS2021 programme is out! I am VERY excited about

⭐​ Nada Amin's keynote
"Staged Relational Interpreters: Running Backwards, Faster" ⭐​​

including logic programming, miniKanren, compilers from interpreters, and only good stuff!
🤩​

Excerpt from the abstract:

> Bringing multi-stage programming to relational programming, we derive a relational compiler from the relational interpreter.

🚀​

Full abstract on the symposium's website: european-lisp-symposium.org/20

#lisp #miniKanren #logic #compilers

@lisp @scheme
@clojure
@commonlisp

Client Info

Server: https://mastodon.social
Version: 2025.07
Repository: https://github.com/cyevgeniy/lmst