Build a Calculator That Thinks in Stacks
Write a tiny language: a calculator that evaluates '3 4 + 2 *' off a stack. The gateway drug to understanding how every interpreter works.
What you'll be able to build
Write a tiny language: a calculator that evaluates '3 4 + 2 *' off a stack. The gateway drug to understanding how every interpreter works. Along the way you pick up real, transferable R skills, not just this one project:
- building a stack with vectors (c(), indexing, slicing)
- for-loops over tokens
- membership tests (%in%)
- switch() for dispatch
- as.numeric coercion
- designing a function that consumes a token stream
A course like this one
Yours is built from your own placement, so module count and depth will differ. This map shows what a intermediate-level R learner building Build a Calculator That Thinks in Stacks actually gets.
- Module 1: Vectors, values, and the shape of R5 lessons
Builds the vector for your build a calculator that thinks in stacks.
- Module 2: Data frames, factors, and tidy shapes5 lessons
Builds the apply pipeline workflow for your build a calculator that thinks in stacks.
- Module 3: Control flow and predicting vectorized output5 lessons
Builds the data frame that powers your build a calculator that thinks in stacks.
- Module 4: Functions, the apply family, and debugging5 lessons
Builds the reusable factor for your build a calculator that thinks in stacks.
- Module 5: Designing a statistical pipeline5 lessons
Builds the simulation for your build a calculator that thinks in stacks.
- Module 6: Shipping a reproducible analysis3 lessons
Builds the summary table for your build a calculator that thinks in stacks.
How the lessons actually work
Every lesson has you predict what a piece of R code will output before you run it, then run it for real in your browser and fix what you got wrong. Each module ends in a challenge gate with hidden tests, so you can't advance until your code actually works. The course closes with a capstone that assembles everything into Build a Calculator That Thinks in Stacks, and a runnable proof page tied to your own code.
Common questions
How long does the Build a Calculator That Thinks in Stacks course take?
about 7 hours, across 6 modules and 28 lessons, at roughly 15 minutes per lesson. Your own course may run shorter or longer, since it's sized to your placement result, not a fixed template.
Do I need experience?
Some. This is an intermediate-tier R project, so it assumes you're comfortable with R basics and pushes past them.
How much does it cost?
$15 one-time, no subscription. The first module is free, so you can see exactly how the course teaches before you pay for the rest.
No subscription. Module one is free.