4 ms·
Joy is great (at least better than SQL) as an API to a database. IE, every query is a joy program. If you add get, set and (de)serialize as primitives, you hav
by toolslive 6y ago
Joy is great (at least better than SQL) as an API
to a database. IE, every query is a joy program. If you add get, set and (de)serialize as primitives, you have stored procedures, intermediate results, galore! Want to transform your result before you send it back to the client ? no problem, just add a transformer function.
- mafm 6y agoCan you add a link pointing at some examples?
- toolslive 6y agothere's a bunch of research related to 'stack based query languages' google for SBQL. Anyway, in the specific case of joy is more difficult to dig up. Here's an example (I know it, because I implemented it): https://github.com/openvstorage/arakoon/blob/lsl/src/system/single.ml#L416 https://github.com/openvstorage/arakoon/blob/lsl/src/system/... "script1_" true "script2_" false 0 [POP; 1; ADD] FOLD_RANGE The above program has basically calculates the number of keys between "script1_" inclusive and "script2_" exclusive. It's really compact flexible and powerful. Now, before you run off and think about implementing this yourself. First have a look at kitten: https://kittenlang.org/ https://kittenlang.org/