alt.hn

4/3/2026 at 11:09:58 AM

Bun: cgroup-aware AvailableParallelism / HardwareConcurrency on Linux

https://github.com/oven-sh/bun/pull/28801

by tosh

4/3/2026 at 2:21:26 PM

Something from the PR description that I had to look up to understand: "WTF" is "WebKit Template Framework".

by elffjs

4/3/2026 at 3:46:49 PM

I had to take a moment to find out why all primitives in chrome were in the WTF namespace.

WTF is just kinda funny. Seen it used in loggers too log.wtf("this should never happen")

by himata4113

4/3/2026 at 3:24:11 PM

That comment put my brain into an infinite loop for a while...

by dboreham

4/5/2026 at 7:51:52 AM

Anyone have ideas about what to do when using cgroup weights rather than max?

I'm currently in the process of removing cpu.max from our clusters, to allow applications to better utilize the available cpu time which currently is just being wasted. We will use cpu weights to make sure that cpu time is fairly allocated during contention, and to not oversubscribe the hosts, but I'm sure that among the thousands of applications that are running on those clusters today, many will be relying on cpu.max to size threadpools etc.

On the one hand, we do want applications to use the available cpu time, but at the same time they need to not kill themselves by running out of memory.

by nevon

4/3/2026 at 3:09:29 PM

I had high hopes for Bun, but looks like it has gone down the shitter after they went all in on vibecoding.

by phplovesong

4/3/2026 at 6:18:23 PM

This was pre-Anthropic but the fact that Bun automatically loads .env files if they're present almost disqualifies it from most tasks https://github.com/oven-sh/bun/issues/23967

It makes it hard to take them too seriously with such a design choice - a footgun really. It's so easy to accidentally load secrets via environment variables, with no way to disable this anti-feature.

by loevborg

4/3/2026 at 10:07:45 PM

Damn. That one is absolutely horrific.

What a find.

by rvz

4/3/2026 at 4:25:30 PM

Any specific links to problems? I was planning to start a new project on it :(

by gear54rus

4/4/2026 at 8:16:15 AM

Deno is solid. Or just use nodejs, it got many of the features deno/bun originally shipped with. No matter how you slice it, node is still the defacto server side JS runtime.

by phplovesong

4/3/2026 at 4:42:38 PM

Anthropic acquisition, what do you expect as outcome?

by pjmlp

4/3/2026 at 6:24:47 PM

Best case is they throw their endless amount of paper at it without touching it. At least something useful comes out of this AI crap then. One can dream.

by gear54rus

4/3/2026 at 7:06:35 PM

I still have high praises since one of my clients use it in production.

I personally use it's tooling part which is screamingly fast.

by hu3

4/3/2026 at 4:56:07 PM

it's been flawless for me

by pier25

4/3/2026 at 9:04:16 PM

That's maybe more worrisome, everything has tradeoffs, if you don't know them yet, search for them :)

by embedding-shape

4/3/2026 at 11:04:54 PM

It's worse to assume something is completely broken and anyone who has had a good experience with it to be an ignorant.

I know the tradeoffs. For me it's way better than Node. Especially given the campaign targeting Node devs.

https://socket.dev/blog/attackers-hunting-high-impact-nodejs...

by pier25

4/3/2026 at 11:10:40 PM

> It's worse to assume something is completely broken and anyone who has had a good experience with it to be an ignorant.

About the same, regardless, truth usually sits somewhere in the middle :)

> I know the tradeoffs

No harm no foul then, "it's been flawless for me" certainly gave me a different impression, but I guess as long as we all find the tools that work for us.

by embedding-shape

4/4/2026 at 1:27:41 PM

Well I certainly didn't say "it's flawless" :)

by pier25

4/3/2026 at 1:10:31 PM

I feel like https://github.com/oven-sh/WebKit/commit/35315978baee84ed1bd... is the more interesting commit tbh

by saagarjha

4/3/2026 at 2:02:23 PM

> p = (char*)"";

yikes

by jasdfwasd

4/3/2026 at 2:22:07 PM

I thought that was a typo or the forum software removed something, but no - it's a pointer to an empty string literal. If I understand how that works, this creates a null byte (in the read-only memory section of the compiled output?) and points to it. Before this line it checks if p is NULL.

I wonder what is the advantage of doing this? Maybe to make sure that p is an actual pointer, so later code can just make that assumption.

by lioeters

4/3/2026 at 2:58:22 PM

Yeah, it simplifies later code, and is safer in the face of future changes.

Or put another way, it tightens the API/contract of that chunk of code to always return a valid string.

by lokar

4/3/2026 at 3:34:05 PM

That makes sense, with that "guard" at the top, the rest of the function can return the pointer anywhere. And I imagine the compiler will ensure the empty string literal is created only once. Good to know!

by lioeters

4/4/2026 at 1:37:13 PM

it would be better to make p a const char* though, so that the code is not casting away the constness of the string literal (which can invoke undefined behaviour, though in practice string literals are going to be in a read-only area of memory anyway).

by rcxdude

4/3/2026 at 9:31:31 PM

Haha, did I just hear someone whisper GOMAXPROCS?

by boomskats