zlacker

[parent] [thread] 90 comments
1. Tiberi+(OP)[view] [source] 2025-12-02 18:26:27
As someone who have been using Deno for the last few years, is there anything that Bun does better? Bun seems to use a different runtime (JSC) which is less tested than V8, which makes me assume it might perform worse in real-world tasks (maybe not anymore?). The last time I checked Bun's source code, it was... quite messy and spaghetti-like, plus Zig doesn't really offer many safety features, so it's not that hard to write incorrect code. Zig does force some safety with ReleaseSafe IIRC, but it's still not the same as even modern C++, let alone Rust.

I'll admit I'm somewhat biased against Bun, but I'm honestly interested in knowing why people prefer Bun over Deno.

replies(23): >>ecares+p >>TheFly+o2 >>cesarv+l4 >>Fragen+s4 >>gre+I6 >>kenhwa+g8 >>gr4vit+k8 >>satvik+A8 >>skybri+s9 >>bcye+3a >>pjmlp+eb >>silasd+vb >>spiffy+Mg >>dmit+Nh >>yieldc+Wi >>WorldM+wr >>torgin+Ms >>dunham+Fv >>kabirg+JK >>creata+rS >>bodge5+ET >>kamika+NC1 >>Griffi+qp2
2. ecares+p[view] [source] 2025-12-02 18:27:49
>>Tiberi+(OP)
It has wayyyyy better nodejs compatibility (day 1 goal)
replies(2): >>Tiberi+P >>0x457+Ot
◧◩
3. Tiberi+P[view] [source] [discussion] 2025-12-02 18:29:16
>>ecares+p
As far as I know, modern Node compat in Deno is also quite great - I just import packages via 'npm:package' and they work, even install scripts work. Although I remember that in the past Deno's Node compat was worse, yes.
4. TheFly+o2[view] [source] 2025-12-02 18:35:53
>>Tiberi+(OP)
I haven't used Deno, but I do use Bun purely as a replacement for npm. It does the hard-linking thing that seems to be increasingly common for package managers these days (i.e. it populates your local node_modules with a bunch of hard links to its systemwide cache), which makes it vastly quicker and more disk-efficient than npm for most usage.

Even with a cold cache, `bun install` with a large-ish dependency graph is significantly faster than `npm install` in my experience.

I don't know if Deno does that, but some googling for "deno install performance vs npm install" doesn't turn up much, so I suspect not?

As a runtime, though, I have no opinion. I did test it against Node, but for my use case (build tooling for web projects) it didn't make a noticeable difference, so I decided to stick with Node.

replies(5): >>homebr+C6 >>satvik+O8 >>agumon+Sk >>WorldM+ht >>user34+sZ
5. cesarv+l4[view] [source] 2025-12-02 18:43:04
>>Tiberi+(OP)
I've found it to be at least twice as fast with practically no compat issues.
replies(1): >>smarna+4n
6. Fragen+s4[view] [source] 2025-12-02 18:43:27
>>Tiberi+(OP)
Easily bundling and serving frontend code from your backend code is very appealing: https://bun.com/docs/bundler/fullstack

Despite the page title being "Fullstack dev server", it's also useful in production (Ctrl-F "Production Mode").

◧◩
7. homebr+C6[view] [source] [discussion] 2025-12-02 18:51:30
>>TheFly+o2
pnpm does all that on top of node. Also disables postinstall scripts by default, making the recent security incidents we've seen a non-issue.
replies(4): >>antihe+m8 >>daheza+Gg >>junon+aw >>replet+N21
8. gre+I6[view] [source] 2025-12-02 18:52:01
>>Tiberi+(OP)
I had memory leaks in bun and not in deno or node for the same code. ymmv
9. kenhwa+g8[view] [source] 2025-12-02 18:57:39
>>Tiberi+(OP)
I always figured Bun was the "enterprise software" choice, where you'd want to use Bun tools and libraries for everything and not need to bring in much from the broader NPM library ecosystem.

Deno seems like the better replacement for Node, but it'd still be at risk of NPM supply chain attacks which seems to be the greater concern for companies these days.

replies(1): >>skybri+Mf
10. gr4vit+k8[view] [source] 2025-12-02 18:57:55
>>Tiberi+(OP)
> I'll admit I'm somewhat biased against Bun?

Why? Genuine question, sorry if it was said/implied in your original message and I missed it.

