Skip to main content

Crusty Interpreter

33h 53m 10s
English
Paid

Course description

Course Description. In brief: you are challenged to implement an interpreter for a programming language unfamiliar to you (Lox) using a language you may also not have worked with (Rust), based on a book written in a language many once knew (Java).

Read more about the course

General Overview

Sometimes at university, there were courses where the instructor would give out a modest assignment like "design the architecture of a processor's instruction set," "implement a Unix shell from scratch," or "solve the Dirac equation" on the very first day. Some students would try to run away, while others would smile as if to say, "go ahead, give it a try." This course falls into that same category.

Starting from scratch, you will dive into Robert Nystrom's book "Crafting Interpreters" and be tasked with implementing a lexer and a recursive descent parser — and this will be your first experience with Rust. The difficulty only escalates from there.

Target Audience

The course is designed for experienced developers who want to enhance their skills by working on a meaningful and intensive project using a modern programming language. Perhaps you recognize yourself in one of these descriptions:

  • You have written a bit in Rust and want to move beyond simple examples by tackling a project with multiple components.
  • You have never worked with Rust, but you are curious. You have experience creating interpreters or compilers, and you are confident you can dive into deep waters.
  • You have never written in Rust or worked on interpreters at all, but you have a whole week, no other commitments, and the desire to take on a serious challenge.

The course is truly challenging, like a marathon: during the process, you'll find yourself thinking "what have I gotten myself into?" but finishing will bring genuine satisfaction.

Learning Format

This is a week-long project-intensive course. Each morning begins with discussions on topics related to programming language design and their implementation in Rust. Most of the time is dedicated to independent code work. Throughout the day, there will be short sessions to address problems and share experiences.

Prerequisites

Confidence in basic programming language concepts is required: expressions, operators, variables, control flow, functions, and classes. Experience in implementing an interpreter in any language is useful but not mandatory. Knowledge of Rust is not assumed, but you must be ready for a very fast-paced learning experience. Rust is a challenging language, so expect a lot of trial and error initially.

Curriculum

The main goal is to cover the first ten chapters of the book "Crafting Interpreters," creating an AST-walking interpreter for the Lox language. Key aspects of programming language implementation will be studied in the process:

  • Scanning and lexical analysis.
  • Parsing using recursive descent.
  • Program representation and AST construction.
  • Program execution.
  • Variables, scope, and environment.
  • Control structures (if, while, for).
  • Functions, including higher-order functions and closures.

Simultaneously, you'll get acquainted with important aspects of Rust development:

  • Project organization across multiple modules.
  • Working with strings.
  • Error handling and using Option/Result.
  • Testing.
  • Algebraic data types (struct, enum).
  • Recursive structures (trees, lists).
  • Pattern matching.
  • Ownership and borrowing rules.
  • Interior mutability.

The book provides all necessary code snippets, but they are written in Java and often use idioms that do not have direct analogs in Rust. A significant part of the challenge lies in understanding the concept and implementing it correctly. This, however, makes course discussions particularly productive.

Watch Online

This is a demo lesson (10:00 remaining)

You can watch up to 10 minutes for free. Subscribe to unlock all 11 lessons in this course and access 10,000+ hours of premium content across all courses.

View Pricing
0:00
/
#1: 001 Day 1 Morning

All Course Lessons (11)

#Lesson TitleDurationAccess
1
001 Day 1 Morning Demo
03:31:34
2
002 Day 1 Afternoon
03:23:52
3
003 Day 2 Morning
01:27:36
4
004 Day 2 Late-Morning
01:51:41
5
005 Day 2 Afternoon
03:21:43
6
006 Day 3 Morning
03:34:18
7
007 Day 3 Afternoon
03:25:26
8
008 Day 4 Morning
03:17:33
9
009 Day 4 Afternoon
03:34:20
10
010 Day 5 Morning
03:39:56
11
011 Day 5 Afternoon
02:45:11

Unlock unlimited learning

Get instant access to all 10 lessons in this course, plus thousands of other premium courses. One subscription, unlimited knowledge.

Learn more about subscription

Comments

0 comments

Want to join the conversation?

Sign in to comment

Similar courses

Ultimate Rust Crash Course

Ultimate Rust Crash Course

Sources: ardanlabs.com
Learn the basics of Rust, gain practical skills for writing safe and fast code. The course is suitable for both beginners and experienced programmers.
2 hours 26 minutes 32 seconds
Learn Rust in a Month of Lunches

Learn Rust in a Month of Lunches

Sources: Dave MacLeod
"Learn Rust in a Month of Lunches" - just one month and one hour a day to start writing code in Rust! This book teaches you to write ultra-fast and safe code...
Rust for Beginners

Rust for Beginners

Sources: zerotomastery.io
Do you want to try Rust but don't know where to start? This course will be your starting point. Whether you have programming experience or not...
3 hours 18 minutes 19 seconds
Ultimate Rust Best Practices

Ultimate Rust Best Practices

Sources: ardanlabs.com
This course covers many best practices to help you with integrate Rust into your workflow, and let Rust’s tooling work for you. It includes formatting, linting, dependencies, vu...
1 hour 39 minutes 25 seconds
Rust Programming: The Complete Developer's Guide

Rust Programming: The Complete Developer's Guide

Sources: zerotomastery.io
Learn the Rust programming language from scratch! Learn how to code & build real-world applications using Rust so that you can get hired and be recognized as a
25 hours 37 minutes 12 seconds