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
42
10年物のRailsアプリにキャッチアップ!〜コードを読まずに理解したかった〜
ima1zumi
0
61
RubyKaigiの登壇者一覧ページを作った
ima1zumi
0
250
Relineのその後の生活
ima1zumi
0
190
Exploring Reline: Enhancing Command Line Usability
ima1zumi
3
14k
Reline 1分 Cooking
ima1zumi
0
24
続・mruby/cにUTF-8 を実装する
ima1zumi
1
22
UTF-8 is coming to mruby/c
ima1zumi
4
5.2k
たのしいString
ima1zumi
1
550
Featured
See All Featured
Understanding Cognitive Biases in Performance Measurement
bluesmoon
27
1.5k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Code Review Best Practice
trishagee
65
17k
Building Applications with DynamoDB
mza
93
6.2k
A Philosophy of Restraint
colly
203
16k
KATA
mclloyd
29
14k
Why You Should Never Use an ORM
jnunemaker
PRO
54
9.1k
jQuery: Nuts, Bolts and Bling
dougneiner
62
7.6k
Bash Introduction
62gerente
610
210k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
230
52k
Building Better People: How to give real-time feedback that sticks.
wjessup
366
19k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
49k
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