Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
IRB and Reline Kaigi 2024
Search
ima1zumi
May 31, 2024
0
7
IRB and Reline Kaigi 2024
ima1zumi
May 31, 2024
Tweet
Share
More Decks by ima1zumi
See All by ima1zumi
Exploring Reline: Enhancing Command Line Usability
ima1zumi
0
32
10年物のRailsアプリにキャッチアップ!〜コードを読まずに理解したかった〜
ima1zumi
0
55
RubyKaigiの登壇者一覧ページを作った
ima1zumi
0
220
Relineのその後の生活
ima1zumi
0
180
Exploring Reline: Enhancing Command Line Usability
ima1zumi
3
13k
Reline 1分 Cooking
ima1zumi
0
22
続・mruby/cにUTF-8 を実装する
ima1zumi
1
22
UTF-8 is coming to mruby/c
ima1zumi
4
5.2k
たのしいString
ima1zumi
1
540
Featured
See All Featured
It's Worth the Effort
3n
183
28k
Bash Introduction
62gerente
608
210k
Into the Great Unknown - MozCon
thekraken
33
1.5k
4 Signs Your Business is Dying
shpigford
181
21k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Gamification - CAS2011
davidbonilla
80
5.1k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
132
33k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
How GitHub (no longer) Works
holman
311
140k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
111
49k
Optimizing for Happiness
mojombo
376
70k
Transcript
IRB and Reline Kaigi in RubyKaigi 2024 RubyKaigi 2024ࣄޙษڧձ ࢥ͍ग़͕ࢭ·Βͳ͍
2024-05-31 Mari Imaizumi @ima1zumi
Haisai • Mari Imaizumi @ima1zumi • STORES, Inc. • IRB
and Reline committer 2
3
IRB and Reline Kaigi in RubyKaigi 2024 4
IRB Reline team • @tompng / Tomoya Ishida • @st0012
/ Stan Lo • @hasumikin / Hitoshi Hasumi • @ima1zumi / Mari Imaizumi 5
IRB Reline team • IRB, Reline, ruby/yamatanooroti, etc ʹίϛοτͰ͖Δ •
ruby/ruby ʹίϛοτͰ͖ͳ͍ͷͰɺRubyίϛολʔͰͳ͍ • IRB, Reline ͷϦϦʔε͕Ͱ͖Δ 6
IRB Reline team 7
IRB Reline team • RubyίϛολʔDay 0ʹຖ։ൃऀձٞΛ͍ͯ͠Δ • IRB Reline team࣮࣭։ൃऀձٞͯ͠Δ
• ډञόʔΦϑΟγϟϧύʔςΟʔձͰ • ࠓDay 1-3ͷʹ͍Ζ͍Ζͳͱ͜ΖͰߦΘΕ͍ͯͨ 8
Α͋͘Δ࣭: StanͱͲ͏ͬͯίϛϡχέʔ γϣϯ͍ͯ͠Δͷ͔ • ӳޠ • ීஈSlackGitHubͰͷςΩετίϛϡχέʔγϣϯ • RubyKaigiͷͱ͖ର໘Ͱӳޠ •
ࢲͷӳޠྗͰࡶஊݫ͍͠ɻͰIRBRelineͷͳΜͱ͔ΪϦΪϦ͍ͭͯ ͍͚ͨΓɺ͍͍͚ͭͯͳ͔ͬͨΓ͢Δ • จ຺Ͱ͍ͩͿิ͕ޮ͍ͯͦ͏ • ӳձ͕ۤखͰίʔυͱ͍͏ڞ௨ೝ͕ࣝ͋Δͱ͍͢͠ 9
KaigiͰٞͨ͠τϐοΫͷ հ 10
ເ Γ͍ͨ͜ͱɺ͘͠ᆵ 11
Remote IRB • ಈ࡞தͷRubyϓϩηεʹIRB͔Βattach͢Δ • productionͰσόοά͢Δͷʹ͑Δ͔ • Ͳ͏ͬͯ௨৴͢ΔʁRelineͲ͏͢Δʁ • RubyKaigiޙʹ࣮Λ͍͔ͭ͘ݟ͚ͭͨ
• https://github.com/QWYNG/irb-remote (druby) • https://mametter.hatenablog.com/entry/20070527/p1 (Unix socket) 12
repl_type_completorΛσϑΥϧτʹ͍ͨ͠ • IRBͷิΛܕิʹ͢ΔϥΠϒϥϦ • σϑΥϧτਖ਼نදݱͰิରΛग़͍ͯ͠ΔͷͰਫ਼͕ѱ͍ • repl_type_completorΛσϑΥϧτʹ͍ͨ͠ • ར༻࣮͕͋Δͱਪન͍͢͠ •
ಛʹೖΕΔσϝϦοτͳ͍ • /sig ʹRBSϑΝΠϧ͕େྔʹ͋ΔͱIRBͷىಈ͕͘ͳΔ͔ • Πϯετʔϧ&ઃఆํ๏ • IRBͷܕิΛ༗ޮʹ͢Δํ๏ - Eggshell https://imaizumimr.hatenablog.com/entry/2023/11/22/232624 13
yamatanooroti͕͍ • ͚ςεςΟϯάϑϨʔϜϫʔΫ • E2EςετͷΑ͏ͳͷ • ruby/yamatanooroti is forked from
aycabta/yamatanooroti • sleep 0.1 Ͱग़ྗΛ͍ͬͯΔ͔Β͍ • ϦτϥΠ͕΄͍͠ 14
·ͱΊ • ·ͩ·ͩເ͕͍ͬͺ͍͋Δ • खͬͯΒ͑Δͱ͋Γ͕͍ͨ • ͜Μͳ͜ͱ͕ΕͨΒ͍͍ͳɺͱ͍͏ϑΟʔυόοΫͱͯॿ͔Γ ·͢ • ࿓Լձٞͱָ͍ͯ͠
15
Appendix 16
ฤूίϚϯυͷϦϑΝΫλϦϯά͍ͨ͠ • ઃఆ `beginning-of-line` ͕ͩݺΕΔϝιου `beginning_of_line` • alias_method࿙Ε͕ͱ͖Ͳ͖͋Δ • ίʔυத͔ΒݺΕͯͳ͍͔ΒෆཁϝιουΈ͍ͨʹݟ͑Δ
17
ed_quoted_insert͕࣮ݱͰ͖ͳ͍ • ೖྗͨ͠จࣈΛͦͷ··ߦʹՃ͢Δػೳ • C-aΛೖྗͨ͠Βߦ಄ҠಈͰͳ͘^Aͱೖྗ͞ΕΔ • ͍·ͷRelineͰΩʔೖྗͰಛఆͷঢ়ଶʹભҠͤ͞Δͷ͍͠ • bracketed_paste_startΈ͍ͨʹ௨ৗͷॲཧ͕Βͳ͍Α͏ʹ͢ΕΑ ͦ͞͏
18