Top Banner
あるRUBYISTCOMMITTERになった その理由 ~事例紹介~ 2015/01/17 日本Rubyの会 樽家 昌也
33

Why did I become a ruby committer

Jul 14, 2015

Download

Engineering

Masaya TARUI
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Why did I become a ruby committer

あるRUBYISTがCOMMITTERになったその理由 ~事例紹介~

2015/01/17

日本Rubyの会

樽家 昌也

Page 2: Why did I become a ruby committer

しばらく自己紹介

たるい といいます

住処 この近辺 1.17から20年

2010年からRubyのコミッターをしてます 気が向いた時に性能改善

気が向いた時に再現性が低いバグの条件出し

No Tool, No Life.

楽するために苦労するのが生き甲斐? ゴロゴロねっころがっていたい。。。

@taru

住まいの変遷

Page 3: Why did I become a ruby committer

つづきます

メーカー勤務 ハードウェアからファームウェアあたり

BASICからプログラムに興味を持ち徐々に アセンブラやOS、論理回路といった下のレイヤーに

アナログ回路の壁に打ち返される

情報発信下手系エンジニア 暖かい目でお見守りください!

高級言語

デジタル回路

製造プロセス

アナログ回路 Cross the border出来なかったorz

Page 4: Why did I become a ruby committer

趣味 : 旅行(世界遺産とか)

故宮博物館

マチュ・ピチュ チチカカ湖 ナスカの地上絵

イスタンブール カッパド キア ペトラ 死海

ブレッド湖 ポストイナ鍾乳洞 プリトヴィツェ湖群国立公園 ドゥブロヴニク

フェス サハラ マラケシュ

プラハ チェスキー・クルムロフ ブダペスト

ネットから離れた生活

Cross the border

Page 5: Why did I become a ruby committer

趣味 : ゲーム

Steam

適当に

ボードゲーム

色々

囲碁

By Donarreiskoffer CC-BY-SA-3.0

Page 6: Why did I become a ruby committer

ここからRUBYの話

Page 7: Why did I become a ruby committer

わたしとRUBYの交際日記(接触編)

2001 出会う 一目ぼれ 当時 1.6.?

2001~ OpenClassに合わせてモンキーパッチ生活

2006/5 ついに内側に手を入れる必要(メモリリーク)が 出てpatchを投げる。

2006/6 日本Rubyカンファレンス 2006 咳さん、立石さんに絡む。

