Math superset of JSON?
dy opened this issue ยท 13 comments
Is there a subset in between Jessie and JSON?
Something that takes JSON primitives and enables calc operations, Math superset of JSON?
That JSON+ops syntax is (almost) cross-platform: Rust, Go, C++, C#, Python, Perl? could support that.
That could be a tiny useful thing for any template engines, template instantiation proposal, evaluable/calc strings (like css calc), and other playgrounds.
There is! Justin , defined at https://github.com/agoric-labs/jessica/blob/master/lib/quasi-justin.js.ts
@michaelfig @dckc do we have anything else on Justin?
No, that's the only material I know on Justin.
That's perfect! Is that sort-of compilable, there's no js dist, right? I'm foreseeing its use for at least 2 projects, I wonder if that can be bundled as a compact dependency.
That parser should verify that a Justin program is syntactically valid, though we are not currently using that parser or parsing framework in production. Having verified that it is valid Justin syntax, since Justin is a subset of SES, you could then use the SES shim to run it as a SES program. You can use the SES Compartment mechanism to craft the lexical environment that your Justin program sees. I just realized there's one more thing to show you:
https://github.com/Agoric/agoric-sdk/blob/master/packages/marshal/src/marshal-justin.js
tested by
https://github.com/Agoric/agoric-sdk/blob/master/packages/marshal/test/test-marshal-justin.js
This does its round trip tests by evaluating the generated justin program as a SES program in a custom SES environment.
That's perfect!
OK, I take it this issue is addressed.
... there's no js dist, right?
no, we don't have a package for all and only Justin. It would be a welcome contribution!
If you want the scope of this issue expanded to include such a package, feel free to re-open this.
What does and doesn't it have in common with Justin?
Just an update. A variation of justin as a separate package here.
Where did it go? This was what I had been looking for for awhile now, as I just need this smaller subset and would prefer a smaller library for it.
I can't opensource it for now unfortunately, besides some aspects are not finished , sorry, had to remove it. I can add you to repository developers if you prefer.
Ok, for these who's interested - there's Justin extension for subscript microlanguage.
I am so appreciative of this specific extension, thank you again.
Btw it's called Justin because there's no keyword operators, just in.