~/talk

All I'd Wanted to Know about Ruby's Object Model Starting Out...and Mooar!!!

Talkat Red Dot Ruby Conference 2017 · 2017-06-22..06-23· [ruby]
github:tjjjwxzq
slides:none on file

Walks the CRuby C source (specifically CRuby 2.4 source) and shows the actual structs – RBasic/RClass structs with flags, kclass pointers and method tables – then traces bootstrapping in init_vm, the rv_define_class_id path that creates classes and method classes, and the convoluted make_metaclass logic that spawns meta/meta chains. Demonstrates singleton-class creation (much simpler), how include classes are inserted and share module method tables, and why Ruby’s class/superclass methods skip singletons and include classes.

AI-written summary · about

  1. 0:00Introduction to Ruby
  2. 1:06The Ruby creation myth
  3. 2:53The object hierarchy
  4. 3:55Introspection and self-discovery
  5. 6:08Singleton methods and classes
  6. 6:58Class methods and meta-classes
  7. 8:47C Ruby internal representation
  8. 10:39Method dispatch mechanics
  9. 12:17Bootstrapping and class creation
  10. 14:15Metaclass creation details
  11. 15:53The metaclass inheritance chain
  12. 18:31Singleton class implementation
  13. 21:25Modules and include classes
  14. 24:44Q&A and conclusion
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.