HackerTube
HomeLongsLikedHistoryWatch laterCategoriesPlaylistsSettings

Anders Hejlsberg on Modern Compiler Construction

Kasper4 HN recommenders · recommended in 4 months, 2018-2023
YouTube
25K views · 9 years ago · lecture · evergreen

Anders Hejlsberg whiteboards how compilers are taught versus how modern ones are actually built. He explains the shift to compilers as services with incremental, error-tolerant, IDE-oriented design, as in Roslyn and TypeScript.

It is the standard reference for why modern compilers and language servers differ from textbook designs, cited in rust-analyzer and parsing threads.

Compilers, interpreters & program analysisTech pioneers & interviewsTesting, debugging & developer tools#compilers#idetooling#roslyn#typescript#incrementalcompilation#languageservers

10 comments from Hacker News

@sarosh2023 · in “”

A (now 6 year old) discussion that might be helpful: Anders Hejlsberg on Modern Compiler Construction: ▶ this video Also link

CitesView on HN
@vector_spaces2020 · in “Advanced Compilers: Self-Guided Online Course”

I saw this great interview recently with Anders Hejlsberg at MSFT on how modern compiler construction differs from what is taught in traditional University courses. Is this what you're alluding to? After watching that interview, it's strange to read a comment like yours. While the architecture is completely different, it doesn't frankly seem like that big a leap to go from "senior engineer with X years working on thing that's tangentially related to compilers" to being able to be productive in a reasonable amount of time working with the new architecture. What am I missing? ▶ this video

RecommendsView on HN
@DylanSp2020 · in “Which Parsing Approach?”

To your first point, I've got a couple of bookmarks: - Query-based compiler architecture: link - Lezer [a parsing system used by CodeMirror]: link - Anders Hejlsberg on Modern Compiler Construction: ▶ this video

CitesView on HN
@pjmlp2020 · in “Emacs 27.1”

Anders explains it better than me, "Anders Hejlsberg on Modern Compiler Construction" ▶ this video Basically ability to see the language AST at all time, do time checking with broken code, incremental compilation, REPL and IDE editing experience is fused together. Here is another short examples, "7 minutes of Pharo Smalltalk for Rubyists" link "MountainWest RubyConf 2014 - But Really, You Should Learn Smalltalk" link

CitesView on HN
@fanf22020 · in “Don't Panic! Better, Fewer, Syntax Errors for LR Parsers”

In a query-oriented compiler, you can give it a source location and ask for type infomation, or where is the definition of the symbol at that location, and the compiler will do just enough work to give you the answer, using laziness and memoization to make it reasonably efficient. As far as I know, LISP systems don't work that way: they parse and evaluate (and maybe compile) as soon as an expression is entered, without the kind of laziness you see in a query-oriented compiler. This recent link was pretty good, I think link and this discussion with Anders Hejlsberg ▶ this video

CitesView on HN
@robocat2020 · in “Rust-analyzer – an IDE backend for Rust”

Anders Hejlsberg explains explains how “the IDE” way compiler works. First ~10 minutes is traditional compiler background. Then about ~8 minutes before he starts talking about how an IDE focused compiler works: ▶ this video

RecommendsView on HN
@atombender2020 · in “Rust Moving Towards an IDE-Friendly Compiler with Rust Analyzer”

Microsoft's Roslyn [1] design (now called .NET Compiler Platform) is what I think any language should strive for, turning the classical black box of the compiler into an incremental pipeline where each stage is annotated/augmented/refined by different mechanisms such as type checkers. If each step is incremental, it follows that it's easier to also let each step "integrate" deltas; for example, adding a comment shouldn't need to recompile anything at all, merely modify the AST, because it doesn't lead to any actual code artifacts. The second benefit is that all the information needed to inspect the program — from syntax highlighting to type information — is already there. If you can keep the entire high-level compilation state in memory, then it's easy to query it for all sorts of IDE features. This same design was used for the TypeScript compiler. Anders Heljsberg has a great little lecture [2] about it. [1] link [2] ▶ this video

RecommendsView on HN
@fanf22019 · in “Parallel GCC: a research project aiming to parallelize a real-world compiler”

There is an interview with Anders Hejlsborg ▶ this video where he talks about how the Roslyn and TypeScript compilers are designed to support IDEs, with a structure that allows the compiler’s model of the program to be incrementally updated as the code is modified. So there has been some fairly prominent work along the lines you want...

CitesView on HN
@ceronman2018 · in “Rust Analyzer in 2018 and 2019”

