Live data from Hacker News

Bun 0.6

bun.sh

51–60 of 243 posts

Re: Bun 0.6

#51

I am truly perplexed as someone outside of the Javascript ecosystem; why are there so many incompatible bundlers? If you look at most compiled languages they have a set ABI / executable image format, and you just use a link editor (either compile time, run time, or both). Is it just because most Javascript developers have never learnt from any of the lessons that came from decades of compiled languages? (compilers, c…

I think it's largely a three-fold problem of the fact that most JS apps are still deployed through browsers and not installed, the fact that HTTP2 was not the panacea of multi-request happy good times it was made out to be, plus the fact that there is no Application Binary Interface, everything gets deployed as source code.

This creates a situation where you need bundlers, whereas other languages don't have the concept at all, just to be able to minimize download time (and honestly, while we end up making rather large apps in comparison to web pages, they're pretty small in comparison to other kinds of applications), and then bundles are too opaque to share common code between applications.

And because there's no chance to benefit across projects from sharing, there's no force driving standardization of bundling, or adoption of said standard.

Re: Bun 0.6

#53
post #39

Earlier quoted context omitted.

Because there were browsers and no standards. How can you expect someone that starts coding on the web to know what pains kernel went through decades prior?

But surely the people writing the browser code thought about the ecosystem they were creating / trying to create?

Browsers weren't written in a day. Technically speaking, Mozilla Firefox is a ship of Theseus going back to the release of Netscape in 1994. Did browser and internet infrastructure developers in the early 90s understand that these things would become rich application platforms? Looking at the history of HTTP, it's clear that they expected some concept of "application" to be delivered through the browser. While there's certainly a chance at least a few of them foresaw the full scope of what that would mean (it's not like X11 remoting wasn't a thing), I don't think most of the people involved were thinking much past 10 years (The Distant Future, the Year 2000).

JavaScript was apocryphally "invented in 10 days", it came as an attempt to create competitive advantage, not to create a global standard. The first JavaScript came a year (1995) after the first Netscape, but the first major JS-heavy application didn't come for another 13 years (Google Maps, 2008).

Re: Bun 0.6

#54

I am truly perplexed as someone outside of the Javascript ecosystem; why are there so many incompatible bundlers? If you look at most compiled languages they have a set ABI / executable image format, and you just use a link editor (either compile time, run time, or both). Is it just because most Javascript developers have never learnt from any of the lessons that came from decades of compiled languages? (compilers, c…

1. Compiling/building is an ~optional layer on top of the core language/standard (which has become less optional over time)

2. Running JS outside of the browser is similarly a layer that was built before any kind of standard existed for it (which still doesn't, really)

The browser standards are the only real standards. Everything else (which has turned into a lot) is "standard by implementation". Implementations usually try to agree with each other, because that's obviously beneficial for everybody, but sometimes they make choices to deviate either out of necessity or in an attempt to improve the ecosystem

So it's all pretty ad-hoc, but in practice most things are mostly compatible most of the time. They orbit the same general things, and the orbit has narrowed in the last few years as most of the big problems have been solved and the community is zeroing in on the agreed solutions (with the caveat of often having to maintain legacy compatibility)

Deno takes a stricter philosophy than most, where it prescribes a ~good way that everything should be done (which is almost entirely based on browser standards which have evolved since all this started), even though it runs outside of a browser, and requiring the ecosystem to fall in line

Bun on the other hand takes a maximalist approach to compatibility; it does its best to make everything from every other sub-ecosystem Just Work without any modifications

Re: Bun 0.6

#55
I've been pretty jaded by Node.js lately, especially with all of the ESM and TypeScript stuff. This led me to try using Deno but Deno was missing the mark in a lot of ways.

Is Bun in a state where I can start thinking about replacing my Node.js production toolchains with it?

Re: Bun 0.6

#56
post #39

Earlier quoted context omitted.

Because there were browsers and no standards. How can you expect someone that starts coding on the web to know what pains kernel went through decades prior?

But surely the people writing the browser code thought about the ecosystem they were creating / trying to create?

nope

well.... not for a surprisingly long time

Re: Bun 0.6

#58
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

First, thank you for all of your hard efforts.

I have seen some desire and works expressed towards using Bun with Electron or Electron alternatives; this interests me greatly. Do you have any plans or aspirations to make any strong push in this direction?

Re: Bun 0.6

#59

Earlier quoted context omitted.

Experimental, so probably at least 5 years before it's considered "stable"

As if bun isn't experimental

Node moves pretty slow these days, I wouldn't be surprised if Bun's version gets stabilized before Node's

Re: Bun 0.6

#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?

Post reply on HN