| ▲ | Bun: cgroup-aware AvailableParallelism / HardwareConcurrency on Linux(github.com) |
| 35 points by tosh 7 hours ago | 12 comments |
| |
|
| ▲ | elffjs 4 hours ago | parent | next [-] |
| Something from the PR description that I had to look up to understand: "WTF" is "WebKit Template Framework". |
| |
| ▲ | himata4113 2 hours ago | parent | next [-] | | 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") | |
| ▲ | dboreham 3 hours ago | parent | prev [-] | | That comment put my brain into an infinite loop for a while... |
|
|
| ▲ | saagarjha 5 hours ago | parent | prev | next [-] |
| I feel like https://github.com/oven-sh/WebKit/commit/35315978baee84ed1bd... is the more interesting commit tbh |
| |
| ▲ | jasdfwasd 4 hours ago | parent [-] | | > p = (char*)""; yikes | | |
| ▲ | lioeters 4 hours ago | parent [-] | | 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. | | |
| ▲ | lokar 3 hours ago | parent [-] | | 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. | | |
| ▲ | lioeters 2 hours ago | parent [-] | | 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! |
|
|
|
|
|
| ▲ | phplovesong 3 hours ago | parent | prev [-] |
| I had high hopes for Bun, but looks like it has gone down the shitter after they went all in on vibecoding. |
| |