Profile avatar
pcwalton.bsky.social
Programming languages and graphics person. Rust compiler developer, Firefox hacker, Bevy contributor.
89 posts 2,340 followers 30 following
Regular Contributor
Active Commenter

One thing I've always wondered is why GCC reports undeclared identifiers only once per function. It's done this for a very long time: I remember the "Each undeclared identifier is reported only once..." message on NeXT!

I’d love it if iSH had a built-in Wayland server that exposed Stage Manager multi-window support on the iPad. It’d probably solve a good 75% of my “why is it so hard to do X random thing on iOS” problems.

Idea I have no time to implement: A RISC-V emulator for iOS, using a single jump table for every 16-bit compressed instruction. Would probably be a lot faster than iSH. 16 bits is small enough that you could inline every single instruction. (I know not all insns are compressed, but most are.)

Looking through old photos and I found this one of a whiteboard in Mozilla offices from Nov 2011. IIRC I was explaining early borrow checker designs to @dherman.dev and @pcwalton.bsky.social.

The fundamental reason I'm bullish on Rust in game dev doesn't have anything to do with (lack of) GC, or memory safety -- it's the way aliasable-xor-mutable makes it easy to multithread your game logic. Updating game objects *should* be embarrassingly parallel... 1/2

The most disqualifying thing about Zig is the semantics around aggregate assignment. github.com/ziglang/zig/... For performance, sometimes Zig doesn't copy structs on the stack, so refactoring to introduce temporaries can cause Zig to just miscompile code. It happens a lot and still isn't fixed.

And they say that comptime is better than generics.

Sometimes I wonder whether people who say that Rust gamedev will never be able to compete with Unity because of slow compiles have ever used Unity. Domain reloads in Mono are agonizingly slow.

Today's fun bug: Diagnosing an error in a popular software package that will remain nameless and compiles to C++ that goes away if you use -fstrict-aliasing. Don't. Compile. To. C.

And now directional light support added. Hardest part was actually just figuring out units. Bevy uses illuminance (lux) for directional lights, but I need it in luminance (just convincing myself that this was true took a long while). The conversion process is a little tricky (thread below).

All this chatter about how Rust is supposedly bad for game development is the exact same chatter I used to read about how Rust is bad for server-side apps, or desktop apps, or OS kernels, or libraries to be called from C, etc. etc. 1/2

The only thing that GC buys you for scene graph objects is memory safety (which you can get in other ways, e.g. generational indices). It doesn't simplify the memory management. Holding on to the memory of an object in your scene that's been despawned is not what you want. 1/2