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
150
継続オペレータの話
Masayuki Mizuno
August 21, 2024
Tweet
Share
More Decks by Masayuki Mizuno
See All by Masayuki Mizuno
RubyでSlackのbotを作ろう
fetburner
0
99
Rubyでリストモナドを使う
fetburner
0
130
次世代のプロファイラVernierを試す
fetburner
0
95
数値計算とメモリ最適化
fetburner
0
200
3/14なので円周率を計算する
fetburner
0
370
ネットワーク機器の中の OCaml
fetburner
1
680
Gotanda.rb#56
fetburner
0
98
遅延評価を使ってOSSのバグを修正した話
fetburner
1
220
Featured
See All Featured
How STYLIGHT went responsive
nonsquared
95
5.2k
The World Runs on Bad Software
bkeepers
PRO
65
11k
Designing for humans not robots
tammielis
250
25k
The Pragmatic Product Professional
lauravandoore
32
6.3k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.5k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
229
52k
The Invisible Side of Design
smashingmag
298
50k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5.1k
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ͱ࣮ͯͯ͘͠͠Ε·ͤΜ͔Ͷʜ