Talks
Speakers
Events
Topics
Sign in
Home
Talks
Speakers
Events
Topics
Leaderboard
Use
Analytics
Sign in
Suggest modification to this talk
Title
Description
This video was recorded on http://wrocloverb.com. You should follow us at https://twitter.com/wrocloverb. See you next year! Ever since I learnt the Ruby language, I thought I can use it to programme virtually anything. Well, I was wrong and I'd like to share this sad story with all of you.
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 'Things you can't do in Ruby,' speaker Piotr Niełacny discusses his journey in learning Ruby and highlights some limitations of the language. Initially drawn to Ruby while searching for a Python book, he shares a few frustrations he encountered over three years of usage. The video covers specific topics about Ruby's capabilities and limitations, clarifying how to work around them without delving into C extensions. **Key Points Discussed:** - **Inheritance Limitations:** While Ruby supports inheritance, it has certain syntax rules, such as the need to specify module names when including classes to avoid type errors. - **Object Unfreezing:** The Ruby standard library only allows freezing objects but not unfreezing them, which can be cumbersome in practice. - **Changing Object Classes:** While you can change the internal representation of an object, Ruby does not allow for easy class changes of objects, leading to different behavior despite the same representation. - **Method Arguments:** Using instance variables as method arguments requires extra work, thus writing more code than expected. Piotr then outlines how to implement solutions for these issues in pure Ruby. For example, he explains how to use Ruby's dynamic linker to create aliases, handle structures, and how to alter object behavior that defies the standard limitations. A significant part of his demonstration shows: - **Multi-Inheritance Workaround:** Tricking Ruby into recognizing an object as a new module, creating a form of multiple inheritance. - **Unfreezing Objects:** How to effectively alter classes and unfreeze objects by changing their pointers. Throughout the presentation, practical coding examples illustrate these concepts. Piotr shows live code demonstrations to exemplify the aforementioned points, emphasizing that despite its limitations, Ruby allows for creative and efficient problem-solving. He concludes with a note on implementing changes in class structures without relying on complicated extensions and encourages the use of his gem for including modules into classes. Overall, the video provides insights into the versatile nature of Ruby, reaffirming the idea that with the right approaches, many restrictions can be bypassed, leading to innovative solutions within the Ruby programming environment.
Suggest modifications
Cancel