423
submitted 7 months ago by db0@lemmy.dbzer0.com to c/opensource@lemmy.ml

Yet another "brilliant" scheme from a cryptobro. Naturally this caused a gold-rush for scammers who outsourced random people via the gig economy to open PRs for this yml file (example)

you are viewing a single comment's thread
view the rest of the comments
[-] rtxn@lemmy.world 13 points 7 months ago* (last edited 7 months ago)

And what would your ideal, legible, general-purpose data markup language be? XML?

[-] kogasa@programming.dev 9 points 7 months ago* (last edited 7 months ago)

Yaml Ain't Markup Language: am i a joke to you

(JSON for data, TOML for configuration)

[-] rtxn@lemmy.world 18 points 7 months ago

I've used both YAML and a TOML-adjacent INI format for Ansible. While I wouldn't use YAML for massive data serialization (because significant whitespaces are fucking stupid), it's much better suited for manual data entry compared to most options, including TOML, when nested data structures are required.

And if YAML's structure is too complicated, that's honestly a skill issue.

[-] kogasa@programming.dev 10 points 7 months ago

Not that YAML's structure is too complicated, but its syntax is too flexible. All the shit about being whitespace sensitive yet with whitespace errors leading to a syntactically valid YAML document. TOML's syntax is rigid which makes it unsuitable for expressing complex nested data structures, which is good because that's not what you should use TOML for. Ultimately the dependence on a highly flexible baseline language like YAML to create complex DSLs is a failure on the developers' part, and the entire configuration system should be reworked.

[-] moonpiedumplings@programming.dev 3 points 7 months ago* (last edited 7 months ago)

Do you use a linter like the ansible vscode extension?

I used to hate writing ansible, and yaml, until I installed the ansible lint vscode extension, and everything became much, much easier.

Later on, when I was working on a docker-compose, I noticed that the vscode yaml extension (which the ansible extension pulled in as a dependency) caught errors. It's quite intelligent, able to spot errors exactly like what you mentioned, where the yaml syntax is correct, but the docker-compose, or the ansible syntax is wrong.

[-] kogasa@programming.dev 3 points 7 months ago

Of course. If you're working in a DSL that's popular enough for someone to have written a good schema/parser for then tooling can help.

load more comments (11 replies)
load more comments (11 replies)
load more comments (19 replies)
this post was submitted on 27 Feb 2024
423 points (98.0% liked)

Open Source

30800 readers
966 users here now

All about open source! Feel free to ask questions, and share news, and interesting stuff!

Useful Links

Rules

Related Communities

Community icon from opensource.org, but we are not affiliated with them.

founded 5 years ago
MODERATORS