2006/8 ほいほい誘われてLL Ringのじゃんけんに Rubyで出場。 かませ犬に惨敗orz (http://magazine.rubyist.net/?0016-LLRingReport)

2007/12 1.9.0になる。見なかった事にして1.8.7生活

2009/1 1.9.1になる。見なかった事にして1.8.7生活

2010/2 東京Ruby会議03。nurseさんのM17Nの説明 と、akrさんのopen3の話を聞く。 windowsでspawnを使いたくて1.9に手を出す。

Page 8: Why did I become a ruby committer

わたしとRUBYの交際日記(接触編)

2001 出会う 一目ぼれ 当時 1.6.?

2001~ OpenClassに合わせてモンキーパッチ生活

2006/5 ついに内側に手を入れる必要(メモリリーク)が 出てpatchを投げる。

2006/6 日本Rubyカンファレンス 2006 咳さん、立石さんに絡む。

2006/8 ほいほい誘われてLL Ringのじゃんけんに Rubyで出場。 かませ犬に惨敗orz (http://magazine.rubyist.net/?0016-LLRingReport)

2007/12 1.9.0になる。見なかった事にして1.8.7生活

2009/1 1.9.1になる。見なかった事にして1.8.7生活

2010/2 東京Ruby会議03。nurseさんのM17Nの説明 と、akrさんのopen3の話を聞く。 windowsでspawnを使いたくて1.9に手を出す。

Page 9: Why did I become a ruby committer

2001 出会う 一目ぼれ 当時 1.6.?

2000年頃の通信事情

socket(GS, PF_INET, SOCK_STREAM, getprotobyname('tcp')); bind(GS, pack_sockaddr_in(6667, inet_aton("localhost"))); listen(GS, 5); my $client_addr; while ($client_addr = accept(S, GS)) { while (...){ select(S); .... } close S; }

Perl

他の部分を考えるとCより断然Perlがお手軽だった

が、この辺りはC言語と同じ感じで書く必要があった(たぶん)

そこにわれらの救世主が!

Page 10: Why did I become a ruby committer

2001 出会う 一目ぼれ 当時 1.6.?

2000年頃の通信事情

Perl

gs = TCPserver.open("localhost",6667) gs.listen 5 while true Thread.new(gs.accept) do |s| ... s.close end End

Ruby

socket(GS, PF_INET, SOCK_STREAM, getprotobyname('tcp')); bind(GS, pack_sockaddr_in(6667, inet_aton("localhost"))); listen(GS, 5); my $client_addr; while ($client_addr = accept(S, GS)) { while (...){ select(S); .... } close S; }

引っかからない! 楽しい! きもちいい!

Page 11: Why did I become a ruby committer

わたしとRUBYの交際日記(接触編)

2001 出会う 一目ぼれ 当時 1.6.?

2001~ OpenClassに合わせてモンキーパッチ生活

2006/5 ついに内側に手を入れる必要(メモリリーク)が 出てpatchを投げる。

2006/6 日本Rubyカンファレンス 2006 咳さん、立石さんに絡む。

2006/8 ほいほい誘われてLL Ringのじゃんけんに Rubyで出場。 かませ犬に惨敗orz (http://magazine.rubyist.net/?0016-LLRingReport)

2007/12 1.9.0になる。見なかった事にして1.8.7生活

2009/1 1.9.1になる。見なかった事にして1.8.7生活

2010/2 東京Ruby会議03。nurseさんのM17Nの説明 と、akrさんのopen3の話を聞く。 windowsでspawnを使いたくて1.9に手を出す。

Page 12: Why did I become a ruby committer

わたしとRUBYの交際日記(発動編)

2010/2 1.9.1に手を出す。

2010/2~ Encoding つらい。それ以上にSEGVがorz

2010/3? nurseさんの観察日記みているうちに 悪い遊び場(%ruby) に出入りするように。

2010/4 SEGV対応のpatchを投げ付け始める。

2010/4 投げる。投げる。投げる。

2010/5 mameさん仲人のもと committerに。 first commit は咳さん部分のtestを 入れさせてもらう。

2011/5 require 速度改善 (http://www.rubyinside.com/ruby-1-9-3-faster-loading-times-require-4927.html)

2013/6 bitmap marking GC 速度改善 (http://www.slideshare.net/tarui/ss-23517958/23)

2013/11 callcc 関連 dynamic-wind実装(Cレベルのみ)

2014/12 callcc をobsoluteにしてremove提案。 mameさんに脅される。

Page 13: Why did I become a ruby committer

わたしとRUBYの交際日記(発動編)

2010/2 1.9.1に手を出す。

2010/2~ Encoding つらい。それ以上にSEGVがorz

2010/3? nurseさんの観察日記みているうちに 悪い遊び場(%ruby) に出入りするように。

2010/4 SEGV対応のpatchを投げ付け始める。

2010/4 投げる。投げる。投げる。

2010/5 mameさん仲人のもと committerに。 first commit は咳さん部分のtestを 入れさせてもらう。

2011/5 require 速度改善 (http://www.rubyinside.com/ruby-1-9-3-faster-loading-times-require-4927.html)

2013/6 bitmap marking GC 速度改善 (http://www.slideshare.net/tarui/ss-23517958/23)

2013/11 callcc 関連 dynamic-wind実装(Cレベルのみ)

2014/12 callcc をobsoluteにしてremove提案。 mameさんに脅される。

Page 14: Why did I become a ruby committer

2010/3? NURSEさんの観察日記みているうちに 悪い遊び場(%RUBY) に出入りするように。

とりあえず半年ROMっておこうと思ってたはずなのですが・・・

http://d.hatena.ne.jp/nurse/20100302

Page 15: Why did I become a ruby committer

2010/4 SEGV対応のPATCHを投げ付け始める。

Mailing Listとか怖いのでIRCで感触を見ながら

http://d.hatena.ne.jp/nurse/20100416

Author: mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> Date: Fri Apr 9 11:08:06 2010 +0000 * dir.c (push_glob): add RB_GC_GUARD to prevent str being free'ed. a patch from Masaya TARUI in [ruby-dev:40939]. [ruby-dev:40514]

Page 16: Why did I become a ruby committer

2010/4 投げる。投げる。投げる。 Author: mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> Date: Fri Apr 9 11:08:06 2010 +0000 * dir.c (push_glob): add RB_GC_GUARD to prevent str being free'ed. a patch from Masaya TARUI in [ruby-dev:40939]. [ruby-dev:40514] Author: wanabe <wanabe@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> Date: Fri Apr 9 22:38:46 2010 +0000 * vm_method.c (rb_add_method): clear attr.location before rb_ary_new3. a patch from Masaya TARUI in [Bug #3108] Author: nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> Date: Sat May 8 02:07:43 2010 +0000 * ext/bigdecimal/bigdecimal.c (VpAlloc): ensure buf does not get collected. based on a patch masaya tarui at [ruby-dev:41213]. Author: nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> Date: Sun May 9 07:28:17 2010 +0000 * cont.c (fiber_initialize_machine_stack_context): try to release unnecessary fibers and retry to create. based on a patch from masaya tarui at [ruby-dev:41230]. Author: naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> Date: Wed May 12 01:06:24 2010 +0000 * re.c (rb_reg_initialize_m): fix wrong index for the lang option's value 'N'. reported by Masaya TARUI via IRC. Author: nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> Date: Sun May 16 01:49:49 2010 +0000 * ext/iconv/iconv.c (rb_iconv_sys_fail): fix number of arguments. a patch by Masaya TARUI <tarui AT prx.jp>. Author: usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> Date: Mon May 17 12:15:47 2010 +0000 * win32/win32.c (argv_size): merged into join_argv() to maintain the agreement with it. removed code has a calclulation bug. fixed [Bug#2388] * win32/win32.c (join_argv): calc and return the length of joined argv. the cause of the original bug was clarified by Masaya TARUI <tarui AT prx.jp> and the solution was suggested by him, too. Author: nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> Date: Wed May 19 14:45:03 2010 +0000 * ext/tk/extconf.rb: [ruby-def:41334] [Bug #3307] invalid result on searching tcl.h/tk.h. Thanks, Masaya Tarui. Author: usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> Date: Fri Jul 2 14:31:26 2010 +0000 * io.c (argf_inplace_mode_set): prohibits an assignment of a tainted value. * file.c (ruby_find_basename, ruby_find_extname): split from rb_file_s_basename() and rb_file_s_extname(). * util.c (ruby_add_suffix): support arbitrary length of the suffix to get rid of the potential buffer overflow. reported by tarui.

1

2

3

4

5

6

7

8

9

約1ヶ月の間に10個前後投げるとコミッターに なっていいらしい?

git log --grep=“tarui”--grep-ignore-case --reverse

こんな事情もあったらしい

Page 17: Why did I become a ruby committer

わたしとRUBYの交際日記(発動編)

2010/2 1.9.1に手を出す。

2010/2~ Encoding つらい。それ以上にSEGVがorz

2010/3? nurseさんの観察日記みているうちに 悪い遊び場(%ruby) に出入りするように。

2010/4 SEGV対応のpatchを投げ付け始める。

2010/4 投げる。投げる。投げる。

2010/5 mameさん仲人のもと committerに。 first commit は咳さん部分のtestを 入れさせてもらう。

2011/5 require 速度改善 (http://www.rubyinside.com/ruby-1-9-3-faster-loading-times-require-4927.html)

2013/6 bitmap marking GC 速度改善 (http://www.slideshare.net/tarui/ss-23517958/23)

2013/11 callcc 関連 dynamic-wind実装(Cレベルのみ)

2014/12 callcc をobsoluteにしてremove提案。 mameさんに脅される。

Page 18: Why did I become a ruby committer

2013/6 BITMAP MARKING GC 速度改善

当時は説明が足りなかったが、Kawasaki.rbの少し前に、有賀さんからHashが遅いと言われて調べていた。

Kawasaki.rb #001

Page 19: Why did I become a ruby committer

わたしとRUBYの交際日記(発動編)

2010/2 1.9.1に手を出す。

2010/2~ Encoding つらい。それ以上にSEGVがorz

2010/3? nurseさんの観察日記みているうちに 悪い遊び場(%ruby) に出入りするように。

2010/4 SEGV対応のpatchを投げ付け始める。

2010/4 投げる。投げる。投げる。

2010/5 mameさん仲人のもと committerに。 first commit は咳さん部分のtestを 入れさせてもらう。

2011/5 require 速度改善 (http://www.rubyinside.com/ruby-1-9-3-faster-loading-times-require-4927.html)

2013/6 bitmap marking GC 速度改善 (http://www.slideshare.net/tarui/ss-23517958/23)

2013/11 callcc 関連 dynamic-wind実装(Cレベルのみ)

2014/12 callcc をobsoluteにしてremove提案。 mameさんに脅される。

Page 20: Why did I become a ruby committer

2014/12 CALLCC をOBSOLUTEにして、 REMOVE提案したら MAMEさんに脅された。

https://twitter.com/mametter/status/537622108163960832

Page 21: Why did I become a ruby committer

閑話

Page 22: Why did I become a ruby committer

知識

Matt Might, a professor in Computer Science at the University of Utah, created The Illustrated Guide to a Ph.D. to explain what a Ph.D. is to new and aspiring graduate students. [Matt has licensed the guide for sharing with special terms under the Creative Commons license.]

Imagine a circle that contains all of human knowledge:

By the time you finish elementary school, you know a little:

Page 23: Why did I become a ruby committer

知識

Matt Might, a professor in Computer Science at the University of Utah, created The Illustrated Guide to a Ph.D. to explain what a Ph.D. is to new and aspiring graduate students. [Matt has licensed the guide for sharing with special terms under the Creative Commons license.]

By the time you finish high school, you know a bit more:

With a bachelor's degree, you gain a specialty:

Page 24: Why did I become a ruby committer

知識

Matt Might, a professor in Computer Science at the University of Utah, created The Illustrated Guide to a Ph.D. to explain what a Ph.D. is to new and aspiring graduate students. [Matt has licensed the guide for sharing with special terms under the Creative Commons license.]

A master's degree deepens that specialty:

Reading research papers takes you to the edge of human knowledge:

Page 25: Why did I become a ruby committer

知識

Matt Might, a professor in Computer Science at the University of Utah, created The Illustrated Guide to a Ph.D. to explain what a Ph.D. is to new and aspiring graduate students. [Matt has licensed the guide for sharing with special terms under the Creative Commons license.]

Once you're at the boundary, you focus:

You push at the boundary for a few years:

Page 26: Why did I become a ruby committer

知識

Matt Might, a professor in Computer Science at the University of Utah, created The Illustrated Guide to a Ph.D. to explain what a Ph.D. is to new and aspiring graduate students. [Matt has licensed the guide for sharing with special terms under the Creative Commons license.]

Until one day, the boundary gives way:

And, that dent you've made is called a Ph.D.:

Page 27: Why did I become a ruby committer

知識

Matt Might, a professor in Computer Science at the University of Utah, created The Illustrated Guide to a Ph.D. to explain what a Ph.D. is to new and aspiring graduate students. [Matt has licensed the guide for sharing with special terms under the Creative Commons license.]

Of course, the world looks different to you now:

So, don't forget the bigger picture:

Keep pushing.

Page 28: Why did I become a ruby committer

知識

Matt Might, a professor in Computer Science at the University of Utah, created The Illustrated Guide to a Ph.D. to explain what a Ph.D. is to new and aspiring graduate students. [Matt has licensed the guide for sharing with special terms under the Creative Commons license.]

Of course, the world looks different to you now:

So, don't forget the bigger picture:

Keep pushing.

知識の範囲がどんどん大きくなっていく そのうち境界線まで誰も到達できなくなる?

Page 29: Why did I become a ruby committer

人類の知識(実現範囲)の変遷

遥か昔 今

学習に掛ける時間の増加 情報の流通・体系化 教育理論の進化 教育につかうツールの進化

遥か昔の全て

2045年には技術的特異点(シンギュラリティ)が?

新石器革命 印刷革命 科学革命 産業革命

etc…

Page 30: Why did I become a ruby committer

諸君 私はツールが好きだ (以下略)

石器 に始まって青銅器、鉄器、、、 印刷機、電気、車、重機、飛行機、計算機、、、 パンチカード、アセンブラ、コンパイラ。。。 そして、いまここにRubyがある

Rubyによって容易に たのしく 学習/実装できる範囲

性能改善や新機能によって 広がる世界 gemによって広がる世界

Page 31: Why did I become a ruby committer

諸君 私はツールが好きだ (以下略)

石器 に始まって青銅器、鉄器、、、 印刷機、電気、車、重機、飛行機、計算機、、、 パンチカード、アセンブラ、コンパイラ。。。 そして、いまここにRubyがある

Ruby on Rails !

性能改善や新機能によって 広がる世界 gemによって広がる世界

Rubyによって容易に たのしく 学習/実装できる範囲

Page 32: Why did I become a ruby committer

あるRUBYISTがCOMMITTERになったその理由

Rubyはすばらしいツールである たのしい! きもちいい!

もっと たのしく、気持ちよくなりたい より安全に (NO SEGV!) より怠惰に (NEW FEATURE!) よりストレスなく (MORE SPEED!)

そのための努力は惜しまない “All for one and one for all” Committerになったのは手を出しやすい範囲が、 たまたまCoreの部分だったから。

patches welcome!

new features welcome!

performance issues welcome!

benchmarks welcome!

速くするために ユーザーが頑張るとかいうことをしない

Page 33: Why did I become a ruby committer

おわり ここまでお付き合いくださり、 ありがとうございました