Live data from Hacker News

Deno 1.33: Deno 2 is coming

deno.com

111–120 of 127 posts

Re: Deno 1.33: Deno 2 is coming

#111
post #97

I still don't understand the true goal of Deno. It started as "better node.js", with better security and modern tooling. Better security was not achieved imo, it's not flexible enough but painful enough that you want to allow everything straight away. The module system suffers the same issues as of npm, and since everything is loaded from the same domain its hard to tell what is official or not. They have a builtin s…

> The module system suffers the same issues as of npm

Tough to interpret this since NPM isn't a module system, but:

- Requiring the standards-compliant ES module system and getting rid of CommonJS is definitely a huge improvement for the future of the ecosystem

- If by "the same issues as npm" you mean "makes adding dependencies so easy that a lot of them get added", then sure I guess, though I'd argue that isn't an issue

> since everything is loaded from the same domain

It's not though; Deno can import from any URL. Personally I like to import directly from github for a lot of things. But anyone can set up their own repository or CDN if they'd like to, because all you need is an HTTP URL

> its hard to tell what is official or not

The official standard library is under deno.land/std/

> I feel like they are getting away from being a language and heading toward being a framework

Well they were never a language because the language part is (almost) identical to what was already out there. Whether or not they're a "framework" (or attempting to be one) is debatable, though they definitely take an "all the things most people need have official solutions (which work together smoothly)" approach, which is one of my favorite things about Deno. Also, a major usecase (their core business) is serverless scripts, so having all the important stuff included is even more beneficial there

I've stopped using Node for any non-UI projects. Deno has been a godsend for me

Re: Deno 1.33: Deno 2 is coming

#112
post #27

Earlier quoted context omitted.

Their main issue IMO is that they are not really bringing anything major to the table in exchange for the very high cost of breaking compatibility with nodejs. If you are going to create a competing ecosystem it has to be somewhat revolutionary for the cost of investing/migrating to a whole new ecosystem to be worth it. I like Typescript quite well, but if I'm told I'm going to throw away my nodejs/ts code base and s…

> Their main issue IMO is that they are not really bringing anything major to the table in exchange for the very high cost of breaking compatibility with nodejs. This is why my money is on Bun, just like a safe bet in Carbon. Both are designed to be drop-in-capable in large codebases where the bean counters aren't going to budget a total rewrite that redelivers the same functionality.

In regards to C++ evolution, Circle is a much better bet than something that is a basic AST interpreter.

Re: Deno 1.33: Deno 2 is coming

#113

Earlier quoted context omitted.

Deno Inc. has two core products: The free Deno runtime and the for-profit Deno Deploy, a Deno hosting service with 35 locations around the world. The question that often popped up was where to store data. Deno Inc. provided several guides to connect to different cloud services. But they want the friction reduced to a simple `await Deno.openKv()`. Deno Inc. has enough expertise in running a global service that two oth…

> The question that often popped up was where to store data. Deno Inc. provided several guides to connect to different cloud services. Sure. > But they want the friction reduced to a simple `await Deno.openKv()`. Do “they”? If so, who’s using it to solve that problem? …because it seems the big uses of deno deploy are not using it, fine with that and it’s pretty unclear who the “they” is in this circumstance. Still, i…

"They" in OP's post is referring to Deno Land Inc.

Re: Deno 1.33: Deno 2 is coming

#114

Didn't take too long to start the 2.0 version. I really like how Rust does not do this.

I think that difference is that Deno is some kind of commercial startup and Rust feels like community project backed by few huge corporations. So Deno needs to generate hype while Rust's not hurrying anywhere.

Are you familiar with the concept of no-2.0 for Rust? The do this on purpose so the users (the software engineers) never need to convert a version x project to a version y unlike for example Python (2 -> 3). I think this is amazing.

Re: Deno 1.33: Deno 2 is coming

#115
post #67

Earlier quoted context omitted.

What do you mean by drama to hook up external db? It’s almost always just a one liner: let conn = db.newConn(host, port, …).

One line _after_ you figure out the myriad of database libraries available, half of which are abandoned, a quarter which are little toys, and if you're lucky one that has a core dev who is being paid real money to support and maintain the library.

Ah yes, that's fair. Finding the good library to rely on can be really time consuming.

Re: Deno 1.33: Deno 2 is coming

#116
post #100
post #97

I still don't understand the true goal of Deno. It started as "better node.js", with better security and modern tooling. Better security was not achieved imo, it's not flexible enough but painful enough that you want to allow everything straight away. The module system suffers the same issues as of npm, and since everything is loaded from the same domain its hard to tell what is official or not. They have a builtin s…

Wild take, but agree with your first sentence. 1.) it was never a language 2.) indisputably better security any time you take advantage of any of the features to disable reading of environment variables, using network, reading files, etc.

I see close to no case where you would not enable all access rights

Re: Deno 1.33: Deno 2 is coming

#117

Earlier quoted context omitted.

I'm not familiar with the offering but find your comment confusing. It seems to suggest there isn't lock in because it's just a hashmap, but also that it is globally replicated and consistent.

If you don't deploy to deno cloud it's just SQLite and not distributed. If you do deploy to deno cloud it's trivial to migrate because there are many competing offerings of kv stores.

When not in deploy, you'd be stuck with a non distributed SQLite database for each instance your application is hosted on. There currently isn't a way to swap the backend for the deno kv API, so you would still need to update your code to use the new kv store that would have a different API. If you use redis instead, you'd be able to easily be able to switch providers by changing configuration options instead of having to update your code wherever it is used.

Re: Deno 1.33: Deno 2 is coming

#118
post #4

Building a KV store into the language is kind of nuts. I love how it abstracts away the local SQLite and deployed FoundationDB behind one interface. Testing would be super easy, as there is no question of "do I spin up an entire db instance or mock the db interface?" as SQLite is relatively lightweight and the burden for keeping both cases consistent falls to the language instead. That being said, was wondering wheth…

Why not just serialize objects to disk? I don't see how this is different from a javascript object, other than being disc-based. Unless I'm missing a detail?

Also, local KV obviously won't work for compute lambdas, as the KV isn't shared across instances.

Re: Deno 1.33: Deno 2 is coming

#119
post #97

I still don't understand the true goal of Deno. It started as "better node.js", with better security and modern tooling. Better security was not achieved imo, it's not flexible enough but painful enough that you want to allow everything straight away. The module system suffers the same issues as of npm, and since everything is loaded from the same domain its hard to tell what is official or not. They have a builtin s…

I found it really to be the perfect shell script replacement. People usually will use python for more complicated shell scripts but deno is just awesome at this. Just run the file and eventually cache the dependencies for the next run. No node modules or pip install etc Also, you can use typescript without any pre-bundling.

The security model works well for this use case also. If your shell script is only supposed to read a few environment variables and not make network calls, you are covered.

Re: Deno 1.33: Deno 2 is coming

#120

Nice to see ongoing development and a view ahead. For work I would need a good interface for SQL. In pet projects I am using sqlx for Rust and sqlc for Python. In both you can write SQL directly and get query validation and parsing into struct / PyDantic for free. Is there something like this for Deno?

I was interested in looking up sqlc for python but it seems to be for go? Is there a different version than this? https://github.com/kyleconroy/sqlc

They put some work into the Python adoption and it is enough for smaller projects but I did not try it for to complex use cases. You can see it under examples. What is nice is that you can set the option to parse into PyDantic rather the dataclasses.
Post reply on HN