Talks
Speakers
Events
Topics
Sign in
Home
Talks
Speakers
Events
Topics
Leaderboard
Use
Analytics
Sign in
Suggest modification to this talk
Title
Description
Since Ruby's inception, there have been many different projects that parse Ruby code. This includes everything from development tools to Ruby implementations themselves. This talk dives into the technical details and tradeoffs of how each of these tools parses and subsequently understands your applications. After, we'll discuss how you can do the same with your own projects using the Ripper standard library. You'll see just how far we can take this library toward building useful development tools.
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 keynote speech titled 'Parsing Ruby' at RubyConf 2021, Kevin Newton explores the various tools and methodologies used to parse Ruby code and how these concepts can be applied to individual projects using the Ripper standard library. The presentation starts with a warm welcome and an acknowledgment of the audience, before diving into the complexities of parsing Ruby. Key points discussed include: - **Foundation of Parsing**: Newton emphasizes the importance of understanding the theoretical aspects of parsing, starting with defining a grammar, which is a syntactical representation of what is allowed in a language. He constructs a simple grammar that can handle numerical expressions and demonstrates how to expand it with operations such as addition and parentheses. - **Building a Parser**: He illustrates the process of creating a parser that can tokenize input strings using lexical analysis and how these tokens are processed semantically through a series of shifts and reductions to create a valid syntax tree. - **Ruby's Parsing History**: A significant portion of the talk focuses on the evolution of Ruby's parsing mechanisms, starting with early implementations and transitioning to the current parser generator systems. He details the transition from using Yacc to Bison in Ruby's core implementation. - **Introduction to Ripper**: Newton provides insight into the Ripper standard library, designed for easy access to parsing events. He explains how Ripper allows developers to hook into tokens and rule reductions, making it easier to build commenting and syntax tree tools. - **Community Tools**: The speaker highlights various parser-generating tools and libraries available for Ruby, such as the parser gem and re-parser, discussing their functionalities, limitations, and community support. - **Future Implications**: Nearing the conclusion, Newton suggests that Ruby's pace of introducing new syntax may slow down. He advocates for a standardized parser that accommodates various Ruby implementations to maintain compatibility and ease of use. Through the exploration of these topics, Newton aims to inspire developers to engage more deeply with parsing concepts to create innovative tools and applications within the Ruby ecosystem. The presentation concludes with a call to action for the community to rally around building more developmental tools, facilitated by a robust understanding of parsing techniques.
Suggest modifications
Cancel