Show HN: CEL by Example

66 points32 comments9 hours ago
ivaniscoding

Shameless plug, but if you want to try CEL in your browser: https://celq-playground.github.io/

I wrote the playground and I should link to your website in my docs. This is neat.

yegle

I think people commenting misunderstood what CEL offers.

Remember the famous https://en.wikipedia.org/wiki/Greenspun%27s_tenth_rule?

> Any sufficiently complicated C or Fortran program contains an ad hoc, informally-specified, bug-ridden, slow implementation of half of Common Lisp.

CEL is a well specified, reasonably fast "embeddable" language with familiar syntax. I'm sure there are other languages that fits the description though.

d4mi3n

I've seen but haven't used CEL. Anybody with experience with competing tech have any strong opinions? I've used OPA, know CEL used by GCP and Kyverno, but otherwise haven't seen anything compelling enough to move away from the OPA ecosystem.

show comments
hamandcheese

Does CEL have any way to import other files? i.e. could it serve as a general purpose config language like jsonnet?

show comments
madduci

CEL is used a lot in FHIR as Path Expressions

bossyTeacher

I would love if languages like Scala, Swift or F# had something like Cel but running at compile time so your program was evaluated against those restrictions. I believe a language called Idris has something like this

show comments
IshKebab

It seems weird to require an entirely new programming language for this tbh. They make the claim that it is special because it's not Turing-complete, but that's nonsense. Turing completeness is almost never a property that is important. I think in this case they're equating Turing incompleteness with "doesn't take a long time to execute" but that isn't really the case at all.

The property you really want is "can be cancelled after a certain amount of compute time - ideally a deterministic amount", and you can obviously do that with Turing complete languages.

show comments