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
78
継続オペレータの話
Masayuki Mizuno
August 21, 2024
Tweet
Share
More Decks by Masayuki Mizuno
See All by Masayuki Mizuno
Rubyでリストモナドを使う
fetburner
0
91
次世代のプロファイラVernierを試す
fetburner
0
85
数値計算とメモリ最適化
fetburner
0
84
3/14なので円周率を計算する
fetburner
0
330
ネットワーク機器の中の OCaml
fetburner
1
650
Gotanda.rb#56
fetburner
0
82
遅延評価を使ってOSSのバグを修正した話
fetburner
1
190
Featured
See All Featured
How STYLIGHT went responsive
nonsquared
93
5.1k
The Brand Is Dead. Long Live the Brand.
mthomps
53
37k
Optimizing for Happiness
mojombo
375
69k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
278
13k
What the flash - Photography Introduction
edds
67
11k
A Tale of Four Properties
chriscoyier
155
22k
Principles of Awesome APIs and How to Build Them.
keavy
125
16k
Clear Off the Table
cherdarchuk
90
320k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
354
29k
Learning to Love Humans: Emotional Interface Design
aarron
270
40k
Raft: Consensus for Rubyists
vanstee
135
6.5k
Building a Scalable Design System with Sketch
lauravandoore
458
32k
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ͱ࣮ͯͯ͘͠͠Ε·ͤΜ͔Ͷʜ