Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'd love to do this, the only problem there is we're sharing this data between systems which use different runtimes. A client who runs a Python environment might not easily be able to make use of that logic. With JsonLogic, that would theoretically be possible.


Btw google have something almost exactly like this: https://github.com/google/cel-spec


You can easily write a parser for this in Python. As long as you only support expressions it should be pretty straightforward.


I can't help but think that at the end of this road is yet another Lisp waiting to be discovered.


Well JsonLogic is basically Lisp expressions in Json syntax which is kind of the worst of both worlds IMHO.

It seems weird to me to pass a syntax tree over the network rather than just the syntax. But if the expression is not supposed to be viewed or edited as code at all, but only in some kind of GUI expression builder, then it might make sense.

Lisp is at least human-writable, but if it is supposed to be written by humans why not just use straightforward expression syntax like "a + b".


I see your angle. I'll consider this. Thanks for the ideas!


I posted this in another thread, but it seems relevant to what you are looking for: https://stopa.io/post/265

It walks through the process of building a Lisp in JSON and the associated parser in JavaScript. It could be a good starting point to build out a cross-platform approach to sending logic over the wire.


Nice, looks quite neat. I'll dive into it a bit deeper!




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: