Live data from Hacker News

Left-Pad (2024)

azerkoculu.com

21–30 of 224 posts

Re: Left-Pad (2024)

#22
Azer Koçulu has never been a scourge to the NPM ecosystem. Nobody forced anyone to use left-pad. The reason it got included in so many projects is due to messy transitive dependencies.

Jon Schlinkert on the other hand is going out of his way to produce these micro libraries and then include them in his widely used legitimate projects (handlebars-helpers) with zero willingness to simply integrate them into the projects that actually use them. Here is the deal: Do you want to be trolled? Then use handlebars-helpers, if not, then stop using the damn library.

Re: Left-Pad (2024)

#24
post #4
post #3

I have to admit that I don't understand half of this blog post, feels like I'm missing some context, but I do like that the "left pad guy" does a post mortem. That said, this seems like a weird argument to me: > but I still don't understand why NPM didn't take the time to find out if any of my modules were widely used and consider ways to handle the unpublishing without breaking anything Sure, NPM's unpublish mechani…

For context, see https://en.wikipedia.org/wiki/Npm_left-pad_incident

11 lines of code! Wow. I had no idea it was that small.

Re: Left-Pad (2024)

#25

left-pad even being a package is pretty funny, no? How many bytes got pumped across CDNs, proxies, build pipelines, etc. just to write a tiny utility function? I'm all for taking advantage of existing solutions, but I can't wrap my head around needing to pad a string and thinking "oh, I bet there's a package for that"

The package's original implementation[1] also seems like it would have resulted in O(n^2) operation rather than desired O(n). [1] https://en.wikipedia.org/wiki/Npm_left-pad_incident

I don't see where the quadratic time complexity comes from. There's a single loop performing n operations in total, ie. O(n).

Re: Left-Pad (2024)

#26
post #16

It's a minor thing, but: > Most of my open source work followed Unix philosophy, so the packages did one thing at a time. Nobody has suggested that libc -- to take the most obvious example -- is against the Unix philosophy. Debates occur around whether whether commands / daemons do too much (recent poster child being systemd) or aren't composable.

If anything, the left-pad debacle has shown that NPM package granularity has gone way too small, at a point where package overhead was outweighing the package simplicity benefits.

Re: Left-Pad (2024)

#27
post #25

Earlier quoted context omitted.

The package's original implementation[1] also seems like it would have resulted in O(n^2) operation rather than desired O(n). [1] https://en.wikipedia.org/wiki/Npm_left-pad_incident

I don't see where the quadratic time complexity comes from. There's a single loop performing n operations in total, ie. O(n).

In each loop prepending a single character could take O(m) (moving all m characters one to the right) so combined O(nm) where n is the number of padding characters and m is the total number of characters in the string.

Re: Left-Pad (2024)

#28

The version history of the kik package[0] is odd. It has been replaced with a security holding package nine years ago[1]. [0] https://www.npmjs.com/package/kik?activeTab=versions

I think this is the biggest irony of it: the kik package, which kik where so desperate to have, is basically sweet Fanny Adams.

Also, Kik turn out to be negligent and pretty scummy. There was some controversy with them involving crypto, but the main thing I remember about them is that Kik is rife in terms of trading pornography, including child pornography, as discussed on this Darknet Diaries episode: https://darknetdiaries.com/episode/93/.

So, from that point of view, I quite enjoy that Azer Koçulu told them to fuck off.

Re: Left-Pad (2024)

#30

NPM (well Microsoft) forcibly took guy's package to give the name to this company: https://www.bbc.com/news/uk-45568276 Since then the name is basically squatted? Whether you use left-pad or not is up to you... but this Kik story is just a bad look for Microsoft all around.

You're aware this happened way before the Microsoft acquisition right?
Post reply on HN