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
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
apidays
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
Pooja Nehwal
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
Results
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Igalia
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Katpro Technologies
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
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
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
Allon Mureinik
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
🐬 The future of MySQL is Postgres 🐘
🐬 The future of MySQL is Postgres 🐘
RTylerCroy
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
The Digital Insurer
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
Delhi Call girls
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
naman860154
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
hans926745
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
HampshireHUG
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
Rafal Los
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
Malak Abu Hammad
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
The Digital Insurer
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
Safe Software
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Roshan Dwivedi
Recently uploaded
(20)
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
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 ...
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
🐬 The future of MySQL is Postgres 🐘
🐬 The future of MySQL is Postgres 🐘
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
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