Live data from Hacker News

Deno 1.9

deno.com

41–50 of 245 posts

Re: Deno 1.9

#41
post #39

I'm not so familiar with web development and don't quite understand where this fits in. I know I can run JS in my browser. I know I can run JS on a web server using node.js. I know I can compile Typescript to JS. So how does Deno fit in and what is the added value? Not trying to be negative, just curious.

Deno is designed to be a replacement for Node.js on the server. The introduction to the Deno Manual [1] provides a comparison.

[1]: https://deno.land/manual@v1.9.0/introduction

Re: Deno 1.9

#42
post #39

I'm not so familiar with web development and don't quite understand where this fits in. I know I can run JS in my browser. I know I can run JS on a web server using node.js. I know I can compile Typescript to JS. So how does Deno fit in and what is the added value? Not trying to be negative, just curious.

deno supports typescript out of the box whereas to run typescript in nodejs you need to transpile down to javscript first. deno also has some security features enabled by default like not allowing network communication unless you explicitly enable it. so that prevents malicious packages from making network requests that you might not have noticed. thats a great feature because tons of javascript projects/tools dont need to send http requests so if your tool doednt require that then you can be confident that any dependency you use is not secretly spying on you.

Re: Deno 1.9

#43
post #39

I'm not so familiar with web development and don't quite understand where this fits in. I know I can run JS in my browser. I know I can run JS on a web server using node.js. I know I can compile Typescript to JS. So how does Deno fit in and what is the added value? Not trying to be negative, just curious.

* Running a linter without granting it write or net access

* Running a build tool with only file access to the source files

* Trying a cli script without granting it access to everything by just showing the help

In times where a linter has 10000 dependencies, I'm in desperate need of sandboxing.

People on hackernews are easy to judge companies when they leak customer data. But what if we the developers are actually the problem by executing megabytes of foreign code just with faith.

Re: Deno 1.9

#44
post #39

I'm not so familiar with web development and don't quite understand where this fits in. I know I can run JS in my browser. I know I can run JS on a web server using node.js. I know I can compile Typescript to JS. So how does Deno fit in and what is the added value? Not trying to be negative, just curious.

Deno is by the original creator of Node.js and seeks to fix/change a few things about Node he regretted while adding first class support for a few things that were new since then like TS. It's also more security minded from the get-go. Not just in a "written in a memory safe language" way but it has a permissions system and strong built in ways to inspect/audit dependencies.

So it's not aiming to be revolutionarily different from Node, rather a second shot at Node.

Re: Deno 1.9

#45
post #39

I'm not so familiar with web development and don't quite understand where this fits in. I know I can run JS in my browser. I know I can run JS on a web server using node.js. I know I can compile Typescript to JS. So how does Deno fit in and what is the added value? Not trying to be negative, just curious.

Deno is meant to be an improvement on the nodejs ecosystem. Ryan Dahl took everything that he learned from node and improved upon it with Deno. There are a series of features like native typescript support, having single executable, url imports, etc that are all very pleasant improvements. The idea is that it will make for a better developer experience.

Re: Deno 1.9

#46

I feel like I have hit a point in my life where I don't want another framework to learn, and due to this I am not giving Deno a fair shake... Does anyone have a short anecdote why I might bother to invest in yet another JS framework?

That's a rather ignorant thing to say. You are basically saying "I feel like I have hit a point in my life where I don't want to learn." It doesn't matter if it's a framework, language, protocol, specification, book, way of coding, or anything else. Learning is how you gain knowledge and stopping ones desire to gain knowledge is never a "point in ones life". It's just being lazy.

Then why are you on here blathering about someone being ignorant when you are being "just as lazy" and not spending this time learning new$x.js instead of arguing on the internet?

Have some compassion/empathy for those of us that don't have the luxury to be able to constantly keep up with what gets churned out every day.

Re: Deno 1.9

#47
post #39

I'm not so familiar with web development and don't quite understand where this fits in. I know I can run JS in my browser. I know I can run JS on a web server using node.js. I know I can compile Typescript to JS. So how does Deno fit in and what is the added value? Not trying to be negative, just curious.

It's a Node.js alternative.

Deno glue code around V8 is written in Rust.

It tries to be as close to the browser API as possible, using ES-Modules instead of CommonJS and doesn't require a package manager.

Also, it compiles TypeScript automatically.

Re: Deno 1.9

#48
post #31

Earlier quoted context omitted.

It's really weird that most responses to you are that Deno isn't a framework, as if changing the category the thing is in would somehow magically remove your choice fatigue, especially considering that the most likely interpretation of your fatigue would make the distinction between runtime and framework fairly meaningless in this case: they are both for practical purposes a set of APIs you must learn on top of an ex…

Maybe because there are way more JS frameworks than runtimes. It feels like dozens of frameworks pop up every day.

Yes but my point is that this doesn't address the OP's frustration: learning new APIs without a clear sense of what one is getting out of it. Many of Deno's fundamental features are basically framework features. Learning the Deno for-await API for answering HTTP requests is an identical experience to learning a framework that offers that API. "But Deno has fundamental performance improvements" -- Frameworks can also offer fundamental performance improvements. In fact, I can write a Rust-backed binary package for node.js and now we're really in a grey area.

The point is that "its a runtime not a framework" is not an answer as to why he should learn it or not. At least, not without attaching to it a meaningful explanation as to the benefits he'll get from it because its a runtime, but at that point, we're back where we started: just pitch him on what he'll get out of it, don't correct him on technical terminology.

Re: Deno 1.9

#49

Earlier quoted context omitted.

What do you mean by reuse of web apis? I’m curious to read up on this feature.

Defaulting to browser based APIs when they exist (like a global 'window' element to access the DOM), rather than reinventing the wheel the way Node did. Although to be fair a lot of Node APIs predate their browser equivalents, and in a lot of ways the browser contains a 2.0 version of a lot of Node APIs.

I can't think of a single case of Node reinventing the wheel with their APIs. Like you said, they were all created to fill gaps in browser JS implementations. It's obviously going to be hard to reconcile the two as browsers themselves increase their API surface, but then Deno is going to run into the same problem eventually.

Re: Deno 1.9

#50
What kind of improvement will this bring to the seasoned nodejs dev, that it will leverage the learning effort?
Post reply on HN