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
let_s_use_Eff.pdf
Search
machu
PRO
November 08, 2018
Technology
1
58
let_s_use_Eff.pdf
machu
PRO
November 08, 2018
Tweet
Share
More Decks by machu
See All by machu
NBAチームから学ぶ強いチームの作り方
machuz
PRO
0
30
Authorization to implement with Extensible Effect
machuz
PRO
0
360
アルプの 認証/認可分離戦略と手法
machuz
PRO
3
700
AuthzCtx - Alp社内共有会
machuz
PRO
0
65
アルプのEff独自エフェクト集 / Alp-original ’Eff’ pearls
machuz
PRO
1
1.7k
Scalebaseバックエンド構成について/the backend design of Scalebase
machuz
PRO
0
6.1k
SQL Meisterへの道 ~更新編~ / sql-meister-CUD
machuz
PRO
0
2.1k
SQL Meisterへの道 ~基礎〜参照編~ / sql-meister-R
machuz
PRO
0
2.5k
Authz
machuz
PRO
0
300
Other Decks in Technology
See All in Technology
AWS⼊社という選択肢、⾒えていますか
iwamot
2
1.1k
Evangelismo técnico: ¿qué, cómo y por qué?
trishagee
0
330
形式手法の 10 メートル手前 #kernelvm / Kernel VM Study Hokuriku Part 7
ytaka23
5
830
B2B SaaS × AI機能開発 〜テナント分離のパターン解説〜 / B2B SaaS x AI function development - Explanation of tenant separation pattern
oztick139
2
190
[CV勉強会@関東 ECCV2024 読み会] オンラインマッピング x トラッキング MapTracker: Tracking with Strided Memory Fusion for Consistent Vector HD Mapping (Chen+, ECCV24)
abemii
0
190
SREの組織類型に応じた リーダシップの考察
kenta_hi
PRO
1
650
安心してください、日本語使えますよ―Ubuntu日本語Remix提供休止に寄せて― 2024-11-17
nobutomurata
0
400
Can We Measure Developer Productivity?
ewolff
1
120
State of Open Source Web Mapping Libraries
dayjournal
0
240
RubyのWebアプリケーションを50倍速くする方法 / How to Make a Ruby Web Application 50 Times Faster
hogelog
2
910
Exadata Database Service on Dedicated Infrastructure(ExaDB-D) UI スクリーン・キャプチャ集
oracle4engineer
PRO
2
3.1k
DMARC 対応の話 - MIXI CTO オフィスアワー #04
bbqallstars
1
150
Featured
See All Featured
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
506
140k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.2k
Code Review Best Practice
trishagee
64
17k
The Cost Of JavaScript in 2023
addyosmani
45
6.7k
The Art of Programming - Codeland 2020
erikaheidi
52
13k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.8k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
How to Think Like a Performance Engineer
csswizardry
20
1.1k
Building Better People: How to give real-time feedback that sticks.
wjessup
364
19k
Ruby is Unlike a Banana
tanoku
96
11k
Docker and Python
trallard
40
3.1k
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ͰΔͷͰ͏ͪΐ͍͓ͪΛ