▲ | williamcotton 7 hours ago | ||||||||||||||||
Just this past week I've been working on a toy/experimental web DSL [0] that uses dynamically loaded shared libraries as middleware that pass per request arena-allocated Jansson json objects between steps in a pipeline. It's extensible in that new middleware can be created. Influenced by bash and OCaml/F#, here is some kind of demo of the syntax:
I'm generally curious as to how jyn thinks this would fit in to their box-based framework. | |||||||||||||||||
▲ | jynelson 4 hours ago | parent | next [-] | ||||||||||||||||
oh hey Will! long time no see lol, it's been ages. small world. i think this is on a good track! i like that it's designed to be extensible while still keeping some amount of structure, and that the DSL makes things very compact. how are those filters implemented? are you spawning a shell to run jq or are you interpreting in-process or something like that? in general i'd love to see a bunch more DSLs, i think using general-purpose languages for everything is most of the time not actually helpful (cc https://jyn.dev/constrained-languages-are-easier-to-optimize...). i have some vague thoughts about how to make interop between DSLs and the host language easier but i need to think about them some more. | |||||||||||||||||
| |||||||||||||||||
▲ | cryptonector 5 hours ago | parent | prev | next [-] | ||||||||||||||||
I've wanted to do just this. I've used libmicrohttpd, and... it's not my favorite. But if you're going to do it in C then libmicrohttpd is probably the best API to use. You get bonus points for using jq :) If you're also using jq you might as well ditch Jansson and use jq's `jv` API. I highly recommend it. | |||||||||||||||||
| |||||||||||||||||
▲ | freedomben 6 hours ago | parent | prev [-] | ||||||||||||||||
This looks really neat! I typically don't like these DSLs, but this is one I would actually use. |