4 ms·
This is cool, and amusingly I wrote a simple calculator over the weekend (and will be adding variables this week when I get back to it) for a demo for work. min
by Jtsummers 6y ago
This is cool, and amusingly I wrote a simple calculator over the weekend (and will be adding variables this week when I get back to it) for a demo for work. minikanren or microkanren would be a good addition to this. There's already miniprolog so there's some overlap, but it's a well-defined language that's about the same size as some of these.
- slaymaker1907 6y agoI think there is still value in minikanren since it uses a different evaluation strategy than Prolog. While Prolog just has to support backtracking when things fail, minikanren requires much more interleaving of code paths. In terms of implementation, you can probably implement backtracking good enough for Prolog via backtracking, but you really need immutable maps for minikanren due to the interleaving. On the prolog side of things, prolog implementations typically care a lot more about being able to dynamically interact with the database including adding/retracing goals. Finally, minikanren tends to play nicer when combined with another language compared to prolog so it might be interesting to do include have it embedded in another language.