Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
let_s_use_Eff.pdf
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
machu
November 08, 2018
Technology
82
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
let_s_use_Eff.pdf
machu
November 08, 2018
More Decks by machu
See All by machu
NBAチームから学ぶ強いチームの作り方
machuz
0
77
Authorization to implement with Extensible Effect
machuz
0
470
アルプの 認証/認可分離戦略と手法
machuz
3
810
AuthzCtx - Alp社内共有会
machuz
0
110
アルプのEff独自エフェクト集 / Alp-original ’Eff’ pearls
machuz
1
2.3k
Scalebaseバックエンド構成について/the backend design of Scalebase
machuz
0
6.6k
SQL Meisterへの道 ~更新編~ / sql-meister-CUD
machuz
0
2.4k
SQL Meisterへの道 ~基礎〜参照編~ / sql-meister-R
machuz
0
2.8k
Authz
machuz
0
330
Other Decks in Technology
See All in Technology
Issue 駆動でスペシャリストの意図を届ける、AI 実装のアクセシビリティ向上
thkt
0
120
synctest時代のhttptest Go 1.27で変わるHTTPサーバテストの裏側 / go conference2026 synctest and httptest
budougumi0617
1
3k
銀行勘定系システムにおける開発プロセス刷新×AIによる環境モダナイゼーション / Development Process Transformation and AI-Driven Environment Modernization
muit
1
2.3k
え、こんなに早く改修できるの?──新人エンジニアとスクラムマスターの2人が語る、AI×アジャイル開発の現場
ysasago
1
180
映像変換サーバーなしで端末内でHLSを生成してライブ配信
hikarusato
0
120
データ界隈LT祭 第1回LT登壇
taromatsui_cccmkhd
2
1.4k
エージェントはローカル、検証はMicroVM — Lambda MicroVMsでつくるServerless CI
fujioka6789
2
150
登壇の自信を奪う3匹のオバケ / 3 Ghosts That Rob You of Your Confidence in Public Speaking
pauli
9
990
山手線を徒歩で一周してわかった、 位置情報アプリは「足」が最強のデバッガー
hinakko
0
160
現場で役立つ技術負債の効果的な返済方法
masuda220
PRO
9
4.4k
HHKBエバンジェリストになる方法
941
0
110
あるけみー式LTスライド作成術
alchemy1115
2
220
Featured
See All Featured
Java REST API Framework Comparison - PWX 2021
mraible
34
9.7k
The Limits of Empathy - UXLibs8
cassininazir
1
670
The Cult of Friendly URLs
andyhume
79
7k
VelocityConf: Rendering Performance Case Studies
addyosmani
331
25k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
330
Building Flexible Design Systems
yeseniaperezcruz
330
41k
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
830
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
520
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
360
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
3.1k
Thoughts on Productivity
jonyablonski
76
5.4k
Exploring anti-patterns in Rails
aemeredith
4
510
Transcript
let's use Eff ~first step~
ࠓ ΄Μͷ͞ΘΓ͚ͩͰ͢
༻ޠͷઆ໌ • Monad Transformer • Extensible effect (use FreeMonad) •
˒Freer effects (use FreerMonad, Efficient Freer) • ࠓճಋೖ͢ΔͷFreer effectsɻ͜·͍ผͰࢿྉ࡞ͬͯ෦ձͰͰ͠·͢ɻ
effͰͳʹ͕͍ͨ͠ͷ͔ • DSLΛ࡞ͬͯͦΕΛ߹͍ͨ͠ɻ • DSLӳޠαϓϦDSLతͳ୯ҐͰ࡞ΔͱυϝΠϯ͕Ͱ͔͗ͯ͋͢·Γҙຯ͕ͳ͍ • ࡉ͔͍୯ҐͰDSLΛ࡞ΓɺͦΕΛUseCaseͰ߹͢ΕυϝΠϯ͕Β·ͳ͍ • DSLΛ࡞Δ·Ͱͳ͍ࡉ͔ͳEffect߹͍ͨ͠ •
zipkinͰͷτϨʔεॲཧͷϕϯνϚʔΫɺΞϓϦέʔγϣϯίʔυͷมߋ͕ඞཁͳٕज़Ҋ݅Λ͢ ҆͘શʹߦ͏͜ͱ͕Ͱ͖Δɻ • ※͜͜Ͱ͍͏DSLશͯEDSLͰ͢ɻ
Ͳ͏มΘΔͷ͔ SecondaryAdapter UseCase Domain Application ※ґଘੑٯసޙͷਤͰ͢ ·ͣ͜͜ʹDSL,InterpreterΛ ಋೖ͢Δɻ Lib ͍·Θ͠Մೳͳ෦͜͜
ίʔυͷΠϝʔδ
DSL • ͜Μͳײ͡ͷܕ(ADT)͕Ͱ͖·͢ɻ • store,find,delete,exists,clearMonad Stackૢ࡞ΛੵΉεϚʔτίϯετϥΫλͰ͢ɻҰݟͦ͠͏Ͱ͕͏ͱ͖؆୯ͳͷͰ҆͝৺Λ(ޙड़)
Interpreter • ఆٛͨ͠ADTΛύλʔϯϚονͯ͠ॲཧΛ͢Δɻ • ͜͜Ͱ৭ΜͳEffectΛ߹͢Δ͜ͱ͕Ͱ͖Δɻ
࣮ߦ • InterpreterͷςετΛషͬͯΈΔ • ͜ͷςετ௨Γ·͢ɻ • CacheIOͷதͰwriter,reader,either,taskΛ߹͍ͯ͠Δͷ ʹɺprogramͰ΄ͱΜͲҙࣝ͠ͳ͍ͰOK • ࣮ߦ࣌ʹͲͷEffectΛ͍ࠞͥͯΔ͔͚ͩڭ͑ͯ͋͛ͳ͍ͱ͍
͚ͳ͍͕ɺࡉ͔͘ҙࣝ͠ͳ͍ͰॅΉΑ͏ʹ͢Δ༧ఆ (CacheIO,TwilioIOͷελοΫΛ͕ͬͪΌΜͯ͜͠Θͨͩ͢ ͚ɺ͘Β͍ͷཻɻ
͏গ͠༡ΜͰΈΑ͏ • ಠࣗఆٛͷDSLͱผͰtaskܕͱUnitܕࠞͥͯΈΔɻ • ͜Εී௨ʹ௨Δɻ • ܕ߹ΘͤήʔϜ͕ͷ͘͢͝γϯϓϧʹͳ͍ͬͯΔͷ͕͓Θ͔Γ͍͚ͨͩΔͩΖ͏͔ɾɾɾɾɾ • sequenceEff.SequenceAͰ༻ҙ͞Ε͍ͯΔɻࠓͬͯΔͷΧόʔ͍ͯ͠Δɻ
Γ࡞ۀήʔ͜ͳͤ PRͰΔͷͰ͏ͪΐ͍͓ͪΛ