News for hackers. Stuff that matters.
Re:Deno 1.0 by nitsky on Wednesday May 13, 2020 @08:23PM (#23173564)
In practice modules will be available from sources that will have similar reliability to npm: github.com, unpkg.com, cdn.pika.dev, jspm.io, etc.
Re:Deno 1.0 by bgdam on Wednesday May 13, 2020 @08:26PM (#23173597)
Which then raises the question - how is it better than NPM? If there are going to be centralized repositories (like NPM), and if I have to download my dependencies into a $DENO_DIR (like NPM), and if I am then loading these dependencies from local files (like NPM), how is it any different to NPM? Except for being less secure by default?

This is starting to look like a case of being different just so you can say you're different.

Re:Deno 1.0 by austincheney on Wednesday May 13, 2020 @09:00PM (#23173900)
NPM is a dependency management failure which is why you are ending up with hundreds of dependencies in the first place. It sounds like you want to reproduce that insanity in Deno. Deno is set up in such a way to dissuade you from the stupidity by default but allow it in very few steps if you cannot imagine a world without it.

In my opinion this is Deno’s biggest selling point.

Re:Deno 1.0 by bgdam on Wednesday May 13, 2020 @09:22PM (#23174074)
> Deno is set up in such a way to dissuade you from the stupidity by default but allow it in very few steps if you cannot imagine a world without it.

Could you elaborate on this? Is it that Deno is against the whole 'small packages that do one thing well' principle and instead in favor of complete libaries? How exactly would it dissuade me from installing hundreds of dependencies?

Re:Deno 1.0 by austincheney on Wednesday May 13, 2020 @09:28PM (#23174126)
The default design style for a Deno application is that the application becomes a single file. Just like packages coming off Steam. This requires that dependencies are packaged into the application before it is distributed to others. The idea there is to include only what you need deliberately and it manage it as a remotely written extension of your application.
Re:Deno 1.0 by bgdam on Wednesday May 13, 2020 @09:45PM (#23174247)
Having a single executable file, makes distribution easier, but while I'm developing the app, I'll still have to manage all of it's dependencies right? How does Deno aid during development?

> The idea there is to include only what you need deliberately and it manage it as a remotely written extension of your application.

I have a node app, in which I deliberately only included the dependencies I need. The package.json lists exactly 8 dependencies. However, the node_modules folder already has 97 dependencies installed into it. The reason of course is that these are dependencies of dependencies of dependencies of dependencies.

Wouldn't Deno have this same issue? Are the dependencies also distributed in compiled form as a single file akin to windows DLLs?

Re:Deno 1.0 by nitsky on Wednesday May 13, 2020 @08:30PM (#23173634)
it's better because there will be more choice.
Re:Deno 1.0 by _630w on Wednesday May 13, 2020 @09:18PM (#23174044)
I am always confused by deno folks. You can install from a git repository using yarn/npm.

How is that not "decentralisation"

And if you are importing single files from a remote url, I would question your sanity.

Re:Deno 1.0 by nitsky on Wednesday May 13, 2020 @09:37PM (#23174191)
> install from a git repository using yarn/npm

yep, that's basically the same. deno has the benefit of using the es module system like it is implemented in browsers.

Re:Deno 1.0 by pknopf on Wednesday May 13, 2020 @09:14PM (#23174018)
Node supports node_modules, not npm. Anything can build the node_modules.
Re:Deno 1.0 by riyakhanna1983 on Wednesday May 13, 2020 @08:40PM (#23173742)
Doesn't this mean more opportunities to inject malicious code?
Re:Deno 1.0 by austincheney on Wednesday May 13, 2020 @09:02PM (#23173910)
Only if you tell your application to retrieve from untrusted locations.