Talks
Speakers
Events
Topics
Sign in
Home
Talks
Speakers
Events
Topics
Leaderboard
Use
Analytics
Sign in
Suggest modification to this talk
Title
Description
RubyKaigi2017 http://rubykaigi.org/2017/presentations/kddeisz.html Since Ruby 2.3 and the introduction of RubyVM::InstructionSequence::load_iseq, we've been able to programmatically load ruby bytecode. By divorcing the process of running YARV byte code from the process of compiling ruby code, we can take advantage of the strengths of the ruby virtual machine while simultaneously reaping the benefits of a compiler such as macros, type checking, and instruction sequence optimizations. This can make our ruby faster and more readable! This talk demonstrates how to integrate this into your own workflows and the exciting possibilities this enables.
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
The video titled 'Compiling Ruby' features Kevin Newton discussing advancements in Ruby programming, particularly focusing on the ability to programmatically load Ruby bytecode since the introduction of Ruby 2.3. The presentation explores the journey from writing Ruby code to retrieving program outputs, highlighting key components of the execution process. Newton explains the transformation of Ruby source files through processes such as tokenization, abstract syntax trees (ASTs), and instruction sequences, emphasizing the benefits of utilizing Ruby's virtual machine (VM) for enhanced performance. Key points discussed in the presentation include: - **Execution Process:** Newton describes how Ruby code is compiled, starting from file loading through 'require' or 'load,' followed by tokenizing input, which generates an abstract syntax tree (AST). - **Advancements since Ruby 1.9:** The introduction of YARV (Yet Another Ruby VM) enabled instruction sequences, which expedite the execution process by compiling code beforehand instead of interpreting ASTs directly. - **New Features in Ruby 3:** Newton discusses the 'load_iseq' feature, which persists compiled instruction sequences in a binary format. This allows for faster loading without recompiling unchanged source files, significantly improving execution speed. - **Use Cases and Performance Optimization:** Examples from the Ruby ecosystem, particularly from companies like Shopify, illustrate the practical benefits of these features. By leveraging instruction sequences, developers can enhance performance and optimize load paths. - **Creative Programming Solutions:** Newton emphasizes Ruby’s flexibility in modifying source code and using macros for performance optimization. This flexibility allows developers to achieve advanced memory and speed solutions while maintaining code readability. - **Dynamic Environment:** 'Load_iseq' enriches the Ruby programming experience by enabling initial source modifications without altering the original files. It enhances the semantic richness and versatility of Ruby programming. Conclusions from the talk include the vital role of 'load_iseq' in fostering innovation within Ruby development, empowering developers with tools for dynamic manipulation of bytecode, and prompting further exploration of Ruby's capabilities. Newton encourages the Ruby community to continue pushing the boundaries of knowledge and optimization in Ruby programming. Overall, the talk highlights both foundational concepts and cutting-edge features in Ruby, aiming to inspire developers to utilize these advancements in their workflows effectively.
Suggest modifications
Cancel