Top posts
Every blog post that took off on Hacker News, ranked by the votes of its best submission. 3,709 posts.
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…
Build systems a la carte: theory and practice (2020)
Andrey Mokhov, Neil Mitchell, Simon Peyton Jones Published in Journal of Functional Programming, Vol 30(E11) View PDF Download BibTex
Ash: A Gentle Primer
An introduction to Ash Framework, written for new Elixir developers. Comes with LiveBooks for interactive examples, live-coding video walkthrough, and illustrations.
Compiling Julia for NVIDIA GPUs
For the few last months, I have been working on CUDA support for the Julia language . It is now possible to write kernels in Julia and without much hassle execute them on a NVIDIA GPU, but there are still many limitations.
Mobile Smalltalk
I've been announcing the Open Beta release of my game HexSolve for Android and iOS. HexSolve was written in Smalltalk and people have been ...
Gradual typing for Clojure
Today’s programming landscape is dynamic and polyglot . Interlanguage interoperability is a mainstay — it’s almost unavoidable that a given piece of code will be used without the knowledge of the original author.
Undefined Behavior in C and C++ (2024)
In some ways, that's because C is a lower-level language, closer to assembly; it just gives you what the underlying machine gives you.
Admitting That Functional Programming Can Be Awkward (2007)
It's not about technology for its own sake. It's about being able to implement your ideas.
Objective-C's niche: why it survives in a world of alternatives
Objective-C remains an impediment for many programmers coming to the Mac or iPhone platforms — few programmers have ever experienced it before learning Cocoa, forcing two learning curves at once for new Cocoa developers. How did Apple end up with such a weird language? And for a company known to replace CPU…
Why Rust helps even if you have to use a lot of `unsafe`
I semi-regularly hear developers who claim that using Rust would not gain them anything because they would have to use `unsafe`. But this is not true. Local reasoning matters.
New integer types I’d like to see
(Most) C++ implementations provide at least 8, 16, 32, and 64-bit signed and unsigned integer types. There are annoying implicit conversions, discussions about undefined behavior on overflow (some think it’s too much UB, others think it’s not enough), but for the most part they do the job well. Newer languages like…
Sylph: the programming language I want
Creating a programming language is apparently all the rage these days, and it’s got me thinking about what I would really like to see in one. I’m starting to suspect the things I want are either impossible or mutually incompatible, so I’d better write them down and let smarter people tell me why I can’t have…
The case for dynamic, functional programming
If you're a fan of dynamic languages then you should also be a fan of functional programming.
Why do C++ folks make things so complicated?
This morning Miroslav Bajtoš asked "Why do C++ folks make things so complicated?" in response to my article on regular expressions in C++. Other people asked similar questions yesterday. My response has two parts: Why I believe C++ libraries are often complicated. Why I don't think it has to be that way. Why would…
What will be the legacy of Go?
In October this year I had the privilege of speaking at the GothamGo conference in New York City. As I talk quite softly, and there were a few problems with the recording, I decided to write up my slide notes and present them here.
Swift on the Server (2020)
Why choose Swift as a backend language in 2020? What are the available frameworks to build your server? Let me guide you.
Why I think Haskell is the best general purpose language as of June 22 2019
Me and my close friends have been interested in starting a project together and I suggested we use Haskell. I do not think the suggestion was received well or perhaps in seriousness. I have a tendency to joke about almost everything and have put forward that we use many interesting but not practical languages in the…
Java 7 changed the structure of String
Java 7 quietly changed the structure of String. Instead of an offset and a count, the String now only contained a char[]. This had some harmful effects for those expecting substring() would always share the underlying char[].
Exercises for understanding Haskell Lenses (2019)
No matter how many blog posts and tutorials I read about lenses, it seems like there's no replacement for just using them to get an intuition. So here are some exercises I came up with. While they shouldn't be all that difficult, they build up from some basic knowledge about lenses up to the more advanced usages of…
Abstraction, intuition, and the “monad tutorial fallacy” (2009)
While working on an article for the Monad.Reader, I’ve had the opportunity to think about how people learn and gain intuition for abstraction, and the implications for pedagogy. The heart of …
Twisted Python's lead hacker discusses Tornado
Deciphering Glyph, the blog of Glyph Lefkowitz.
How Python 3 Should Have Worked (2012)
As a workaday Python developer, it’s hard to shake the feeling that the Python 2 to 3 transition isn’t working. I get occasional requests to make my libraries work in 3 but it’s far from clear how to and when I try to look it up I find all sorts of conflicting advice, none of which sounds very practical.
Friendly attributes pattern in Ruby
Friendly Attributes pattern enables writing human-friendly attributes with compact and flexible syntax.
Summer of Programming Languages
Having just returned from the annual Oregon Programming Languages Summer School, at which I teach every year, I am once again very impressed with the impressive growth in the technical sophisticati…
A rough proposal for sum types in Go (2018)
Sum types are pretty cool. Just like how a struct is basically “This contains one of these and one of these”, a sum type is “This contains one of …
Quote-unquote "macros"
You’ve probably seen this Python 101 thing before: @memoized def fib(n): if n <= 1: return n return fib(n - 1) + fib(n - 2) Leaving aside the absurdity of computing Fibonacci numbers recursively, it’s a common first introduction to Python decorators and higher-order functions. fib is just a function, and memoized…
Types versus sets (and what about categories?) (2022)
A recent Twitter thread brought home to me that there is widespread confusion about what types actually are, even among the most prominent researchers. In particular: are types the same thing as sets ? At the risk of repeating some of my prior posts, perhaps it’s time for a little history about type theory, set theory…
What is “Open Recursion”?
Someone on StackOverflow stumbled onto the strange term “open recursion” and asked what it meant . Since most of the other answers to this online are pretty opaque, I started writing an answer. But then I accidentally wrote a blog post.