• papers podcast posts projects
    • 2021年01月24日
    • 6 分
    On Strings in Compilers

    I’ve been thinking recently about handling strings and names in compilers in a more principled way, and I think I’ve come up with a nice way of doing this.

    • Compiler
    • Programming Languages
    • 2020年12月28日
    • 67 分
    (Haskell in Haskell) 3. Parsing

    This is the third post in the Haskell in Haskell series.

    In this post, we’ll go over creating a parser for our subset of Haskell. This stage of the compiler is responsible for taking the tokens that our lexer produced in the previous part.

    • Compiler
    • Haskell
    • Programming Languages
    • 2020年12月10日
    • 61 分
    (Haskell in Haskell) 2. Lexing

    This is the second post in the Haskell in Haskell series.

    In this post, we’ll go over creating a lexer for our subset of Haskell. This stage of the compiler goes from the raw characters in our a source file, to a more structured stream of tokens.

    We’ll finally be digging into some serious code this time, so get your editor ready if you’re following along!

    • Compiler
    • Haskell
    • Programming Languages
    • 2020年11月23日
    • 19 分
    (Haskell in Haskell) 1. Setup

    This is the first “real” post in the Haskell in Haskell series.

    In this post we’ll go over setting up a basic project in Haskell. We’ll be building our compiler on top of this foundation in the next posts.

    • Compiler
    • Haskell
    • Programming Languages
    • 2020年11月10日
    • 9 分
    On Deep Immutability

    This post is about the different ways objects can be immutable and mutable in programming languages, why deep immutability is what we really want, and a path towards implementing that in higher level languages.

    • Programming Languages
    • 2020年11月01日
    • 13 分
    (Haskell in Haskell) 0. Introduction

    This is an introduction to a series I’m calling Haskell in Haskell. The goal of this series of posts is to go through the implementation of a subset of the Haskell language, from parsing, to typechecking, to code generation, using Haskell itself.

    • Compiler
    • Haskell
    • Programming Languages
    • 2020年10月22日
    • 1 分
    Haskell in Haskell

    This is a series I’m writing about implementing a compiler for a subset of Haskell, using nothing else than Haskell itself! We’ll go through the whole process, going from a file containing Haskell code to generating C that we can compile into a functional executable. I’ve only just started working on the series, so stay tuned for new posts as they come along: I’ll update this page whenever they arrive.

    • Compiler
    • Haskell
    • Parsing
    • Programming Languages
    • 2020年10月18日
    • 12 分
    Lexer Combinators

    When you write a parser in Haskell, you want to use parser combinators. When you write a lexer, you should use lexer combinators! We’ll see what these are, and how to use them to write a simple lexer.

    • Haskell
    • Programming Languages
    • 2020年06月03日
    • 25 分
    Parsing A Whitespace-Sensitive Language

    This post is about how to parse programming languages which define blocks using indentation, instead of braces and semicolons. We’ll end up learning how to infer these blocks based on the indentation, using Typescript to parse a toy functional language.

    • Parsing
    • Programming Languages
    • 2019年08月31日
    • 9 分
    Poline

    This is a post about Poline, a tiny programming language I wrote recently. The main “gimmick” of Poline is a feature called Green Threads. In fact, Poline doesn’t have many other features besides them.

    • Concurrency
    • Programming Languages
    • Rust
    • 2019年08月17日
    • 8 分
    From Interfaces to Traits

    This is a post about how different languages handle the concept of interfaces. We’ll go over the classical OO way of handling them, with Java, to the more recent approaches of languages like Rust, as well as others in between.

    • Programming Languages
    • Software Architecture