Writing a compiler in Ruby, bottom up (2008)
(To follow my compiler related posts, either subscribe to my main RSS feed, or the compiler specific one )
Posts that commenters keep linking to, ranked by how many different people have cited them in Hacker News comments. 662 posts.
(To follow my compiler related posts, either subscribe to my main RSS feed, or the compiler specific one )
This paper appears in Lisp and Symbolic Computation , Volume 1, No. 1, June 1988, pp81-101.
No general procedure for bug checks will do. Now, I won’t just assert that, I’ll prove it to you. I will prove that although you might work till you drop, you cannot tell if computation will stop. For imagine we have a procedure called P that for specified input permits you to see whether specified source code, with…
October 1997: It has been six years since I finished Paradigms of AI Programming (or PAIP ), and now seems like a good time to look back at how Lisp and AI programming have changed.
(You probably already have realized this.) The reason the compiler produced code that terminated was based upon the fact that the values being altered (i.e., a, b and c) within the “while” loop are never referenced again after the loop. But, once you added code which printed the resulting values it was forced to…
What is threaded code? What is it good for? What are the differences between the various threading techniques? How do I implement threaded code portably? How fast are various threading techniques?
Here is some practical evidence: According to the most recent 2002 North American Developer Survey by Evans Data Corporation, over half the developers surveyed are using Java. About 1/7 of developers surveyed are using C#. Roughly half of those also use Java, so the fraction of surveyed developers using one or both is…
I've written previously about the problem recursive descent parsers have with expressions, especially when the language has multiple levels of operator precedence.
A lot of people remarked that in my post on Tail Recursion Elimination I confused tail self-recursion with other tail calls, which proper T...
A tour of free monads and their motivating use cases
Recently we (Felix, Niko, and I) have been working on getting compiler-level GC support for Rust. The plan is to provide a base set of APIs and …
Context free grammars (CFGs) are a valuable theoretical tool on which the modern compilation theory relies for parsing the code of programming languages. For example, the most popular tool used for parsing – YACC , generates parsers for CFGs. What most people don’t know 1 is that the vast majority of programming…
I’ve been doing a lot of work, lately, with JavaScript inheritance – namely for my work-in-progress JavaScript book – and in doing so have examined a number of different JavaScript classical-inheritance-simulating techniques. Out of all the ones that I’ve looked at I think my favorites were the implementations…
(These are some notes I made for a panel discussion on programming language design at MIT on May 10, 2001.) 1. Programming Languages Are for People. Programming languages are how people talk to computers. The computer would be just as happy speaking any language that was unambiguous. The reason we have high level…
To dwellers in a wood, almost every species of tree has its voice as well as its feature. Thomas Hardy, Under the Greenwood Tree
Urbit is a static functional namespace : a programming environment specified as a single stateless, frozen function. The Urbit function is ...
When Jarred joined the Zig community about 5 years ago, I described him as someone who had strong "beginner energy". That is, he moved fast and tried a lot of different stuff, jumping head first into problems that he was not yet equipped to solve, leading to mediocre outcomes in terms of engineering, but learning a…
Few weeks ago I noticed a blog post "Oxidizing Source Maps with Rust and WebAssembly" making rounds on Twitter - talking about performance benefits of replacing plain JavaScript in the core of source-map library with a Rust version compiled to WebAssembly.
A few weeks ago, on a whim my friend and I decided to hackathon our way through an app to help us learn how to play guitar . In a stroke of inspiration, we decided to learn something new, and do the project in the Elm programming language , about which I had heard many good things.
There are about six major conceptualizations of memory, which I’m calling “memory models”, that dominate today’s programming.
This post is about why we need a coroutine package for Go, and what it would look like. But first, what are coroutines?
Just so you know, x86 machine-code is now a "high-level" language. What instructions say, and what they do, are very different things. I m...
I really believe all developers should learn Haskell. I don’t think everyone needs to be super Haskell ninjas, but they should at least discover what Haskell has to offer. Learning Haskell opens your mind.
For those who don’t follow Swift’s development, ABI stability has been one of its most ambitious projects and possibly it’s defining feature, and it finally shipped in Swift 5 . The result is something I find endlessly fascinating, because I think Swift has pushed the notion of ABI stability farther than any language…
I've recently been exploring the exciting new world of asynchronous I/O libraries in Python 3 – specifically asyncio and curio . These two libraries make some different design choices. This is an essay that I wrote to try to explain to myself what those differences are and why I think they matter, and distill some…
In which I discuss a modules problem that is being ignored
Russian Translation by frol , Chinese Translation by JiyinYiyong , Japanese Translation by Mutsuha Asada
How a 10 year old design choice for Swift’s type checker still haunts us to this day