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
継続オペレータの話
Search
Masayuki Mizuno
August 21, 2024
0
120
継続オペレータの話
Masayuki Mizuno
August 21, 2024
Tweet
Share
More Decks by Masayuki Mizuno
See All by Masayuki Mizuno
RubyでSlackのbotを作ろう
fetburner
0
87
Rubyでリストモナドを使う
fetburner
0
120
次世代のプロファイラVernierを試す
fetburner
0
91
数値計算とメモリ最適化
fetburner
0
180
3/14なので円周率を計算する
fetburner
0
360
ネットワーク機器の中の OCaml
fetburner
1
670
Gotanda.rb#56
fetburner
0
93
遅延評価を使ってOSSのバグを修正した話
fetburner
1
210
Featured
See All Featured
Embracing the Ebb and Flow
colly
84
4.5k
Gamification - CAS2011
davidbonilla
80
5k
Designing on Purpose - Digital PM Summit 2013
jponch
115
7k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
131
33k
Art, The Web, and Tiny UX
lynnandtonic
297
20k
Designing for Performance
lara
604
68k
Teambox: Starting and Learning
jrom
133
8.8k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
Code Review Best Practice
trishagee
64
17k
Why You Should Never Use an ORM
jnunemaker
PRO
54
9.1k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Transcript
©2024 Wantedly, Inc. ܧଓΦϖϨʔλͷ Shibuya.rb[:20240821] Aug 21, 2024 - Masayuki
Mizuno
©2024 Wantedly, Inc. ࠓ͢͜ͱ
©2024 Wantedly, Inc. ࠓ͢͜ͱ Ϟνϕʔγϣϯ w ඇܾఆੑܭࢉͰͷίʔϧόοΫࠈ 3VCZʹ࣮͞Ε͍ͯΔܧଓΦϖϨʔλͷհ
w DBMMDDͷհ DBMMDDҎ֎ͷܧଓΦϖϨʔλͷհ w TIJGUSFTFUͷհ w DBMMDDʹΑΔTIJGUSFTFUͷ࣮ w TIJGUSFTFUΛ༻͍ͨඇܾఆܭࢉͷ࣮
©2024 Wantedly, Inc. Ϟνϕʔγϣϯ
©2024 Wantedly, Inc. Ϟνϕʔγϣϯ doʙendͰωετΛਂͤͣ͘ίʔυยΛΓग़͍ͨ͠ HaskellͷϦετϞφυతͳίʔυΛRubyͰॻ͘ͱίʔϧόοΫࠈʹͳͬͯ͠·͏
©2024 Wantedly, Inc. ϝλϓϩͰͷղܾ ੍ޚߏͷ࠶ൃ໌͕ඞཁ Ifจ͕ཉ͚͠ΕDSL͕ղऍͰ͖ΔͷΛ৽͘͠༻ҙ͠ͳ͚ΕͳΒͳ͍
©2024 Wantedly, Inc. ܧଓΦϖϨʔλͰͷղܾ ੍ޚߏͷ࠶ൃ໌ෆཁ ωετΛਂͤͣ͘ίʔυยΛΓग़ͯ͠ϧʔϓ͍ͯ͠Δ
©2024 Wantedly, Inc. 3VCZʹ࣮͞Ε͍ͯΔܧଓΦϖϨʔλͷհ
©2024 Wantedly, Inc. Rubyʹ࣮͞Ε͍ͯΔܧଓΦϖϨʔλ: call/cc ܧଓʢͦΕҎ߱ͷܭࢉʣΛશͯΓग़ͯ͠ଋറ͢Δ setjmpతͳΠϝʔδ https://docs.ruby-lang.org/ja/latest/class/Continuation.html ΑΓ
©2024 Wantedly, Inc. ܧଓΦϖϨʔλͰͷղܾ࠶ܝ call/ccͰΓग़ͨ͠ίʔυยΛԿݺͼग़͍ͯ͠Δ call/ccͰߦ͖ͬͨΓͬͯ͜ͳ͍ͷͰɺΓઌcall/ccͰొ͍ͯ͠Δ
©2024 Wantedly, Inc. call/ccͷ ඞཁҎ্ʹେ͖ͳίʔυยΛΓग़ͯ͠͠·͏ endҎ߱ͷίʔυΓग़ͯ͠͠·͏ͷͰɺదͳॴͰଧͪࢭΊʹ͢ΔͨΊʹcall/cc͕2ճඞཁ
©2024 Wantedly, Inc. DBMMDDҎ֎ͷܧଓΦϖϨʔλͷհ
©2024 Wantedly, Inc. call/ccҎ֎ͷܧଓΦϖϨʔλ: shift/reset shift͔Βreset·ͰͷؒͷίʔυยΛΓग़͢ ߦ͖ͬͨΓͬͯ͜ͳ͍call/ccͱҧ͍ɺresetʹ౸ୡͨ͠Β͖ͬͯͯ͘ΕΔ
©2024 Wantedly, Inc. call/ccʹΑΔshift/resetͷ࣮ άϩʔόϧมͱcall/ccͰshift/reset࣮Մೳ ΓઌΛ͓֮͑ͯͨ͘Ίͷάϩʔόϧมඞཁ https://okmij.org/ftp/continuations/shift-reset.scm ͷScheme࣮ΛRubyʹҊͨ͠ͷ
©2024 Wantedly, Inc. shift/resetΛ༻͍ͨඇܾఆੑܭࢉͷ࣮ ૂͬͨίʔυย͚ͩऔΓग़ͤΔͷͰɺ࣮͕γϯϓϧ resetͰͬͯ͘ΕΔͷͰɺflat_map͕ͦͷ··͑Δ
©2024 Wantedly, Inc. ·ͱΊ
©2024 Wantedly, Inc. ·ͱΊ 3VCZʹ࣮͞Ε͍ͯΔܧଓΦϖϨʔλͷհ w DBMMDDΛ͑ɺͦΕҎ߱શ෦ͷίʔυยΛΓग़ͤΔ DBMMDDҎ֎ͷܧଓΦϖϨʔλͷհ
w TIJGUSFTFUͷհ w TIJGUʙSFTFUͷؒͷίʔυยΛΓग़ͤΔ w DBMMDDʹΑΔTIJGUSFTFUͷ࣮ w TIJGUSFTFUΛ༻͍ͨඇܾఆܭࢉͷ࣮ w ಛఆ۠ؒͷίʔυยΛΓग़ͤΔͷͰɺ࣮͕γϯϓϧʹ w DBMMDDͳΜ͔ΑΓTIJGUSFTFUͷํΛQSJNJUJWFͱ࣮ͯͯ͘͠͠Ε·ͤΜ͔Ͷʜ