News for hackers. Stuff that matters.
Re:70% of new NPM packages in last 6 months were spam by lolinder on Wednesday August 07, 2024 @08:23AM (#41180648)
I know it's a meme on HN to rant about the terrible JavaScript ecosystem and how bad JS developers are, but I would ask that if you're going to do it you be specific about what you mean instead of just generally accusing it of being "bad".

It's not even that I disagree, it's that it's a conversation killer. "The JS ecosystem is bad" has no response someone could make besides "no it's not", which is boring. "The JS ecosystem encourages using a million tiny unmaintained packages and that is bad" is a much more interesting statement that can spark a useful discussion.

Re:70% of new NPM packages in last 6 months were spam by marginalia_nu on Wednesday August 07, 2024 @08:43AM (#41180800)
We can empirically observe that NPM-sphere is relatively alone among software ecosystems to have this particular problem.

This is an indication that the problem is either with some facet of NPM itself, javascript the language or js programmers, as that is what distinguishes the ecosystem from e.g. Maven or Pip that do not suffer from the same problems, at least not to the same extent.

However, going from this observation to isolating causal factors is a lot harder, and randomly guessing isn't very likely to hit the mark.

Re:70% of new NPM packages in last 6 months were spam by WA on Wednesday August 07, 2024 @08:56AM (#41180924)
It's two things really: a small standard library and sheer size of developer community. JS has way more developers than any other language. But if you search for "$PROGRAMMING_LANGUAGE supply chain issues" you literally find reports for all popular languages.

[1] claims that half of Python packages have security issues.

[2] says that the Rust supply chain has security issues.

just as two examples.

---

[1]: https://www.theregister.com/2021/07/28/python_pypi_security/

[2]: https://news.ycombinator.com/item?id=40864787

Re:70% of new NPM packages in last 6 months were spam by lolinder on Wednesday August 07, 2024 @08:57AM (#41180939)
You're doing it again, though: are "this particular problem" and "these problems" the tea.yaml spam? The million tiny packages problem I mentioned? The fact that people online will generically attack the ecosystem without being specific about their complaints?

I'm not asking for solutions, and I'm not asking for people to identify casual factors. I'm asking for people to put a little bit more effort into their criticisms of the JS ecosystem than just "it's obviously and empirically a dumpster fire".

Re:70% of new NPM packages in last 6 months were spam by pdimitar on Wednesday August 07, 2024 @09:12AM (#41181094)
A lot of people have already been very specific in many other threads -- "the JS ecosystem has way too many and way too small packages and there's zero curation".

Not sure what your seemingly intended moderation is supposed to achieve but the complaints towards the JS ecosystem have been very clear for no less than 10 years.

Re:70% of new NPM packages in last 6 months were spam by marginalia_nu on Wednesday August 07, 2024 @10:13AM (#41181680)
"70% of new NPM packages in last 6 months were spam"
Re:70% of new NPM packages in last 6 months were spam by lolinder on Wednesday August 07, 2024 @10:27AM (#41181820)
So we're specifically talking about the tea.yaml spam. More than any other topic that seems like one that is worth digging into details on rather than just shrugging and saying isolating causality is hard.

If we look at the chart in the original article [0] that this one is a follow up to, the NPM spam suddenly picked up around the end of February, with new packages per day first doubling and then tripling. So this 70% figure is specific to the last 6 months, not something that has been the case with the ecosystem for a long time.

That makes tracing causality much simpler: the Tea protocol seems to be pretty clearly the source of the problem. The big open question is why NPM, but the way that people jump to the conclusion that NPM being the target of this attack must have something to do with the flaws in the ecosystem smacks of victim blaming. Isn't it just as possible that NPM was targeted because it's huge? If you're going to run a massive spam campaign you do it where the people are.

Could NPM learn from this and start controlling spam better? Yes! But That's not the same thing as attributing this tea.yaml nonsense to systemic flaws in the ecosystem—spam prevention has to be balanced with usability, and the balance was pretty decent until 6 months ago.

[0] https://blog.phylum.io/digital-detritus-unintended-consequen...

Re:70% of new NPM packages in last 6 months were spam by brynb on Wednesday August 07, 2024 @09:22AM (#41181200)
and then there's go, wherein you simply don't import anything outside of the stdlib. a stoic and rather perfect immunity to this nonsense
Re:70% of new NPM packages in last 6 months were spam by marcosdumay on Wednesday August 07, 2024 @11:59AM (#41182670)
The JS ecosystem doesn't have any singular bad feature that other languages do not share.

Instead, what it does have is a huge prevalence of those features, and minimal size of a "safe space" where one can have some confidence they will not appear. Both of those are quantitative differences, that people can not summarize in a short comment, and people can easily dismiss with (misguided or dishonest) counterexamples.

So, what you are asking for is a full blown large scale study of several ecosystems. Somebody may do something like that, but not for a comment, and not because you asked.

Re:70% of new NPM packages in last 6 months were spam by lolinder on Wednesday August 07, 2024 @12:16PM (#41182829)
I ask because I don't believe the JS ecosystem is notably worse than the Python ecosystem or the Java ecosystem and I'm tired of the meme of railing on JS developers when what people are really railing against is developers in general.

All ecosystems that are sufficiently popular have terrible problems. They have different problems, but none is consistently pleasant to work with. Out of all of them, though, JS gets singled out for constant attacks because... reasons.

I just want people to identify what those reasons are so we can have a conversation about them rather than just repeating the meme endlessly.

Re:70% of new NPM packages in last 6 months were spam by sushibowl on Wednesday August 07, 2024 @08:36AM (#41180742)
> The JS ecosystem encourages using a million tiny unmaintained packages and that is bad

continuing on this, I wonder if this is a cultural thing or if there are actual technical choices made in NPM that play a role. Could NPM change something in their package management to change this? Should they?

Re:70% of new NPM packages in last 6 months were spam by brynb on Wednesday August 07, 2024 @09:28AM (#41181258)
it's language-cultural. to "publish a package" in Go simply means having a public git repository. and yet, nobody who writes Go imports packages. it's well-understood that if you can't write something like leftpad (or many other JS packages) yourself in your own codebase in a few lines, you're an absolute nonce. Javascript developers on the other hand tend to skew towards the juniors in our broader ecosystem, and they seek easy and quick prestige, which leads to "star farming"/"download farming"
Re:70% of new NPM packages in last 6 months were spam by lupire on Wednesday August 07, 2024 @09:39AM (#41181366)
So no one uses all those Go libraries on GitHub? Hmmm except pedophiles? What is wrong with you?
Re:70% of new NPM packages in last 6 months were spam by brynb on Wednesday August 07, 2024 @01:49PM (#41183639)
... _what_? i don't think you parsed my comment correctly at all

to address the part of your comment that doesn't make my head spin: only very occasionally do i see senior Go developers import 3rd party libraries. i'm just speaking from my experience

Re:70% of new NPM packages in last 6 months were spam by gleenn on Wednesday August 07, 2024 @08:43AM (#41180806)
The Lpad fiasco was pretty bad, being able to delete libraries used by so many people. Hard to forget that.
Re:70% of new NPM packages in last 6 months were spam by lolinder on Wednesday August 07, 2024 @08:48AM (#41180845)
Which, incidentally, some people seem to have forgotten when suggesting that NPM should start deleting things en masse.
Re:70% of new NPM packages in last 6 months were spam by pdimitar on Wednesday August 07, 2024 @09:14AM (#41181117)
What other outcome than "curation" do you see as a solution of the "bloat" problem?
Re:70% of new NPM packages in last 6 months were spam by dgfitz on Wednesday August 07, 2024 @10:25AM (#41181799)
A new npm-esque?
Re:70% of new NPM packages in last 6 months were spam by pdimitar on Wednesday August 07, 2024 @10:37AM (#41181932)
Meaning what exactly, sorry?
Re:70% of new NPM packages in last 6 months were spam by 3np on Wednesday August 07, 2024 @07:12PM (#41186471)
One possible outcome: Start considering it a public namespace (which in practice it's been not far from for a long time).

Meaning curation falls outside it and should not be centrally and unilaterally enforced by gating the entry.

We seem to be handling the bloated .com DNS namespace just fine.

Re:70% of new NPM packages in last 6 months were spam by pdimitar on Wednesday August 07, 2024 @07:30PM (#41186584)
> We seem to be handling the bloated .com DNS namespace just fine.

If you say so. I wouldn't think that.