FAWK: LLMs can write a language interpreter
2 days ago
- #AWK
- #LLM
- #Functional Programming
- The author attempted to use AWK for Advent of Code but found it lacking in functional programming features.
- They struggled with implementing functional approaches in AWK, such as hashing, serialization, and immutable data structures.
- The author envisioned a more modern, functional version of AWK with features like first-class arrays, lexical scope, and pipelines.
- They used an LLM (Sonnet 4.5) to create a new language called FAWK, which implements these features in Python.
- The LLM successfully implemented complex features like lexical scoping, multi-dimensional arrays, and print statement redirection.
- The author reflects on the implications of using LLMs for coding, including the trade-off between speed and familiarity with the codebase.
- FAWK is now available on GitHub for experimental use, though performance and usability remain open questions.