Live data from Hacker News

Ignore the haters, and other lessons learned from creating JSON5

aseemk.substack.com

151–160 of 211 posts

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

#151

Earlier quoted context omitted.

This seems like making a mountain out of a molehill. > Extending the syntax is undoing all the communal work JSON5 takes stuff from ES5.1 and adds it to JSON, and ES5 is backwards-compatible with older JS. This means it's fairly trivial to convert JSON5 to JSON (literally 13 lines: https://gist.github.com/iddan/3d34b12f6b22c30a8a07c149b3175e... ). And ES5.1 itself was the product of communal work. > encroaching on gr…

> JSON5 takes stuff from ES5.1 and adds it to JSON, and ES5 is backwards-compatible with older JS. This means it's fairly trivial to convert JSON5 to JSON (literally 13 lines). This take is disingenuous and horribly uninformed and very shortsighted. Not every parser out there is JavaScript eval(). Some people actually had to write and maintain a parser in whatever programming language they have to work with. In the p…

Saying the take is “disingenuous” is certainly a rude and inappropriate response.

You can disagree with someone without accusing them of being insincere or arguing in bad faith (which is what “disingenuous” means).

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

#152

I can really relate to this. I posted something earlier this year about how a number of file system problems are directly related to an archaic architecture that was designed when hard drive capacities were measure in MBs. I offered a possible solution in a hobby project that I have been working on for years. https://news.ycombinator.com/item?id=30449263 While there were some really good comments, the vast majority w…

>(BTW: the comments on HN were much more civil than on Slashdot where the story also got picked up) Slashdot stopped being a worthwhile place to frequent at least 10 years ago. It's devolved into an utter cesspool, since all the quality people fled for greener pastures ages ago. I recommend ignoring its existence altogether at this point, along with any comments from that site.

I don’t remember the Slashdot comments ever being valuable. It was flooded with troll comments, and once you got past the troll comments, there were low-effort jokes, “first”, etc. Dig through the Internet Archive and you’ll see old Slashdot comments in all their glorious mediocrity.

Or search for “gnaa”, but not if you’re on a corporate network.

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

#153

I don't think ignore the haters is sage advice in this context. What was directed at this project in the original HN thread was not hate , it was criticism . These are very different things. People were not abusing the author. Some of the original commenters had very salient critiques, and questions. "Ignore the haters" reads like: "I ignored all criticism of my idea, and some other people like it anyway." . There's…

The criticism highlighted in the article looks more like hate than criticism, to me.

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

#154
post #33

Earlier quoted context omitted.

I read and write json manually almost every day. I haven't bothered to insert json5 in our pipelines for various reasons, but I sure wish it was the default. The interesting question I think is, why do you think json is so used in that capacity despite not being meant for it? Why YAML, despite being so widespread, hasn't swept json away for those purposes? (let's for a moment ignore that YAML can go REALLY nuts, and…

I used to think YAML would be great for that sort of thing. Now, having dealt with some large YAML files, I understand at least a couple of reasons why people don't like it for that. Things that are invisible when visually looking at a file, and not really detectable by IDEs or linters or anything (because they would have to assume your intent). In a small file, semantic indentation is beautiful. In a large file wher…

References are used quite a bit. Look at OpenAPI; they're critical to that effort.

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

#155
post #9

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.

If you had OpenAPI to document the JSON, where would you use comments in the JSON payload?

Why would you assume that you would?

If you did, I guess it would be anywhere that you had a description in the OpenAPI document. But I wouldn't do that.

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

#156

Earlier quoted context omitted.

> This means it's fairly trivial to convert JSON5 to JSON (literally 13 lines: https://gist.github.com/iddan/3d34b12f6b22c30a8a07c149b3175e... ). Did you paste the correct link? This just plumbs together an existing JSON 5 parser with a JSON 4 serializer. How many lines does this take without importing a library the solves this for you?

JSON5 parse constructs a Javascript object, which can in turn be serialized by JSON 4 into valid plain JSON string. That's not an invalid way of converting the two objects. JSON.stringify is part of the standard JS spec: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe... JSON5.parse() is part of JSON5's API: https://json5.org/#json5parse So any project that includes both standard JS and JSON5 could liter…

What about the vast majority of languages that aren’t JavaScript?

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

#157
post #132

In videogames, "If there are enemies ahead of you, then you are going the right now." I have long held the belief that if the audience of Reddit or Twitter or Slashdot or Hackernews universally hates something with such vehemance that you doubt your own thoughts then you are probably doing the right thing. In the words of Casey Neistat, in his video "Do what you can't." - "To the haters, the doubters, my 7th grade vi…

That's a terrible outlook. You are saying that all negative feedback should be ignored by everybody and treated as a positive sign. This is insane.

Nowhere, not once, did I say that all negative feedback should be ignored. I specifically stated "I have long held the belief that if the audience of Reddit or Twitter or Slashdot or Hackernews universally hates something with such vehemance that you doubt your own thoughts then you are probably doing the right thing."

This is not "all negative feedback" or "that it should be ignored by everybody" or "treated as a positive sign" and it is disingenuous of you to imply otherwise or to conflate it as such. I'd like to introduce you to a video between a psychologist and someone with an agenda: "So what you're saying is..." No, that's not what I am saying at all. I cannot decide if you have poor reading comprehension or want to twist someone's words. Perhaps both. I'm done with this discussion with you because I'm not going to engage with someone who suffers from the former or wants to engage in the latter.

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

#158

The only 2 things I'd like to add in JSON are trailing commas and comments, and this is already supported in most JSON configs (.eslintrc, .babelrc, ..), it's called JSONC I believe

Another name for this is JWCC. IMO very good argument for this feature set here:

https://nigeltao.github.io/blog/2021/json-with-commas-commen...

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

#159
I'll take any feedback. If someone tells me I'm dumb and have it wrong, I thank them and fix it. Now they can't complain about it, I learned something, and someone spent their time giving me free advice.

But if they don't convince me I'm wrong, then I ignore them. :)

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

#160

Earlier quoted context omitted.

>(BTW: the comments on HN were much more civil than on Slashdot where the story also got picked up) Slashdot stopped being a worthwhile place to frequent at least 10 years ago. It's devolved into an utter cesspool, since all the quality people fled for greener pastures ages ago. I recommend ignoring its existence altogether at this point, along with any comments from that site.

I don’t remember the Slashdot comments ever being valuable. It was flooded with troll comments, and once you got past the troll comments, there were low-effort jokes, “first”, etc. Dig through the Internet Archive and you’ll see old Slashdot comments in all their glorious mediocrity. Or search for “gnaa”, but not if you’re on a corporate network.

Maybe I'm wearing rose-tinted glasses, but I remember Slashdot comments being full of highly insightful and informative comments back in the early 2000s.
Post reply on HN