4 ms·
This seems like some sort of horrible inner platform effect. It would be nice if they would use an actual embeddable programming language, like Lua.
by osmarks 6y ago
This seems like some sort of horrible inner platform effect. It would be nice if they would use an actual embeddable programming language, like Lua.
- baq 6y agoturing complete configuration? no thanks. i like it when my configs are guaranteed to halt.
- osmarks 6y agoFair, and there's this neat Dhall (https://dhall-lang.org/ https://dhall-lang.org/) thing for config files (not really this, since it seems like it is designed to actually encode some amount of logic) which enforces that while still being pretty programmable. This might actually already be TC, though; at the very least it is able to do infinite loops.
- SomaticPirate 6y agoDhall really feels like the future of configuration as code. It provides strong typing and outputs to a flat map. It’s still early though and the tooling is a bit ugly. You can embed enough logic that it feels usable. The biggest selling point for me was the typing though.
- zingplex 6y agoI've used Dhall in production, pushed it fairly hard and can say with utmost certainty it's be an absolute pleasure. We use it as our application configuration format and derive fairly intricate Kubernetes resources from our app config.
- Gravityloss 6y agoWe also use Dhall. The home page has a very nice intro indeed. https://dhall-lang.org/ https://dhall-lang.org/
- perfunctory 6y agowhat makes you think this yml language is not turing complete?
- osmarks 6y agoBased on skimming the docs there, you can do infinite loops but may have finite storage (strings are apparently <=64KB and there seems to not be a way to append to arrays). It does have subworkflows, so maybe you could store data in the callstack in some horrendous way, but it's probably also limited in size.
- gnulinux 6y agoBecause obviously you can do loops, it's even there in the example.
- ufo 6y agoIt is possible to use Lua hooks to protect against programs that accidentally take too long too run. Lua can be told to stop the script after so many steps. This technique isn't fool proof against maliciously crafted programs, but it might be sufficient depending on what you are doing.
- amyjess 6y agoLua isn't homoiconic, though. This is basically Lisp without the parentheses.
- osmarks 6y agoThis doesn't have any of what makes lisps nice, in that you cannot, as far as I can tell from those docs, operate on the data structures the code consists of at all.
- Spivak 6y agoThat’s also not really the defining feature of lisps though. If it was, any language with access to its own parser would be a lisp.
- Jtsummers 6y agoThis language isn’t a lisp, nor is it homoiconic. It’s just a tree-structured language. It may be fair to compare the syntax and structure to s-expressions, but not to lisp itself. In the same way this language could as easily be expressed as XML.
- keymone 6y agoThis is basically half assed bug ridden implementation of half of a lisp.
- ByteJockey 6y agoYeah, that seems to happen every few years an people call it revolutionary, which half ends up implemented seems to vary. And then they realize that it's not very useful without the other half and it dies.