Forge: A Tiny Calculator Language
Turn text like '3 4 + 5 *' into real answers by building your own interpreter. By the end the word parsing will never feel like magic again.
What you'll be able to build
Turn text like '3 4 + 5 *' into real answers by building your own interpreter. By the end the word parsing will never feel like magic again. Along the way you pick up real, transferable Ruby skills, not just this one project:
- tokenization by splitting input
- an Array as a stack (push and pop)
- a dispatch table of lambdas
- a Hash of operators to procs
- error handling for bad input
- writing and running test cases
A course like this one
Yours is built from your own placement, so module count and depth will differ. This map shows what a advanced-level Ruby learner building Forge actually gets.
- Module 1: Idiomatic Ruby: symbols, ranges, and string methods5 lessons
Builds the production-ready version of the script for your forge.
- Module 2: Blocks, procs, lambdas, and yield5 lessons
Builds the production-ready version of the reusable class for your forge.
- Module 3: Mixins, duck typing, and Comparable/Enumerable5 lessons
Builds the production-ready version of the collection pipeline for your forge.
- Module 4: Enumerable mastery: map/reduce/group_by/each_with_object5 lessons
Builds the production-ready version of the module workflow for your forge.
- Module 5: Truthiness, case/when, and the safe-navigation operator5 lessons
Builds the production-ready version of the method that powers your forge.
- Module 6: Error contracts, dependency-free packaging, documented output3 lessons
Builds the production-ready version of the command-line tool for your forge.
How the lessons actually work
Every lesson has you predict what a piece of Ruby 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 Forge, and a runnable proof page tied to your own code.
Common questions
How long does the Forge: A Tiny Calculator Language 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?
Yes. This is an advanced-tier Ruby project, so it assumes you're already comfortable writing and reading Ruby before you start.
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.