Live data from Hacker News

Ignore the haters, and other lessons learned from creating JSON5

aseemk.substack.com

61–70 of 211 posts

Re: Ignore the haters, and other lessons learned from creating JSON5

#61
post #50

Earlier quoted context omitted.

Umm you can find burning trash in your backyard useful to yourself - but it's still polluting the neighborhood (eg. people using this crap in APIs or pulling down useless dependencies to get this). It's especially bad if you start promoting your practices and get your neighbors start doing this as well. I completely understand the reaction and find his repo a very appropriate response.

This is a great example of how argument by analogy completely breaks down and just helps the author express their feelings. But for a second it makes them feel smart.

Maybe expressing feelings about the topic, as a guess behind the motivation for the mocking repo, was my intention ? (like I said in the second part of the post)

Left-pad shitshow showed how relevant NPM dependency chain is as a measure of quality and what it does for the ecosystem. This is left-pad with added complexity to sneak in malicious code.

Re: Ignore the haters, and other lessons learned from creating JSON5

#62

I don't think writing an article about hackernews comments from two years ago is exactly what I'd call a lesson in ignoring the haters, but this reads a little bit like someone writing an article about the roaring success of null references after their adoption. despite popularity, most of the technical comments in that original thread aren't wrong. 'Popular', 'Easy to adopt' and 'a very bad idea' can be overlapping…

From my experience, the current generation of programmers value convenience beyond everything else, with a great margin. This is not wrong per se, but it calls for much more complex code which handles all the edge cases, and hurts performance at the end of the day. Then, this small performance penalties pile-up and the same developers ask why their code is not working as fast as it should. I don't call for very pedan…

This might be a preference revealed in which libraries people choose but I think it is not really exhibited in the kind of libraries or code that people write. You aren’t seeing the vast majority of libraries that aren’t convenient because they don’t get released as open source or become popular.

In my experience, some of the projects which have been most valuable have been those which follow a theme of ‘do something really horrible or annoying inside our program so that the users don’t need to deal with the nastiness’. For example it might mean having to write code with some unpleasant hacks or in a very weird way to fit underlying apis or performance requirements; or it could mean spending a bunch of time manually tuning some heuristics because those heuristics improve the library.

Re: Ignore the haters, and other lessons learned from creating JSON5

#63
Here's the old (2012) HN thread with the haters in it: https://news.ycombinator.com/item?id=4031699 . Happy to see an old (positive) comment of my own that I had forgotten about, which I think sums the whole thing up quite well. It still applies, so I'll repost it here:

You know that something has gone very deeply wrong somewhere when people oppose your project because they are ideologically opposed to comments. In my own experience, finding out that many JSON parsers reject comments was a real WTF moment, and a deal breaker for my config-file application, so I ended up using JSON-plus-comments for it instead of JSON. At the same time, lack of support for trailing commas and unquoted member names have been a minor but persistent thorn in my side for no good reason. The justification for not having comments in JSON is that in the great disaster that was XML, some projects would parse the comments and take them as semantically significant. However, the real problem there was that parser libraries would expose the comments, and that some generators would put important information only in comments. But I think that these mistakes are unlikely to be repeated, and that the proposed alternative - moving all comments into the markup, or eliminating them entirely - is just obviously worse.

One of the things that ruined the XML ecosystem was a persistent belief that XML was to be read and written by machines, combined with a reality in which it was mostly used for human-written config files, leading to a tolerance for awful syntax (like prefixing every single attribute with a namespace, and the ridiculous CDATA notation). I'm seeing the same thing with JSON: A significant fraction of its use is for human-written and human-read config files (which often desperately need comments) and people are pretending it's strictly a data interchange format that shouldn't be used for that.

It is sometimes said that JSON was discovered, rather than invented - that the syntax was already out there. So it is with JSON5: There is nothing new in this, it is simply return to JavaScript Object Notation and bringing in the rest of what Javascript has.

So, all you pooh-poohing ideologists: please seriously rethink whether disallowing comments, trailing commas, and quoteless member names is actually a good idea. Consider this in light of the fact that JSON is widely used, today, as a config-file language, and that {"--":"This is a comment"} is ridiculous enough that no one does it in practice, can't be inserted on any line, and invites consumers of your data to parse the comments.

Re: Ignore the haters, and other lessons learned from creating JSON5

#65

Does ‘downloads per day’ actually mean anything? It could be someone large company’s CI system building on every commit. I don’t think I’ve ever seen a JSON5 file in the wild. I’ve always wanted comments in JSON, but the other issues highlighted are not things I care about. The ‘be lenient in what you accept’ philosophy is a disaster, just look at HTTP… stricter is better IMO.

"The ‘be lenient in what you accept’ philosophy is a disaster" - I've seen that stated before, and I don't think I quite agree. It depends on how much market power you have - if you're Chrome or Safari, I agree, you should display non-compliant pages in a way that makes it obvious that they're broken. But if you're just developing a backend component that happens to consume data in a particular format and it's not part of a system that millions depend on daily, ensuring it can handle non-strictly-conforming input well usually pays off (but by all means, do what you can to warn relevant users).

Re: Ignore the haters, and other lessons learned from creating JSON5

#66

Here's the old (2012) HN thread with the haters in it: https://news.ycombinator.com/item?id=4031699 . Happy to see an old (positive) comment of my own that I had forgotten about, which I think sums the whole thing up quite well. It still applies, so I'll repost it here: You know that something has gone very deeply wrong somewhere when people oppose your project because they are ideologically opposed to comments. In m…

[deleted]

Re: Ignore the haters, and other lessons learned from creating JSON5

#67
post #30
post #8

I'm kind of appalled that the Hashicorp guy went that far to put someone down for just building something they found useful to themselves. What a great way to discourage someone from expressing themselves creatively. Glad Aseem carried on regardless.

I wouldn't want to work for some company whose founder can be openly toxic against a project that solves an actual problem.

How many years ago was this? I’m sure Mitchell has grown a lot and matured since then. Just like everybody else. He did something a little mean spirited. Maybe even something he regrets now. I think he deserves a little bit of grace.

Re: Ignore the haters, and other lessons learned from creating JSON5

#68

Here's the old (2012) HN thread with the haters in it: https://news.ycombinator.com/item?id=4031699 . Happy to see an old (positive) comment of my own that I had forgotten about, which I think sums the whole thing up quite well. It still applies, so I'll repost it here: You know that something has gone very deeply wrong somewhere when people oppose your project because they are ideologically opposed to comments. In m…

https://hn.algolia.com/?dateRange=all&page=0&prefix=true&que...

Re: Ignore the haters, and other lessons learned from creating JSON5

#69

Earlier quoted context omitted.

Of course premature optimization is root of all evil, but JSON is a data exchange format above all else, and using a more relaxed version of it will inevitably incur a higher overhead, and its original format is just native to the language itself. I personally prefer to choose a simpler, and a bit more pedantic versions of stuff whenever I develop something, and while it doesn’t break performance records OOTB, the pe…

My assumption here is that, like you, other people will continue to use strict JSON for APIs and interchange, and use JSON5 for configuration as appropriate.

That’s my hope too. In fact the idea is very neat, but it involves humans. So I’ll just observe. :)

Re: Ignore the haters, and other lessons learned from creating JSON5

#70
post #47

Earlier quoted context omitted.

Shockingly about 98% of the population doesn't find massive mounds of nested parens especially readable.

But make the brackets curly and it's fine.

Curly bracket languages don't require braces around every statement.

If C was written like

    {if {x == 1}{
      {return {x + 1};}
    }
Maybe you'd have a point
Post reply on HN