this post was submitted on 24 Feb 2026
559 points (98.1% liked)

Programmer Humor

30013 readers
2058 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
 
top 50 comments
sorted by: hot top controversial new old

I love NixOS

[–] Klear@quokk.au 19 points 23 hours ago (1 children)

As someone who likes lua, I don't see the problem.

[–] _stranger_@lemmy.world 12 points 9 hours ago

The very minor and nitpicky problem is that if you want JSON just use JSON. there's still a place in the world for human readable/ editable configs that don't require linters to be run on them after. (Current TOML is fine, I like it).

[–] palordrolap@fedia.io 153 points 1 day ago (8 children)
orange = {
    you = "glad",
    I = {
        didn\'t = {
            say = "banana"
        }
    }
}
load more comments (8 replies)
[–] artifex@piefed.social 199 points 1 day ago (21 children)
[–] Valmond@lemmy.dbzer0.com 73 points 1 day ago (5 children)

Chuck in comments and I'm on board.

[–] socsa@piefed.social 2 points 9 hours ago

_comment: "this is a comment"

[–] luciferofastora@feddit.org 18 points 1 day ago (1 children)

They were chucked out because, according to the guy who defined it, people started using them for parsing directives, which hurt interoperability because now you needed to be sure that the parser would both read the comments and interpret them correctly. Suddenly, those comments might make otherwise identical files parse differently. If the whole point is that it's reliable and machine-readable, keeping it to the minimal set of features and not extending it any way whatsoever is a good way to ensure compatibility.

What you can do is define some property for comments. It's not standardised, but you could do stuff like

{
  "//": "This is a common marker for comments",
  "#": "I've never seen that as a property name, so it might be safe?",
  "_comment": "Property names with underscore for technical fields seem common enough as well, and it's semantically explicit about its purpose"
}
[–] The_Decryptor@aussie.zone 13 points 17 hours ago (2 children)

And also, JSON was intended as a data serialisation format, and it's not like computers actually get value from the comments, they're just wasted space.

People went on to use JSON for human readable configuration files, and instantly wanted to add comments, rather than reconsider their choice because the truth is that JSON isn't a good configuration format.

[–] BorgDrone@feddit.nl 6 points 10 hours ago

JSON was intended as a data serialisation format

Why then use a inefficient text based format instead of a much more efficient and easy to parse binary format?

Just use DER encoded ASN.1 like a normal person.

[–] luciferofastora@feddit.org 6 points 15 hours ago

People went on to use JSON for human readable configuration files

Speaking from my own experience, "I could also use this for..." seems to be a ubiquitous programmer affliction. Single-purpose tools that are great at their thing tend to be short-lived unicorns until someone starts sticking other parts onto them for additional functionalities, taking off the horn because it's in the way for some thing or other, and somehow we end up with yet another multi-function-tool that does a lot of things poorly.

[–] panda_abyss@lemmy.ca 87 points 1 day ago (4 children)

If we’re adding comments to json, can we add canonical support for trailing commas?

load more comments (4 replies)
load more comments (2 replies)
load more comments (20 replies)
[–] Michal@programming.dev 39 points 1 day ago (2 children)

I like this. I also like yaml, I've had very few issues with it and it's nicer to work with than json.

Json's lack of support for trailing commas and comments makes it very annoying for everyday use.

[–] backgroundcow@lemmy.world 1 points 53 minutes ago

Just the other day I had a list show up as ["a", "b", "c", "d", "e", false, "g", "h", "i"].

The issue was that, without me being overly aware of it, the data was going through a data -> yaml -> data step.

Yes, the data -> yaml filter was broken for not putting general strings in quotes. But IMO the yaml design invites these odd "rare" bugs.

I used to like yaml, but was happy to see Toml taking the niche of human-readable-JSON, but felt the format for nested key-value was a weird choice. However, I've always felt we could just have extended JSON a bit (allow line breaks, comments, if the outermost data type is an object, the curly brackets may be omitted).

[–] Senal@programming.dev 49 points 1 day ago (5 children)

Significant white-space is bullshit and i will die on this hill.

[–] softwarist@programming.dev 0 points 5 hours ago (1 children)
[–] 3abas@lemmy.world 2 points 3 hours ago

Because yaml is not a programming language, and debugging why your whatever you're configuring isn't working correctly can be a nightmare. It doesn't tell you you missed an indent on a block, it just assumes it should be there and changes the meaning.

Braces are visually clear.

[–] BlueKey@fedia.io 16 points 22 hours ago (1 children)

Is there space left on the hill? I want to join you.

[–] Michal@programming.dev 20 points 21 hours ago (2 children)

I hear there's significant space left

[–] _stranger_@lemmy.world 1 points 9 hours ago

Their whole thing is that they don't want to care about it, so if you get to the hill and there's no space, you're SOL.

[–] squaresinger@lemmy.world 9 points 19 hours ago (1 children)

But it's only white space. That's kinda racist.

[–] Senal@programming.dev 2 points 7 hours ago

significant white space to it's classist and racist

load more comments (3 replies)
[–] qevlarr@lemmy.world 72 points 1 day ago (5 children)
[–] LiveLM@lemmy.zip 32 points 1 day ago

The json spec is not versioned. There were two changes to it in 2005 (the removal of comments

See, this is why we can't have nice things.

load more comments (4 replies)
[–] panda_abyss@lemmy.ca 85 points 1 day ago (20 children)

If yaml didn’t have anchors and 8 different white space formats, it’d be a great replacement for this kind of thing.

But yaml is a mess, and you’d think you could parse it easily, but you can’t.

load more comments (20 replies)
[–] Solemarc@lemmy.world 24 points 1 day ago

If this is where the toml train ends I will be happy with it. If they do a yaml, I will be very upset.

load more comments
view more: next ›