Live data from Hacker News

Ignore the haters, and other lessons learned from creating JSON5

aseemk.substack.com

171–180 of 211 posts

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

#171

Earlier quoted context omitted.

I read through most of those comments and while a lot of them are critical or negative I would still say most of them are "good" as in that they are constructive and give feedback on the idea or it's execution. When you say "While there were some really good comments, the vast majority were very negative and critical" it sounds like you think that negative or critical comments cannot be good.

I took another look at the HN comments and I think you are right, there were a lot more constructive comments there. I guess I just remembered the toxic comments on Slashdot a lot more and mixed the two in my memory.

> I just remembered the toxic comments

We tend to pay more attention to the negative and dangerous -- a survival thing, right (from when we were hunters and gatherers)

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

#172
post #97

I still don't get what the point of json is. If you want to dump raw JS data structures as text just do. You don't need a spec or special tools. If you want human readable XML just use s-expressions. Something that's so easy to parse you can roll your own in an afternoon. Json is trying to square the circle of "I want things to be easy" but also "I want to not shoot myself in the foot", goals which are mutually exclu…

No, these goals aren't mutually exclusive and I am not sure where "shoot myself in the foot" fits here. It's a serialization format and has many practical use cases. At least back your claims with concrete examples. There's only a single JSON ISO standard (21778:2017). Why do you feel compelled to comment on topics you don't have knowledge about?

You're posting this in a thread about json5. Clearly there isn't just one json standard.

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

#173

Earlier quoted context omitted.

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.

Insightful comments, long ago. Yes wasn't it a bit like HN is today, back that long ago

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

#174
post #94

I still don't get what the point of json is. If you want to dump raw JS data structures as text just do. You don't need a spec or special tools. If you want human readable XML just use s-expressions. Something that's so easy to parse you can roll your own in an afternoon. Json is trying to square the circle of "I want things to be easy" but also "I want to not shoot myself in the foot", goals which are mutually exclu…

"s-expressions" is vaporware. Everyone who says it has a slightly different format in mind. It's easy to be all things to all people when you don't have to actually implement anything.

Every lisp program supports that serialization format out of the box.

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

#175

I still don't get what the point of json is. If you want to dump raw JS data structures as text just do. You don't need a spec or special tools. If you want human readable XML just use s-expressions. Something that's so easy to parse you can roll your own in an afternoon. Json is trying to square the circle of "I want things to be easy" but also "I want to not shoot myself in the foot", goals which are mutually exclu…

If I wanted to dump raw JS data structures as text the most straightforward way I can think of is `JSON.stringify` and `JSON.parse`. No need to roll your own S-expression parser.

console.log(a)

eval(a)

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

#176
post #165

Earlier quoted context omitted.

You don't have to set up local mirrors. You can start the build with periodically-saved node_packages, or if you're using docker "ADD packages.json, RUN npm install", or commit vendored modules, or do one of thousand of other things. For some companies release just means another merge to master, so they are doing tens/hundreds releases a day. Once you do enough development that this matters, you're going to be doing…

Yes you CAN do all of these things, but do people do them? Consider that for developers a slow build = break time. https://xkcd.com/303/ And just running npm or pip at every turn is easier than setting up all of that, so there needs to be a push to do it. And the server of those entities seem to be able to deal with the load. In my first job we had autoscaling cloud servers that took 30-40 minutes to be operational.…

> Yes you CAN do all of these things, but do people do them?

Yes, they do. Mostly as a result of looking for infra savings, optimising job time, improving reliability after some process fails when npm is down. It takes some longer than others. It's not necessarily devs that will do it either.

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

#177
post #94

Earlier quoted context omitted.

"s-expressions" is vaporware. Everyone who says it has a slightly different format in mind. It's easy to be all things to all people when you don't have to actually implement anything.

Every lisp program supports that serialization format out of the box.

No, every lisp program supports its own idiosyncratic variation on it, no two alike.

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

#178

Earlier quoted context omitted.

> 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).

It is disingenuous to reply to a comment about "undoing all the json parser work across multiple languages" with "no it hasn't it's just 13 lines in javascript see!"

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

#179

Earlier quoted context omitted.

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).

It is disingenuous to reply to a comment about "undoing all the json parser work across multiple languages" with "no it hasn't it's just 13 lines in javascript see!"

It is potentially uninformed, possibly mistaken, but not disingenuous.

We're supposed to assume best intent.

Accusing someone of being "disingenuous", "horribly uninformed" and "short sighted" for providing an different opinion isn't doing that.

I learned something from the post. I learned that these enhancements are already mostly being codified in the language.

That influenced my opinion on the subject.

I assumed that the 13 lines of code comment was in the context of js, not (for example) a c parser, where it's pretty normal for 13 lines of js to translate to hundreds or potentially thousands of lines of C code.

The post was informative and respectful.

The name-calling response was not.

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

#180

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

Proper support for dates too.
Post reply on HN