Live data from Hacker News

Bun 0.3

bun.sh

51–60 of 64 posts

Re: Bun 0.3

#51
post #4

I like this tech "fights" (evolutions). Even if bun will not overtake node, it will make node better. We see this many times with other projects (js/coffeescript/typescript/..., php/HHVM/HPHPc, webpack/vite/...)

> Even if bun will not overtake node... Why wouldn't bun , if it keeps its performance promises on its way to 100% node compatibility? I am intently keeping tabs on bun 's progress because a better-engineered, faster, and leaner node-compatible runtime means $$ saved in server costs. Besides, from the effort going into bun , it looks like the node community has its work cut out.

Also, a big reduction in dependencies could make hardening a Bun application something that’s realistic. It’s unimaginable with the typical node stack that I’ve seen.

Re: Bun 0.3

#52
post #8

Looks awesome. Gotta say, the built in testing, websockets, and file system router are exciting to see. Is anyone using bun in production? Would love to hear your experience.

I’m using it for some internal business apps. I quite like it.

It’s early days, so I definitely miss some things— like a REPL.

I gotta say, though, it’s a good feeling when you deploy a zero-dependency TypeScript application complete with tests.

Re: Bun 0.3

#53
post #12

I work on Bun happy to answer any questions or feedback

I have been unable to locate examples using remote import/export. I would like to able to do a

  import { inflate } from "https://www.example.org/libs/zlib.ts"
with bun downloading all dependencies in the background. Like Deno does.[1]

[1] https://deno.land/manual@v1.28.3/basics/modules#remote-impor...

Re: Bun 0.3

#54
post #12

I work on Bun happy to answer any questions or feedback

I’m starting a project that requires a lower level language. Ideally I have tighter control of memory and no GC. I want to move fast and be safe. Go gives me the speed of development I desire, but is a little higher level than this project calls for. Rust is in theory the right choice, but my development speed is like molasses. Given I hope for this project to turn into a company I seek VC backing for, I’m uncomfortable investing in a tool that slows me down so early on.

How has Zig been for you in this regard? Do you have any regrets building your company’s flagship software around it at this stage?

Re: Bun 0.3

#55

Does anyone know if there's a TypeScript runtime that compiles/runs TypeScript directly instead of going through the JS/ECMAScript intermediary?

There's AssemblyScript, which is designed to be Typescript-esque, and compiles to webassembly, but apart from that, there's not much. The thing is that there's not much value in a Typescript runtime. The semantics of Typescript are fundamentally the semantics of Javascript, but with labels attached to each variable giving a rough hint as to what the type might be. For static analysis, that's really useful - rough hints are mostly good enough for human things like editor hints and typechecking that are allowed to be incorrect - but when it comes to executing the code, the type hints don't actually have that much value. It's very easy for them to be incorrect ("A as B" is a valid Typescript construct that just asserts that a variable is a type without needing to check that it's actually the case), and so the runtime engine can only ever use them as a hint. But with the JIT engines that must runtimes use, the interpreter already has a pretty good idea what the type is going to be, because it's already executed the code and inspected the runtime variable. So you don't get a huge amount of practical value by using the type hints.

And if the type hints aren't useful for the runtime, then there's no real reason to enforce that they be present. A Typescript runtime that ignores types is just a Javascript runtime with a more pedantic syntax, and if you're going to that effort, you may as well support both.

Re: Bun 0.3

#56
post #42

Earlier quoted context omitted.

Happened with node via io.js back in the day too

Hadn't heard of io.js before but from reading up on it it seems to be a unique case since they had the explicit goal of merging back into node eventually. Can't really find what the main benefits of io.js are though...

It actually had developers. It was a political move by the devs against joynet who were refusing to give up full control of nodejs.

Re: Bun 0.3

#58
post #54
post #12

I work on Bun happy to answer any questions or feedback

I’m starting a project that requires a lower level language. Ideally I have tighter control of memory and no GC. I want to move fast and be safe. Go gives me the speed of development I desire, but is a little higher level than this project calls for. Rust is in theory the right choice, but my development speed is like molasses. Given I hope for this project to turn into a company I seek VC backing for, I’m uncomforta…

I'm also interested in this, the segmentation faults Primeagen found in Bun were concerning: https://youtu.be/qAYFepR4GcE?t=370 might have been fixed by now though.

I was seriously looking at Zig, but I'm always getting faster in Rust and it feels like the downsides of extra complexity is well worth the upsides for larger projects.

Re: Bun 0.3

#60
post #12

I work on Bun happy to answer any questions or feedback

Who do you see as biggest competition (Eg Just-JS, Deno, etc)

Thanks for all you do to make the ecosystem better, btw.

Post reply on HN