New
The latest blog posts to take off on Hacker News. 3,709 posts.
Friendship ended with the garbage collector
It's been a while since the last update about my work on the Inko programming language . Not because there hasn't been any progress, but because I've been busy making changes. A lot of changes.
I use Attrs instead of Pydantic
This post is an account of why I prefer using the attrs library over Pydantic. I'm writing it since I am often asked this question and I want to have something concrete to link to.
Error stack traces in Go with x/xerror
A workaround to get nice stack traces for errors in Go.
C++20 Concepts: The Definitive Guide
Start using this domain right away. Straightforward domain shopping experience. Quick access to your domain.
Parser generators vs. handwritten parsers: surveying major languages in 2021
Parser generators vs. handwritten parsers: surveying major language implementations in 2021
Let's write a compiler, part 3: A parser
Tokenizing the source code input is a great start for our compiler. Now let's turn our attention to parsing the PL/0 grammar. Once we have finished with the parser, the front end of our compiler will be finished and we will have a PL/0 validator. This is a program that can read in PL/0 source code and inform the user…
Why is learning functional programming so damned hard? (2019)
My Functional Programming journey was filled with dead ends, false starts, failed attempts and frustration. And I suspect that I’m not…
Let's write a compiler, part 1: Introduction, selecting a language, and planning
I think we all knew this might be coming once we finished up with our assembler . While we can in theory solve any computable problem by writing the appropriate assembly for our assembler, writing assembly code can be a bit more cumbersome than a high-level language. There is a reason why we did not write our…
Thoughts On Lisp And Racket (2019)
I plan on writing about why I am interested in the Lisp family of languages. It will probably come out in stages.
How Actors Work Internally in Swift
Lets explore how actors work under the hood, using Swift's own source code as a guide to finding out how they work inside the compiler.
When zero cost abstractions aren't zero cost
Rust is built around the concept of “zero cost abstraction”. The idea is that you can write human-friendly high level code and the compiler will give you for free performance at least as good as any optimized low level code you could have written yourself. With zero cost abstraction, you no longer have to trade off…
A Lisp interpreter written in Lisp (2017)
A Lisp interpreter written in Lisp
Revisiting Prechelt’s paper comparing Java, Lisp, C/C++ and scripting languages
In 1999, Lutz Prechelt published a seminal article on the COMMUNICATIONS OF THE ACM (October 1999/Vol. 42, No. 10) called Comparing Java vs. C/C++ Efficiency Differences to Interpersonal Differences , henceforth Java VS C , which seems to have later (March 2000) been expanded into a full paper, An empirical comparison…
Constexpr is a Platform (2020)
Let me share a useful insight with you: constexpr is a platform. Just like you write code that targets Windows or a microcontroller, you write code that targets compile-time execution. In both cases you restrict yourself to the subset of C++ that works on your target platform, use conditional compilation if your code…
Learning APL
A language that doesn’t affect the way you think about programming is not worth knowing. – Alan Perlis
Beautiful ideas in programming: generators and continuations
Science, programming, books, and other interesting stuff
Learning that you can use unions in C for grouping things into namespaces
You're probably reading this page because you've attempted to access some part of my blog (Wandering Thoughts) or CSpace , the wiki thing it's part of. Unfortunately you're using a browser version that my anti-crawler precautions consider suspicious, most often because it's too old (most often this applies to versions…
strcpy: A niche function you don't need
The C strcpy function is a common sight in typical C programs. It’s also a source of buffer overflow defects, so linters and code reviewers commonly recommend alternatives such as strncpy (difficult to use correctly; mismatched semantics), strlcpy (non-standard, flawed ), or C11’s optional strcpy_s ( no correct or…
What's bad about Julia?
A mega-rant about all the things I find bad about Julia.
Understanding Rust futures by going way too deep
So! Rust futures! Easy peasy lemon squeezy. Until it’s not. So let’s do the easy thing, and then instead of waiting for the hard thing to sneak up on us, we’ll go for it intentionally. That’s all-a...
Types versus sets in math and programming languages
For several years I have been designing and implementing a functional teaching language especially for use in the context of a Discrete Mathematics course. The idea is for students to be exposed to…
Modern C++ for C Programmers (2018)
Welcome to part 1 of Modern C++ for C Programmers, please see the introduction for the goals and context of this series. In this part we start with C++ features that you can use to spice up your code ’line by line’, without immediately having to use all 1400 pages of ‘The C++ Programming Language’. Various code…
Worse Is Better (2001)
The concept known as "worse is better" holds that in software making (and perhaps in other arenas as well) it is better to start with a minimal creation and grow it as needed. Christopher Alexander might call this "piecemeal growth." This is the story of the evolution of that concept.
Namedtuple in a Post-Dataclasses World
namedtuple has been around since forever, and over time, its convenience saw it used far outside its originally intended purpose. With dataclasses now covering part of those use cases, what should one use named tuples for? In this article, I address this question, and give a few examples from real code.
Julia's multiple dispatch explained with Pokemons
T hese days, I find myself evangelizing for Julia quite a bit. It’s a good language, especially for scientific computing, but I believe its focus on performance also makes it a good general language as well. At some level, programmers who know multiple languages have an abstract understanding of the constructs used…
Zig, Skia, Clojure, Geometry and the Japanese TV Show: ICFP Contest 2021
4-day coding marathon