I've had far more issues getting these YAML files correctly formatted than I should admit, and every test means pushing a commit and waiting to see what happens.
https://docs.github.com/en/actions/using-workflows/workflow-...
It refers you to this YAML guide, which itself never mentions what version it's helping you learn:
I use nekos act to run workflows locally (and it does not support reusable workflows), but it sure helped me to get the yaml right.
run: |
mkdir build && build
cmake ..
etc. This is great for CI.Even I tend to write "pseudo-YAML" and then add the JSON line noise programmatically if I'm entering a lot of data.
- Oh you used a tab instead of a space.
- What do you mean country code can be 'no'?
- Sure we are JSON compatible**!
- Yeah. 1e3 is an actual string. If it's not. We're not compatible with YAML 1.1
- Yes. I will import your remote exploit.
((name "Ford Prefect")
(age 42)
(possessions "Towel"))
(:name "Ford Prefect"
:age 42
:possessions ("Towel"))
(countries "GB" "IE" "FR" "DE" "NO")
(countries gb ie fr de no) ; if country codes are identifiers in a DSL
((first-name "Christopher")
(surname "Null"))
(:first-name "Christopher"
:surname "Null")We seem to have very different ideas of what a "configuration language" should be capable of and what its parser should (be allowed to) do.
Look a little closer, dhall is probably the best option I've seen that preserves the properties I want out of a configuration language (correctness, determinism, turing incompleteness, easy projection into other formats, etc).
> However, when you protect an import with a semantic integrity check the import is permanently locally cached after the first request, so subsequent imports will no longer make outbound HTTP requests.
Also this PR to nixpkgs from 2020: https://github.com/NixOS/nixpkgs/pull/79900
> Many users have requested Dhall support for "offline" packages ... The goal of this change is to document what is the idiomatic way to implement "offline" Dhall builds ... The trick to implementing offline builds in Dhall is to take advantage of Dhall's support for semantic integrity checks. ... The offline nature of the builds are enforced by compiling the Haskell interpreter with the -f-with-http flag ...
https://docs.dhall-lang.org/discussions/Safety-guarantees.ht...
(server-addresses)
(server-addresses (ipv4 "10.255.5.5:801") (localhost) (ipv6 "1234::5678") (ipv4 "10.255.25.25:8001"))
(list
(server (address (ipv4 "10.255.5.5")) (port "801") (allowed-countries (list "se" "no" "dk" "fi")) )
(server (name "nil") (allowed-countries nil) (address (ipv6 "1234::5678") )))Dhall and Cue are no doubt excellent and amazing for complicated use cases, but there are a lot of use cases where using them is akin to taking the VTOL jet out to pick up a few things at Trader Joe's.
Yeah, you always start out with K/V pairs but it never takes long until you need the same configuration but just with a slight tweak here or there. For example consider the same configuration but for different running environments.
People always come up with custom solutions per tool which some sort of metaprogramming, again in YAML. This is just bonkers IMO.
So why not just use a proper language from the beginning?
If I where to use it in Python, I would have to code a parser, then implement the entire type logic mysql.
And I bet this is why it's not more used: JSON or YAML are comparatively easy to implement because you just need the parser. You don't have a full featured language with a set based typing system on top.
Any new tech is esoteric at first.
When I started Python 20 years ago, there were no job offer for it in my country.
So like, Typescript but worse ?
Sometimes you want to let a user edit some fields in a map/dict/whatever, and that's it. I use TOML here, personally, but YAML has some advantages for more complex data, especially if string keys are long.
Not everyone is trying to set up a Kube cluster.
Honest question - what is the example use case here? Which configuration files in YAML are currently being handled by people who don't know any coding, and would be impeded by curly braces (and anything like JSON or XML)? I think this is only an imagined problem.
Also, I have a met a non-programmer lady from HR, who was able to download a VB script into Outlook and adapt it to her needs (which was some kind of automation). Richard Stallman made a similar observation with Emacs configuration. I think you quite underestimate what non-programmers can do.