Skip to main content
CourseFlix

Building an Interpreter from scratch

2h 59m 53s
English
Paid

Understand the fundamentals of programming languages and dive deep into how they operate beneath the surface. Explore the distinctions between compilers and interpreters, learn about virtual machines and JIT-compilers, and comprehend the differences between functional and imperative programming. Many questions surface when implementing a programming language, and traditional "compiler classes" often present them as complex, advanced topics — something only for expert engineers.

Course Description

Traditional compiler textbooks often start with less engaging topics like Lexical Analysis and delve into theoretical aspects of formal grammars. By the time students implement their first Tokenizer module, they may lose interest without having the chance to create a full programming language. This course takes a different approach, focusing on building a comprehensive understanding of programming language semantics in just 4-6 hours using a practical, live coding session format.

In the Essentials of Interpretations class, we concentrate specifically on runtime semantics and create an interpreter for a language similar to JavaScript or Python. By implementing a programming language, you'll enhance your understanding and application of other programming languages.

Who is this class for?

This class suits curious engineers eager to learn about building complex systems, such as programming languages. If you're interested in compilers, interpreters, and source code transformation tools, this course is for you. The only prerequisite is a basic understanding of data structures and algorithms — trees, lists, and traversal.

Tools and Implementation

We implement a language with semantics akin to JavaScript or Python, using JavaScript for its versatile, multi-paradigm structure, suitable for this endeavor. While JavaScript is prevalent and easy to pick up, the code from this course is transferable to TypeScript, Python, Java, C++, Rust, and many more languages.

Course Highlights

  • Concise and to the point lectures. Self-contained and focused on relevant topics without digressing into unrelated discussions.
  • Animated presentations and live-editing notes. Enhance comprehension and demonstrate the interconnectedness of object structures, more effectively than static slides.
  • Comprehensive live coding sessions. From the basics to the final implementation, experience coding through assignments and complete resources provided in the class.

Course Structure and Content

The course consists of four parts, spanning 18 lectures with various sub-topics. Refer to the curriculum for detailed descriptions of each lecture.

Part 1: Compilers Crash Course

This section explores various compilation and interpretation pipelines, comparing JIT-compilers with AOT-compilers, and discussing Virtual machines, Bytecode-interpreters, AST-interpreters, and examples of native code and LLVM IR.

Part 2: Interpreters - Basic Expressions and Variables

Begin building the programming language by handling basic expressions like numbers and strings, understanding variables, scopes, lexical environments, control structures, and parser generators.

Part 3: Functions and Functional Programming

Explore and implement function abstractions and calls, understanding closures, lambda functions, and IILEs. This section also covers the Call-stack, recursion, and syntactic sugar.

Part 4: Object-Oriented Programming

Focus on incorporating object-oriented support in our language, discussing class-based and prototype-based approaches, and implementing concepts like classes, instances, and modules.

Course Requirements

  • Basic understanding of data structures and algorithms
  • Familiarity with graphs, trees, and traversal

Who Should Enroll?

  • Engineers curious about the inner workings of programming languages

What You'll Learn

  • Build a programming language from scratch
  • Understand Interpreters and Compilers
  • Differentiate AOT, JIT-compilers and Transpilers
  • Work with AST-interpreters and Virtual Machines
  • Explore Bytecode, LLVM, and Stack-machines
  • Master First-class functions, Lambdas, and Closures
  • Understand the Call-stack and Activation Records
  • Implement OOP: Classes, Instances, and Prototypes
  • Create Modules and Abstractions

About the Authors

Dmitry Soshnikov

Dmitry Soshnikov thumbnail

Dmitry Soshnikov is a Russian software engineer and educator focused on programming-language internals, compiler construction, JavaScript engine architecture, and the theoretical computer-science foundations underneath modern software development. His independent course catalog is one of the deepest sources of long-form material on language implementation available outside university CS programs.

His CourseFlix listing carries nine courses spanning parser combinators, interpreter construction, garbage-collection algorithm internals, the design of pattern-matching engines, and JavaScript object-model deep dives. Material is paid and aimed at engineers who want to understand how the languages they use every day actually work under the hood.

Udemy

Udemy thumbnail

Udemy is the largest open marketplace for online courses on the internet. Founded in 2010 by Eren Bali, Oktay Caglar, and Gagan Biyani and headquartered in San Francisco, the company went public on the Nasdaq in 2021 under the ticker UDMY. The platform hosts well over two hundred thousand courses across software development, IT and cloud, data science, design, business, marketing, and creative skills, taught by tens of thousands of independent instructors. Roughly seventy million learners use it worldwide, and the corporate arm — Udemy Business — supplies a curated subset of that catalog to enterprise customers.

Because Udemy is a marketplace rather than a single editorial publisher, the catalog is uneven by design. The strongest material lives in the long-form, project-based courses authored by working engineers — full-stack JavaScript, React, Node.js, Python data science, AWS, Docker and Kubernetes, mobile development with Flutter and React Native, and cloud certification preparation. The CourseFlix listing under this source is the slice of that catalog that has been mirrored here for offline-friendly viewing, organized by topic and updated as new releases land. Pricing on Udemy itself swings dramatically with the site's near-permanent sales, which is why the platform is best treated as a deep reference catalog: pick instructors with strong reviews and a track record of updating their material rather than buying on the headline price alone.

Watch Online 18 lessons

This is a demo lesson (10:00 remaining)

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

View Pricing
0:00
/
#1: Parsers, ASTs, Interpreters and Compilers
All Course Lessons (18)
#Lesson TitleDurationAccess
1
Parsers, ASTs, Interpreters and Compilers Demo
12:08
2
AST Interpreters and Virtual Machines
12:02
3
Compilers: AOT, JIT, Transpiler
12:19
4
Eva programming language
11:12
5
Self-evaluating expressions
07:03
6
Variables and Environments
13:07
7
Blocks: expression groups and Nested Scopes
11:56
8
Control flow: If and While expressions
06:09
9
Back to parsers: S-expression to AST
09:44
10
Built-in and Native functions
06:54
11
User-defined functions, Activation Records and Closures
13:57
12
Lambda functions and Functional programming
06:33
13
Call-stack and Recursive calls
09:37
14
Syntactic sugar: Switch, For, Inc, Dec operators
08:56
15
Object-oriented Eva: Classes
10:50
16
Class inheritance and Super calls
04:24
17
Code isolation: Modules and Imports
09:35
18
Final executable and specification
13:27
Unlock unlimited learning

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

Learn more about subscription

Course content

18 lessons · 2h 59m 53s
Show all 18 lessons
  1. 1 Parsers, ASTs, Interpreters and Compilers 12:08
  2. 2 AST Interpreters and Virtual Machines 12:02
  3. 3 Compilers: AOT, JIT, Transpiler 12:19
  4. 4 Eva programming language 11:12
  5. 5 Self-evaluating expressions 07:03
  6. 6 Variables and Environments 13:07
  7. 7 Blocks: expression groups and Nested Scopes 11:56
  8. 8 Control flow: If and While expressions 06:09
  9. 9 Back to parsers: S-expression to AST 09:44
  10. 10 Built-in and Native functions 06:54
  11. 11 User-defined functions, Activation Records and Closures 13:57
  12. 12 Lambda functions and Functional programming 06:33
  13. 13 Call-stack and Recursive calls 09:37
  14. 14 Syntactic sugar: Switch, For, Inc, Dec operators 08:56
  15. 15 Object-oriented Eva: Classes 10:50
  16. 16 Class inheritance and Super calls 04:24
  17. 17 Code isolation: Modules and Imports 09:35
  18. 18 Final executable and specification 13:27

Related courses

  • Building a Virtual Machine for Programming Language thumbnail

    Building a Virtual Machine for Programming Language

    By: Udemy, Dmitry Soshnikov
    Building a Virtual Machine for a Programming Language — design a stack-based VM, bytecode compiler, and runtime in plain code.
    4 hours 27 minutes 8 seconds
  • Automata Theory: inside a RegExp machine thumbnail

    Automata Theory: inside a RegExp machine

    By: Dmitry Soshnikov
    State machines — the fundamental concept used today in many practical applications, starting from UI programming like React, automated reply systems, lexical an
    1 hour 48 minutes 5 seconds 5 / 5
  • Building a Transpiler from scratch thumbnail

    Building a Transpiler from scratch

    By: Dmitry Soshnikov
    In modern implementations of compilers, it has become popular to transform one high-level language into another.
    2 hours 3 seconds

Frequently asked questions

What is Building an Interpreter from scratch about?
Understand the fundamentals of programming languages and dive deep into how they operate beneath the surface. Explore the distinctions between compilers and interpreters, learn about virtual machines and JIT-compilers, and comprehend the…
Who teaches Building an Interpreter from scratch?
Building an Interpreter from scratch is taught by Dmitry Soshnikov, Udemy. You can find more courses by these instructors on the corresponding source pages.
How long is Building an Interpreter from scratch?
Building an Interpreter from scratch contains 18 lessons with a total runtime of 2 hours 59 minutes. All lessons are available to watch online at your own pace.
Is Building an Interpreter from scratch free to watch?
Building an Interpreter from scratch is part of CourseFlix's premium catalog. A CourseFlix subscription unlocks the full video player; the course description, table of contents, and preview information are available to everyone.
Where can I watch Building an Interpreter from scratch online?
Building an Interpreter from scratch is available to watch online on CourseFlix at https://courseflix.net/course/building-an-interpreter-from-scratch. The page hosts every lesson with the integrated video player; no download is required.