replies(2): >>Tiberi+o9 >>fn-mot+iX
◧◩◪
11. antihe+m8[view] [source] [discussion] 2025-12-02 18:58:09
>>homebr+C6
I’m not sure why but bun still feels snappier.
replies(2): >>B56b+ph >>babysh+Zn
12. satvik+A8[view] [source] 2025-12-02 18:59:03
>>Tiberi+(OP)
Search for pointer exceptions or core dumps on Bun's GitHub issues and you'll see why people (should) use Deno over Bun, if only because Rust is a way more safe language than Zig.
replies(2): >>reacto+we >>rvrb+Oo
◧◩
13. satvik+O8[view] [source] [discussion] 2025-12-02 18:59:41
>>TheFly+o2
Deno does all that. Hell, yarn does too, or pnpm as the sibling mentioned.
replies(1): >>FINDar+XH
◧◩
14. Tiberi+o9[view] [source] [discussion] 2025-12-02 19:01:34
>>gr4vit+k8
Good question, hard to say, but I think it's mainly because of Zig. At its core Zig is marketed as a competitor to C, not C++/Rust/etc, which makes me think it's harder to write working code that won't leak or crash than in other languages. Zig embraces manual memory management as well.
replies(2): >>ecshaf+Uk >>AndyKe+9k1
15. skybri+s9[view] [source] 2025-12-02 19:01:40
>>Tiberi+(OP)
I’ve been using Deno too. Although npm support has improved and it’s fine for me, I think Deno has more of a “rewrite the world” philosophy. For example, they created their own package registry [1] and their own web framework [2]. Bun seems much more focused on preexisting JavaScript projects.

[1] https://jsr.io/ [2] https://fresh.deno.dev/

replies(1): >>Tiberi+sa
16. bcye+3a[view] [source] 2025-12-02 19:04:46
>>Tiberi+(OP)
It just works. Whatever JavaScript/TypeScript file or dependencies I throw at it, it will run it without needing to figure out CJS or ESM, tsconfig, etc.

I haven't had that experience with deno (or node)

replies(1): >>catapa+zc
◧◩
17. Tiberi+sa[view] [source] [discussion] 2025-12-02 19:06:06
>>skybri+s9
It's interesting that people have directly opposite opinions on whether Deno or Bun are meant to be used with the existing ecosystem - >>46125049
replies(1): >>hardwa+dd
18. pjmlp+eb[view] [source] 2025-12-02 19:09:33
>>Tiberi+(OP)
Agreed, the language would be interesting during the 1990's, nowadays not so much.

The tools that the language offers to handle use after free is hardly any different from using Purify, Insure++ back in 2000.

replies(1): >>defen+kg
19. silasd+vb[view] [source] 2025-12-02 19:10:18
>>Tiberi+(OP)
Stopped following Deno while they were rejecting the need for a package management solution. Used Bun instead.
replies(1): >>croes+Th
◧◩
20. catapa+zc[view] [source] [discussion] 2025-12-02 19:13:33
>>bcye+3a
Same. I had a little library I wrote to wrap indexedDB and deno wouldn't even compile it because it referenced those browser apis. I'm sure it's a simple flag or config file property, or x, or y, or z, but the simple fact is, bun didn't fail to compile.

Between that and the discord, I have gotten the distinct impression that deno is for "server javascript" first, rather than just "javascript" first. Which is understandable, but not very catering to me, a frontend-first dev.

replies(1): >>bcye+Oi
◧◩◪
21. hardwa+dd[view] [source] [discussion] 2025-12-02 19:16:14
>>Tiberi+sa
I don’t think these are mutually exclusive takes. Bun is essentially taking Node and giving it a standard library and standard tooling. But you can still use regular node packages if you want. Whereas Deno def leaned into the clean break for a while
◧◩
22. reacto+we[view] [source] [discussion] 2025-12-02 19:22:18
>>satvik+A8
This is a non sequitur. Both Rust and Zig and any other language has the ability to end in an exception state. Whether it be kernel exception, pointer exception, or Rust's panic! - these things exist.

The reason why you see so many GitHub issues about it is because that's where the development is. Deno is great. Bun is great. These two things can both be great and we don't have to choose sides. Deno has it's use case. Bun has it's. Deno want's to be secure and require permissions. Bun just wants to make clean, simple, projects. This fight between Rust vs The World is getting old. Rust isn't any "safer" when Deno can panic too.

replies(3): >>skipan+hi >>satvik+cj >>diarrh+il
◧◩
23. skybri+Mf[view] [source] [discussion] 2025-12-02 19:27:48
>>kenhwa+g8
If you want to download open source libraries to be used in your Bun project then they will come from npm, at least by default. [1].

So it seems odd to say that Bun is less dependent on the npm library ecosystem.

[1] It’s possible to use jsr.io instead: https://jsr.io/docs/using-packages

replies(1): >>kenhwa+3m
◧◩
24. defen+kg[view] [source] [discussion] 2025-12-02 19:29:53
>>pjmlp+eb
I find comments like this fascinating, because you're implicitly evaluating a counterfactual where Bun was built with Rust (or some other "interesting" language). Maybe Bun would be better if it were built in Rust. But maybe it would have been slower (either at runtime or development speed) and not gotten far enough along to be acquired by one of the hottest companies in the world. There's no way to know. Why did Anthropic choose Bun instead of Deno, if Deno is written in a better language?
replies(3): >>pjmlp+gk >>n42+5E >>Aeolun+Rv1
◧◩◪
25. daheza+Gg[view] [source] [discussion] 2025-12-02 19:31:10
>>homebr+C6
Are there any popular packages that require postinstall scripts that this hurts?
26. spiffy+Mg[view] [source] 2025-12-02 19:31:42
>>Tiberi+(OP)
I tried several times to port Node projects to Deno. Each time compatibility had "improved" but I still didn't have a working build after a few days of effort.

I don't know how Deno is today. I switched to Bun and porting went a lot smoother.

Philosophically, I like that Bun sees Node compatibility as an obvious top priority. Deno sees it as a grudging necessity after losing the fight to do things differently.

replies(1): >>fastba+EB
◧◩◪◨
27. B56b+ph[view] [source] [discussion] 2025-12-02 19:34:21
>>antihe+m8
This is why: https://bun.com/blog/behind-the-scenes-of-bun-install
28. dmit+Nh[view] [source] 2025-12-02 19:35:37
>>Tiberi+(OP)
> is there anything that Bun does better?

Telling prospective employees that if you're not ready to work 60-hour weeks, then what the fuck are you doing here? for one.

> Zig does force some safety with ReleaseSafe IIRC

which Bun doesn't use, choosing to go with `ReleaseFast` instead.

◧◩
29. croes+Th[view] [source] [discussion] 2025-12-02 19:35:51
>>silasd+vb
Isn’t because packages are one of the problems deno tried to fix?
replies(1): >>WorldM+fq
◧◩◪
30. skipan+hi[view] [source] [discussion] 2025-12-02 19:37:15
>>reacto+we
I agree. Pointing at Github issues is a strange metric to me. If we want to use that as a canary then you shouldn't use Deno (2.4k open issues) or Bun (4.5k open issues) at all.
◧◩◪
31. bcye+Oi[view] [source] [discussion] 2025-12-02 19:39:00
>>catapa+zc
Even for server ~~java~~typescript, I almost always reach for Bun nowadays. Used to be because of typestripping, which node now has too, but it's very convenient to write a quick script, import libraries and not have to worry about what format they are in.
32. yieldc+Wi[view] [source] 2025-12-02 19:39:22
>>Tiberi+(OP)
I've been using Bun since 2022 just to be trendy for recruitment (it worked, and still works despite it almost being 2026)

Bun is fast, and its worked as a drop in replacement for npm in large legacy projects too.

I only ever encountered one issue, which was pretty dumb, Amazon's CDK has hardcoded references to various package manager's lock files, and Bun wasn't one of them

https://github.com/aws/aws-cdk/issues/31753

This wasn't fixed till the end of 2024 and as you can see, only accidentally merged in but tolerated. It was promptly broken by a bun breaking change

https://github.com/aws/aws-cdk/issues/33464

but don't let Amazon's own incompetency be the confirmation bias you were looking for about using a different package manager in production

you can use SST to deploy cloud resources on AWS and any cloud, and that package works with bun

◧◩◪
33. satvik+cj[view] [source] [discussion] 2025-12-02 19:40:04
>>reacto+we
Don't make a false equivalence, how many times does one get a panic from Deno versus a segmentation fault in Bun? It's not a similar number, and it's simply wrong to say that both are just as unsafe when that's plainly untrue.
replies(3): >>ricard+7G >>reacto+HP >>hu3+a61
◧◩◪
34. pjmlp+gk[view] [source] [discussion] 2025-12-02 19:44:32
>>defen+kg
Because maybe they reached out to them, and they didn't took the money, while Bun folks business model wasn't working out?

Who knows?

Besides, how are they going to get back the money spent on the acquisition?

Many times the answer to acquisitions has nothing to do with technology.

replies(1): >>defen+Ql
◧◩
35. agumon+Sk[view] [source] [discussion] 2025-12-02 19:47:24
>>TheFly+o2
IIRC bun zig code base has a lot of fine optimization too. I think the lead did a conference explaining his work. Or maybe i'm confused.
replies(1): >>dolmen+9Z
◧◩◪
36. ecshaf+Uk[view] [source] [discussion] 2025-12-02 19:47:30
>>Tiberi+o9
Rust is more of a competitor to C++ than C. Manual memory management is sometimes really helpful and necessary. Zig has a lot of safety features.
◧◩◪
37. diarrh+il[view] [source] [discussion] 2025-12-02 19:49:24
>>reacto+we
> This is a non sequitur. Both Rust and Zig and any other language has the ability to end in an exception state.

