5 ms·
Hey pat, how do you understand the internal code so well ? I read your free chapter on Ruby's Hash table and I loved every bit of it. It would be great if you c
by Who828 14y ago
Hey pat, how do you understand the internal code so well ? I read your free chapter on Ruby's Hash table and I loved every bit of it. It would be great if you can share the process you go through when you read the source code, so maybe I can apply it in the future. By the way, congrats for the release !
- saturnflyer 14y agoI suspect buying the book might yield some info like that.
- pat_shaughnessy 14y agoHey thanks for asking - and yes, in the preface to the book I do explain how I figure this stuff out. But basically I: - study the C code for a long time - step through it in GDB a lot - add printf statements and recompile it to print out debug/trace info - actually change it to see what would happen if things were written differently. A lot of hard work! I do the hard work so you don't have to :)
- milesf 14y agoYour process is something I'd like an ebook or screencast about. Perhaps others would find it interesting as well.
- pat_shaughnessy 14y agoYea I've thought about that. Let me see what I can do... :) thanks.
- petercooper 14y agoThe code for MRI is.. idiomatic, but actually pretty easy to read. I last did C full time in the 90s and so am mostly just a 'reader' now but it's not hard to follow, although some of the reasoning behind doing things a certain way in MRI is unfathomable.. ;-)
- JulianWasTaken 14y agoI don't understand the wording of your first sentence. Did you mean "idiotic" or?
- JonnieCache 14y agohttps://encrypted.google.com/search?q=define%3Aidiom https://encrypted.google.com/search?q=define%3Aidiom
- JulianWasTaken 14y agoYes, thanks. I know what idiomatic means, but the OP either does not or just wrote an awkward sentence.
- deleted 14y ago[deleted]
- omaranto 14y agoPat probably meant 'idiosyncratic' instead of 'idiomatic' (unless it's a non-idiomatic use of 'idiomatic').
- petercooper 14y ago'Idiosyncratic' is clearer, though 'idiomatic' is valid and what I wished to say, but in its secondary definition: http://www.merriam-webster.com/dictionary/idiomatic http://www.merriam-webster.com/dictionary/idiomatic (see def 2)
- JulianWasTaken 14y agoOh, OK. I've never seen "idiomatic" used with a negative connotation before.
- deleted 14y ago[deleted]