Gaussian retweeted
Today we're shining the indie Sega Dreamcast development spotlight on @8bitProdigy 's new raylib-backed, Faceball 2000-inspired engine, Face-Off! Here's a direct hardware capture of it running on my DC.
Not only is it quite impressive that a first-time DC homebrewer was able to get such an engine up and running so quickly at solid 60fps (it started out on Linux), but his codebase also serves as an extremely well-written, clean example of Dreamcast development with raylib and the C programming language.
Despite what it looks like, the engine is technically NOT a raycaster, as he's determining visibility through a recursive portal algorithm. He's also just finished implementing proper collision detection, and it also compiles natively for Linux, for easy testing/debugging.
In-game objects and their behaviors are written with clean, object-oriented C code (I know, SO controversial), demonstrating how to elegantly implement the 3 main-pillars of OO: encapsulation, inheritance, and polymorphism, without built-in language support for any of them.
He also does linked lists CORRECTLY (I know, even more controversy) by making them intrusive and circularly linked, as in the Linux kernel.
Source code can be found here:
github.com/8bitprodigy/Face-…
Gaussian retweeted
FFmpeg assembly lessons are now hosted on GitHub:
github.com/FFmpeg/asm-lesson…
Gaussian retweeted
If you want to really feel the future, take your iPhone out of its case and run a Deep Seek 7B reasoning model on it:
Gaussian retweeted
My digital book "Understanding the Odin Programming Language" is OUT NOW! ✨
If you want to learn Odin and demystify low-level programming, then this book is for you!
Read more or buy at: odinbook.com/
Gaussian retweeted
Compiler Optimization in a Language you Can Understand:
🔗sbaziotis.com/compilers/comp…
Gaussian retweeted
📢 It's here! The second edition of my book "Performance Analysis and Tuning on Modern CPUs" is out NOW!
Dive into low-level optimizations and learn to write fast code like a pro.
Grab your copy: amzn.to/4fsroBs
Please RT to spread the word!
#NewBook #BookRelease
🧵1/3
Gaussian retweeted
I wrote a new blog post about my work on mutexes, and it's a great conversation starter for any engineer. justine.lol/mutex/
Gaussian retweeted
If you don't know how to do a removal of a node from a singly linked list like this, you don't understand pointers well enough (with explicit derefs to be clearer)
p := &list
for p^ != node { p = &p^^.next }
p^ = node^.next
Gaussian retweeted
Mnist neural network visualization written from scratch in Odin and Raylib.
repo:
github.com/bones-ai/odin-mni…
I'm still new to Odin so if you see a way to imporve something, let me know :)
Gaussian retweeted
Exploiting the power of the multi-core and many-core processors requires writing parallel algorithms and data structures. Moreover, the implementation also needs to be cache friendly. But these aspects are typically not covered in the introductory courses.
I came across this book (freely available online) which covers sequential algorithms and data structures (which you learn in school), and then extends the discussion to talk about how cache friendly the implementation is, and then also covers the parallel implementations of those data structures.
Gaussian retweeted
Every year the Oregon Programming Language Summer School covers advanced topics in programming languages, such as type systems, formal verification, category theory, proof theory.
Most of the lectures are recorded and available online (link in the reply).
Gaussian retweeted
Scan HTML even faster with SIMD instructions (C++ and C#)
Earlier this year, both major Web engines (WebKit/Safari and Chromium/Chrome/Edge/Brave) accelerated HTML parsing using SIMD instructions. These ‘SIMD’ instructions are special instructions that are present in all our processors that can process multiple bytes at once (e.g., 16 bytes).
The problem that WebKit and Chromium solve is to jump to the next target character as fast as possible: one of <, &, \r and \0. In C++, you can use std::find_first_of for this problem whereas in C#, you might use the SearchValues class. But we can do better with a bit of extra work.
The WebKit and Chromium engineers use vectorized classification (Langdale and Lemire, 2019): we load blocks of bytes and identify the characters you seek using a few instructions. Then we identify the first such character loaded, if any. If no target character is found, we just move forward and load another block of characters. I reviewed the new methods from the Web engines in C++ and C# along with minor optimizations. The results are good, and it suggests that WebKit and Chromium engineers were right to adopt this optimization.
But can we do better?
Let us consider an example to see how the WebKit/Chromium approach works. Suppose that my HTML file is as follows:
Gaussian retweeted
CPython internals: A ten-hour codewalk through the Python interpreter source code.
This is some really nice C code.
youtube.com/playlist?list=PL…
Gaussian retweeted
*Alice goes to a differentiable wonderland!* 🔥
I published a short free book on the design of neural networks, from convolutions to transformers, SSMs, and a few other topics.
As a bonus, I tried to make it looking nice - any feedback is appreciated! sscardapane.it/alice-book
Gaussian retweeted
Last Saturday I talked at @h2hconference and shared the results of working with the Rust community to add LLVM CFI and cross-language LLVM CFI to the Rust compiler...
Gaussian retweeted
Wrote up a more detailed "6.10 io_uring" changes than what the pull requests generally contain, and more geared towards actual users. I'll make more of an effort at doing this for every new release. Find it here:
github.com/axboe/liburing/wi…
Feedback appreciated!
Gaussian retweeted
RELEASE DAY
After almost 10 years of hard work, tireless research, and a dive deep into the kernels of computer science, I finally realized a dream: running a high-level language on GPUs. And I'm giving it to the world!
Bend compiles modern programming features, including:
- Lambdas with full closure support
- Unrestricted recursion and loops
- Fast object allocations of all kinds
- Folds, ADTs, continuations and much more
To HVM2, a new runtime capable of spreading that workload across 1000's of cores, in a thread-safe, low-overhead fashion. As a result, we finally have a true high-level language that runs natively on GPUs!
Here's a quick demo:
Gaussian retweeted
More ALGOL68 fun. Here is an example from Wikipedia. Note how with a few different syntax changes, this could literally be any modern imperative language.
In fact, each line could become valid Odin code excluding the scope-capture nested procedure "no multiple".
Gaussian retweeted
In-process database like SQLite is the holy grail for low-latency database access on the edge. However, the synchronous I/O is holding it back, but how does in-process database look like with asynchronous I/O?
Paper: penberg.org/papers/penberg-e…
Source code: github.com/penberg/limbo






























