Live data from Hacker News

Deno 1.9

deno.com

171–180 of 245 posts

Re: Deno 1.9

#171

I'm curious, if anyone has lived through the experience: What is the migration story like to port an existing codebase from node.js to Deno?

Even trying this with some toy projects I have it is NOT easy or straightforward. The dependency management alone is different enough to make this almost impossible.

I think if you want to use Deno, it would have to be from the ground up or a complete rewrite.

Re: Deno 1.9

#172
Does the single executable distribution change anything? node/python/google-chrome are all single executable programs as far as the users are concerned.

Re: Deno 1.9

#173

Earlier quoted context omitted.

> enums [...] everybody but me hates them Hmm, what did I miss, why do people hate them exactly? > And sure it’s marked “experimental” but it’s used a lot and almost guaranteed to be a future conflict. Putting that toothpaste back in the tube is gonna make a lot of people feel a lot of pain. Maybe I'm a bit masochist, but I can't say I feel a lot of compassion for people using experimental features in missing-critica…

>Maybe I'm a bit masochist, but I can't say I feel a lot of compassion for people using experimental features in missing-critical production code. To be fair, decorators are an experimental feature in name only at this point. A lot of libraries force you to use it, including Microsoft's own tsyringe and the beyond popular TypeORM. NestJS is a reasonably popular framework that will codegen services with decorators in…

the entire angular2+ ecosystem as well

Re: Deno 1.9

#174
> Therefore we have employed Hyper to build a new native HTTP/2 server API in Deno.

> The binding improves hello-world throughput by 48% when compared to the std/http pure TypeScript HTTP server.

Nice to read it about Hyper - one of my favorite Rust tools!

Re: Deno 1.9

#175
post #165
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 main selling point is security. With Deno you can provide permission to scripts using flags. Deno offers a sandbox security layer through permissions. List of the flags: --allow-env allow environment access. --allow-hrtime allow high resolution time measurement. --allow-net= allow network access. --allow-plugin allow loading plugins. --allow-read= allow file system read access. --allow-run allow running subproce…

What I dislike is that you provide these permissions for the whole process. I'd like it to be more that you can constrain and pass the permissions down to libraries like capabilities.

Re: Deno 1.9

#176
post #151

Earlier quoted context omitted.

Because Typescript eventually won that race? (The race to be a fine, typed and sane counterpart to Javascript). Somehow Typescript convinced people from the Javascript side of the fence that they could mix both and eventually upgrade from it. While Dart also tried the same feat, it failed doing so. Nowadays Dart is only being considered to anything because the team behind it are top-notch and implemented themselves a…

> Because Typescript eventually won that race? (The race to be a fine, typed and sane counterpart to Javascript). Dart is doing fine, I'm not sure what race you're talking about? > If you want to use Flutter go for Dart, but picking Dart to anything outside Flutter will just alienate the developer crowd as giving even Typescript is some sort of a niche language in terms of adoption, nevermind forcing people to learn…

As is the dart type system compared to that of typescript.

Re: Deno 1.9

#177
post #53

Earlier quoted context omitted.

Deno has a couple of very good selling points, the main one is that it allows to use JS web browser API's in the CLI, this includes things that range from the Fetch API[1], up to WebGPU even! all in the command line interface. Besides this, it uses the same module system as the browsers do. The JS module system is in my opinion very well designed and intuitive. No need for AMD or CommonJS or Node require's. Other goo…

I personally really like the `Deno compile` feature which outputs your code into a self-contained .exe which executes your script no need for separate tools.

If you want to do this with node, pkg exists.

https://github.com/vercel/pkg

Re: Deno 1.9

#178

Earlier quoted context omitted.

Snowpack might be an option

Their companion CDN (and namesake umbrella parent company) is also a first class part of Snowpack. However using CDNs in the browser has some big trade offs. Besides obvious concerns sending any data to consolidated third parties, it’s actually a performance detriment now that browsers are caching per origin. Used to be, using a CDN got you more likely cache hits and better perf on N+1 requests. Now you definitely do…

There has always been an extra DNS lookup wirh a CDN. Thats even the point of the CDN since based on where you are, you will be served from a location as physically close to you as possible.

Where did you get the information from that CDNs arent as good as they used to be?

Re: Deno 1.9

#180
post #165

Earlier quoted context omitted.

It's main selling point is security. With Deno you can provide permission to scripts using flags. Deno offers a sandbox security layer through permissions. List of the flags: --allow-env allow environment access. --allow-hrtime allow high resolution time measurement. --allow-net= allow network access. --allow-plugin allow loading plugins. --allow-read= allow file system read access. --allow-run allow running subproce…

What I dislike is that you provide these permissions for the whole process. I'd like it to be more that you can constrain and pass the permissions down to libraries like capabilities.

I agree. I hear a lot made of Deno's "security" but process flags don't really make me feel much more secure when I've had to enable most of them anyway. At that point they just start getting in the way and giving me a false sense of security.
Post reply on HN