New
The latest blog posts to take off on Hacker News. 3,709 posts.
Rewriting m4vgalib in Rust
If this isn’t your first time visiting my blog, you may recall that I’ve spent the past several years building an elaborate microcontroller graphics demo using C++.
Crafting Interpreters: Classes and Instances
Caring too much for objects can destroy you. Only — if you care for a thing enough, it takes on a life of its own, doesn’t it? And isn’t the whole point of things — beautiful things — that they connect you to some larger beauty?
The Typestate Pattern in Rust
The typestate pattern is an API design pattern that encodes information about an object’s run-time state in its compile-time type . In particular, an API using the typestate pattern will have:
I love coding in C
For the first time in almost a year, I brushed up on my C fundamentals and built a few toy programs. As I played around with pointers and printed out a memory location, I experienced a literal chill down my spine. I had almost forgotten how marvelous programming in this language was.
Java JIT vs. Java AOT vs. Go for Small, Short-Lived Processes
Mario Macias' handcrafted blog
Learn Rust the Dangerous Way
LRtDW is a series of articles putting Rust features in context for low-level C programmers who maybe don’t have a formal CS background — the sort of people who work on firmware, game engines, OS kernels, and the like. Basically, people like me.
Interface Builder's Alternative Lisp Timeline (2013)
Denison “Denny” Bollay is one of the guys at ExperTelligence that crafted the first Interface Builder (IB) and showed Steve Jobs and Bill Gates. Jeff Wishnie introduced me (thanks dude) recently, and I’ve been talking to Denny as I have an agenda - Pseudo-declarative UIs - that is in complete opposition to my…
Modern garbage collection: Part 2
A look at what the newest generation of Java GCs can do
Developing a Statically Typed Programming Language (2017)
In this blog post we’ll go through a sample implementation of a type checker, interpreter and a transpiler for a basic purely functional programming language, which is based on the lambda calculus. We will do a “full-stack” programming language development by going through formal definition of the language’s syntax…
The Go runtime scheduler's way of dealing with system calls
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…
The Road to Valhalla
The goal of Project Valhalla is to bring more flexible flattened data types to JVM-based languages, to bring the programming model back in line with the performance characteristics of modern hardware. The core feature is inline classes (known previously as value types ), but such a fundamental perturbation of the JVM…
Software Security Is a Programming Languages Issue (2018)
Software security must be addressed by all programmers, not just security experts. So we teach it in CS 330, a programming (languages) class.
Garbage Collection
We say Lox is a “high-level” language because it frees programmers from worrying about details irrelevant to the problem they’re solving. The user becomes an executive, giving the machine abstract goals and letting the lowly computer figure out how to get there.
Building a language server for Muon
I’m a big fan of interactive tool support for programming. I often use features like “go to definition”, “find symbol”, compile error underlining, etc. Also, earlier this year, I launched Muon, a new low-level programming language. As no tooling existed beyond the compiler, writing the initial Muon programs (such as a…
Overview of Rust error handling libraries
Rust's error handling is a pleasure to use thanks to the Result type . It ensures Rust's error handling is always correct , visible , and performant . And with the addition of the ? operator in Rust 1.13 , and the addition of return types from main in Rust 1.26 Rust's error handling has only kept improving.
Mu: Sketching out a minimal system programming language
In the previous post , I described what my new hobbyist computing stack looks like today, and how the design decisions seemed to accumulate inevitably from a small set of axiomatic goals. In this post I describe some (far more speculative) future plans for Mu and try to articulate how the design process continues to…
Go’s Features of Last Resort
A “Feature of Last Resort” (FOLR) is a useful feature which solves certain otherwise hard-to-solve problems, but are often best avoided.
How to make your C codebase Rusty: rewriting keyboard firmware keymap
Recently, my colleague introduced me to QMK 1, an open-source keyboard firmware. Like many non-trivia C projects, macro is heavily used everywhere, especially in keymap files 2. It didn’t bother me much since I have been programming C for many years. But I kept thinking to myself, “what would it look like if I can…
Functional Imperative Programming with Elixir (2018)
Stuff about things
Code Pages, Character Encoding, Unicode, UTF-8 and the BOM [video]
OK, fine maybe they DID teach you this in class. But, you'd be surprised how ...