Go.sum is not a lockfile
In Go, go.mod acts as both manifest and lockfile. There is never a reason to look at go.sum.
In Go, go.mod acts as both manifest and lockfile. There is never a reason to look at go.sum.
dystroy - blog
I had seen many talks about coroutines but it never really clicked where I could use them outisde of async IO. Until I looked at how Unity uses them in C#.
First foray into the Zig programming language
Modern programming languages are full of violence, vulgar abbreviations, and naked imperatives. Bespoke is a statically typed alternative in which exceptions are regrettable circumstances, mutexes ...
From my experience, people like functions like "map" and "filter", but not "reduce".
Anyone who's written C knows that full ISO C standard-adhering code is an impractical rarity. Most real world C code out there relies on non-standard behaviors and language extensions to varying extents, and a lot of this isn't for extra features, but just to work around bugs and gaps in different compilers and…
Interesting and unexpected details for Rust programmers learning the C programming language.
Let’s start with a question! Is this program well-defined? 1 2 3 4 int main() { while (true) ; } If you said yes, you’d be wrong — at least before C++26. A while (true); loop with no side effects used to be undefined behaviour. Compilers were free to assume it terminates, and some — Clang in particular — would…
In the previous post , we watched the compiler transform optimized SSA into machine code bytes and package them into object files. Each .o file contains the compiled code for one package—complete with machine instructions, symbol definitions, and relocations marking addresses that need fixing. But your program isn’t…
A programming language should not be your identity.
You already know that a + b * c + d is calculated as a + (b * c) + d. But how do you encode that knowledge precisely enough for a machine to act on it?
Erlang's mailbox design is more disciplined than Go's channels: only the owning process can read from a mailbox, and sends are asynchronous. Yet the four failure modes of shared mutable state still show up, just in different shapes.
Lately I've been spending time learning Scheme and using it to implement the concepts I'm learning in my physics classes as time permits. One of the most exciting things I've been doing with this is getting my Scheme to compile to the Web thanks to Hoot. One of the biggest challenges has been the fact that Hoot is…
Ok, the title is a tongue-in-cheek, but there's very little thought put into files in most languages. It always feels a bit out of place... except in C. In fact, what you get is usually a worse version of C.
I don't remember where the idea came from, but I decided that it would be cool if I could write websites using a stack-based language. Something like this: : h1 ( s -- ) "<h1>" emit . "</h1>" em…
Paul Khuong's personal blog. Some Lisp, some optimisation, mathematical or computer.
japanese verbs are awesome. you can take the dictionary form of a verb (for example, "taberu", to eat) and turn it into many forms: taberu ("eat"): tabemasu…
TL;DR: I believe Odin's inline assembly is currently the best out of any language.The most important aspects are of this article listed below. I am not aware of any other assembly (GCC/Clang/Rust/Go...) that would combine all of these aspects:Inline assembly is organized into "templates", similar to and callable as…
In the previous article we explored how Go’s memory allocator manages heap memory — grabbing large arenas from the OS, dividing them into spans and size classes, and using a three-level hierarchy (mcache, mcentral, mheap) to make most allocations lock-free. A key detail was that each P (processor) gets its own memory…
The four-pane System Browser has shaped Smalltalk development for forty years. It’s still brilliant at providing context. But the real problem may not be the browser itself—it may be the lack of composition between the tools that surround it.
I have a huge appreciation for the Scheme programming language. I just seem to be unable to get it to stick in my head. This seems like a huge revelation for someone who named their blog after the Scheme textbook, but there it is. This post is the public admission I need to make, to...
A blog about computers, functional languages, Lisp, and Scheme.
It's not my favorite language
A false dichotomy that hides the real request
In the article about Standard Library hardening, we looked at checks for invalid Standard Library container access and other broken preconditions. I mentioned that those requirements are expressed in terms of “contracts”. But what about our code? In this post, we’ll explore contracts from C++26. We’ll start with a…
A deep dive into converting a simple arithmetic expression into a binary tree, leading to a custom language in C.
A draft design document describing lightweight userland cooperative threads for SBCL.
In my previous post I talk about how I got rid of hundreds of thousands of lines of Objective-C code while at Audible and I explain why keeping Objective-C code around is a terrible idea. And I explain that…