Passing DBs through continuations
Posted by remywang 3 days ago
Comments
Comment by tenwz1 1 day ago
Comment by remywang 1 day ago
Comment by antonvs 18 hours ago
Comment by epolanski 22 hours ago
Not sure what the AI one gives you at a personal level.
Comment by icedchai 17 hours ago
Comment by antonvs 18 hours ago
Comment by epolanski 13 hours ago
Comment by antonvs 9 hours ago
As far as I'm concerned, it's all just Luddites v2.0.
Comment by gavinray 11 hours ago
> "Suppose you want to write a database. You'd probably start by implementing relational algebra operators — projection, filter, join, etc. The easy way is to implement them as functions that take in tables and return tables, and assemble them into a larger expression. That was how Prela worked in its first incarnation. The code was clean, but it was hella slow! Which was not surprising, because every operator materialized every intermediate result. "
This is one of the LAST things you do when writing a database.DB development starts with the storage engine, file manager, buffer pool (page cache), and page access methods (heaps/indices) which are binary buffer views. Then, you add the transaction manager, the WAL/recovery bits.
The actual implementation of relational algebra and a SQL language + parsing are little icing layers on top of a transactional storage engine.
Comment by cryptonector 10 hours ago
Comment by unrealhoang 1 day ago
Comment by fredrikholm 22 hours ago
Transducers are specialized to data transformation pipelines, continuations are a form of control flow from which you can derive a lot of cool things (exceptions, time travel debugging etc).
Comment by snthpy 13 hours ago
Transducers are just the morphisms in the category of the reducing-functions. No problem!
Comment by masfuerte 17 hours ago
Comment by DevelopingElk 1 day ago
Comment by IsTom 18 hours ago
Comment by cryptonector 14 hours ago
A better analogy is that continuations are reified function call return addresses, since return addresses come with a frame pointer (explicit or implicit), and therefore are closure-like.
Comment by antonvs 9 hours ago
A continuation is a value that's passed to a function to tell it where to send its result when it's complete.
In imperative programming languages which invariably have restricted function calls, the continuation that every function receives is the address following the function call. This was just a mistake which the earliest programming languages committed, which has been perpetuated ever since, except in functional languages.