In modern implementations of compilers, it has become popular to transform one high-level language into another. Examples include transpiling new versions of JavaScript into older ones or converting TypeScript into JavaScript. Such compilers are called transpilers, and this course is dedicated to them.
Building a Transpiler from scratch
Building a Transpiler from scratch is a 18-lesson 2 hours self-paced course by Dmitry Soshnikov. In modern implementations of compilers, it has become popular to transform one high-level language into another.
Course facts
- Lessons
- 18
- Duration
- 2 hours
- Level
- All levels
- Language
- English
- Updated
- Instructor
- Dmitry Soshnikov
- Price
- Premium
Why are transpilers important?
Transpilers allow the use of existing runtime environments (such as JavaScript engines) while avoiding dealing with low-level details such as memory management or bytecode. This is a practical and efficient approach to learning compilers, especially if you want to create your own programming language.
Unlike traditional books on compilers that focus on theoretical aspects (grammars, parsing, etc.), this course offers a practical guide to creating a full-fledged transpiler in 2-4 hours. We will develop it in a live coding format, step by step, with clear explanations.
What will you learn?
We will focus on transpiling a high-level concurrent programming language with message-passing processes into JavaScript. Besides transpiling, you will understand how concurrent functional languages (such as Erlang) and even operating systems with processes and threads work.
Developing a transpiler will improve your programming skills as it involves data structures, algorithms, and architectural decisions.
Course prerequisites
It is optionally recommended to take the course "Building an Interpreter from Scratch", where we create an AST interpreter. If you already understand concepts such as eval, closures, scopes, environments, you can start this course directly.
Who is this course for?
- For engineers who want to master the creation of complex systems and acquire transferable knowledge
- For those interested in compilers, programming languages, and type theory
- For developers who want to create their own programming language
What technologies are used?
We will write the transpiler in JavaScript and compile code into JavaScript. This choice makes the course accessible to a wide range of developers and allows the code to be adapted to other languages (TypeScript, Rust, OCaml, C++, Python, etc.).
Important! This course is focused on active learning. We do not just provide the final code - you will need to implement key parts of the transpiler yourself in specially prepared exercises.
Course format
- Clear and structured lectures - without distractions and unnecessary theoretical digressions
- Animated presentations + live notes - to visually explain complex topics
- Live coding with step-by-step assignments - from an empty project to a full-fledged transpiler
Additional
Who teaches Building a Transpiler from scratch? Dmitry Soshnikov
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.
What lessons are included in Building a Transpiler from scratch?
| # | Lesson Title | Duration | Access |
|---|---|---|---|
| 1 | Lecture 1: Transpiler overview | Numbers Demo | 12:04 | |
| 2 | Lecture 2: Strings | Blocks and Statements | 07:28 | |
| 3 | Lecture 3: Parsing: S-expression to AST | 05:59 | |
| 4 | Lecture 4: Variable declaration and lookup | 05:17 | |
| 5 | Lecture 5: Function calls | Runtime | 04:21 | |
| 6 | Lecture 6: Binary and Unary expressions | 05:29 | |
| 7 | Lecture 7: Control flow: If statement | While loops | 03:12 | |
| 8 | Lecture 8: Function declarations | Return statement | 05:14 | |
| 9 | Lecture 9: Primer on generators | 08:40 | |
| 10 | Lecture 10: Process | Scheduler class | 05:08 | |
| 11 | Lecture 11: Spawning processes | JS Transform | 07:48 | |
| 12 | Lecture 12: Records and Lists | 07:00 | |
| 13 | Lecture 13: Pattern matching | Decomposition | 11:42 | |
| 14 | Lecture 14: Pattern matching statement | 05:23 | |
| 15 | Lecture 15: Awaiting messages | Process mailbox | 05:41 | |
| 16 | Lecture 16: Receive statement | Recursive calls | 05:18 | |
| 17 | Lecture 17: Using compiled code from Web | 08:35 | |
| 18 | Lecture 18: Final executable | Next steps | 05:44 |
Get instant access to all 17 lessons in this course, plus thousands of other premium courses. One subscription, unlimited knowledge.
Learn more about subscriptionWhat courses are similar to Building a Transpiler from scratch?
-
Updated 1y agoProgramming Language with LLVM
By: Dmitry SoshnikovProgramming Language with LLVM — implement a compiler that emits native code via LLVM IR. Master codegen, optimisation passes, and JIT.2h 46m5/5 -
Updated 2mo agoWrite a Compiler
By: David BeazleyUnlock the Complexity of Software Development by Writing a Compiler . The course on compiler development is traditionally considered a capstone discipline.35h 41m -
Updated 1y agoAutomata Theory: inside a RegExp machine
By: Dmitry SoshnikovState machines — the fundamental concept used today in many practical applications, starting from UI programming like React, automated reply systems, lexical an1h 48m5/5