| ▲ | veqq 5 hours ago | |
> Edgar Codd formalised relational algebra in 1970. SQL sits on top of it as a declarative interface. You describe what you want. The database engine decides how to get it. The engine improves every year. Your query stays the same. Although SQL is of course not relational Algebra (and others like Datalog and D4M are better), it's still cool. It inspired kSQL like Lil uses https://beyondloom.com/decker/lil.html#lilthequerylanguage , which inspired the code I'm most proud of: https://codeberg.org/veqq/declarative-dsls A common query language, a common idiom, for many data structures (arrays, hashmaps, datafremas) is liberating, permitting you to e.g. solve sudoku, make mandelbrot sets or calculate primes directly:
Or e.g.
The tests file has many such things (like the sudoku solver) and even datalog and minikanren implemented on top of this! | ||
| ▲ | andersmurphy 5 hours ago | parent [-] | |
Datalog is the dream. But SQL with a good query builder like Clojure's honeysql is not so bad. That and SQLite seems to be able to scale to almost any problem, is disgustingly fast and with litestream incredibly resilient. | ||