3 ms·
Are you informed by any general work on using relational algebra + one or two other things (recursion via CTE and environments, I guess, in this case) as genera
by wwweston 7y ago
Are you informed by any general work on using relational algebra + one or two other things (recursion via CTE and environments, I guess, in this case) as general purpose programming languages, or did this mostly start by thinking about hacking your way to the specific goal of an interpreter or fractal generator using postgres facilities at hand?
- malisper 7y agoI'm not aware of any general work. I initially tried to directly port Paul Graham's interpreter into SQL. I immediately ran into problems because it wasn't possible to map the recursive function calls into SQL. After thinking about it in the background for a day, I figured out I could use the CTE +_stack approach instead of recursion. Once I figured that out, it only took me a few hours to port the interpreter.