Best of 2024

The blog posts Hacker News loved most in 2024. 327 posts.

Programming Languages
152

Own Constant Folder in C/C++

I was talking with someone today that really really wanted the sqrtps to be used in some code they were writing. And because of a quirk with clang (still there as of clang 18.1.0), if you happened to use -ffast-math clang would butcher the use of the intrinsic. So for the code: __m128 test(const __m128 vec) { return…

159

Async Rust in Three Parts

Async/await, or "async IO", is a new-ish ​ Rust added async/await in 2019. For comparison, C# added it in 2012, Python in 2015, JS in 2017, and C++ in 2020. language feature that lets our programs do more than one thing at a time. It's sort of an alternative to multithreading, though Rust programs often use both…

160

The Next Big Step in Mojo Open Source

At Modular, open source is ingrained in our DNA. We firmly believe for Mojo to reach its full potential, it must be open source. We have been progressively open-sourcing more of Mojo and parts of the MAX platform, and today we’re thrilled to announce the release of the core modules from the Mojo standard library under…

172

Porting to GCC 14: C language issues

The GCC 14 release series differs from previous GCC releases in a number of ways . Some of these are a result of bug fixing, and some old behaviors have been intentionally changed to support new standards, or relaxed in standards-conforming ways to facilitate compilation or run-time performance.

174

Zngur: A C++/Rust interop tool

Zngur (/zængɑr/) is a C++/Rust interop tool. It tries to expose arbitrary Rust types, methods, and functions while preserving their semantics and ergonomics as much as possible. Using Zngur, you can use arbitrary Rust crates in your C++ code as easily as using them in normal Rust code, and you can write idiomatic…

175

Half My Life with Perl

I had never met Randal Schwartz before, but when I reached out to him about contributing to year 25 of the Perl Advent Calendar, he immediately agreed. This year I wanted to try some new things and Randal suggested giving a Perl-specific talk which he had given once before, but which was lacking in recording quality…

178

APL at Volvo

Hercules is a system used by the Volvo Car Corporation (Volvo) for planning car production. Its main output is the monthly Master Production Schedule (MPS) – a detailed plan on how many cars are to be produced per market, factory and week during the following 13-15 months. Migrating such a comprehensive and vital…