Rendered at 23:25:23 GMT+0000 (Coordinated Universal Time) with Cloudflare Workers.
gavinray 5 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.
cryptonector 4 hours ago [-]
This. But TFA was specifically concerned with the relational algebra, so I'm giving it a pass :)
tenwz1 18 hours ago [-]
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.
Worth noting that’s a quote from the article (footnote 1).
epolanski 16 hours ago [-]
At least FP psychosis leaves you more educated and with more tools in your box.
Not sure what the AI one gives you at a personal level.
icedchai 11 hours ago [-]
A lobotomy? I've witnessed several individuals who were entirely dependent on Claude for any technical issue.
antonvs 12 hours ago [-]
As a happy sufferer from FP psychosis, I can tell you that LLMs can be a fantastic tool for learning if you choose to use them that way.
epolanski 7 hours ago [-]
You're not describing AI psychosis tho.
antonvs 3 hours ago [-]
Meh. The term "psychosis" is a deliberate troll. If "FP psychosis" is understanding that imperative programming is a ridiculously primitive misunderstanding of computation that tends to discount the time dimension, it implies that "AI psychosis" is a similarly biased, nonsensical take that only matches the incorrectly perceived reality of the people using the term.
As far as I'm concerned, it's all just Luddites v2.0.
Continuations predate transducers by some ~40 years and are mostly used as a means of control flow, but yes they are very similar.
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).
snthpy 7 hours ago [-]
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!
masfuerte 11 hours ago [-]
There was a similar article about the same database a few days ago:
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.
IsTom 12 hours ago [-]
I'd rather compare CPS to goto than regular imperative computation.
cryptonector 8 hours ago [-]
The continuations in CPS are closures. Goto basically isn't. GCC's computed goto is, but generally when people say 'goto' they mean the traditional C goto, which involves no closures. The goto analogy is not great for this reason.
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.
antonvs 3 hours ago [-]
A function call that's not artificially restricted to return to its caller is equivalent to a goto. See "Lambda: The Ultimate GOTO" by Guy Steele.
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.
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.
Not sure what the AI one gives you at a personal level.
As far as I'm concerned, it's all just Luddites v2.0.
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).
Transducers are just the morphisms in the category of the reducing-functions. No problem!
https://news.ycombinator.com/item?id=48356563
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.
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.