News for hackers. Stuff that matters.
Re:A notable JavaScript developer shamelessly copied one of ... by tomxor on Sunday September 26, 2021 @10:49AM (#28661306)
> I think because JS is such a large tent, there are folks not familiar with licenses and general norms in this space.

It's worth pointing out that this is all about a bunch of packages that decorate strings with ANSI colour escape sequences... I'm not saying it's worthless, or that there is nothing wrong in principle - but it's a lot of noise over something easily replicable from scratch - something simple enough that you may even choose to not bother with a library, (i've always just used ANSI codes directly in JS command line tools, sometimes defined in a few constants and interpolated for readability).

So perhaps the reason why one author is so pissed at misattribution, and the other allegedly doesn't seem to care much about it, is explained by a large difference in perceived value of the code.

To make my point more potent, imagine it was the same debacle over one of the many infamous one line NPM packages like "is-odd" which currently has half a million downloads per day and ultimately consists of the code "return (n % 2) === 1;"... excluding all of the fluff, and even with some unnecessary parenthesis.

Re:A notable JavaScript developer shamelessly copied one of ... by fenomas on Sunday September 26, 2021 @12:04PM (#28662009)
I don't think this is a fair framing. This isn't left-pad - it's a library that abstracts something people find annoying, and finding the right abstraction can be difficult even if the final code doesn't seem complicated. Add in a few years of bug fixes and whatnot, and it seems pretty rude to dismiss the result as "easily replicable from scratch".
Re:A notable JavaScript developer shamelessly copied one of ... by tomxor on Monday September 27, 2021 @08:26AM (#28669791)
I think I made it clear enough that I was suggesting these packages are somewhere above the one-liners. While I agree finding the right abstraction is useful and takes time, I find it hard to apply that to a package that provides a function that wraps strings... I think it's fair to say that it's somewhat useful, but easy to replicate from scratch, and that's ok it deserves to exist - it does however considerably affect how different people perceive it's value.

But perhaps for contrast we should compare to the other end of the spectrum... Intel uses Minix3 in intelME which is part of every modern intel CPU [0]. Minix3 has a 3 clause BSD license which requires reproducing the copyright notice for basic attribution [1]. Which they failed to reproduce. Now in Tanenbaum's public letter, he politely suggested it would have been courteous if they had merely informed him of what it was being used for [2]... no mention of lack of attribution, no hysteria, no invoking of the mob on twitter, he didn't make even 1/10th the fuss this NPM package developer made.

Lets cut to the chase: The difference between these two people is that one cares about attribution way more than contributing to FOSS. They care about it to such a degree that makes me uncomfortable to touch their code, in-case of any perceived injustice against them or missed opportunity for self-promotion.

[0] https://en.wikipedia.org/wiki/Intel_Management_Engine#Hardwa...

[1] https://github.com/minix3/minix/blob/master/LICENSE

[2] https://www.cs.vu.nl/~ast/intel/

Re:A notable JavaScript developer shamelessly copied one of ... by hitekker on Monday September 27, 2021 @06:22PM (#28676802)
The difference is that someone pirated another person's software and tried to get away with it. Then that person's fan club wrote a bunch of nonsense to distract, deflect and cloud their malfeasance.

Attribution may not be a concern for career criminals but FOSS tries to stay on the side of the law. Otherwise, projects risk being "tainted" by copy-pasted code that could lead to even larger legal repercussions. ReactOS had its development shut down in 2006 because of mere allegations; they had to prove all their code was written by themselves

https://reactos.org/project-news/reset-reboot-restart-legal-...

Re:A notable JavaScript developer shamelessly copied one of ... by tomxor on Tuesday September 28, 2021 @05:03AM (#28680673)
wow... listen to yourself, this is FOSS, we aren't the MPAA. You are just banging the drum louder for the OP, nothing to do with what I said at all.
Re:A notable JavaScript developer shamelessly copied one of ... by hitekker on Tuesday September 28, 2021 @12:38PM (#28684734)
If you don't care about software licenses or attribution, then you're not apart of FOSS. Sorry, Tom
Re:A notable JavaScript developer shamelessly copied one of ... by cnst on Sunday September 26, 2021 @12:15PM (#28662107)
I think it's worth pointing out that these pull requests replace a totally unrelated package with either one of these two packages that claim to be copying each other.

The way it was framed was that someone forked a packaged and started replacing all users; not what happened.

Also: I don't even use JS, so, I have no idea who these people or libraries are.

Re:A notable JavaScript developer shamelessly copied one of ... by fenomas on Sunday September 26, 2021 @12:45PM (#28662338)
I was replying to GP's suggestion that the argument is over relatively trivial code, not to anything about the core dispute.
Re:A notable JavaScript developer shamelessly copied one of ... by diroussel on Sunday September 26, 2021 @11:34AM (#28661691)
There can be a lot of value in value in a code base such as this. Just copy an existing open source lib, add a small speed up, push for fast adoption across common OS build tools, now you can sell committer rights for a high price to anyone wanting to launch a supply chain attack. Could be very profitable.

This is of course unlikely to be ai’s motivation. I just wanted to present a count point to the argument that such modules have low value.

Re:A notable JavaScript developer shamelessly copied one of ... by tomxor on Sunday September 26, 2021 @11:38AM (#28661743)
Very true, this is a reason i'm trying to distance myself from the NPM ecosystem actually... It's a cultural problem as much as a technical one, and it is ripe for exploitation... In combination with some of the NPM CVEs revealed in the past, it's pretty scary the reach and potential a single NPM package has for destruction and exploitation... and that is before even considering packages that get included in front and back end code for the web.
Re:A notable JavaScript developer shamelessly copied one of ... by ta988 on Sunday September 26, 2021 @11:23AM (#28661569)
I thought it was a joke your is-odd comment. But no it is at version 3.0.1 and has 2.1 million downloads a month[0]... And it has a dependency to is-number. With the performance of today's tree shaking systems I wonder why there is not a simple math lib.

[0] https://www.npmjs.com/package/is-odd

Re:A notable JavaScript developer shamelessly copied one of ... by tomxor on Sunday September 26, 2021 @11:29AM (#28661628)
It's pretty crazy. For whatever reason there is a substantial culture around NPM usage of preferring to depend on lots of trivial packages, over writing simple inline equivalents. And it's recursive, which can mean depending on what seems to be a modest but useful package at the top of that hierarchy ends up pulling down 10k packages.

I think this makes it easier to acquire an inflated sense of importance when an authors package reaches popularity - most of the small packages have some value and aren't as ridiculously worthless as "is-odd"; yet they also don't embody anything particularly unique or difficult to replicate.

> I wonder why there is not a simple math lib.

There are some non-standard but comprehensive math libraries such as MathJS. Although I don't think "is-odd" could be attributed to an absence of standard math libraries.

Re:A notable JavaScript developer shamelessly copied one of ... by dudeinjapan on Sunday September 26, 2021 @11:48AM (#28661842)
In fairness to the OP he did optimize the hell out of his colorette lib, it's about 1/10th the size of the widely adopted chalk lib and performs way better. Back in the day I remember he was (rightly) complaining that the chalk author submitted PRs to get chalk used in as many libs as possible, while colorette (or whatever it was called--it has a different name before) was the technically superior solution to the problem.
Re:A notable JavaScript developer shamelessly copied one of ... by smoldesu on Sunday September 26, 2021 @01:02PM (#28662491)
Then he should have made a PR, or at the very least retained the commit history to recognize the original programmer's work. That's non-negotiable, because commit history can be essential to understanding breakage in mature libraries. The fact that anyone would feel comfortable erasing it leads me to believe there's an ulterior motive.
Re:A notable JavaScript developer shamelessly copied one of ... by honzzz on Sunday September 26, 2021 @01:54PM (#28662950)
If I understand correctly, the parent is talking about the original author of the library, not the person who forked it.
Re:A notable JavaScript developer shamelessly copied one of ... by dudeinjapan on Sunday September 26, 2021 @11:24PM (#28666767)
Yes, this is correct, I was referring to colorette's maintainer. Sorry for confusion.
Re:A notable JavaScript developer shamelessly copied one of ... by zkldi on Sunday September 26, 2021 @12:05PM (#28662018)
For what it's worth, this is also all the work of one person who spammed NPM with micropackages to boost his download counts. This meme attacking `npm` for nonsense like `is-odd` is quite literally the result of one person resume boosting.

For every one thing, he broke it down into as many possible packages as possible, and all of his packages depend on 20 more of his packages. It's like a fractal of resume boosting.

https://github.com/jonschlinkert/info-symbol https://github.com/jonschlinkert/success-symbol https://github.com/jonschlinkert/warning-symbol https://github.com/jonschlinkert/error-symbol

My personal favourite is making every single ansi colour into a separate package, and then making `ansi-colors` which depends on all of them, and all of these packages are just a single function call with a provided number. It's honestly insane.

https://github.com/jonschlinkert/ansi-black

https://github.com/jonschlinkert/ansi-reset

https://github.com/jonschlinkert/ansi-bold

https://github.com/jonschlinkert/ansi-dim

https://github.com/jonschlinkert/ansi-italic

https://github.com/jonschlinkert/ansi-underline

https://github.com/jonschlinkert/ansi-inverse

https://github.com/jonschlinkert/ansi-hidden

https://github.com/jonschlinkert/ansi-strikethrough

https://github.com/jonschlinkert/ansi-black

https://github.com/jonschlinkert/ansi-red

https://github.com/jonschlinkert/ansi-green

https://github.com/jonschlinkert/ansi-yellow

https://github.com/jonschlinkert/ansi-blue

https://github.com/jonschlinkert/ansi-magenta

https://github.com/jonschlinkert/ansi-cyan

https://github.com/jonschlinkert/ansi-white

https://github.com/jonschlinkert/ansi-gray

https://github.com/jonschlinkert/ansi-grey

https://github.com/jonschlinkert/ansi-bgblack

https://github.com/jonschlinkert/ansi-bgred

https://github.com/jonschlinkert/ansi-bggreen

https://github.com/jonschlinkert/ansi-bgyellow

https://github.com/jonschlinkert/ansi-bgblue

https://github.com/jonschlinkert/ansi-bgmagenta

https://github.com/jonschlinkert/ansi-bgcyan

https://github.com/jonschlinkert/ansi-bgwhite

Re:A notable JavaScript developer shamelessly copied one of ... by et-al on Sunday September 26, 2021 @03:19PM (#28663739)
Wow, this person's Github about says it all.

> Several years ago I switched careers from sales, marketing and consulting to learn how to program, with the goal of making the world a better place through code. Whether that means giving people access to information, the tools and technology to level the playing field with big corporations, or empowering people in impoverished regions to participate in the world economy.

> To date, I've created more than 1,000 open source projects in an effort to reach my goal.

They're good at marketing, I'll give 'em that.

Re:A notable JavaScript developer shamelessly copied one of ... by hamburglar on Sunday September 26, 2021 @01:02PM (#28662489)
Wow, that is no joke. ansi-colors relies on ansi-blue, which relies on ansi-wrap and makes a single call to ansi-wrap, providing the constants 34 and 39. It’s a couple dozen packages whose sole purpose is to provide a distributed set of constants. That is pretty blatant. On his bio he boasts about having over 1000 open source projects, and I can’t help but think he could have a few useful ones in there that are overshadowed by this embarrassing display of clout-chasing.
Re:A notable JavaScript developer shamelessly copied one of ... by kgeist on Sunday September 26, 2021 @01:04PM (#28662502)
His explanation on Reddit:

"The way I learned how to program was by publishing one project a day that used a specific language feature I was trying to learn. No one even looked at my projects or used them until I had quite a few published. I didn't even want people to use them at that point, since I had no idea what I was doing. Then one day I realized that people were actually using some of the things I published as a learning exercise, and I started going back and fixing and improving that code. Rinse and repeat. That's pretty much all I did.

Why is the default for people to assume the worst all the time? It's depressing as hell."

If true, it's kind of sad so many people badmouth him.

Re:A notable JavaScript developer shamelessly copied one of ... by smsm42 on Sunday September 26, 2021 @01:26PM (#28662714)
Maybe public common repository shouldn't be used as a dumping ground for every random guy learning how to make their first script. It's a bit like learning to drive by going to a public highway and just starting driving at random directions and then saying "why are you folks screaming? I'm just learning, it's depressing you always assume the worst!"
Re:A notable JavaScript developer shamelessly copied one of ... by dehrmann on Sunday September 26, 2021 @04:45PM (#28664524)
Ever publish a Java project to Maven Central? It's a massive pain, but it also acts as a bar to make sure you're publishing something of value you think others might use.
Re:A notable JavaScript developer shamelessly copied one of ... by nextaccountic on Sunday September 26, 2021 @05:11PM (#28664706)
Unlike a public highway, you can't actually harm anyone by publishing to a public repository. The code is just there; you can ignore if you prefer (you can't ignore a swerving car in a highway).

What's actually harmful is the blind trust most developers have on adding dependencies without proper vetting. But if someone publishes a package they are not responsible for vetting it for inclusion in your project. So shifting blame to the library author gets responsibilities backwards.

Perhaps you would prefer a curated package registry, but in this case you would need actual curators. Something like Debian has maintainers, but doesn't have every library in existence (and what it has is often outdated anyway). Npm and other language registries aren't curated, by design. You could create a curated registry on top of npm but, again, you need curators.

Re:A notable JavaScript developer shamelessly copied one of ... by smsm42 on Sunday September 26, 2021 @09:58PM (#28666357)
By publishing one single script - not likely. By publishing 1000 scripts - yes, you can, by polluting the public space and making it so much harder to find real supported code that can be relied upon. It's like throwing garbage on the street. One can won't do much, do it many times - and your neighborhood is a dump.

Same argument as with spam. Sending an email is not a crime, and sending an email to somebody you didn't know to ask them maybe they want to do business with you is not that bad. Do it couple of millions of times, and it breaks the whole system.

> What's actually harmful is the blind trust most developers have on adding dependencies without proper vetting.

Now comes the victim blaming. Nope, the fact the people should verify stuff does not absolve the guilt of those who put garbage into the public space. On the contrary, they are making the problem so much worse. And yes, there are means to deal with the problem, but again "you can clean up" is not an argument that absolves the guilt of somebody who throws trash around. They are doing bad thing, and should feel bad about it.

Re:A notable JavaScript developer shamelessly copied one of ... by zkldi on Sunday September 26, 2021 @01:24PM (#28662694)
I have nothing against them as a person - I don't know them at all. However, the ANSI colours one is blatant package-downloads optimisation. Infact, the READMEs were clearly copied and pasted,

> The color reset, in ansi. [1]

> The color strikethrough, in ansi. [2]

etc.

Which don't really make any sense.

[1] https://github.com/jonschlinkert/ansi-reset [2] https://github.com/jonschlinkert/ansi-strikethrough

Re:A notable JavaScript developer shamelessly copied one of ... by hitekker on Sunday September 26, 2021 @01:20PM (#28662645)
It sounds like he's just making excuses. If he really thought his contributions were just for learning, he wouldn't be bragging in his bio that he's "created more than 1,000 open source projects". That's like saying "I've written more than a million lines of code" because I copy-pasted one line of code a million times in college.
Re:A notable JavaScript developer shamelessly copied one of ... by dehrmann on Sunday September 26, 2021 @04:47PM (#28664533)
> I hope he didn't brag about "more than 1,000 open source projects." That number's so large it's a red flag that he's never build anything complex.
Re:A notable JavaScript developer shamelessly copied one of ... by hamburglar on Sunday September 26, 2021 @05:42PM (#28664925)
It kind of stretches credulity for him to say these are just test projects that he doesn’t want people to use when his profile is bragging about having 1000 open source projects.
Re:A notable JavaScript developer shamelessly copied one of ... by smsm42 on Monday September 27, 2021 @02:01AM (#28667532)
Exactly. I almost believed it until I saw shameless self-promotion and soliciting donations under it. I mean I have nothing against people getting paid for their work, especially open-source developers, but you can't both claim you were just learning and didn't expect anything, and use that to brag and solicit donations.
Re:A notable JavaScript developer shamelessly copied one of ... by thdespou on Monday September 27, 2021 @04:44AM (#28668466)
Agree. And also when you publish something on NPM you could expect someone to download it and you would need to maintain it. You cannot say later "Ohh I didn't know or I had no idea".
Re:A notable JavaScript developer shamelessly copied one of ... by iaml on Sunday September 26, 2021 @11:47AM (#28661838)
> I wonder why there is not a simple math lib

This [0] might be what you are looking for, it has both is-number and is-odd.

[0] https://github.com/stdlib-js/stdlib

Re:A notable JavaScript developer shamelessly copied one of ... by dehrmann on Sunday September 26, 2021 @12:45PM (#28662329)
Am I right that this is the important part of the library?

https://github.com/jorgebucaran/colorette/blob/d1ff3a7/index...

I agree that the author clearly spent a lot of time polishing it, hence the pride and feeling of betrayal.