Long before AI psychosis, there was FP psychosis, clinically defined as the intense psychological response to understanding functional programming concepts like recursion, higher order functions, monads, or in this case, continuation passing style.
CPS is a way of embedding imperative computation into an FP language. I think they built a mini compiler for their binary relation language, which is then Jitted by Julia.
Thank you! This is the concept I've been looking for. I always had the sense that compositional data transformation frameworks like PRQL or LINQ should have a clean categorical interpretation. I was exploring how this could be expressed in terms of monads but they usually start with the data while I was trying to formalise the composition of the transformations. I think transducers are it.
Transducers are just the morphisms in the category of the reducing-functions. No problem!
> "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.
6 comments
[ 2.5 ms ] story [ 29.9 ms ] threadTransducers are just the morphisms in the category of the reducing-functions. No problem!
https://news.ycombinator.com/item?id=48356563
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.