How I went about learning Rust
Rust has been on my radar for a long time now , and about a year ago I finally began allocating some time every week to learning it.
One of the most wonderful aspects of math is how deep we can get by studying seemingly trivial questions. Consider the roots of unity, where "unity" simply means the number 1.
Visit eli.thegreenplace.net → RSS feedOn Hacker News Apr 2008 – Oct 2026
Software Engineering 51Programming Languages 23Systems & Performance 17Math & Algorithms 9Web & Frontend 3Life, Learning & Writing 3
Rust has been on my radar for a long time now , and about a year ago I finally began allocating some time every week to learning it.
More than thirteen years have passed since Herb Sutter declared that the free lunch is over and concurrency is upon us , and yet it's hard to claim that most mainstream languages have made a strong shift towards concurrent modes of programming. We have to admit that concurrency is just hard , and the struggles of some…
There's an old compiler-building tutorial that has become part of the field's lore: the Let's Build a Compiler series by Jack Crenshaw (published between 1988 and 1995).
Updated (2023-05-08): the Go compiler keeps evolving and it takes time to keep up with changes. While the general gist of this post remains true and it's worth reading to understand how the compiler works on a high level, the details of the modifications are slightly different now.
I sometimes get asked for recommendations of what programming language to "learn next". It's great that folks appreciate the fact that being exposed to several sufficiently different programming languages is an important step on the path to programming enlightenment. But it's also true that, given limited free time…
This is a whirlwind tour of some of the cool new features that appeared in Clojure in the past few years. I find it fascinating how one good idea (reducers) morphed into another (transducers), and ended up mating with yet another, apparently unrelated concept (concurrent pipelines) to produce some really powerful…
I first ran into Forth about 20 years ago when reading a book about designing embedded hardware . The reason I got the book back then was to actually learn more about the HW aspects, so having skimmed the Forth chapter I just registered an "oh, this is neat" mental note and moved on with my life. Over the last two…
Type inference is a major feature of several programming languages, most notably languages from the ML family like Haskell. In this post I want to provide a brief overview of type inference, along with a simple Python implementation for a toy ML-like language.
To implement its safety guarantees, the Rust compiler keeps careful track of ownership and references throughout a program. This makes writing certain kinds of data structures challenging; in particular, data structures that have circular references.
This is the first article in a series dedicated to multiple dispatch - an advanced abstraction technique available to programmers out-of-the-box in some languages, and implementable in others. This first post in the series presents the technique and explains the problem it intends to solve. It uses C++ as the…
A few years ago I've written in some detail about the Y combinator, including implementations in Clojure and Python.
Recently, a new set of sorting functions has landed in Go's golang.org/x/exp/slices package [1] . These functions leverage Go generics to provide a more ergonomic API for sorting (without requiring users to implement sort.Interface ), and also deliver a nice performance improvement, as the CL demonstrates.
In this brief post I want to discuss a fairly unusual feature of Haskell - functions that can be parameterized by their return type.
How is tail recursion different from regular recursion? What do continuations have to do with this, what is CPS, and how do trampolines help? This article provides an introduction, with code samples in Python and Clojure.
Longer answer: it depends on what you mean by "equivalent". Pointer arithmetic and array indexing are equivalent. In other aspects, pointers and arrays are different.
[The Python version described in this article is 3.x, more specifically - the 3.3 alpha release of CPython.]
The craft of programming is almost universally concerned with different types of data and operations/algorithms that act on this data [1] . Therefore, it's hardly surprising that designing abstractions for data types and operations has been on the mind of software engineers and programming-language designers since…
The terms lvalue and rvalue are not something one runs into often in C/C++ programming, but when one does, it's usually not immediately clear what they mean. The most common place to run into these terms are in compiler error & warning messages. For example, compiling the following with gcc :
This article is an attempt to better understand how the front-end of Python works. Just reading documentation and source code may be a bit boring, so I'm taking a hands-on approach here: I'm going to add an until statement to Python.
I've completed the SICP reading project, which I began on June 19th, 2007 . In hindsight, it seems like a very long time (almost a year!), during which this was my main hacking project at home. So, in this conclusion I want to examine my progress, and compare the result with my initial goals.
Almost exactly a year ago I wrote here about giving Python a try as my main programming language. Before that I was mainly writing in Perl, and eying Ruby from time to time as the replacement.
I've written previously about the problem recursive descent parsers have with expressions, especially when the language has multiple levels of operator precedence.
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…