Live data from Hacker News

I've Just Liberated My Modules

medium.com

741–750 of 827 posts

Re: I've Just Liberated My Modules

#741

Atom.io is not impacted, I think it's a good thing that apm is running on its own network.

Like trusting Github is much better?

I think it's a bit better, they do have a track record to fight over zealous legal claims - like this one. The Github repository is still untouched.

Re: I've Just Liberated My Modules

#742
post #501

Earlier quoted context omitted.

You can use github and get namespacing under the author. IMO, this could end npmjs of they don't fix the issue.

You don't get any prepublish hook when pushing to a git repository though, so you can't do things like preprocess with babel, typescript, etc, unless you check in the compiled source.

You do, actually, if you've setup the git repository correctly.

https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks

Check out the pre-push, pre-receive, update, and post-update hooks.

Re: I've Just Liberated My Modules

#743
post #556

Earlier quoted context omitted.

Most Germans wouldn't know that kik is also a chat app ;-) "KiK is the largest textile discounter chain in Germany and operates about 3,200 stores in Germany, Austria (since 1998), Slovenia and Czech Republic (since 2007), Hungary and Slovakia (since 2008), Croatia (since 2011) and Poland (since March 2012)." https://en.wikipedia.org/wiki/KiK

Being from Germany, I had initially assumed that was in fact the company in question. I was wondering why a textile discounter would care about some NPM module...

Haha.

There is a British company selling eCigs called Kik.co.uk too.

Seems Kik is a fairly common term, even for companies.

Re: I've Just Liberated My Modules

#744
post #327
post #229

Earlier quoted context omitted.

Someone with more JS experience can chime in, but isn't this really inefficient in JavaScript? Wouldn't appending rather than pre-pending be better due to the way strings and memory are handled? Or at the bare minimum create the left padding in the loop and tack on str after? Can you use ch.repeat(len) + str; yet in node or if not just do the same idea of doubling in size ch until len is satisfied? while (++i And isn…

Essentially all JS engines implement string concatenation lazily as ropes so there isn't much difference.

Well, you can do it in O(log(n)) time instead of O(n) time. But n is unlikely to be large enough for this to even matter a little bit.

Re: I've Just Liberated My Modules

#745

Earlier quoted context omitted.

https://en.wikipedia.org/wiki/Unix_philosophy

In this case the npm ecosystem is providing more of a surrogate standard library. Imagine if there were no libc, for example, and so people had to reimplement all those functions; would you really want one package per function because of how "Unix philosophy" it would be? This is where the JavaScript ecosystem is right now -- JS doesn't have the kind of robust standard library other languages take for granted, so you…

I think you're assuming libc is more robust and useful than it actually is. Libc is extremely minimal (and is full of pitfalls as well).

JS has an extremely large and robust standard library in comparison.

Re: I've Just Liberated My Modules

#746
post #628

Earlier quoted context omitted.

Why is that a dick move? What would you do if npm or github goes down tomorrow? Vendor your dependencies if you want to make sure your own project doesn't break.

I am not affected by this. It just seems like a childish move that only hurts the users. NPM did not go against its ToS.

Neither did he.

Re: I've Just Liberated My Modules

#748

Earlier quoted context omitted.

I've had deploys break because gems were removed from RubyGems.org. Using CI as a gate isn't sufficient because a gem can be removed in the window between a completed CI run and the deploy. Making it harder, generally if you have a gem installed locally you won't notice the problem until you need to install it on a fresh system. It used to be the case that a yanked gem was simply removed from the gem index, but the f…

Dear Everyone Doing Devops: do not build gems on your production servers. Build a tarball, test the tarball through dev/staging, deploy the tarball to production. For any value of tarball- literal tarball, deb/rpm (actually CPIO under the hood, but who cares), prebaked AMI (not tar at all), docker image (tarball of JSON + nested tarballs. Seriously, it's tar all the way down). Everything will be better. Roll forwards…

Your point is well-taken. Broken deploys are just the extreme case. You'd run into the same problem if two devs on the team just happened to install libraries at different times. One would get it, one would not. And you don't get a remotely helpful error message in that case. So, you're back to mirroring or vendoring everything you need anyway. Arguably that's better, but why even bother with a centralized package management system at all then?

Re: I've Just Liberated My Modules

#749
post #681

Earlier quoted context omitted.

That is some serious highfaluting language going on in those tweets. Something something if you play the game something something...

The whole thread is just really astounding. I am rather neutral on the drama here, but I am certainly coming away with a real distaste for npmjs just from reading that.

You and me both. I wish I could up-vote your comment twice!

Re: I've Just Liberated My Modules

#750
post #130

The fact that this is possible with NPM seems really dangerous. The author unpublished (erm, "liberated") over 250 NPM modules, making those global names (e.g. "map", "alert", "iframe", "subscription", etc) available for anyone to register and replace with any code they wish. Since these libs are now baked into various package.json configuration files (some with 10s of thousands of installs per month, "left-pad" with…

So we need gpg signed packages :> And... all packages should be namespaced under the author who published them. And... I kind of want to say "once it's published, it's forever".

I think I'd just want to add that namepsacing by author doesn't entirely fix the problem. For the fewer instances where there is a collision, we still have this issue with lawyers asserting trademarks.

"Would the real Slim Shady please stand up?"

We want multiple 'kik's and multiple Shady's simultaneously. So record the gpg sig of the author in package.json, and filter the name + semver against just their published modules when updating.

Depending on how unique you need to be:

npm install --save

npm install / --save

npm install / --save

On a side note, npm-search really sucks. It lacks a lot of fine-grained filtering. I'd love to be able to search by tags, or exclude results with an incompatible license, or even prioritize results by specified dependencies. npm-search needs love.

Post reply on HN