Earlier quoted context omitted.
It is very interesting although I didn't really understand the 'security' part. The motivation seems to be twofold - some bad things have happened because of compromised npm packages and v8 happens to have a robust sandbox. This sounds like a solution looking for a vaguely defined problem. The illustrative example he gives is 'malicious linter'. Is malicious linter that important a threat?
In the example the linter itself is not malicious, but used to deliver a malicious program that can have unrestricted filesystem access. Not vague at all, see recent news on the ‘event-stream’ package being used to steal cryptocurrency wallets.
A Secure Runtime for JavaScript and TypeScript Built with V8, Rust, and Tokio
61–68 of 68 posts
Re: A Secure Runtime for JavaScript and TypeScript Built with V8, Rust, and Tokio
#62For the inevitably "what differentiates this from node?" Single executable Allows imports from url File system & network Sandboxing is controlled with flags Dies on uncaught errors https://deno.land/manual.html#introduction
>Dies on uncaught errors how can JS programmers deal with this?
Cattle not pets!
Re: A Secure Runtime for JavaScript and TypeScript Built with V8, Rust, and Tokio
#63Earlier quoted context omitted.
Sure but logic doesn't exist in a vacuum so in most cases you are going to import / export your input data or your results to the filesystem or through the network. I actually suggested a more granular, per-module approach to this during the Node Forward and IO.js debacle years ago: https://github.com/node-forward/discussions/issues/14 At the time it was deemed to difficult to implement in Node.js after the fact, whi…
It is actually more interesting about the definition of “per module”, because technically every single file is its very own module from the view of V8, and is reinforced in Deno since we are trying to be web compatible, so there is not even a package.json-like construct for you to identify the “root” of any library, more so as there is no more index.js magical resolution
Re: A Secure Runtime for JavaScript and TypeScript Built with V8, Rust, and Tokio
#64As a contributor to Deno, I am actually quite surprised that this got resurfaced on Hacker news after the hype June last year. That being said, I suggest checking out this video (recorded this April) for updated information about Deno, since things have changed quite a bit since the initial announcement: https://youtu.be/z6JRlx5NC9E (Edit: fixed link, posted the wrong one. Why would YouTube think I want to share ads.…
Curious about deno's development stage: can the brave already run it in production, or there are probably too many breaking changes in the pipe that it's better to wait?
Re: A Secure Runtime for JavaScript and TypeScript Built with V8, Rust, and Tokio
#65Earlier quoted context omitted.
It was rhetorical and meant to be facetious.
on node, this can actually be very difficult or even impossible if using 3rd party libraries. For example, some node internals like networking require the invoker to attach to some obscure .on("error") event to avoid uncaught errors. and a lot of the time these 3rd parties are not aware of it. I'm all for deno being built from the ground up to properly crash on uncaught errors. Silent ignoring is a really stupid deci…
I think the erlang/elixir model of fail fast and try to restart is the best for availability.
Re: A Secure Runtime for JavaScript and TypeScript Built with V8, Rust, and Tokio
#66I admittedly haven't researched too deeply, but are there any examples/docs on embedding Deno in another Rust program and/or writing/exposing Rust libs with a TS API?
Re: A Secure Runtime for JavaScript and TypeScript Built with V8, Rust, and Tokio
#67Earlier quoted context omitted.
on node, this can actually be very difficult or even impossible if using 3rd party libraries. For example, some node internals like networking require the invoker to attach to some obscure .on("error") event to avoid uncaught errors. and a lot of the time these 3rd parties are not aware of it. I'm all for deno being built from the ground up to properly crash on uncaught errors. Silent ignoring is a really stupid deci…
I never understood why this is necessary. Using promises means you get to use try-with-resources style construct for handling non-memory resources safely. As such you no longer need to crash on uncaught errors, except errors pertaining to resource disposal.
probably didn't have to be designed this way, but it was designed pre-promises and I guess they are lothe to change it.
Re: A Secure Runtime for JavaScript and TypeScript Built with V8, Rust, and Tokio
#68Earlier quoted context omitted.
It is actually more interesting about the definition of “per module”, because technically every single file is its very own module from the view of V8, and is reinforced in Deno since we are trying to be web compatible, so there is not even a package.json-like construct for you to identify the “root” of any library, more so as there is no more index.js magical resolution
I'm really sad that I lost my gist on this, but I was working on a system in Node.js for defining the capabilities of modules in an es module graph (as you suggest) where there might not be defined package boundaries. The implementation complexity (required changes to upstream V8) resulted in us going with node policies as they are today. I don't remember the exact API, but basically an es module graph is a directed…