The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My work

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,822 other followers

Anders Hejlsberg on Modern Compiler Construction | Seth Juarez | Channel 9

Posted by jpluimers on 2017/05/18

One of those “must watch” videos if you are remotely or more interested in how compilers influence our day to day coding activities.

The Red Dragon Book, first edition: Compilers. Principles, Techniques and Tools.

The Red Dragon Book, first edition: Compilers. Principles, Techniques and Tools.

It starts out with referring to the Dragon Book (well, actually the first edition of the Red Dragon Book, as there are three) describing the compilers as having front-ends consisting of a Lexer, Parser and Type Checker and back-ends consisting of Code Generator and Emitter. A full compilation is going through all five stages and there is an increasing cost using these traditional stages when going from syntax highlighting via collapsible regions to red squiggles and code completion will need to go further along those stages taking an increasing time – like seconds or even longer – whereas the user experience requires responses in ~ 100 milliseconds where his code might not even compile in the first place.

Then Anders goes on describing Roslyn, TypeScript and Compiler API JSON interfaces to them so you can run them as a service and keep compiler state, rebuilding just enough of the state on source code changes. He goes on talking about how Visual Studio, Visual Studio Code, Command-Line Compiler, Sublime Text and other tools (can) use these APIs to interact with the compiler so it keeps state of slowly evolving code of which the tools than can emit what they need.

Anders explains this much better and much more visually than I do: so it’s a highly recommended video.

From the introduction Source: Anders Hejlsberg on Modern Compiler Construction | Seth Juarez | Channel 9:

… I happened to have a chat with the great Anders Hejlsberg about compilers (yeah, it was pretty cool). One thing he mentioned (in passing I might add) was that there is a huge gap between the way compilers are taught in school and the way compilers are implemented nowadays. I mentioned (again in passing) that we should do a whiteboard on the the topic for Channel 9. He agreed!

In this video Anders a great foundation of compiler construction by describing the traditional methodologies that have been used in the last 30 or so years. He then uses that foundation to describe modern tooling needs and how compilers have adapted to meet increasing demands…

Via Warren Postma posting:

Great talk by the father of Delphi, on compiler construction techniques and the modern unified single-grammar compiler and code-completion technologies in today’s roslyn C# and typescript (typed javascript) technologies.

https://channel9.msdn.com/Blogs/Seth-Juarez/Anders-Hejlsberg-on-Modern-Compiler-Construction

–jeroen

2 Responses to “Anders Hejlsberg on Modern Compiler Construction | Seth Juarez | Channel 9”

  1. sglienke said

    I cringed when he mentioned the implementing everything twice (for the actual compiler and the IDE tooling) was not an option anymore…
    IDE that does not know about some language features added in the last 10 years and complains about valid code or just refuses to work? Check.

  2. Watch this last week. Very good. Went and got the updated book as well to try and improve my parsing skills.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: