News for hackers. Stuff that matters.
Re:Bun v0.5.7 by Jarred on Friday February 24, 2023 @06:12PM (#34931553)
I work on Bun. Happy to answer questions
Re:Bun v0.5.7 by traviswt on Friday February 24, 2023 @07:16PM (#34932181)
Do you have a guess when you’ll be stabilizing around 1.0, perhaps a roadmap?
Re:Bun v0.5.7 by raydiatian on Friday February 24, 2023 @07:29PM (#34932297)
+1
Re:Bun v0.5.7 by Jarred on Friday February 24, 2023 @07:59PM (#34932540)
I think we are 2 months out from a 1.0 release
Re:Bun v0.5.7 by traviswt on Saturday February 25, 2023 @12:15AM (#34934122)
Exciting! Thanks for all your hard work!
Re:Bun v0.5.7 by codethief on Friday February 24, 2023 @07:18PM (#34932218)
Congrats on the release!

Having recently started coding in Zig, in no small part because of Bun, I would like to know: How do you deal with the fact that Zig is not a very stable language yet? I was surprised to find out that Andrew Kelley and his collaborators still consider breaking changes on a regular basis, that there quite a few bugs and, let's call them, unintentional inconveniences that will require further breaking changes to fix.

Re:Bun v0.5.7 by hryx on Saturday February 25, 2023 @01:09AM (#34934320)
I don't speak for Jarred or Andrew, but here is a recent exchange between them about this matter: https://github.com/ziglang/zig/issues/14542#issuecomment-141...

The tension is understandable: Zig is explicitly not production-ready, yet it has such attractive performance and productivity properties, and has even proven useful in production scenarios (Bun, Uber, Tigerbeetle). But Andrew's suggestion is correctly aligned with Zig's mission and current level of maturity. If you have a complex project with lots of users like Jarred does, stick with a tagged release for now.

The highest priority of Zig pre-1.0 is to make the language the best it can be — which it will be in due time. The target audience of the master branch is those who can withstand churn and are focused on getting it there.

Re:Bun v0.5.7 by dottedmag on Saturday February 25, 2023 @02:11AM (#34934601)
I'm not affiliated with Bun either, however the my advice would be to freeze the Zig dependency, and treat Zig upgrade like you would treat any library update: do it explicitly.
Re:Bun v0.5.7 by rmorey on Friday February 24, 2023 @07:21PM (#34932233)
do you foresee having to make more decisions that come down against web standards for the sake of node compatibility? any tough decisions on the roadmap? to be clear i think you made the right call, but i’m curious if you think this is going to be a recurring issue
Re:Bun v0.5.7 by eyelidlessness on Friday February 24, 2023 @07:56PM (#34932506)
I can’t speak for Jarred or other Bun devs, but I think this has a pretty straightforward answer: if the goal is transparent support for packages written for Node (or some defined subset thereof), that inherently means bug/quirk/extension compatibility too (for whatever subset is being targeted).

IMO (not strongly held, largely as a spectator so far), it’s probably a bad thing in the long run for Bun (and Deno, and other JS server/CLI runtimes) to be so beholden to Node compatibility. I’d much rather see these compatibility efforts devoted to isolating Node-specific considerations, with clear guidance on how to migrate existing projects to more portable APIs. Node has already shown positive signs of embracing portability as contenders have also done. In the short term “works with stuff written for Node” is very appealing, but in the long term “Node works for stuff written for standards” is much more appealing than that. The more each of these runtimes courts the former, the more the latter is protracted.

Re:Bun v0.5.7 by brundolf on Friday February 24, 2023 @11:36PM (#34933945)
This was the battle I was looking forward to Deno taking a hard stance on, but it seems like even they have been forced to make some compromises now. It still seems like they envision people moving (gradually instead of all at once) to more consistent and standardized practices, but it doesn't look like we get to cut off the long tail of compatibility after all
Re:Bun v0.5.7 by Jarred on Friday February 24, 2023 @08:25PM (#34932766)
Recent versions of Node.js implement many web APIs. The ecosystem is converging on a mix of web APIs and Node.js APIs. Excluding a few cases (like setTimeout), this won’t be a recurring tradeoff for Bun's runtime APIs (module resolution, however, is complicated).
Re:Bun v0.5.7 by DanielHB on Monday February 27, 2023 @04:48AM (#34954647)
A problem I had in NodeJS the other day, NodeJS has 3 stream classes: require("stream").ReadableStream

require("stream").Readable require("stream/web").ReadableStream

I was using node-fetch and fastify but I decided to remove node-fetch to just use global.fetch and everything broke.

Turns out node-fetch and fastify uses require("stream").ReadableStream, but global.fetch() uses require("stream/web").ReadableStream (because it is a web standard). Took me a few hours to figure out why it wasn't working, getting some "ReadableStream is not a ReadableStream" error is very fun to troubleshoot

I don't know what approach Bun should take in this regard, but I would like to see NodeJS deprecating non-standards as much as possible so eventually this problem can go away. ECMA should also standardise things required for server-side code more

Re:Bun v0.5.7 by serverholic on Friday February 24, 2023 @07:31PM (#34932325)
Are you willing to hire people who don't want to work 80 hour weeks yet?
Re:Bun v0.5.7 by MuffinFlavored on Friday February 24, 2023 @07:34PM (#34932347)
hire? it's open source software for free, no?
Re:Bun v0.5.7 by pancrufty on Friday February 24, 2023 @07:37PM (#34932369)
No, there’s intention to monetize.
Re:Bun v0.5.7 by wpietri on Friday February 24, 2023 @07:48PM (#34932455)
Yeah, if you take $7m from YC and Kleiner Perkins, it is definitely not a charity operation: https://www.crunchbase.com/organization/oven/company_financi...

It's a little concerning to me when something's commercial nature is so far in the background like this. I guess I've had too many years of, "Surprise, our business model is you!"

Re:Bun v0.5.7 by ilrwbwrkhv on Friday February 24, 2023 @08:21PM (#34932739)
Wow didn't know they took a loan of $7 million dollars. That is an insane amount for a runtime without market adoption. Another one of those 2021 VC play I guess.
Re:Bun v0.5.7 by paxys on Friday February 24, 2023 @07:51PM (#34932477)
What's the surprise exactly? Deno works the same way, as do hundreds of other companies that give out an open source version of their software for free and provide hosting and support as paid services.
Re:Bun v0.5.7 by wpietri on Friday February 24, 2023 @07:55PM (#34932499)
One difference is that Deno, and presumably those hundreds of other companies, have a pricing page. Whereas bun could easily be mistaken for just another open-source project.
Re:Bun v0.5.7 by paxys on Friday February 24, 2023 @07:59PM (#34932537)
They don't have a pricing page because there is nothing to price yet.
Re:Bun v0.5.7 by doodlesdev on Friday February 24, 2023 @08:32PM (#34932820)
That's exactly their point.
Re:Bun v0.5.7 by paxys on Friday February 24, 2023 @09:04PM (#34933028)
What's their point? That they should not be open source? Or should not be allowed to ever launch a paid product? Or be forced to add a pricing page that...goes nowhere?
Re:Bun v0.5.7 by doodlesdev on Friday February 24, 2023 @09:27PM (#34933186)
The point is that Deno has already a plan to monetize and they haven't, which puts a lot of doubt into if they will ever manage to and whether that will affect existing projects which rely on the runtime.
Re:Bun v0.5.7 by re-thc on Saturday February 25, 2023 @03:39AM (#34935004)
The plan just hasn't been made official yet. I'm sure there was some plan that resulted in the raise.
Re:Bun v0.5.7 by yurishimo on Saturday February 25, 2023 @11:24AM (#34937816)
Deno has already monetized. Their tech powers many of the "serverless" platforms offered by other hosts. Just because they don't have a public pricing page for B2C doesn't mean they don't make money.
Re:Bun v0.5.7 by wpietri on Saturday February 25, 2023 @05:50PM (#34941271)
My point is that they could be transparent about the fact that they're collecting users along the way to extracting money from them. They chose not to. That's concerning to me. Possible explanations include "they have no idea what they're doing" and "they know exactly what they're doing but think people won't like it".

As the rest of your hyperventilation, no, none of those are my points, and I think you were smart enough to figure that out without me having to say so.

Re:Bun v0.5.7 by pancrufty on Sunday February 26, 2023 @09:25AM (#34945766)
> collecting users along the way to extracting money from them

Can you listen to yourself?

When was the last time you paid Node or npm inc? Projects have the absolute right to monetize without having to start that way. You can use bun without signing up, there’s no data, there’s no registration. There are only entitled users.

Re:Bun v0.5.7 by wpietri on Monday February 27, 2023 @04:25PM (#34962070)
I'm not a JS person, so never. But the first has a foundation, and the second has a transparent revenue model.

Bringing up rights is a straw man. They have a right to conceal their plans. I have a right to criticize them for it. You have the right to do defensive, awkward, unpaid PR for people who have millions of dollars. All rights are being honored here.

Re:Bun v0.5.7 by paxys on Friday February 24, 2023 @07:46PM (#34932441)
Possibly unpopular opinion – don't look to work at a <10 person startup if you don't want to put in those kind of hours. There are plenty of companies out there that will give you a great work life balance, fixed responsibilities, low pressure, big paychecks and more, and the trade off is that you won't get a chance at a 100x exit a few years down the line. You have to pick one of the two.
Re:Bun v0.5.7 by eyelidlessness on Friday February 24, 2023 @08:06PM (#34932606)
Your opinion is probably popular among its audience, but really that’s a shame. There’s a wealth of evidence that such an investment in hours is either counterproductive or short lived or both. The human impact can be devastating. The reward can be somewhere between fleeting and extremely deleterious.

I’m a former workaholic who put in countless 60-100 hour weeks, and mostly I made that choice on my own, but I sincerely wish I had heeded the warnings sooner. My 60-100 hour weeks weren’t 50-150% more productive, ever. They were just exhausting, maybe permanently.

Re:Bun v0.5.7 by benatkin on Friday February 24, 2023 @08:38PM (#34932855)
There are good reasons to avoid putting in 80 hour weeks but doing so because someone who put in 100 hour weeks had a bad experience isn't one of them. The level of stress isn't linear as the weekly number of hours increases.
Re:Bun v0.5.7 by eyelidlessness on Friday February 24, 2023 @09:17PM (#34933123)
> someone who put in 100 hour weeks had a bad experience isn't one of them

I wasn’t so much trying to make my example a reason, as to say that I relate my own experience to the wealth of evidence.

> The level of stress isn't linear as the weekly number of hours increases.

This is true, and I definitely can relate to that as well. And I’d still feel the same way, now, if I’d only ever worked 50 hours in a week.

I’ll also add that the level of stress isn’t even consistent over multiple sustained weeks of the same level of overwork. When I even could work a 60 hour week, the second one in a row was much harder. The next one drastically harder still, and so on. And my probably-permanent burnout wasn’t from one particularly long week, it was from sustaining 60-100 hour weeks for about six months straight, with a lot of prior stressors, while developing a very strong internal rejection of sustaining anything like it while it was happening. In the end it was an action motivated by a sense of duty to address problems that put me in this position as fully as I could, so I could move on and never overwork for anyone or anything ever again.

But I’m cautious even saying all of that now, because any way I frame it suggests there’s an overwork compromise that might make sense. There isn’t. In hindsight, the first week I put too much of myself into work was one too many.

Re:Bun v0.5.7 by benatkin on Friday February 24, 2023 @10:22PM (#34933508)
Ah, fair enough. Your opinion is still relevant. I would still like to hear from those that never exceeded 80 because there is a bit more of a chance they could have pulled it off.
Re:Bun v0.5.7 by wpietri on Friday February 24, 2023 @07:52PM (#34932486)
Eh. If you talk with second-time founders, a really common theme is how inefficient in retrospect the work-all-the-time phase was and how they want to do it differently.

I don't have a lot of data on current <10 person startups, so maybe it's all different now. But the times I was working 80-100 hour weeks were just not time well spent. It was not, "How can I deliver the most in the time I have?" It was "OMG pressure makes me so anxious I'm going to work all the time to avoid thinking about the stakes." It was more drama than effectiveness.

And people have been saying so for a long time. E.g.: https://lostgarden.home.blog/2008/09/28/rules-of-productivit...

Re:Bun v0.5.7 by agrippanux on Friday February 24, 2023 @08:10PM (#34932648)
Also frequently a good chunk of that 80-100 is watching YouTube or cruising Reddit and convincing yourself you were putting in real hours.
Re:Bun v0.5.7 by jamil7 on Saturday February 25, 2023 @04:42AM (#34935308)
That or the leadership is inexperienced and get the team locked in a build trap.
Re:Bun v0.5.7 by hinkley on Friday February 24, 2023 @11:33PM (#34933935)
Half of my best ideas happen outside of work. If I spend 70% of my waking hours at work we’re gonna have a bad time.
Re:Bun v0.5.7 by serverholic on Friday February 24, 2023 @08:23PM (#34932756)
Eh, if you follow this guy it's pretty clear he's a bit of a wannabe tyrant. I wouldn't be surprised if he owns a copy of Atlas Shrugged and shines Peter Thiel's boots every morning before he gets back to working on Bun and making sure his employees hit the 80 hour mark.

Overall, I think the tech industry needs to do a better job of calling out the self-centered, narcissistic, libertarian, objectivist, wannabe billionaire, hustle culture types. These are the types of people who won't think twice about working on Facebook's algorithms to improve user engagement at the detriment of society and our mental health.

Re:Bun v0.5.7 by alphanullmeric on Friday February 24, 2023 @08:36PM (#34932837)
There are no libertarian tyrants. Every dictator in history is known for wanting to control what other people do, similar to yourself.
Re:Bun v0.5.7 by paxys on Friday February 24, 2023 @08:52PM (#34932937)
Well sure, just like how there are technically no socialist tyrants and no communist tyrants and no capitalist tyrants. At the end of the day everyone can choose bits and pieces of what they want to believe in and ignore the rest.
Re:Bun v0.5.7 by jahewson on Friday February 24, 2023 @10:34PM (#34933590)
Now tell me, what’s the expected value of a 1% chance of a 100x return?
Re:Bun v0.5.7 by intelVISA on Friday February 24, 2023 @08:32PM (#34932821)
Based on the perf of Bun vs. the naive impl. of the same tech I'm doubtful of this 80hrs a week claim.
Re:Bun v0.5.7 by serverholic on Friday February 24, 2023 @08:35PM (#34932833)
He literally said that's what he's looking for when he announced his company. He also shows off his work stats on twitter.
Re:Bun v0.5.7 by dang on Sunday February 26, 2023 @03:38PM (#34949147)
Your posts in this thread crossed not only into personal attack but harassment. Not only that, but you've done it before. Not only that, but you've been breaking the site guidelines in all kinds of ways and ignoring our previous requests to stop. I've therefore banned the account.

If you don't want to be banned, you're welcome to email [email protected] and give us reason to believe that you'll follow the rules in the future. They're here: https://news.ycombinator.com/newsguidelines.html.

Re:Bun v0.5.7 by omani on Friday February 24, 2023 @07:32PM (#34932329)
do you plan to provide an alpine package for bun?
Re:Bun v0.5.7 by Jarred on Friday February 24, 2023 @08:44PM (#34932893)
We need to get a musl libc build of Bun to do it properly. The zig part of that is really easy, but we also need to build WebKit and all other dependencies with musl libc

If you use glibc-compat, you can download Bun from the github releases and that should just work. In a docker image it's about 200 MB (bun's binary is around 90 MB right now, which is way too big imo)

Re:Bun v0.5.7 by rom-antics on Friday February 24, 2023 @08:54PM (#34932961)
> bun's binary is around 90 MB right now

This made me curious, so I checked out bun's repo and it's 217k lines of Zig (ignoring the other languages). Can you share what Zig's build times are like for a project that size?

Re:Bun v0.5.7 by serverholic on Friday February 24, 2023 @07:33PM (#34932334)
What do you think about being a Thiel fellow? Do you think billionaire elites are good for humanity?
Re:Bun v0.5.7 by sroussey on Friday February 24, 2023 @08:37PM (#34932848)
Loving bun!

Best way to use typescript and have things “just work” as compared to node and node-ts and setting type:”module” in package.json and dealing with headaches.

Some things to add: - duckbd embedded like sqlite - fix the stdout/stdin terminal issues so it can be used for fast CLI stuff (basic things like columns/rows count, rawMode, mouse, et all) - sub project to port electron apis so we can have a new, mostly compatible version of electron that uses bun for the headless processing and uses system webviews for front lens (no node integration).

Re:Bun v0.5.7 by toastal on Saturday February 25, 2023 @02:31AM (#34934700)
When will communications be bridged to Matrix/IRC instead of Discord lock-in?
Re:Bun v0.5.7 by truth_seeker on Saturday February 25, 2023 @02:47AM (#34934771)
Please create a feature parity page on Github so that the end user knows how far the latest releases of Bun is compatible with latest version of NodeJS API.