Author: James Paul Jackson
Version: v2.1 (Canon)
Date: January 2026
| -- Implementation in LH of Calculating Dependently-Typed Compilers | |
| -- https://people.cs.nott.ac.uk/pszgmh/well-typed.pdf | |
| {-# LANGUAGE GADTs #-} | |
| {-# OPTIONS_GHC -fplugin=LiquidHaskell #-} | |
| {-@ LIQUID "--ple" @-} | |
| {-@ LIQUID "--reflection" @-} | |
| {-@ LIQUID "--max-case-expand=4" @-} |
- Parallel Computing Course - Stanford CS149, Fall 2023
- Performance-Aware Programming Series by Casey Muratori
- Algorithms for Modern Hardware
- Computer Systems: A Programmer's Perspective, 3/E - by Randal E. Bryant and David R. O'Hallaron, Carnegie Mellon University
- Performance Engineering Of Software Systems - am MITOCW course
- Parallel Programming 2020 by NHR@FAU
- Cpu Caches and Why You Care - by Scott Meyers
- [Optimizing a ring buffer for throughput](https://rig
| -- An evaluator for the language "Untyped Arithmetic Expressions" described in | |
| -- Types and Programming Langauges section 3. | |
| -- Below I have a few different syntax for starting indentation blocks. | |
| -- | |
| -- I'm looking for the syntax that is (in priority order) | |
| -- | |
| -- (1) Most readable (subjective, I know) | |
| -- (2) Easiest to implement tooling for (e.g. indentatation plugin in text | |
| -- editors) |
All started around 1930, when mathematicians discovered the λ-calculus. It was Turing complete, so we wrote programs on it. Everything was great, until the first program crashed and the first paradox was found. The world was in flames, so humans looked for better.
Around 1940, the simple type was discovered. It solved everything: math was consistent again, programs stopped crashing. People were happy, until someone tried to make a linked list.
"Why do I need to duplicate my entire codebase?" - asked the angry developers.
At this point, half of humanity gave up on types. A duck religion was born. The other half looked for better.
This is the predecessor of Mazeppa.
Supercompilation is a deep program transformation technique due to V. F. Turchin, a prominent computer scientist, cybernetician, physicist, and Soviet dissident. He described the concept as follows [^supercompiler-concept]:
A supercompiler is a program transformer of a certain type. The usual way of thinking about program transformation is in terms of some set of rules which preserve the functional meaning of the program, and a step-by-step application of these rules to the initial program. ... The concept of a supercompiler is a product of cybernetic thinking. A program is seen as a machine. To make sense of it, one must observe its operation. So a supercompiler does not transform the program by steps; it controls and observes (SUPERvises) the running of the machine that is represented by th
| open Printf | |
| exception Goto of string | |
| let label (name: string) = () | |
| let goto (name: string) = raise (Goto name) | |
| let goto_block (blocks: (string * (unit -> unit)) list): unit = | |
| let rec goto_block_impl (name: string option): unit = | |
| try |
| [<RequireQualifiedAccess>] | |
| type Type = | |
| | Unit | |
| | Bool | |
| | Int | |
| | Sum of (string * Type list) list | |
| [<RequireQualifiedAccess>] | |
| type Pattern = | |
| | Variable of string |
I write about inductive-recursive types here. "Generally" means "higher inductive-inductive-recursive" or "quotient inductive-inductive-recursive". This may sound quite gnarly, but fortunately the specification of signatures can be given with just a few type formers in an appropriate framework.
In particular, we'll have a theory of signatures which includes Mike Shulman's higher IR example.