u/killercupin r/rust • Recommends
On “Compile-time Brainfuck evaluation using macros”
Also just released on Youtube: RustFest Zürich 2017 - Impractical Macros by Alex Burka
#macros#brainfuck#compile-timeevaluation
70K subscribers • 72 videos on Hallway • Conference channel
Advanced. Deep dive for people who know the field.
1.4K views8 years ago2 recommendations
Programming languagesRustCompilers and interpreters
Alex Burka demonstrates a macro that interprets the Brainfuck programming language completely at compile time in Rust.
A whirlwind tour through a (macro_rules 1.0!) macro that interprets everyone’s favorite Turing tarpit, Brainfuck, completely at compile time. I’ll highlight various components such as number encoding, arithmetic, input/output and explain how they work. This is not a macro tutorial. I’ll cover a few techniques that you might possibly be able to use in real code, such as how to set up a recursive macro with an accumulator, but I’ll be breezing through them to get to the fun stuff, like memory zippers and “Zermelo numbers” (a term I may have invented). About Alex Burka: Alex is a robotics graduate student at the University of Pennsylvania. He got into Rust by writing his research software (a hardware controller and web interface for a sensor suite), and continues to spend too much of his free time writing macros.What people say. Recommended as a fun and educational reference for advanced Rust macro techniques.
u/killercupin r/rust • Recommends
On “Compile-time Brainfuck evaluation using macros”
u/__fmease__in r/rust • Recommends
On “What's everyone working on this week (11/2019)?”