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
10年物のRailsアプリにキャッチアップ!〜コードを読まずに理解したかった〜
ima1zumi
0
17
RubyKaigiの登壇者一覧ページを作った
ima1zumi
0
190
Relineのその後の生活
ima1zumi
0
140
Exploring Reline: Enhancing Command Line Usability
ima1zumi
3
13k
Reline 1分 Cooking
ima1zumi
0
21
続・mruby/cにUTF-8 を実装する
ima1zumi
1
21
UTF-8 is coming to mruby/c
ima1zumi
4
5.1k
たのしいString
ima1zumi
1
520
Watchから始めるOSS生活
ima1zumi
0
59
Featured
See All Featured
Rebuilding a faster, lazier Slack
samanthasiow
79
8.6k
Designing for Performance
lara
604
68k
Embracing the Ebb and Flow
colly
84
4.5k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.8k
Automating Front-end Workflow
addyosmani
1366
200k
Side Projects
sachag
452
42k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
Producing Creativity
orderedlist
PRO
341
39k
Docker and Python
trallard
40
3.1k
How to Think Like a Performance Engineer
csswizardry
20
1.1k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
108
49k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
8.1k
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