|
|
|
|
|
by carapace
1212 days ago
|
|
I'm designing a such a system now, based on the pure functional Joy language with two additional data stores: a relational db system (Prolog (or maybe Datalog), not SQL) and what is effectively a git repo although I think of it as a "data oracle". The role of the relational db system is explained in TFA. (Prolog makes a fine Relational Model DB (the "relations" in RMDBs are the same logical relations that Prolog "relations", um, are.) The language is cleaner and simpler and more powerful than stock SQL, there's an ISO standard and several solid implementations, and you can always back it up with SQLite or PostGRES or whatever if you need to.) The trick to integrating it with a purely functional system is to only use "pure and monotonic Prolog code" which you want to do anyway ( https://www.metalevel.at/prolog/debugging ) or as I like to say, "Don't put lies in your database." The "data oracle" (which again is more-or-less just a git repo) provides bytes given a three-tuple of (hash, offset, length). These are immutable, so you can cache the results of (pure) computations over them (e.g. a predicate like "is valid UTF-8" is true/false for all time, yeah?) This replaces the filesystem. I was working with Prof. Wirth's Oberon RISC CPU as a basis, but a couple of days ago a fantastic new 64-bit vm went by here on HN and I'm going to use that going forward. https://github.com/maximecb/uvm https://news.ycombinator.com/item?id=34936729 |
|