Hacker Newsnew | past | comments | ask | show | jobs | submit | LogikalGuy's commentslogin

For me the best introduction to unification was creating a microKanren[1] implementation based on the "Hello, declarative world" article[2], but even just reading the article can help enormously to understand how unification works.

Basically if you have unification then you already have a simple query engine, which can handle simple equality constraints that is usually used in SQL WHERE clauses. For example "select * where pokemon = pikachu" can be simply achieved by such a system. Of course this only gives a bare bones query engine, so if you want something more advanced then you will need to implement a constraint system on top of this base unification system. cKanren is a good example of such a system.

Few years ago I had the same kind a of curious question about the relationship between databases and logic programming languages like microKanren and as a result I created LogikalDB[3], which is an embedded query language for FoundationDB.

1: http://minikanren.org/ 2: https://codon.com/hello-declarative-world 3: https://github.com/MechaRex/logikaldb


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: