Live data from Hacker News

Bun 0.6

bun.sh

111–120 of 243 posts

Re: Bun 0.6

#111
post #60

Why are we still minifying JavaScript? Is it only for obfuscation? State-of-the-art HTTP servers already do a pretty damn good job gzipping stuff on the fly, do we need this garbage? If it is for obfuscation, fine, can we just call it that?

We touch on this in the docs [0]. TLDR, bundlers are still necessary (for now) to reduce the number of roundtrip requests required before page load (ideally to 1), and in more complex apps to avoid overwhelming the browser with parallel requests. Even HTTP2 can't handle 100k parallel requests for a big app with a bloated node_modules.

[0] https://bun.sh/docs/cli/build#why-bundle

Re: Bun 0.6

#112
post #44

Earlier quoted context omitted.

JSC is ridiculously fast, this is what makes bun great

It really depends on what you're doing. If 95% of your code is file or network I/O then it's really not going to make the slightest difference whether you're running JSC, V8 or QuickJS. If your code is enormously complex and benefits from JIT then yes, you're going to really feel that downgrade.

The difference in real world performance between web servers written in things like Python or Ruby to those written in Go, C# or even lower-level languages like Rust would indicate that's an over-estimation of how much IO dominates total runtime, even if it is by far the slowest part.

Re: Bun 0.6

#113
post #81

Earlier quoted context omitted.

Apparently a hello world is like 90MB. https://twitter.com/jarredsumner/status/1657765876085690368

ICU :( https://github.com/oven-sh/bun/issues/2541 https://twitter.com/jarredsumner/status/1616597667408404481

QuickJS has a custom unicode library for this reason.

Re: Bun 0.6

#114
post #6

> Standalone executables. You can now create standalone executables with bun build. > bun build --compile ./foo.ts > This lets you distribute your app as a single executable file, without requiring users to install Bun. > ./foo This is big! Part of Go's popularity is due to how easy it is to produce self-contained executables. And it seems to support amd64 and arm according too: https://twitter.com/jarredsumner/statu…

Fwiw, Deno can do this too: https://deno.com/manual@v1.33.3/tools/compiler

Yeah, I used Deno to build a simple URL switch case utility in late 2021 to handle sending different URLs to different browsers, and that was ~56MB compiled at the time. I don't know if it's changed in the base size since then, but if bun is resulting in 90MB binaries (as reported here), then Deno may yield a significant reduction in size (if it hasn't gotten much worse in that time).

Re: Bun 0.6

#115

How big are the bundles (edit: I meant self-contained executables) and do they depend on glibc? Edit: just saw a comment from the author indicating glibc is required.

Doing it without glibc is not practical

Re: Bun 0.6

#116
post #38
post #2

I work on Bun. Happy to answer any questions also: there is a bug in `bun build --compile` I am currently working on fixing. Expect a v0.6.1 in a bit

Revenue/monetization model? Given that Oven has taken $7m in VC funding, how do you plan to monetize Bun, etc?

The plan is JavaScript edge hosting focused on fast cold starts and being extremely inexpensive, using lots of custom infrastructure

Re: Bun 0.6

#117
post #81
post #6

> Standalone executables. You can now create standalone executables with bun build. > bun build --compile ./foo.ts > This lets you distribute your app as a single executable file, without requiring users to install Bun. > ./foo This is big! Part of Go's popularity is due to how easy it is to produce self-contained executables. And it seems to support amd64 and arm according too: https://twitter.com/jarredsumner/statu…

Apparently a hello world is like 90MB. https://twitter.com/jarredsumner/status/1657765876085690368

Is 90MB really that big when compared against the other types of binaries that would get deployed: containers and VM images? How big is the platform (k8s, docker, etc) you need installed to run your app? Probably more than 90MB.

Re: Bun 0.6

#119
post #81

Earlier quoted context omitted.

Apparently a hello world is like 90MB. https://twitter.com/jarredsumner/status/1657765876085690368

Is 90MB really that big when compared against the other types of binaries that would get deployed: containers and VM images? How big is the platform (k8s, docker, etc) you need installed to run your app? Probably more than 90MB.

Depends. Doesn't seem much for a server but if you want to distribute an executable to your users then 90MB seems huge. IIRC a hello world Go binary is like 2MB.

Re: Bun 0.6

#120
Is WHAT? The title should tell us what the post is about. Why do we have to keep bringing this up? A title like this is a great way to miss out on a lot of views and reduce the usefulness of your post.

Let the downvoting of this simple observation begin.

Post reply on HN