Talks
Speakers
Events
Topics
Sign in
Home
Talks
Speakers
Events
Topics
Leaderboard
Use
Analytics
Sign in
Suggest modification to this talk
Title
Description
Let's dive into one of the the deep ends of CS and implement a turing-complete interpreter in just 30 minutes using ruby, ruby_parser, sexp_processor, and a minor amount of elbow grease. Help us caption & translate this video! http://amara.org/v/FG7y/
Date
Summarized using AI?
If this talk's summary was generated by AI, please check this box. A "Summarized using AI" badge will be displayed in the summary tab to indicate that the summary was generated using AI.
Show "Summarized using AI" badge on summary page
Summary
Markdown supported
In the video titled "Let's Write an Interpreter!", speaker Ryan Davis delivers a fast-paced presentation on creating a Turing-complete interpreter in just 30 minutes using Ruby, Ruby Parser, and S-expression processing. The session's tone is both humorous and informative, aimed at challenging the audience's understanding while providing practical coding insights. ### Key Points: - **Expectations Set**: Ryan warns attendees that he has 168 slides planned for the next 30 minutes, setting a brisk delivery pace with an expectation of some cognitive overload. - **Why Write an Interpreter?**: Ryan emphasizes the enjoyment and learning value of writing an interpreter, asking the audience to consider why they might want to undertake such a project outside of academic settings. - **Ubi Interpreter**: The core of the talk revolves around constructing the Ubi interpreter, which supports branching logic, function definitions, and local state management. - **Parsing**: He describes using Ruby Parser to generate an Abstract Syntax Tree (AST) for input code, explaining the concept of S-expressions (sexp) briefly, while opting not to delve deep into parsing mechanics, humorously deeming parsing 'boring' compared to semantics. - **Runtime and Evaluation**: Ryan explains the evaluation process through a test-driven methodology, illustrating how to handle operations like addition and cognitive processes involved in interpreting code. - **Adding Complexity**: As he progresses, Ryan introduces conditionals, local variables, and function recursion, demonstrating each with relevant code examples and testing practices. - **Final Implementation**: The culmination of his work leads to a functional interpreter capable of executing basic arithmetic, conditionals, loops, and user-defined functions, encapsulated in concise code. ### Conclusions: - Ryan reflects on the small implementation size of the interpreter (approximately 200 lines of code) and suggests potential expansions for further study, such as richer data types and different function calling conventions. - He shares a personal recommendation for foundational programming resources, encouraging the audience to explore texts like "Structure and Interpretation of Computer Programs" and "The Little Schemer". - In closing, he humorously advocates for 'Seattle style' coding conventions, emphasizing clarity and minimalism in syntax throughout the development process. Overall, this engaging presentation not only illustrates the mechanics of building an interpreter but also highlights the joy inherent in programming and problem-solving.
Suggest modifications
Cancel