HNHacker News
TopNewBestAskShowJobs

ben-schaaf

4,396 karma · joined November 11, 2015

submissionscomments
ben-schaaf··on C++ std::move doesn't move anything: A deep dive into Value Categories
No, it is not statically knowable if it is actually moved.

    void foo(Obj && arg) {}
Does not move `arg`. It's fairly easy to write code that assumes `std::move` moves the value, but that can lead to bugs. For example:

    void some_function(std::vector<int> &&);
    void some_function2(std::vector<int> &&);

    void main() {
        std::vector<int> a = { 1 };
        some_function(std::move(a));

        a.push_back(2);
        some_other_function(std::move(a));
    }
The expectation is that `some_other_function` is always called with `{ 2 }`, but this will only happen if `some_function` actually moves `a`.
ben-schaaf··on I switched from VSCode to Zed
> or maybe it's solo dev pretending to be small business, I can't really tell.

Certainly small business :)

ben-schaaf··on France targets Australia-style social media ban for children next year
Other than the criminalization, I like the idea. I'm purely criticizing the privatization.
ben-schaaf··on France targets Australia-style social media ban for children next year
A private monopoly sounds like a great idea. A profit incentive for access to social media definitely won't result in the price of these tokens skyrocketing to extract as much money as possible.
ben-schaaf··on Loss32: Let's Build a Win32/Linux
Only because people aren't putting in the effort to build their binaries properly. You need to link against the oldest glibc version that has all the symbols you need, and then your binary will actually work everywhere(*).

* Except for non-glibc distributions of course.

ben-schaaf··on Valve reveals it’s the architect behind a push to bring Windows games to Arm
> x86-64 is typically limited to about 5 instructions

Intel Lion-cove decodes 8 instructions per cycle and can retire 12. Intel Skymont's triple decoder can even do 9 instructions per cycle and that's without a cache.

AMD's Zen 5 on the other hand has a 6K cache for instruction decoding allowing for 8 instructions per cycle, but still only a 4-wide decoder for each hyper-thread.

And yet AMD is still ahead of intel in both performance and performance-per-watt. So maybe this whole instruction decode thing is not as important as people are saying.

ben-schaaf··on Advent of Code 2025
You definitely could do it all in shaders. People have done crazier things.
ben-schaaf··on APT Rust requirement raises questions
> littered with too many special symbols and very verbose

This seems kinda self-contracticting. Special symbols are there to make the syntax terse, not verbose. Perhaps your issue is not with how things are written, but that there's a lot of information for something that seems simpler. In other words a lot of semantic complexity, rather than an issue with syntax.

ben-schaaf··on Helping Valve to power up Steam devices
> Apple demonstrated to the world that it can be extremely fast and sip power.

Kinda. Apple silicon sips power when it isn't being used, but under a heavy gaming load it's pretty comparable to AMD. People report 2 hours of battery life playing cyberpunk on Macs, which matches the steam deck. It's only in lighter games where Apple pulls ahead significantly, and that really has nothing to do with it being ARM.

