leastfixedpoint

Tony's Link Log

Links tagged with “bcs2220”

All tags.

Links relevant to students in my Principles of Programming Languages course (BCS2220) at Maastricht University. The course covers both fundamentals of Functional Programming (following the How to Design Programs approach) and analysis of Programming Languages through the lens of PLAI.

Atom 1.0 feed Atom feed for links tagged with bcs2220

Links added 16 July 2026

The Origins of Flow Control and Acknowledgements.

Tony Garnock-Jones (15 May 2011)
🔗 https://eighty-twenty.org/2011/05/15/origins-of-ack-and-flow-control
#networking #functional-programming #bcs2110 #bcs2220 #bcs

One of my own old blog posts. Incrementally refactors normal Enumerator and Observer interfaces (in the object-oriented sense) using algebraic reasoning, gradually bringing them closer and closer to realistic networking protocols, and quite quickly arriving at a place where the networking concepts of “acknowledgement of messages” and “flow control to avoid overwhelming a receiver” fall out for free.

The Algebra of Data, and the Calculus of Mutation.

Kalani Thielen (18 April 2009)
🔗 http://static.v25media.com/the-algebra-of-data-and-the-calculus-of-mutation.html
#functional-programming #bcs2220 #bcs

A short tutorial on algebraic data types, useful tools for reasoning about and refactoring data structures:

In what sense are data types algebraic? […] Isn’t this all just a bunch of general abstract nonsense? We’ll investigate these questions, and perhaps demystify this important concept of functional languages.

An example of how these ideas can help can be seen in my old blog post on The Origins of Flow Control and Acknowledgements.

(Aside: this post’s link seems to be to a rescued copy of the text, which was originally at http://blog.lab49.com/archives/3011.)

Links added 10 July 2026

Verdigrist: a mostly-traditional Smalltalk-80 in Rust.

Cliff L. Biffle (n.d.; project 2026–)
🔗 https://codeberg.org/cliffle/verdigrist
#programming-languages #operating-systems #smalltalk #bcs2220 #bcs2140 #bcs

A cool recent Smalltalk VM based directly on Smalltalk-80 and closely following the classic “Blue Book” design, but somewhat modernized and implemented in Rust. Straighforward and understandable.

Compiler Explorer.

Matt Godbolt (n.d.; project 2012–)
🔗 https://godbolt.org/
#programming-languages #bcs2220 #bcs1450 #bcs

An interactive tool for seeing how various compilers (GCC, Clang, MSVC, rustc, etc.) produce machine code for various architectures at various optimisation levels.

Squeak.

Dan Ingalls, Ted Kaehler, John Maloney, Scott Wallace, Alan Kay et al. (n.d.; project 1996–)
🔗 https://squeak.org/
#personal-computing #operating-systems #programming-languages #smalltalk #bcs2220 #bcs2140 #bcs #software

Squeak is a direct descendant of the Smalltalk-80 system. Lots to criticise, lots to be inspired by. One of my favourite operating systems, one of my favourite programming languages! Not that it couldn’t be better, of course…

1SubML Programming Language.

Robert Grosse (29 April 2026)
🔗 https://github.com/Storyyeller/1subml
#programming-languages #functional-programming #bcs2220 #bcs

A recent ML-family language design:

1SubML is an experimental ML-like programming language with a unified module and value language, structural subtyping, global type inference, higher rank polymorphic types, existential types, higher kinded types (no partial application), recursive types, worst-case polynomial time type checking and much more.

Pratt Parsing is a Black Box.

Vinícius dos Santos Oliveira (24 April 2026)
🔗 https://vinipsmaker.github.io/blog/article/pratt-parsing-is-a-black-box/
#parsing #programming-languages #bcs2220 #bcs

A slightly rambly but rich discussion of Pratt parsing, a parsing technique that is very simple, on the one hand, but surprisingly powerful and subtle, on the other.

Retrofitting JIT Compilers into C Interpreters.

Laurence Tratt (15 April 2026)
🔗 https://tratt.net/laurie/blog/2026/retrofitting_jit_compilers_into_c_interpreters.html
#jit #programming-languages #bcs2220 #bcs

Laurence Tratt explains a relatively simple new meta-tracing-based technique for adding a JIT compiler to an existing C-based interpreter:

What might surprise you is that we only added about 400LoC to PUC Lua, and changed under 50LoC. This hopefully makes the trade-off yk offers clear: yklua does not reach the performance peaks of the wonderful, carefully hand-written, LuaJIT; but LuaJIT is stuck in the 13 year old past of Lua 5.15, whereas yklua trivially tracks updates to PUC Lua. The point of this post isn’t to tell you that one side or the other of this trade-off is best. Rather, it’s to show that the trade-off exists, and that yk fills in a part of the design space that was largely out of bounds before.

A Better Web Streams API for JavaScript.

Cloudflare Blog (27 February 2026)
🔗 https://blog.cloudflare.com/a-better-web-streams-api/
#programming-languages #bcs2220 #bcs

Many programming languages have some kind of representation of a stream, a sequence of bytes (or objects) that can be processed a chunk at a time, filtered, transformed, composed, pipelined, split, merged and so on. JavaScript is no exception, but historical peculiarities of the language have left it in kind of a bad place for the ergonomics of using streams. So this article discusses improvements that could be made. PL students take note: we’ve moved on from mere syntax and semantics to the squishy yet ultimately valuable worlds of ergonomics and pragmatics!

Consideration of Input Shapes.

Addison Crump (14 August 2025)
🔗 https://addisoncrump.info/research/consideration-of-input-shapes/
#testing #programming-languages #bcs2220 #bcs

Musings on the topic of “input shapes” in context of fuzz testing (a powerful automated software testing technique), and why they are important:

I propose that there are two types of inputs: instruction-like and data-like. Of course, there is some overlap where, for example, an instruction contains data, or data contains instructions, but fundamentally, this is what inputs are consumed as by the program. For both of these types, you have three shapes: linear, tree, and directed graph.

Write Little Proofs in Your Head.

Matthew Prast (14 July 2025)
🔗 https://blog.get-nerve.com/to-be-a-better-programmer-write-little-proofs-in-your-head/
#programming-languages #functional-programming #bcs2220 #bcs

The importance of (and tricks for) doing proofs about code you’re writing as you write it:

This is a brief write-up of a trick I learned that helps me write code faster and more accurately. I say “trick”, but it’s really something I started to do without noticing as I moved further into my career.

When you’re working on something difficult, sketch a proof in your head as you go that your code will actually do what you want it to do. A simple idea, but easier said than done: doing this “online” without interrupting your flow takes a lot of practice. But once you get really good at it, you’ll find that a surprising amount of the time your code will work on the first or second try. It feels a little magical.

(via John Regehr)

Garbage Collection Explorer (GC Explorer).

Eric Rescorla (2025)
🔗 https://gcexplorer.net/
#programming-languages #bcs2220 #bcs

An interactive web tool that simulates various garbage collection algorithms running over a user-specified concrete heap. Also illustrates a simple tagging/object-header scheme. (Note that the “About” page is hidden away in a hamburger menu at the top right.)

Paragraph flowing as a fold.

Wolfgang Corcoran-Mathe (2024)
🔗 https://www.sigwinch.xyz/cs/2024/flow-fold.html
#functional-programming #bcs2220 #bcs

An elegant example of FP for the FP portion of my PL course:

A simple, useful, plain-text variant of Donald Knuth’s paragraph-filling algorithm can be expressed as a fold. This algorithm runs in time linear to the length of its input and usually produces better results than the classic greedy text-flow algorithm.

Visitor as a Sum Type.

Mark Seemann (25 June 2018)
🔗 https://blog.ploeh.dk/2018/06/25/visitor-as-a-sum-type/
#functional-programming #bcs2220 #bcs

Makes explicit the connection between the Visitor design pattern and sum types (a.k.a. tagged unions / algebraic data types).

C Is Not a Low-level Language: Your computer is not a fast PDP-11.

David Chisnall (30 April 2018)
🔗 https://queue.acm.org/detail.cfm?id=3212479
#programming-languages #operating-systems #bcs2220 #bcs2140 #bcs

An excellent paper that skewers the common cultural understanding of the C programming language as being a “low-level” or “portable assembly” language. Modern CPUs have diverged so far from the C abstract machine that C no longer provides predictable “close-to-the-metal” guarantees.

Memory Safety.

Arthur Azevedo de Amorim, Cătălin Hrițcu, Benjamin C. Pierce (April 2018)
🔗 https://link.springer.com/content/pdf/10.1007/978-3-319-89722-6_4.pdf
#pdf #programming-languages #bcs2220 #bcs #paper

A concrete and formal definition of memory safety from (inter alia) Benjamin C. Pierce.

We give a rigorous characterization of what it means for a programming language to be memory safe, capturing the intuition that memory safety supports local reasoning about state.

Paper in the proceedings of the Principles of Security and Trust conference 2018.

Quick-Sort: A Pet Peeve.

Arthur Nunes-Harwitt, Matt Gambogi, Travis Whitaker (21 February 2018)
🔗 https://dl.acm.org/doi/abs/10.1145/3159450.3159535
#functional-programming #pdf #bcs2220 #bcs #paper

Development of incremental improvements to a pure-functional quicksort implementation, eliminating multiple passes over the input and unnecessary append operations by introducing accumulators.

John Reynolds on Language Design.

Neel Krishnaswami (29 April 2013)
🔗 https://semantic-domain.blogspot.com/2013/04/john-c-reynolds-june-1-1935-april-28.html
#programming-languages #bcs2220 #bcs

Neel Krishnaswami remembers John Reynolds. One particular quote that struck me (highlighted by Lindsey Kuper) is this:

So this was John [Reynolds]’s definition of a successful language design: if you have a user who has used it to write a program you couldn’t have, your language has succeeded, since it has helped a fellow human being solve one of their own particular problems.

I’ve always liked his definition, since it manages to avoid an obsession with nose-counting popularity metrics, while still remembering the essentially social purpose of language design.”

Programming languages are about people!

Back to the Future: The Story of Squeak, a Practical Smalltalk Written in Itself.

Dan Ingalls, Ted Kaehler, John Maloney, Scott Wallace, Alan Kay (9 October 1997)
🔗 https://dl.acm.org/doi/10.1145/263700.263754
#personal-computing #operating-systems #programming-languages #smalltalk #bcs2220 #bcs2140 #bcs #paper

The OOPSLA 1997 paper that introduced Squeak, a Smalltalk implementation “written in itself”:

Squeak is an open, highly-portable Smalltalk implementation whose virtual machine is written entirely in Smalltalk, making it easy to debug, analyze, and change. To achieve practical performance, a translator produces an equivalent C program whose performance is comparable to commercial Smalltalks.

The paper discusses the bootstrapping process, the VM’s object format and garbage collector, the Smalltalk-subset-to-C translation process, the implementations’ approach to the BitBlt graphics primitive, performance, and the fledgling Squeak community. The latter is still going strong thirty-some years later.