Hacker News new | ask | show | jobs
by rjrodger 1837 days ago
Started working on a JS version a few weeks ago [1]. Even with 20% of the features it’s already so useful we’re building systems with it. And not just config - model all the things!

Overrides and inheritance are a world of pain. Unification and commutative operations restore sanity to the actual work of coding with a domain representation language because WYSIWYG. And you get type safety for your domain model.

The project is still at the “Read the Source, Luke” stage so caveat emptor until we get a respectable release out.

* https://github.com/rjrodger/aontu

3 comments

Very excited to see someone doing this! Right now, Grafana is [planned to] relying on an anemic CUE->Typescript translator for getting its schema to the frontend - https://github.com/sdboyer/cuetsy. (Somebody also pointed me to Project Cambria recently, which could be an interesting compilation target for what we have https://www.inkandswitch.com/cambria.html)

Being able to work with CUE natively in TS, though, would be a huge gamechanger for what we can do with CUE in Grafana

Our implementation is in TS. However that's just an API. Do you have some ideas on how you'd like the TS type system to work with the Cue type system. It's an open question for us.
Nice, I was looking for a Javascript version. I will check it out. Regarding "Read the Source, Luke" you are in good company with Apple and its Swift ABI :)
And we kinda leverage the docs on cuelang.org since the syntax and semantics are mostly the same!
Does this make it possible to add syntax highlight and validation in an editor like monaco?
Yeah - we're just cheating and using YAML syntax modes for the moment which mostly works. The plan is to support LSP for much better DX of course.