Reddit Reddit reviews Ruby Under a Microscope: An Illustrated Guide to Ruby Internals

We found 6 Reddit comments about Ruby Under a Microscope: An Illustrated Guide to Ruby Internals. Here are the top ones, ranked by their Reddit score.

Computers & Technology
Books
Computer Science
Ruby Under a Microscope: An Illustrated Guide to Ruby Internals
Check price on Amazon

6 Reddit comments about Ruby Under a Microscope: An Illustrated Guide to Ruby Internals:

u/yosheek · 8 pointsr/ruby

A great book for learning about the inner workings of Ruby is Ruby Under The Microscope:
http://www.amazon.com/Ruby-Under-Microscope-Illustrated-Internals/dp/1593275277

It walks through the the whole MRI implementation, the parser, lexer, byteocdeo, YARV etc. along with some of the C source code to give you a picture of how Ruby actually works internally. I believe there's some chapters about Jruby and Rubinius as well but I haven't read those yet.

u/BLITZCRUNK123 · 7 pointsr/ruby

A book called Ruby Under a Microscope is a great start to learning about the MRI internals.

u/brainbag · 3 pointsr/ruby
  1. Ruby has symbols that are used in place of most strings. If you have a :word_symbol, that is a globally unique identifier. Anywhere you see the exact phrase :word_symbol it's the same as all of the others. Ruby inherently gains a lot of performance from this that would otherwise be from immutable strings, without losing the easy mutability of strings.

  2. IIRC, hashes keys for strings use a memory copy as an immutable string, which is the other major performance gain. However, the key lookup still has to do a string comparison, which (again IIRC) are optimized for small comparison sequences, I think under 32 length.

    >> string_key = "word"
    => "word"
    >> hash = { string_key => 'whatever' }
    => {"word"=>"whatever"}
    >> string_key = 'word2'
    => "word2"
    >> hash # no change to the key
    => {"word"=>"whatever"}

    If you're curious about how Ruby works under the hood, this book is exceptional: https://www.amazon.com/Ruby-Under-Microscope-Illustrated-Internals/dp/1593275277. It's a few years old so it might be a bit out of date with the garbage collection in particular, but it's hugely helpful!
u/garrettd714 · 1 pointr/ruby

Ruby under a Microscope is good, if you want a better understanding of Ruby internals. http://www.amazon.com/Ruby-Under-Microscope-Illustrated-Internals/dp/1593275277

u/MelissaLiberty · 1 pointr/ruby

> If you're curious about how Ruby works under the hood, this book is exceptional: https://www.amazon.com/Ruby-Under-Microscope-Illustrated-Internals/dp/1593275277. It's a few years old so it might be a bit out of date with the garbage collection in particular, but it's hugely helpful!

Thanks for the recommendation! Not sure if I will get around to read it (reading POODR by Sandi Metz right now) but I put it on my Amazon list.

u/OtavioHenrique · 1 pointr/ruby

I pretty recommend this book: http://createyourproglang.com/, and this series: https://hokstad.com/compiler


If you want something more advanced you can read the famous https://www.amazon.com.br/Ruby-Under-Microscope-Illustrated-Internals/dp/1593275277 to understand how a language works behind scenes. Understanding Computation is also good too.