ben-schaaf··on FEX-emu – Run x86 applications on ARM64 Linux devices
Not for Linux they're not. IIRC Audio and camera don't work, and firmware is non-redistributable and so you need to mooch it off a Windows partition. On top of that the performance on Linux hasn't been great either.
ben-schaaf··on Checkout.com hacked, refuses ransom payment, donates to security labs
It changes nothing. If you get taxes 20% til 90k and 30% above that, then donating 10k still saves you 3k in taxes, you're still out 7k and you're still paying 18k in taxes on the 90k.
ben-schaaf··on Ruby already solved my problem
That's a rule that might hold for applications and services. It does not hold for languages and libraries, where any and every aspect is going to be the bottleneck in someone else's code. It's a different 10% for each user.
ben-schaaf··on Analyzing the Performance of WebAssembly vs. Native Code
Native code generally doesn't have undefined behaviour. C has undefined behaviour and that's a problem regardless of whether you're compiling to native or wasm.
ben-schaaf··on When O3 is 2x slower than O2
I have the opposite experience: C++ is what I have the most experience with by a very wide margin, but I find reading other people's rust code way easier than other people's C++ code. There's way more weird features, language extensions and other crazy stuff in C++ land.
ben-schaaf··on Asahi Linux Still Working on Apple M3 Support, M1n1 Bootloader Going Rust
A M1 Max has 400GB/s of memory bandwidth but the CPU is only capable of using half of that (see https://tlkh.hashnode.dev/benchmarking-the-apple-m1-max#memo...). So a framework 13 with ddr 5 5600 with 86GB/s of memory bandwidth has a bit less than half, nowhere near ⅕th.

If we compare like-to-like the rtx 5070 in a framework 16 has 384GB/s on its own, add the 86 and the combined memory bandwidth is higher than a M1 Max.

ben-schaaf··on The scariest "user support" email I've received
Out of curiosity I asked chatgpt what the malware does, but erased some parts of the base64 encoded string. It still gave the same answer as the blog. I take that as a strong indication that this script is in its training set.
ben-schaaf··on The scariest "user support" email I've received
It didn't get it right though: The temp file name is not the one that was encoded.
ben-schaaf··on DoorDash and Waymo launch autonomous delivery service in Phoenix
Yes it does, and at least for me locally it's all done by motorcycle or E-Bike.
ben-schaaf··on Garbage collection for Rust: The finalizer frontier
The popular Bumpalo only returns references with the lifetime of the allocator. Not sure what you mean by manage your own garbage, an arena allocator deallocates everything when it goes out of scope. You definitely can't reference uninitialized parts of an arena.
ben-schaaf··on Zed is now available on Windows
Entirely untrue. Download git, run make and you'll get a 19MB `git` binary along with a whole lot of other 19MB binaries. Running `cargo build` produces a 3.8MB binary.

And that's still comparing apples to oranges, because git is compiled with full optimizations. Running `cargo build --release` produces a 462KB binary.

Even if I'm comparing to my system's git installation, that's still 3.9MB, and that's with all the debug info stripped.

Yes rust (like C++) tends to produce larger binaries than C, but lets be real here: The reason Zed has a bloated binary is the ~2000 rust packages that comprise it.

ben-schaaf··on Fastmail desktop app
> That’s a drawback, not a plus. You can’t easily style the app with CSS the way you want it (VSCode, Obsidian).

VSCode isn't really styled with CSS if you're a user. It's done by some json or yaml. This kind of hack is required: https://marketplace.visualstudio.com/items?itemName=be5invis..., and it's clearly not supported.

You know what does have theming? Win32, GTK and QT. GTK even uses CSS for it.

And unlike electron apps, when you change how a button looks in your GTK theme it affects all GTK apps rather than just the single electron app.

> Nonsense. Obsidian is sitting at 115 MB right now, zero CPU.

I just downloaded obsidian for the first time and launching it spawns 8(!) processes using a total of 827.3 MB of RAM. That's at the launch screen, before it's doing anything.

Of course it's using no CPU when idle. That's basically the bare minimum bar for any application. It's well known that javascript is at least an order of magnitude slower than C. That's where it's wasting CPU, not when it's idle.

> Define slow.

Well to start off with, I can count the seconds obsidian takes to start up. Most native apps I have installed (other than browsers) start faster than I can reasonably react.

Typing has noticeable lag, see: https://github.com/microsoft/vscode/issues/27378

And this is on a workstation computer, I don't want to imagine how terrible the experience is on low-end hardware.

> P.S. Thunderbird performs worse than ANY Electron app I’ve ever used, and I’ve been using Electron since its inception.

Thunderbird isn't a native app either. Just like electron it's using a browser engine to show the UI.

ben-schaaf··on Zig builds are getting faster
clang -O0 is significantly slower than tcc. So the problem is clearly not (just) the optimisation passes.
ben-schaaf··on Baldur's Gate 3 Steam Deck – Native Version
I get where you're coming from, and I do think game devs should put more effort into supporting lower-end hardware.

That said, bg3 does run on 10-year old hardware. The minimum requirements lists a gtx 970, released 2014. Which, despite its age, is still 6x faster than your integrated graphics.

ben-schaaf··on Baldur's Gate 3 Steam Deck – Native Version
When was the last time you played? They've been making continuous performance improvements and act 3 hasn't chugged on my PC for a long time. Even steam deck seems to get a steady 30fps.
ben-schaaf··on I'm spoiled by Apple Silicon but still love Framework
That's cool, but the 5850u is from 2021, around the time Microsoft started pushing hard for modern standby. Other laptops of that generation also have a S3 bios setting: https://www.reddit.com/r/GamingLaptops/comments/yvpae5/to_al...

The oldest AMD chip framework sells is two generations, and to me knowledge don't have S3 support.

ben-schaaf··on Go has added Valgrind support
IME Helgrind does an great job finding concurrency issues.
ben-schaaf··on I'm spoiled by Apple Silicon but still love Framework
Do you have a source for that? The only thing I've found is S3 sleep under coreboot, which only applies to intel.
ben-schaaf··on I'm spoiled by Apple Silicon but still love Framework
That ThinkPad has S3 sleep support, unlike modern laptops.
ben-schaaf··on I'm spoiled by Apple Silicon but still love Framework
I've heard this isn't possible on AMD unfortunately.
ben-schaaf··on Waymo has received our pilot permit allowing for commercial operations at SFO
Is it just me or don't people go on walks with their babies/children all the time? Also riding a mile with groceries & babies is trivial.

Cars are a piece of the transportation puzzle, but groceries and babies aren't why they're needed.

← PreviousPage 5 of 34Next →