News for hackers. Stuff that matters.
Re:Things I Regret About Node.js [video] by sametmax on Wednesday June 06, 2018 @01:57PM (#17249411)
What the others say.

And also, golang tried no centralized package management by using git repo. It didn't end with people go getting from moving masters. Of course they did.

And in an area of finally accepting lock files, do you really want to go back in middle age ? Lock files are not a constraint. They are a god saver. You want lock files. You don't want to have either vague dependencies or pin pointed ones. You need both to stay sane.

And of course somebody will do something dynamic that will open a security issue.

And of course typo squatting is going to be so much easier.

And removing a bad lib ? From npm you signal the admin. When it's on it's own domain ? Good luck.

And then searching for libs is going to be fun. And naming, naming will be amazing.

And having a quick glance at the dependency of a lib ? So much fun.

And wait for the search/replace in the code that will change your entire run time by mistake.

And no possible alternative package manager. Hope their dependency resolver never sucks cause you will be stuck till you can install the next node... if they ever fix it.

Ah, and the git blames to see what dependencies have changed are going to be just peachy.

Oh, and your juniors copy/pasting code from the net is going to get extra crispy.

But wait, running the code on conditional imports means your project may install something at ANY moment in its life cycle. And could be changed by somebody editing the code by mistake without really asking to change a depandancy. You know, like a ctrl + D on "0.1" to replace all those floats quickly.

Also cool URLs don't change. Until they do. Tiny URLS dependencies are going to be hilarious.

I could go on and on and on and on...

I can't understand how you can be intelligent enough to code freaking node JS and not see THAT elephant in the doll room.

Re:Things I Regret About Node.js [video] by JeremyBanks on Wednesday June 06, 2018 @02:48PM (#17249903)
You are imagining the worst possible execution of these ideas. Nobody is proposing that you should start using libraries that pull in code from random domains, unless you have some specific need to. Whitelisting sources is such an obvious step, given the security focus, that you should really have applied the https://en.wikipedia.org/wiki/Principle_of_charity in your speculation.
Re:Things I Regret About Node.js [video] by sametmax on Wednesday June 06, 2018 @02:56PM (#17249974)
No one proposed to make spaghetti code with "goto".

Yet we did. And we replaced it with "if" or"while", to avoid repeating history.

This is a prophecy: this dep managing concept, if kept in this form, will cause something terrible. It will.

Good luck.

Re:Things I Regret About Node.js [video] by sagichmal on Wednesday June 06, 2018 @02:09PM (#17249505)
> golang tried no centralized package management by using git repo. It didn't end well.

What? There's no fundamental problem with it. It will continue. What do you mean?

Re:Things I Regret About Node.js [video] by jcranendonk on Wednesday June 06, 2018 @03:04PM (#17250053)
I like go as a language, but its lack of package management is the single reason I no longer use it.
Re:Things I Regret About Node.js [video] by sagichmal on Wednesday June 06, 2018 @08:19PM (#17252265)
Go has had primitive package management for 5+ years, and official package management (in some form or another) for a year.
Re:Things I Regret About Node.js [video] by allover on Wednesday June 06, 2018 @07:14PM (#17251937)
The go team recognise there's a fundamental problem with it, otherwise they wouldn't have created dep and vgo [1]

[1] https://github.com/golang/go/issues/24301

Re:Things I Regret About Node.js [video] by sagichmal on Wednesday June 06, 2018 @08:18PM (#17252262)
`dep` and `vgo` both continue to use URLs as import paths. They optionally provide other means of fetching code.