To better understand why this project is trying to re-implement the compiler frontend, I really recommend this video from Anders Hejlsberg (creator of C# and TypeScript) explaining how modern compiler construction oriented towards IDE works: ▶ this video

RecommendsView on HN
@wenc2018 · in “Introducing the Python Language Server”

From what I've seen (MS folks can correct me here), language services are part of a much larger effort at Microsoft led by Anders Heijsberg (Delphi, C#) called Roslyn [1], which decouples code analysis from IDEs and provides things like refactoring, autocomplete, find-all-references, Intellisense, etc. as services. This means the compiler is now an abstracted platform that editors can get services from (CompilerAndCodeAnalysis-as-a-service?). Anders talks about the motivation for doing that here [2]. It's a pretty exciting idea. This might mean I would some day be able to use Vim and get IDE-like functionality. [1] Roslyn link [2] ▶ this video

CitesView on HN
A 10x faster TypeScript13:45

A 10x faster TypeScript

Microsoft Developer
608K views • 1 year ago
TypeScript is being ported to Go | interview with Anders Hejlsberg1:01:31

TypeScript is being ported to Go | interview with Anders Hejlsberg

Michigan TypeScript
102K views • 1 year ago
Episode 1: A basic expression evaluator1:38:36

Episode 1: A basic expression evaluator

Immo Landwerth (terrajobst)
284K views • 8 years ago
Let's prototype a JavaScript JIT compiler!1:21:25

Let's prototype a JavaScript JIT compiler!

Andreas Kling
49K views • 3 years ago
Modernizing Compiler Design for Carbon Toolchain - Chandler Carruth - CppNow 20231:35:12

Modernizing Compiler Design for Carbon Toolchain - Chandler Carruth - CppNow 2023

CppNow
71K views • 3 years ago
Co-dfns Live Stream: Compiler Design and Architecture2:03:12

Co-dfns Live Stream: Compiler Design and Architecture

Aaron Hsu (arcfide)
21K views • 9 years ago
Building Your Own Dynamic Language1:14:32

Building Your Own Dynamic Language

Stanford
21K views • 18 years ago
2016 LLVM Developers’ Meeting: D. Dunbar “A New Architecture for Building Software”40:33

2016 LLVM Developers’ Meeting: D. Dunbar “A New Architecture for Building Software”

LLVM
7K views • 9 years ago
Demo: Base language, compile-time execution2:07:18

Demo: Base language, compile-time execution

Jonathan Blow
164K views • 12 years ago
JVMLS 2015 - Compilers are Databases1:08:52

JVMLS 2015 - Compilers are Databases

Java
16K views • 11 years ago
ASPLOS Keynote: The Golden Age of Compiler Design in an Era of HW/SW Co-design by Dr. Chris Lattner52:21

ASPLOS Keynote: The Golden Age of Compiler Design in an Era of HW/SW Co-design by Dr. Chris Lattner

SiFive
52K views • 5 years ago
Brian Goetz - Stewardship: the Sobering Parts1:03:31

Brian Goetz - Stewardship: the Sobering Parts

ClojureTV
39K views • 11 years ago
Nordic.js 2014 • Douglas Crockford - The Better Parts33:52

Nordic.js 2014 • Douglas Crockford - The Better Parts

Nordic.js
73K views • 12 years ago
Compiling and Optimizing Scripting Languages1:01:37

Compiling and Optimizing Scripting Languages

Google TechTalks
21K views • 17 years ago
C++Now 2018: Matt Godbolt “What Else Has My Compiler Done For Me Lately?”1:30:03

C++Now 2018: Matt Godbolt “What Else Has My Compiler Done For Me Lately?”

CppNow
11K views • 8 years ago
Compiling C to printable x86, to make an executable research paper25:41

Compiling C to printable x86, to make an executable research paper

suckerpinch
479K views • 9 years ago
Javascript in 201510:32

Javascript in 2015

Glen Maddern
58K views • 11 years ago
The Forgotten Art of Structured Programming - Kevlin Henney [C++ on Sea 2019]1:29:27

The Forgotten Art of Structured Programming - Kevlin Henney [C++ on Sea 2019]

cpponsea
245K views • 7 years ago
Brandt Bucher – A JIT Compiler for CPython47:51

Brandt Bucher – A JIT Compiler for CPython

encukou
14K views • 2 years ago
Chris Seaton @ VMSS16: JRuby+Truffle: Why it’s Important to Optimise the Tricky Parts1:02:44

Chris Seaton @ VMSS16: JRuby+Truffle: Why it’s Important to Optimise the Tricky Parts

softdevteamuk
5K views • 10 years ago