Submit Search
Upload
Code Reading
•
1 like
•
637 views
Eddie Kao
Follow
Learning More about Ruby by Reading Ruby Source Code
Read less
Read more
Technology
Report
Share
Report
Share
1 of 86
Download now
Download to read offline
Recommended
What's new in Perl 5.12?
What's new in Perl 5.12?
acme
Go for Rubyists. August 2018. RUG-B Meetup
Go for Rubyists. August 2018. RUG-B Meetup
Kirill Zonov
Flash Ecosystem and Open Source
Flash Ecosystem and Open Source
Eddie Kao
Forumwarz and RJS: A Love/Hate Affair
Forumwarz and RJS: A Love/Hate Affair
guest06ed72
CoffeeScript
CoffeeScript
Eddie Kao
AS3 Better Practices
AS3 Better Practices
Eddie Kao
測試
測試
Eddie Kao
Agenda 6è b setmana 02-gener-curs 16-17
Agenda 6è b setmana 02-gener-curs 16-17
6sise
Recommended
What's new in Perl 5.12?
What's new in Perl 5.12?
acme
Go for Rubyists. August 2018. RUG-B Meetup
Go for Rubyists. August 2018. RUG-B Meetup
Kirill Zonov
Flash Ecosystem and Open Source
Flash Ecosystem and Open Source
Eddie Kao
Forumwarz and RJS: A Love/Hate Affair
Forumwarz and RJS: A Love/Hate Affair
guest06ed72
CoffeeScript
CoffeeScript
Eddie Kao
AS3 Better Practices
AS3 Better Practices
Eddie Kao
測試
測試
Eddie Kao
Agenda 6è b setmana 02-gener-curs 16-17
Agenda 6è b setmana 02-gener-curs 16-17
6sise
Sinatra: прошлое, будущее и настоящее
Sinatra: прошлое, будущее и настоящее
.toster
Week10
Week10
reneedv
IJTC%202009%20JRuby
IJTC%202009%20JRuby
tutorialsruby
IJTC%202009%20JRuby
IJTC%202009%20JRuby
tutorialsruby
Ruby Programming Language - Introduction
Ruby Programming Language - Introduction
Kwangshin Oh
How to Begin to Develop Ruby Core
How to Begin to Develop Ruby Core
Hiroshi SHIBATA
Scala : language of the future
Scala : language of the future
AnsviaLab
Ruby Kaigi 2008 LT
Ruby Kaigi 2008 LT
Motohiro Takayama
Intro to Rails
Intro to Rails
lvrubygroup
Children of Ruby
Children of Ruby
Simon St.Laurent
About Clack
About Clack
fukamachi
The story of language development
The story of language development
Hiroshi SHIBATA
NodeHack 02 - socket.io workshop
NodeHack 02 - socket.io workshop
Raj Rajandran
plackdo, plack-like web interface on perl6
plackdo, plack-like web interface on perl6
Nobuo Danjou
Ruby for Java Developers
Ruby for Java Developers
Robert Reiz
Hybrid concurrency patterns
Hybrid concurrency patterns
Kyle Drake
萌典與零時政府
萌典與零時政府
Au Tang
WebSocket For Web Rubyists
WebSocket For Web Rubyists
Mu-Fan Teng
Learning To Walk In Shoes
Learning To Walk In Shoes
Brian Hogan
Week2
Week2
reneedv
Rails girls in Taipei
Rails girls in Taipei
Eddie Kao
Rails Girls in Taipei
Rails Girls in Taipei
Eddie Kao
More Related Content
Similar to Code Reading
Sinatra: прошлое, будущее и настоящее
Sinatra: прошлое, будущее и настоящее
.toster
Week10
Week10
reneedv
IJTC%202009%20JRuby
IJTC%202009%20JRuby
tutorialsruby
IJTC%202009%20JRuby
IJTC%202009%20JRuby
tutorialsruby
Ruby Programming Language - Introduction
Ruby Programming Language - Introduction
Kwangshin Oh
How to Begin to Develop Ruby Core
How to Begin to Develop Ruby Core
Hiroshi SHIBATA
Scala : language of the future
Scala : language of the future
AnsviaLab
Ruby Kaigi 2008 LT
Ruby Kaigi 2008 LT
Motohiro Takayama
Intro to Rails
Intro to Rails
lvrubygroup
Children of Ruby
Children of Ruby
Simon St.Laurent
About Clack
About Clack
fukamachi
The story of language development
The story of language development
Hiroshi SHIBATA
NodeHack 02 - socket.io workshop
NodeHack 02 - socket.io workshop
Raj Rajandran
plackdo, plack-like web interface on perl6
plackdo, plack-like web interface on perl6
Nobuo Danjou
Ruby for Java Developers
Ruby for Java Developers
Robert Reiz
Hybrid concurrency patterns
Hybrid concurrency patterns
Kyle Drake
萌典與零時政府
萌典與零時政府
Au Tang
WebSocket For Web Rubyists
WebSocket For Web Rubyists
Mu-Fan Teng
Learning To Walk In Shoes
Learning To Walk In Shoes
Brian Hogan
Week2
Week2
reneedv
Similar to Code Reading
(20)
Sinatra: прошлое, будущее и настоящее
Sinatra: прошлое, будущее и настоящее
Week10
Week10
IJTC%202009%20JRuby
IJTC%202009%20JRuby
IJTC%202009%20JRuby
IJTC%202009%20JRuby
Ruby Programming Language - Introduction
Ruby Programming Language - Introduction
How to Begin to Develop Ruby Core
How to Begin to Develop Ruby Core
Scala : language of the future
Scala : language of the future
Ruby Kaigi 2008 LT
Ruby Kaigi 2008 LT
Intro to Rails
Intro to Rails
Children of Ruby
Children of Ruby
About Clack
About Clack
The story of language development
The story of language development
NodeHack 02 - socket.io workshop
NodeHack 02 - socket.io workshop
plackdo, plack-like web interface on perl6
plackdo, plack-like web interface on perl6
Ruby for Java Developers
Ruby for Java Developers
Hybrid concurrency patterns
Hybrid concurrency patterns
萌典與零時政府
萌典與零時政府
WebSocket For Web Rubyists
WebSocket For Web Rubyists
Learning To Walk In Shoes
Learning To Walk In Shoes
Week2
Week2
More from Eddie Kao
Rails girls in Taipei
Rails girls in Taipei
Eddie Kao
Rails Girls in Taipei
Rails Girls in Taipei
Eddie Kao
Let's Learn Ruby - Basic
Let's Learn Ruby - Basic
Eddie Kao
iOS app development and Open Source
iOS app development and Open Source
Eddie Kao
Vim
Vim
Eddie Kao
from Ruby to Objective-C
from Ruby to Objective-C
Eddie Kao
CreateJS - from Flash to Javascript
CreateJS - from Flash to Javascript
Eddie Kao
May the source_be_with_you
May the source_be_with_you
Eddie Kao
Why I use Vim
Why I use Vim
Eddie Kao
There is something about Event
There is something about Event
Eddie Kao
Happy Programming with CoffeeScript
Happy Programming with CoffeeScript
Eddie Kao
Ruby without rails
Ruby without rails
Eddie Kao
CoffeeScript-Ruby-Tuesday
CoffeeScript-Ruby-Tuesday
Eddie Kao
API Design
API Design
Eddie Kao
3rd AS Study Group
3rd AS Study Group
Eddie Kao
iOS Game Development with Cocos2d
iOS Game Development with Cocos2d
Eddie Kao
AS3讀書會(行前準備)
AS3讀書會(行前準備)
Eddie Kao
AMF
AMF
Eddie Kao
Misunderstanding about flash
Misunderstanding about flash
Eddie Kao
Refactoring in AS3
Refactoring in AS3
Eddie Kao
More from Eddie Kao
(20)
Rails girls in Taipei
Rails girls in Taipei
Rails Girls in Taipei
Rails Girls in Taipei
Let's Learn Ruby - Basic
Let's Learn Ruby - Basic
iOS app development and Open Source
iOS app development and Open Source
Vim
Vim
from Ruby to Objective-C
from Ruby to Objective-C
CreateJS - from Flash to Javascript
CreateJS - from Flash to Javascript
May the source_be_with_you
May the source_be_with_you
Why I use Vim
Why I use Vim
There is something about Event
There is something about Event
Happy Programming with CoffeeScript
Happy Programming with CoffeeScript
Ruby without rails
Ruby without rails
CoffeeScript-Ruby-Tuesday
CoffeeScript-Ruby-Tuesday
API Design
API Design
3rd AS Study Group
3rd AS Study Group
iOS Game Development with Cocos2d
iOS Game Development with Cocos2d
AS3讀書會(行前準備)
AS3讀書會(行前準備)
AMF
AMF
Misunderstanding about flash
Misunderstanding about flash
Refactoring in AS3
Refactoring in AS3
Recently uploaded
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
shyamraj55
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
BookNet Canada
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Katpro Technologies
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
naman860154
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
Delhi Call girls
How to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
naman860154
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
Delhi Call girls
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
Paola De la Torre
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
carlostorres15106
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
Michael W. Hawkins
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
XfilesPro
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
AndikSusilo4
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Alan Dix
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
BookNet Canada
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
Sinan KOZAK
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
Mark Billinghurst
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
Ridwan Fadjar
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
Delhi Call girls
Recently uploaded
(20)
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
How to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
Code Reading
1.
2.
高見 龍 です
3.
高 見龍 です @eddiekao
4.
Code Reading Learning more
about Ruby by Reading Ruby Source Code Chimpr
5.
I come from
Taiwan photo by Fishtail@Taipei
6.
photo by J
o n a G r a p h Y
7.
photo by HeyNix
8.
photo by randomwire
9.
10.
11.
I’m a Flash
guy (≈ 8 years) I’m a Python guy (≈ 2 years) I’m a Ruby guy (≈ 4 years) I’m a iOS app guy (≈ 2 years)
12.
But not a
C guy, yet!
13.
Ruby > Rails
14.
“I’m a SHOW
OFF person”
15.
“Experience Sharing is
fun”
16.
Current Status 80% iOS
app, 20% Ruby/Rails
17.
100% Ruby Lover!
18.
19.
Web Development Conference
in Taiwan
20.
21.
2 days, 3
tracks session
22.
750+ attendees
23.
all tickets sold
out in 4 mins
24.
WebConf Taiwan 2014
25.
Will be held
on Jan 2014
26.
850+ attendees in
2014, hopefully.
27.
All about web
development
28.
楽しい
29.
http://webconf.tw
30.
Code Reading
31.
Why read source
code? How to start? What I learned? Anything interesting?
32.
Why read source
code ?
33.
Ian Ruotsala
34.
“once you start
digging around in someone else’s code base, you’ll learn a lot about your own strengths and weaknesses” - Ruby Best Practice http://blog.rubybestpractices.com/posts/gregory/005-code-reading-stdlib.html
35.
See how the
Core Team write Ruby
36.
Read the source,
Luke! photo by chaines106
37.
source code は友達 source
http://kyaraben.seesaa.net/article/168967765.html
38.
Contribution!
39.
Committer in my dream!
40.
FUN! :)
41.
Requirement ?
42.
C language
43.
“What if I
don’t have any skill of C?”
44.
“Just Learn It!”
45.
Curiosity and Passion
46.
Where to Start
?
47.
get source files!
48.
download from Ruby
website, or clone from github
49.
Ruby 1.9.2 p290
50.
51.
Quick browsing.. :)
52.
*c + *h .
. *rb (stdlib) .
53.
Let’s have some
fun!
54.
Object Class String Hash Array
55.
“ruby.h”
56.
Object => RObject Class
=> RClass String => RString Array => RArray Hash => RHash
57.
“object.c”
58.
Init_XXXX( )
59.
“all Class’s class
is a Class”
60.
“new”
61.
class A def initialize puts
"hello" end end a = A.new
62.
Proc
63.
How to execute
a Proc?
64.
proc.call proc[ ] proc.yield proc ===
123
65.
attributes
66.
push v.s. <<
67.
Object ID
68.
What else?
69.
Haskell-like syntax :)
70.
head (x:_) = x tail (_:xs) = xs
71.
people = { "Eddie"
=> ["green", "eddie@digik.com.tw"], "Joanne" => ["yellow", "hello@yahoo.com"] } people.map { |name, (color, email)| puts [name, email] }
72.
people = { "Eddie"
=> ["green", "eddie@digik.com.tw"], "Joanne" => ["yellow", "hello@yahoo.com"] } people.map { |name, (_, email)| puts [name, email] } parse.y#8277-8299 shadowing_lvar_gen( )
73.
Method missing
74.
Anything interesting ?
75.
Interesting naming.. XD
76.
Conclusion
77.
“from basic structure”
78.
“don’t be afraid
of source code”
79.
source code は友達 source
http://kyaraben.seesaa.net/article/168967765.html
80.
References
81.
“Rubyソースコード完全解説” (RHG) by 青木峰郎 http://i.loveruby.net/ja/rhg/book/
82.
“Ruby Under a
Microscope” by Pat Shaughnessy http://patshaughnessy.net/ruby-under-a-microscope
83.
Hope we all
can become Jedi Master someday :) Chimpr
84.
高見 龍 です
85.
以上です。 ご清聴ありがとうございました thanks for your
listening :)
86.
Contacts 高見龍 Website http://www.eddie.com.tw Blog http://blog.eddie.com.tw Plurk http://www.plurk.com/aquarianboy Facebook http://www.facebook.com/eddiekao Google Plus http://www.eddie.com.tw/+ Twitter https://twitter.com/#!/eddiekao Email eddie@digik.com.tw Mobile +886-928-617-687 photo by
Eddie
Download now