logoalt Hacker News

colinmarctoday at 7:50 AM6 repliesview on HN

Wow - I love programming in YAML! You know what would make this really fun? Sprinkle in some Jinja. Then we'll be cooking with gas.


Replies

hansmayertoday at 8:40 AM

:) Here is a crazy thought - what if we had some kind of a narrowed down, specific subset of normal language which would translate into specific computer-level instructions. So for example, instead of telling computer to read something from a file and transform it in a certain way, you actually had a specific instruction to open a file, which worked the same each time you used it and guaranteed to fail if you used it the wrong way? Wow, the possibilities are endless :)

show 2 replies
grunder_advicetoday at 8:17 AM

Exactly. At some point, the specification becomes so complex, it's easier to just write the code yourself.

It's why famously, programmers always say, the code is the documentation, because writing detailed docs is very tedious and nobody wants to do it.

show 1 reply
bronxpockfabztoday at 9:13 AM

We might as well future proof this by writing specs in YAML-ified Ruby, this way it's more flexible, I've been told it's best practice!

karmakazetoday at 11:31 AM

I started reading to find out why Yaml? In it's place I found a great post.

One thing though, I loved the "AUTH-1" numbering and the Yaml breaks that into an Auth section, with "1." subsection which I don't like nearly as much, the codification AUTH-1 is more referenceable/searchable.

show 1 reply
photiostoday at 7:55 AM

Dreaming about ` | nindent 12` in my specs! :D

dgellowtoday at 9:46 AM

Crying in k8s templating