There are degrees to this though. A panic + unwind in Rust is clean and _safe_, thus preferable to segfaults.

Java and Go are another similar example. Only in the latter can races on multi-word data structures lead to "arbitrary memory corruption" [1]. Even in those GC languages there's degrees to memory safety.

1: https://go.dev/ref/mem

replies(2): >>dranne+fm >>ignora+Q64
◧◩◪◨
38. defen+Ql[view] [source] [discussion] 2025-12-02 19:51:54
>>pjmlp+gk
> Claude Code, FactoryAI, OpenCode, and others are all built with Bun.

Anthropic chose to use Bun to build their tooling.

replies(1): >>pjmlp+Dv
◧◩◪
39. kenhwa+3m[view] [source] [discussion] 2025-12-02 19:52:22
>>skybri+Mf
Yes, both can pull in open source libraries and I can't imagine either dropping that ability. Though they do seem to have different eagerness and competency on Node compatibility and Bun seems better on that front.

From a long term design philosophy prospective, Bun seems to want to have a sufficiently large core and standard library where you won't need to pull in much from the outside. Code written for Node will run on Bun, but code using Bun specific features won't run on Node. It's the "embrace, extend, ..." approach.

Deno seems much more focused on tooling instead of expanding core JS, and seems to draws the line at integrations. The philosophy seems to be more along the lines of having the tools be better about security when pulling in libraries instead of replacing the need for libraries. Deno also has it's own standard library, but it's just a library and that library can run on Node.

replies(1): >>skybri+8D
◧◩◪◨
40. dranne+fm[view] [source] [discussion] 2025-12-02 19:53:08
>>diarrh+il
I'll take a small panic and unwind any day over a total burnout crash. Matters in code and life.
◧◩
41. smarna+4n[view] [source] [discussion] 2025-12-02 19:56:20
>>cesarv+l4
Twice as fast at executing JavaScript? There's absolutely zero chance this is true. A JavaScript engine that's twice as fast as V8 in general doesn't exist. There may be 5 or 10 percent difference, but nothing really meaningful.
replies(4): >>johnfn+Fs >>ukblew+1t >>jasnel+6F >>oscarg+jW3
◧◩◪◨
42. babysh+Zn[view] [source] [discussion] 2025-12-02 20:00:37
>>antihe+m8
Aside from speed, what would the major selling points be on migrating from pnpm to bun?
◧◩
43. rvrb+Oo[view] [source] [discussion] 2025-12-02 20:04:07
>>satvik+A8
I haven't verified this, but I would be willing to bet that most of Bun's issues here have more to do with interfacing with JavaScriptCore through the C FFI than Zig itself. this is as much a problem in Rust as it is in Zig. in fact, it has been argued that writing unsafe Zig is safer than writing unsafe Rust: https://zackoverflow.dev/writing/unsafe-rust-vs-zig/
replies(1): >>polkch+xO
◧◩◪
44. WorldM+fq[view] [source] [discussion] 2025-12-02 20:10:48
>>croes+Th
They tried to realign package management with web standards and tools that browsers can share (URLs and importmaps and "cache, don't install"). They didn't offer compatibility with existing package managers (notably and notoriously npm) until late in that game and took multiple swings at URL-based package repositories (deno.land/x/ and JSR), with JSR eventually realizing it needed stronger npm compatibility.

Bun did prioritize npm compatibility earlier.

Today though there seems to be a lot of parity, and I think things like JSR and strong importmaps support start to weigh in Deno's favor.

replies(1): >>silasd+qJ2
45. WorldM+wr[view] [source] 2025-12-02 20:16:38
>>Tiberi+(OP)
> Bun seems to use a different runtime (JSC) which is less tested than V8, which makes me assume it might perform worse in real-world tasks (maybe not anymore?).

JSC is still the JS engine for WebKit-based browsers, especially Safari, and per Apple App Store regulations the only JS engine supposedly allowable in all of iOS.

It's more "mature" than V8 in terms of predating it. (V8 was not a fork of it and was started from scratch, but V8 was designed to replace it in the Blink fork from WebKit.)

It has different performance goals and performance characteristics, but "less tested" seems uncharitable and it is certainly used in plenty of "real-world tasks" daily in iOS and macOS.

