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

Sorry I’m sure that’s a great and wonderful product, but I’m so pissed off by yaml files that I can only hope one day humanity will figure out a better alternative to yaml and json for configuration files. I’m using a lot of yaml with the serverless framework and I hate that. And no, infrastructure as code like terraform or aws cdk always looked too limited or strangely designed


I'm not sure, if we, as a humanity, can do much here.

You have 2 choices:

- Use a "0-config" solution. You sacrifice control, efficiency and a lot more.

- You write configuration. In my opinion, the best language for configuration that humanity has come up with is YAML. Yes, it's not ideal, but it's expressive and (compared to alternatives), very readable. Compared to real programming languages, it lacks some of the goodies like autocompletion, validation, etc. Stacktape has a VScode extension for that. Also, you can write your config using Typescript: https://docs.stacktape.com/user-guides/writing-config-in-typ...

If you want a "quick-start" solution, we have a lot of those in our docs. Also, we are working on an interactive CLI "tour" that will "bootstrap" the configuration for you (with some sane defaults).

Edit: We are actively looking for a better and easier solution. If you have a suggestion, I will be very happy to discuss it.


I quite like configuration written in Python. Clearly very different beast; but:

1. It’s not YAML (which I agree is dreadful after about 10 LOC)

2. You’re not fighting it. Want to condition the config on something? Just code that up, no need to introduce custom options etc.

3. A basic setup is barely more work than filling up a YAML file, it might even look like basically key=value kind of file.

4. Easier to structure. A big config file in YAML can only ever be a single large file. In Python/code, if you grow a big and complex config, you split it like you would with any regular code.

It is of course less safe to parse a config file than it is to read a YAML one (I guess?) but if you’re then running user code anyway then it probably is no additional security risk.

Clearly, can replace Python with any other language.


I've found Hashicorp's HCL to be excellent in comparison. It's open source and starting to be adopted by non hashi projects.


The weird design is the “construct programming model.” It’s pretty darn powerful but will always be a little weird because modeling “semi-free-floating objects in space” with a programming language that wants to do things one after the other will always have a bit of a mismatch. But classes work pretty well all things considered.

An example of a cdk that isn’t tied to a cloud would be https://cdk8s.io/docs/latest/getting-started




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

Search: