Skip to main content
CF

Programming Language with LLVM

2h 46m 4s
English
Paid

Programming Language with LLVM is a 20-lesson 2 hours 46 minutes self-paced course by Dmitry Soshnikov. Ever wondered how programming languages work under the hood?

Course facts

Lessons
20
Duration
2 hours 46 minutes
Level
All levels
Language
English
Updated
Instructor
Dmitry Soshnikov
Price
Premium

Ever wondered how programming languages work under the hood? What sets apart a compiler from an interpreter? What exactly are a virtual machine and a JIT-compiler? And how do functional and imperative programming differ?

Understanding Programming Languages and Compilers

The journey of implementing a programming language is filled with numerous questions and challenges. Unfortunately, traditional "compiler classes" in educational settings often present these concepts as "hardcore rocket science", targeted only at advanced engineers.

Many classic compiler books dive into the technicalities like Lexical analysis and formal grammars right from the start. As a result, students often lose interest before they even begin implementing a programming language, spending whole semesters on tokenizers and BNF grammars without truly grasping the semantics of programming languages.

I believe we can understand and build a full programming language's semantics, end-to-end, within 4-6 hours. This course offers focused content, using live coding sessions in pair-programming, all described in an easy-to-understand manner.

Course Focus: Programming Language with LLVM

In this Programming Language with LLVM class, the focus is on compiling languages into LLVM IR, creating a lower-level programming language. By working directly with the LLVM compiler infrastructure, you'll gain an understanding of how modern languages like C++ and Rust operate at a lower-level.

Building a programming language will elevate your proficiency in numerous other programming languages, making your skills more professional.

Prerequisites

There are three prerequisites for this class.

The Programming Language with LLVM course is an extension of previous classes including Building an Interpreter from Scratch (also known as Essentials of Interpretation) and Building a Virtual Machine. If you're not already familiar with how programming languages function at this level—in terms of eval, closure, scope chain, environments, and other constructs—you should take the interpreters class first.

Furthermore, to delve into the lower (bitcode/IR) level where production languages reside, basic C++ experience is necessary. However, this class is not about C++ itself; we utilize fundamental C++ constructs that are easily transferable to other languages.

Target Audience

This class is designed for curious engineers eager to acquire skills in building complex systems, such as programming languages, which is an advanced engineering task. The knowledge acquired is transferable to other complex system builds as well.

If you are particularly interested in LLVM, its compiler infrastructure, and the process of creating your own language, this course is also suitable for you.

Implementation Tools

Low-level compilers often focus on performance, so they're typically implemented in languages like C or C++. In this course, we utilize basic C++ features to ensure the code is easily convertible and portable to other languages like Rust or even higher-level ones like Python. Using C++ simplifies the implementation of further JIT-compilers.

Note: Our objective is for students to understand and implement every detail of the LLVM compiler independently, rather than copying from solutions. While full source code is shared in video lectures, the project repository contains /* Implement here */ assignments that students need to complete.

Who teaches Programming Language with LLVM? 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.

What lessons are included in Programming Language with LLVM?

This is a demo lesson (10:00 remaining)

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

View Pricing
0:00
/
#1: Introduction to LLVM IR and tools
All Course Lessons (20)
#Lesson TitleDurationAccess
1
Introduction to LLVM IR and tools Demo
13:34
2
LLVM program structure | Module
06:18
3
Basic numbers | Main function
10:21
4
Strings | Printf operator
06:44
5
Parsing: S-expression to AST
10:24
6
Symbols | Global variables
06:40
7
Blocks | Environments
10:00
8
Local variables | Stack allocation
10:51
9
Binary expressions | Comparison operators
04:16
10
Control flow: If expressions | While loops
10:42
11
Function declarations | Call expression
06:25
12
Introduction to Classes | Struct types
09:29
13
Compiling Classes
08:51
14
Instances | Heap allocation
10:05
15
Property access
05:16
16
Class Inheritance | vTable
09:00
17
Methods application
07:29
18
Functors – callable objects
04:42
19
Closures, Cells, and Lambda expressions
08:04
20
Final executable | Next steps
06:53
Unlock unlimited learning

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

Learn more about subscription

What courses are similar to Programming Language with LLVM?

Frequently asked questions

What are the prerequisites for enrolling in this course?
The course is designed for learners with a basic understanding of programming concepts. Familiarity with programming languages like C++ or Rust is beneficial, as the course involves compiling languages into LLVM IR. Prior experience with compilers or interpreters is not necessary, but knowledge of programming language semantics will be helpful.
What specific projects or exercises will I work on during the course?
During the course, you will engage in live coding sessions to build a programming language from scratch. Key projects include creating and compiling classes, handling control flow with if expressions and while loops, and implementing closures and lambda expressions. The course culminates in producing a final executable, applying the concepts learned throughout the lessons.
Who is the target audience for this course?
This course is aimed at learners interested in understanding the internals of programming languages and how compilers work. It is suitable for software developers, computer science students, and anyone curious about language design and implementation, especially those who find traditional compiler classes too technical or overwhelming.
How does the depth and scope of this course compare to other compiler courses?
Unlike traditional compiler courses that focus heavily on technicalities like lexical analysis and formal grammars, this course offers a more approachable introduction to programming language implementation. It emphasizes practical understanding through live coding and pair-programming, covering the full semantics of a programming language within 4-6 hours.
What specific tools and platforms will I learn to use in this course?
The course centers on utilizing the LLVM compiler infrastructure to compile languages into LLVM IR. You will learn about LLVM tools and concepts such as program structure, module, stack and heap allocation, and class inheritance using vTables. These tools are essential for understanding how modern languages operate at a lower level.
What topics are not covered in this course?
The course does not delve into the extensive study of lexical analysis or BNF grammars, which are commonly covered in traditional compiler courses. It also does not focus on high-level language syntax or advanced compiler optimizations, instead prioritizing a hands-on approach to understanding language semantics and LLVM IR.
How can the skills learned in this course be applied to other areas or careers?
The skills acquired in this course provide a foundational understanding of how programming languages work, which is valuable for careers in software development, language design, and systems programming. Knowledge of LLVM IR and compiler infrastructure is particularly useful for roles that require performance optimization and low-level programming expertise.