News for hackers. Stuff that matters.
Re:Deno's Decline by andrewmcwatters on Thursday May 01, 2025 @06:49PM (#43864228)
I said it back when Deno was released, and I'll say it again: I'm not doing another JavaScript rugpull. Node.js is here to stay, it's mature, and if you want performance, leave it behind for Go.

It was telling when you saw that basically all of Deno's interfaces were inspired by Go.

I'm so glad that as an industry we're saying "No," to all of these JavaScript authors who try to yank entire ecosystems along with them as they go try and monetize their spin-offs.

I'm too busy shipping to care.

Re:Deno's Decline by danpalmer on Thursday May 01, 2025 @08:06PM (#43864796)
> I'm not doing another JavaScript rugpull. Node.js is here to stay, it's mature

I'm a bit of an outsider here, I've only run a little Node in production in the past, and used it on and off for ~13 years. My take is that these projects all get some hype specifically because Node.js is not mature.

I've got a hobby project that has a bit of Node in it, and it very plainly difficult (Which imports am I using? Not the good one. Which language am I writing? Not the typed one. Which package manager do I use? etc). Getting a new project set up well takes time and effort, it is not the default that Node gives you (at least in ~early 2024 maybe?).

I can really get behind the "not another JS rugpull" idea, but I also see why everyone is constantly wanting to get off Node itself onto something Node-like that solves their problems.

Re:Deno's Decline by andrewmcwatters on Thursday May 01, 2025 @10:48PM (#43865671)
You avoid much of this by ignoring new things that are new for the sake of being new. Imports instead of require? Waste of time. TypeScript? Waste of time. Widely unpopular opinion. Package managers other than npm? Waste of time.

Just ignore it all and you're fine. And definitely ignore the people who keep changing things on you.

If it doesn't help me ship more product, I do not care.

Re:Deno's Decline by danpalmer on Thursday May 01, 2025 @11:45PM (#43865997)
Moving to Typescript may be unnecessary, but starting a brand new codebase in 2025 and using JavaScript instead of Typescript is a hard one to defend. The fact that Node.js doesn't support it out of the box, let alone encourage it as the default, is much of the reason why the community is constantly clamouring for something better.
Re:Deno's Decline by curtisblaine on Friday May 02, 2025 @01:56AM (#43866598)
Node.js supports typescript out of the box by stripping types since node 22 (current LTS is 24, iirc)

https://nodejs.org/en/learn/typescript/run-natively

Re:Deno's Decline by andrewmcwatters on Friday May 02, 2025 @10:44AM (#43870532)
It’s pretty easy, its not necessary.
Re:Deno's Decline by RainyDayTmrw on Thursday May 01, 2025 @06:51PM (#43864248)
I dunno. How much do you value isomorphism and code sharing?
Re:Deno's Decline by behnamoh on Thursday May 01, 2025 @07:03PM (#43864329)
I legit read your comment as "I deno" :)
Re:Deno's Decline by josephg on Thursday May 01, 2025 @07:34PM (#43864569)
That’s fair but -

I replaced node with bun a few months ago and I haven’t looked back. All my JavaScript projects run with no changes. Performance is on par or better compared to nodejs. It can run typescript directly without needing to be compiled. It also has a built in bundler & minifier (bun build), and some other goodies. The command line is a bit different - you need to “bun run” to run scripts. But eh.

Nodejs still works fine, of course. But being able to run typescript directly is killer.

Re:Deno's Decline by croes on Thursday May 01, 2025 @08:09PM (#43864814)
Wasn’t the USP of deno the baked in security features?

How are bun and nodejs on that side?

Re:Deno's Decline by nicce on Thursday May 01, 2025 @09:25PM (#43865238)
Bun has segmentation faults regularly if you look issue tracker. Security is not there yet.
Re:Deno's Decline by andrewmcwatters on Thursday May 01, 2025 @10:53PM (#43865702)
I get the point of Deno's sandboxing, but at the same time, like, imagine writing software and not knowing whether your own code is secure because you're that reliant on downstream dependencies and have to update frequently because your dependency authors are constantly releasing enough that you have no confidence to say otherwise.

It's just straight up not a problem other authors are thinking about regularly in other programming languages, because we don't have left-pad crises in other programming language ecosystems.

Re:Deno's Decline by curtisblaine on Friday May 02, 2025 @01:59AM (#43866609)
Node.js supports typescript out of the box by stripping types since node 22 (current LTS is 24, iirc)

https://nodejs.org/en/learn/typescript/run-natively

Re:Deno's Decline by theThree on Thursday May 01, 2025 @07:43PM (#43864632)
In web backend, Node.js is not slower than Go.
Re:Deno's Decline by danpalmer on Thursday May 01, 2025 @08:02PM (#43864772)
[citation needed]
Re:Deno's Decline by theThree on Thursday May 01, 2025 @09:19PM (#43865206)
From my own testing. In high-concurrency scenarios, their performance is roughly the same, and Node uses less memory. When it comes to string concatenation, Go has to do a lot of extra work (no "+",Estimating string length, Preallocate memory ) just to catch up with the speed of Node (simply using "+").
Re:Deno's Decline by Aeolun on Thursday May 01, 2025 @08:20PM (#43864869)
Eh, there’s some use cases where you can see some speedup from going to Go/Rust, but I’ll admit they’re pretty minimal.
Re:Deno's Decline by 9rx on Thursday May 01, 2025 @10:42PM (#43865647)
Execution performance might be similar, but Node.js and Deno execution performance are also similar (both use v8 – there is only so much you can optimize beyond that), so clearly the comment is not talking about execution performance. Deno sells itself as having faster development performance, so presumably that is what performance is in reference to.

It is hard to deny that Go isn't much more performant on the development end. Someone who is inexperienced might be slowed down due to that inexperience negating the performance boost, sure, but when one is concerned about developer performance they will be happy to incur the small upfront cost to become experienced for the bigger payoff later.

(It is debatable if Go is really the king of developer performance, you might do even better with another language, but what is certain is that it is not Javascript/Typescript)

Re:Deno's Decline by williamstein on Thursday May 01, 2025 @10:55PM (#43865722)
For some applications especially those that benefit from cpu-bound parallelism, it is possible to write much faster code with Go than Node.js, e.g., consider the recent port of the Typescript compiler from Javascript to Go:

- https://news.ycombinator.com/item?id=43332830

Re:Deno's Decline by gr4vityWall on Friday May 02, 2025 @07:01AM (#43868219)
I think 9rx agrees with you. Node.js shines as a web server. It can be made fast at CPU-bound tasks as well, but you wouldn't be writing idiomatic JS/TS.

The recent tsc port from TS to Go is a good example of that. The TypeScript code in the compiler relied a lot on polymorphism, which made it really hard for the JIT to do a good job.

The Go port enabled them to 'rewrite' it keeping the logic more-or-less 1:1 and land a good performance increase. IMO it was a good decision, specially the language choice, and much saner than what a JIT-friendly TS compiler would be.