Software Engineering Radio - the podcast for professional software developers

Episode 57: Compile-Time Metaprogramming with Laurence Tratt


Listen Later

This episode is about compile-time metaprogramming, and specifically, about implementing DSLs via compile-time metaprogramming. Our guest, Laurence Tratt, illustrates the idea with his (research) programming language called Converge. We started by talking about the importance of a custom syntax for DSL and took a brief look at the definition of DSLs by a chap called Paul Hudak. We then briefly covered the disctinction between internal and external DSLs. More to the point of this episode, we discussed the concept of compile-time metaprogramming, and the language features necessary to achieve it: in converge, these concepts are called splice, quasi-quote and insertion. We then looked at how the Converge compiler works, and at the additional features that are required to implement DSLs based on the metaprogramming features mentioned above. Using an example, we then walked through how to implement a simple DSL. Looking at some of the more technical details, we discussed the difference between the parse tree and the abstract syntax tree and at different kinds of parsers - specifically, the Earley parser used by Converge. In multi-stage languages (i.e. languages that execute programs and meta programs) error reporting is important, but non trivial. We discussed how this is done in Converge. We finally looked at how to integrate Converge's expression language into your DSL and how to package DSL definition for later use. The last segment look at the process of implementing a DSL in converge and about some of the history and practical experience with Converge. Lessons learned from building Converge wrap up the episode.
...more
View all episodesView all episodes
Download on the App Store

Software Engineering Radio - the podcast for professional software developersBy [email protected] (SE-Radio Team)

  • 4.4
  • 4.4
  • 4.4
  • 4.4
  • 4.4

4.4

270 ratings


More shows like Software Engineering Radio - the podcast for professional software developers

View all
The Changelog: Software Development, Open Source by Changelog Media

The Changelog: Software Development, Open Source

288 Listeners

The Vergecast by The Verge

The Vergecast

3,713 Listeners

Software Engineering Daily by Software Engineering Daily

Software Engineering Daily

624 Listeners

Talk Python To Me by Michael Kennedy

Talk Python To Me

580 Listeners

Thoughtworks Technology Podcast by Thoughtworks

Thoughtworks Technology Podcast

43 Listeners

Syntax - Tasty Web Development Treats by Wes Bos & Scott Tolinski - Full Stack JavaScript Web Developers

Syntax - Tasty Web Development Treats

990 Listeners

Darknet Diaries by Jack Rhysider

Darknet Diaries

8,083 Listeners

CoRecursive: Coding Stories by Adam Gordon Bell - Software Developer

CoRecursive: Coding Stories

188 Listeners

Practical AI by Practical AI LLC

Practical AI

200 Listeners

The Stack Overflow Podcast by The Stack Overflow Podcast

The Stack Overflow Podcast

62 Listeners

The Real Python Podcast by Real Python

The Real Python Podcast

140 Listeners

Last Week in AI by Skynet Today

Last Week in AI

311 Listeners

Machine Learning Street Talk (MLST) by Machine Learning Street Talk (MLST)

Machine Learning Street Talk (MLST)

95 Listeners

Big Technology Podcast by Alex Kantrowitz

Big Technology Podcast

504 Listeners

Latent Space: The AI Engineer Podcast by swyx + Alessio

Latent Space: The AI Engineer Podcast

98 Listeners