0:00 / 0:00
MicroHs, a tiny Haskell Compiler – Lennart Augustsson (Language Pioneer & Compiler Expert)
OST – Ostschweizer Fachhochschule
3.4K subscribers • 9 videos on Hallway
- Recommended by 1 person: 1 on Lobsters.
- Presented by Lennart Augustsson, compiler expert
Advanced. Deep dive for people who know the field.
2.2K views1 year ago1 recommendation
Programming languagesSystems programmingCompilers and interpretersHaskellLanguage design and type systems
Lennart Augustsson presents MicroHs, a lightweight Haskell compiler that translates code into combinators executed by a portable C runtime.
In this engaging and technically rich talk, Lennart Augustsson presents his project microHs – an extremely lightweight Haskell compiler developed both as a fun experiment and a deep dive into functional programming. Augustsson, known for having written several Haskell compilers and for his award-winning entries in the International Obfuscated C Code Contest, demonstrates the installation, usage, and unique features of MicroHs live. He explains how the compiler translates Haskell code into combinators, which are then executed using a runtime system based in combinators written in C. The result is a tiny, portable binary – even suitable for microcontrollers. About Lennart Augustsson Lennart Augustsson is a longtime contributor to the field of programming languages, known especially for his early Haskell implementations and for designing the dependently-typed language Cayenne. He has worked at the intersection of theory and systems in both academic and industrial settings and continues to shape the way we think about functional programming today. Lennart Augustsson was introduced by Farhad Mehta. 🧠 Talk Highlights (Chapters): · Introducing Lennart Augustsson · What is microHs? A small Haskell compiler · Live installation demo · Interactive mode and math with complex numbers · Compiling and running Haskell programs · Comparing binary sizes: microHs vs. GHC · Cross-compilation & WebAssembly support · Why build another Haskell compiler? · Combinator-based compilation (Turner-style) · Running on bare metal and microcontrollers · microHs vs. GHC: Speed and binary size · Implemented language extensions · Limitations: No Template Haskell, some concurrency · microCabal: Building packages without full Cabal · Compiler architecture overview · Serialization and caching · Church & Scott encoding of data types · Overview of SKI combinators · Optimization rules and combinator reduction · Self-optimizing properties of combinators · Specialization and dictionary elimination · The C runtime and performance: ~3ns per reduction · Garbage collection: bitmap-based strategy · Compilation statistics: combinators, GC, runtime · Serialization formats and portability · Running microHs on microcontrollers (Morse demo) · Community contributions & thanks · Audience Q&A: Hardware execution, performance, IO, etc. With humor and deep technical insight, Augustsson shares his experience, including notes on Unicode support and community contributions. One particularly impressive demo: microHs running on a microcontroller, blinking in Morse code – of course written in Haskell. 🔧 A must-watch for anyone interested in compiler design, functional programming, or software minimalism! #Haskell #CompilerDesign #FunctionalProgrammingWhy it's here
1 person recommends thisWhat people say. Recommended as an insightful look into building a lightweight Haskell compiler using combinators.