◧◩◪
46. johnfn+Fs[view] [source] [discussion] 2025-12-02 20:23:32
>>smarna+4n
You might want to revise what you consider to be "absolutely zero chance". Bun has an insanely fast startup time, so it definitely can be true for small workloads. A classic example of this was on Bun's website for a while[1] - it was "Running 266 React SSR tests faster than Jest can print its version number".

[1]: https://x.com/jarredsumner/status/1542824445810642946

replies(1): >>smarna+oq1
47. torgin+Ms[view] [source] 2025-12-02 20:23:49
>>Tiberi+(OP)
Is it just me, but I don't find npm that slow? Sure it's not a speed demon, but I rarely need to do npm install anyways so it's not a bottleneck for me.

For deploy, usually running the attached terraform script takes more time.

So while a speed increase is welcome, but I don't feel it gives me such a boost.

replies(1): >>hinkle+it
◧◩◪
48. ukblew+1t[view] [source] [discussion] 2025-12-02 20:24:33
>>smarna+4n
It depends on what. Bun has some major optimisations. You’ll have to read into them if you don’t believe me. The graphs don’t come from nowhere
◧◩
49. WorldM+ht[view] [source] [discussion] 2025-12-02 20:25:14
>>TheFly+o2
Deno does that. It also refrains from keeping a local node_modules at all until/unless you explicitly ask it to for whatever compatibility reason. There are plugins to things like esbuild to use the Deno resolver and not need a node_modules at all (if you aren't also using the Deno-provided bundler for whatever reason such as it disappeared for a couple versions and is still marked "experimental").
◧◩
50. hinkle+it[view] [source] [discussion] 2025-12-02 20:25:16
>>torgin+Ms
The speed shows up for large projects. Especially if you end up with multiple node_modules directories in your dev sandbox.
◧◩
51. 0x457+Ot[view] [source] [discussion] 2025-12-02 20:28:46
>>ecares+p
Pretty sure one of the Deno day 1 goals was to correct mistakes made during the early days of Node.js.
◧◩◪◨⬒
52. pjmlp+Dv[view] [source] [discussion] 2025-12-02 20:37:23
>>defen+Ql
We can think of they making bun an internal tool, push roadmap items that fit their internal products, whatever, which doesn't answer the getting back money of the acquisition.

Profit in those products has to justify having now their own compiler team for a JavaScript runtime.

53. dunham+Fv[view] [source] 2025-12-02 20:37:26
>>Tiberi+(OP)
Is JSC less tested? I thought it was used in Safari, which has some market share.

I used bun briefly to run the output of my compiler, because it was the only javascript runtime that did tail calls. But I eventually added a tail call transform to my compiler and switched to node, which runs 40% faster for my test case (the compiler building itself).

◧◩◪
54. junon+aw[view] [source] [discussion] 2025-12-02 20:40:03
>>homebr+C6
As the victim of the larger pre-Shai-Hulud attack, unfortunately the install script validation wouldn't have protected you. Also, if you already have an infected package on the whitelist, a new infection in the install script will still affect you.
◧◩
55. fastba+EB[view] [source] [discussion] 2025-12-02 21:06:42
>>spiffy+Mg
Which makes sense given that a big impetus for Deno's existence was the creator of Node/Deno (Ryan Dahl) wanting to correct things he viewed as design mistakes in Node.
◧◩◪◨
56. skybri+8D[view] [source] [discussion] 2025-12-02 21:14:34
>>kenhwa+3m
That’s true of some parts of Deno’s standard libraries, but major functionality like Deno.test and Deno.serve are Deno-specific API’s.

Here are the Bun API’s:

https://bun.com/docs/runtime/bun-apis

Here are the Deno API’s:

https://docs.deno.com/api/deno/

◧◩◪
57. n42+5E[view] [source] [discussion] 2025-12-02 21:19:59
>>defen+kg
Don't engage with this guy, he shows up in every one of these threads to pattern match back to his heyday without considering any of the nuance of what is actually different this time.
replies(1): >>pjmlp+MI
◧◩◪
58. jasnel+6F[view] [source] [discussion] 2025-12-02 21:25:59
>>smarna+4n
Keep in mind that it's not just a matter of comparing the JS engine. The runtime that is built around the engine can have a far greater impact on performance than the choice of v8 vs. JSC vs. anything else. In many microbenchmarks, Bun routinely outperforms Node.js and Deno in most tasks by a wide margin.
replies(1): >>smarna+1r1
◧◩◪◨
59. ricard+7G[view] [source] [discussion] 2025-12-02 21:32:26
>>satvik+cj
Anecodtally? Zero segfaults with bun since I started using it back in beta.
replies(1): >>satvik+hn8
◧◩◪
60. FINDar+XH[view] [source] [discussion] 2025-12-02 21:42:17
>>satvik+O8
Sure, but pnpm is very slow compared to bun.
◧◩◪◨
61. pjmlp+MI[view] [source] [discussion] 2025-12-02 21:46:18
>>n42+5E
Look an admirer!
62. kabirg+JK[view] [source] 2025-12-02 21:54:50
>>Tiberi+(OP)
My team has been using it in prod for about a year now. There were some minor bugs in the runtime's implementation of buffers in 1.22 (?), but that was about the only issue we ran into.

The nice things:

1. It's fast.

2. The standard library is great. (This may be less of an advantage over Deno.)

3. There's a ton of momentum behind it.

4. It's closer to Node.js than Deno is, at least last I tried. There were a bunch of little Node <> Deno papercuts. For example, Deno wanted .ts extensions on all imports.

5. I don't have to think about JSR.

The warts:

1. The package manager has some issues that make it hard for us to use. I've forgotten why now, but this in particular bit us in the ass: https://github.com/oven-sh/bun/issues/6608. We use PNPM and are very happy with it, even if it's not as fast as Bun's package manager.

Overall, Deno felt to me like they were building a parallel ecosystem that I don't have a ton of conviction in, while Bun feels focused on meeting me where I am.

◧◩◪
63. polkch+xO[view] [source] [discussion] 2025-12-02 22:14:51
>>rvrb+Oo
As someone who has researched the internals of Deno and Bun, your unverified vibe thoughts are flat out wrong. Bun is newer and buggier and that's just the way things go sometimes. You'll get over it.
◧◩◪◨
64. reacto+HP[view] [source] [discussion] 2025-12-02 22:21:01
>>satvik+cj
The only time I got a segfault in Bun is when I used bun:ffi to wrap glfw and wgpu-native so I can threejs on the desktop. Ironically, the segfault was in wgpu. Which is Rust. But to be fair it was because the glfw surface had dirty flags for OpenGL and didn’t have the Vulkan extensions. So anyone would have faulted.
65. creata+rS[view] [source] 2025-12-02 22:36:13
>>Tiberi+(OP)
Looking at Bun's website (the comparison table under "What's different about Bun?") and what people have said here, the only significant benefit of Bun over Node.js seems to be that it's more batteries-included - a bigger standard library, more tools, some convenience features like compiling JSX and stripping TypeScript types on-the-fly, etc.

It's not clear to me why that requires creating a whole new runtime, or why they made the decisions they did, like choosing JSC instead of V8, or using a pre-1.0 language like Zig.

66. bodge5+ET[view] [source] 2025-12-02 22:45:07
>>Tiberi+(OP)
I really want to like Deno and will likely try it again, but last time I did it was just a bit of a pain anytime I wanted to use something built for npm (which is most packages out there), whereas bun didn't have that problem.

There's certainly an argument to be made that, like any good tool, you have to learn Deno and can't fall back on just reusing node knowledge, and I'd absolutely agree with that, but in that case I wanted to learn the package, not the package manager.

Edit: Also it has a nice standard library, not a huge win because that stuff is also doable in Deno, but again, its just a bit less painless

◧◩
67. fn-mot+iX[view] [source] [discussion] 2025-12-02 23:11:07
>>gr4vit+k8
I mean, they said they looked at the source code and thought it was gross, so there’s a justification for their concern, at least.
replies(1): >>gr4vit+Fc2
◧◩◪
68. dolmen+9Z[view] [source] [discussion] 2025-12-02 23:24:45
>>agumon+Sk
https://bun.com/blog/behind-the-scenes-of-bun-install
replies(1): >>agumon+E01
◧◩
69. user34+sZ[view] [source] [discussion] 2025-12-02 23:27:21
>>TheFly+o2
I decided to stick with Node in general. I don't see any compelling reason to change it.

Faster install and less disk space due to hardlink? Not really all that important to me. Npm comes with a cache too, and I have the disk space. I don't need it to be faster.

With the old-school setup I can easily manually edit something in node_modules to quickly test a change.

No more node_modules? It was a cool idea when yarn 2 initially implemented it, but at the end of the day I prefer things to just work rather than debug what is and isn't broken by the new resolver. At the time my DevOps team also wasn't too excited about me proposing to put the dependencies into git for the zero-install.

◧◩◪◨
70. agumon+E01[view] [source] [discussion] 2025-12-02 23:37:16
>>dolmen+9Z
oh thanks yes, i couldn't find it, i was already lost thinking it was a conference by andrew kelley .. thanks a lot
◧◩◪
71. replet+N21[view] [source] [discussion] 2025-12-02 23:51:40
>>homebr+C6
A whitelist in package.json is only a partial assist
◧◩◪◨
72. hu3+a61[view] [source] [discussion] 2025-12-03 00:19:28
>>satvik+cj
I use Bun in production. Well, one of my clients.

We have yet to witness a segfault. Admitedly it's a bunch of micro services and not many requests/s (around 5k AVG).

◧◩◪
73. AndyKe+9k1[view] [source] [discussion] 2025-12-03 02:35:39
>>Tiberi+o9
> At its core Zig is marketed as a competitor to C, not C++/Rust/etc

What gives you this impression?

I directly created Zig to replace C++. I used C++ before I wrote Zig. I wrote Zig originally in C++. I recently ported Chromaprint from C++ to Zig, with nice performance results. I constantly talk about how batching is superior to RAII.

Everyone loves to parrot this "Zig is to C as Rust is to C++" nonsense. It's some kind of mind virus that spreads despite any factual basis.

I don't mean to disparage you in particular, this is like the 1000th time I've seen this.

replies(3): >>Aeolun+8w1 >>troad+xC1 >>oscarg+zZ3
◧◩◪◨
74. smarna+oq1[view] [source] [discussion] 2025-12-03 03:35:44
>>johnfn+Fs
I only claimed there is absolutely zero chance that Bun is twice as fast at executing general JavaScript as Deno. The example doesn't give any insight into the relative speeds of Bun and Deno, as fast as I can tell.
replies(1): >>johnfn+QD1
◧◩◪◨
75. smarna+1r1[view] [source] [discussion] 2025-12-03 03:41:54
>>jasnel+6F
The claim I responded to is that Bun is "at least twice as fast" as Deno. This sounds a lot more general than Bun being twice as fast in cherry-picked microbenchmarks. I wasn't able to find any benchmark that found meaningful differences between the two runtimes for real-world workloads. (Example: https://hackernoon.com/myth-vs-reality-real-world-runtime-pe...)
replies(1): >>Aeolun+zv1
◧◩◪◨⬒
76. Aeolun+zv1[view] [source] [discussion] 2025-12-03 04:32:54
>>smarna+1r1
Real world benchmarks include database queries and http requests? That’d quickly obviate any differences between runtimes.

Lol, yeah, this person is running a performance test on postgres, and attributing the times to JS frameworks.

◧◩◪
77. Aeolun+Rv1[view] [source] [discussion] 2025-12-03 04:37:09
>>defen+kg
> Why did Anthropic choose Bun instead of Deno, if Deno is written in a better language?

Something about moral and philosophical flexibility.

◧◩◪◨
78. Aeolun+8w1[view] [source] [discussion] 2025-12-03 04:40:07
>>AndyKe+9k1
I got to love that the author of the thing can show up and say “Why?! I never said any of that!”

A lot of stuff related to older languages is lost in the sands of time, but the same thing isn’t true for current ones.

◧◩◪◨
79. troad+xC1[view] [source] [discussion] 2025-12-03 06:04:01
>>AndyKe+9k1
You have pretty explicitly framed Zig as a C replacement yourself, e.g.: https://www.youtube.com/watch?v=Gv2I7qTux7g

More broadly, I think the observation tends to get repeated because C and Zig share a certain elegance and simplicity (even if C's elegance has dated). C++ is many things, but it's hardly elegant or simple.

I don't think anyone denies that Zig can be a C++ replacement, but that's hardly unusual, so can many other languages (Rust, Swift, etc). What's noteworthy here is that Zig is almost unique in having the potential to be a genuine C replacement. To its (and your) great credit, I might add.

>> At its core Zig is marketed as a competitor to C, not C++/Rust/etc, which makes me think it's harder to write working code that won't leak or crash than in other languages. Zig embraces manual memory management as well.

@GP: This is not a great take. All four languages are oriented around manual memory management. C++ inherits all of the footguns of C, whereas Zig and Rust try to sand off the rough edges.

Manual memory management is and will always remain necessary. The only reason someone writing JS scripts don't need to worry about managing their memory is because someone has already done that work for them.

80. kamika+NC1[view] [source] 2025-12-03 06:07:42
>>Tiberi+(OP)
At this stage I don't think either is better over the other. Deno has inexplicable high memory usage issues in Linux containers. Bun more or less suffers from the same with an added dose of segfaults.

1. https://github.com/denoland/deno/issues?q=is%3Aissue%20state... 2. https://github.com/oven-sh/bun/issues?q=is%3Aissue%20state%3...

Node.js is a no-brainer for anyone shipping a TS/JS backend. I'd rather deal with poor DX and slightly worse performance than risk fighting runtime related issues on deployment.

Linux needs to be a first class citizen for any runtime/langauge toolchain.

◧◩◪◨⬒
81. johnfn+QD1[view] [source] [discussion] 2025-12-03 06:23:03
>>smarna+oq1

    johnfn@mac ~ % time  deno eval 'console.log("hello world")'
    hello world
    deno eval 'console.log("hello world")'  0.04s user 0.02s system 87% cpu 0.074 total
    johnfn@mac ~ % time   bun -e 'console.log("hello world")'
    hello world
    bun -e 'console.log("hello world")'  0.01s user 0.00s system 84% cpu 0.013 total
That's about 560% faster. Yes, it's a microbenchmark. But you said "absolutely zero chance", not "a very small chance".
◧◩◪
82. gr4vit+Fc2[view] [source] [discussion] 2025-12-03 10:58:48
>>fn-mot+iX
That's fair, but the word 'biased' felt unusual to describe how they perceive the runtime.
83. Griffi+qp2[view] [source] 2025-12-03 12:36:58
>>Tiberi+(OP)
Crash. According to my experience trying it many times oves the past years.

It feels like a very unfocused project, every few months they introduce a new feature that is to replace an entire class of tools, while the original promise of "drop in Node replacement" was never fulfilled (or at least, that was the vibe for the past years when I was still paying attention).

We'll see how this works out but speed + lack of scope never works out well in the long term.

◧◩◪◨
84. silasd+qJ2[view] [source] [discussion] 2025-12-03 14:43:57
>>WorldM+fq
Yeah it does look like things have moved on, but there were echoes from previous Go conversations around the idea of a standardised package and the attendant years of hurt that it turned me off a little while ago. I did try: https://github.com/denoland/deno/issues/4574#issuecomment-62...
◧◩◪
85. oscarg+jW3[view] [source] [discussion] 2025-12-03 20:29:03
>>smarna+4n
We are in the "system engineering territory" and as such it might have more to do with the way the runtime is designed and how the javascript native runtime does things than the compiler optimizations. You have to measure syscalls, memory access, cpu cache locality and a bunch of design decisions that in the end contribute a lot to the running time. So depending on the decisions taken, it can easily happen.
◧◩◪◨
86. oscarg+zZ3[view] [source] [discussion] 2025-12-03 20:45:52
>>AndyKe+9k1
Well if anything take as a compliment. As a C, C++ (and some Rust) who lately is enjoying Zig, I think Zig is the only programming language positioned to convince system programming die hard C programmers to use another programming language with simplicity and power backed in.

But completely agree. Its a perfect replacement for C++ and I would say the natural spiritual successor of C.

I gave up using Rust for new projects after seeing the limitations for the kind of software I like to write and have been using Zig instead as it gives me the freedom I need without all the over-complication that languages like C++ and Rust bring to the table.

I think people should first experiment see for themselves and only then comment as I see a lot of misinformation and beliefs more based on marketing than reality.

Thank you very much for your wonderful work!

◧◩◪◨
87. ignora+Q64[view] [source] [discussion] 2025-12-03 21:23:25
>>diarrh+il
> A panic + unwind in Rust is clean and _safe_, thus preferable to segfaults

Curious about safety here: Are kernel / cross-thread resources (ex: a mutex/futex/fd) released on unwind (assuming the stack being unwound acquired those)?

replies(1): >>diarrh+Sj5
◧◩◪◨⬒
88. diarrh+Sj5[view] [source] [discussion] 2025-12-04 08:04:47
>>ignora+Q64
Good question. For fds their Drop implementation closes them, yes. Rust Mutexes will be poisoned on panic (not unlocked). Not sure about futexes.
replies(1): >>reacto+bna
◧◩◪◨⬒
89. satvik+hn8[view] [source] [discussion] 2025-12-05 04:03:50
>>ricard+7G
I'm talking statistically in terms of number of issues that reference segmentation faults in the Bun vs Deno GitHub repositories. Anecdata doesn't mean much.
◧◩◪◨⬒⬓
90. reacto+bna[view] [source] [discussion] 2025-12-05 17:29:33
>>diarrh+Sj5
But if Rust panic’s, the entire process is dead, so everything gets reclaimed on exit by the kernel. Total annihilation.

All modern OS’s behave this way. When your process starts and is assigned an address, you get an area. It can balloon but it starts somewhere. When the process ends, that area is reclaimed.

replies(1): >>diarrh+cab
◧◩◪◨⬒⬓⬔
91. diarrh+cab[view] [source] [discussion] 2025-12-05 21:18:49
>>reacto+bna
The OS is my GC. It's why I segfault liberally.
[go to top]