Discovering Functional Programming Preferences While Implementing Advent of Code in AWK
By
todsacerdoti
Hot, fresh, and worth queueing round the block for.
Summary
The author shares their experience implementing an Advent of Code problem in AWK and discovering their preference for functional programming paradigms. They discuss the limitations of AWK compared to modern functional programming languages, particularly around immutability, lexical scope, and returning arrays from functions. The article explores the author's realization about being 'FP-pilled' (addicted to functional programming concepts) and reflects on programming language design choices.
Key quotes
· 3 pulledI found I'm FP-pilled. I knew I'm addicted to the combination of algebraic data types (tagged unions) and exhaustive pattern matching, but what got me this time was immutability, lexical scope and the basic human right of being allowed to return arrays from functions.
After reading the book The AWK Programming Language (recommended!), I was planning to try AWK out on this year's Advent of Code.
Having some time off from work this week, I tried to implement one of the problems in it to get some practice, set up my tooling, see how hard AWK would be...
You might also wanna read
Loon: A Modern LISP with Invisible Types, Algebraic Effects, and Ownership Without Annotations
Loon is a modern functional programming language based on LISP that features invisible type inference (Hindley-Milner), safe ownership seman
Implementing Profunctor Equipment in Haskell: A Toy Implementation for Programmers
The article discusses a toy implementation of profunctor equipment in Haskell, building on previous work. The author aims to make the concep
bartoszmilewski.com·15d agoOCaml-based CCSDS protocol stack successfully deployed in low Earth orbit
A pure-OCaml CCSDS protocol stack (codename Borealis) successfully booted in low Earth orbit on 23 April, running inside DPhi Space's Cluste
Rust is not for every project: A critical look at the hype behind Amazon, Cloudflare, and Discord's adoption
The article critically examines the hype around Rust programming language, arguing that while Rust has strengths in safety and performance,
A Grounded Conceptual Model for Ownership Types in Rust Programming
This article presents a grounded conceptual model for ownership types in Rust, the programming language known for memory safety without garb
Dynamic Borrow-Checking in a Toy Programming Language: Implementing Rust-like Memory Safety Without Static Types
This article presents a demonstration of a toy programming language that implements borrow-checking without static type-checking. The langua
