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
Racc Introduction
Search
Hirofumi Wakasugi
October 25, 2017
Programming
1
410
Racc Introduction
201-10-25 Shinjuku.rb #54 言語のしくみ
Hirofumi Wakasugi
October 25, 2017
Tweet
Share
More Decks by Hirofumi Wakasugi
See All by Hirofumi Wakasugi
Keep Calm and Enjoy Gachima
5t111111
3
350
Swift Functional Programming
5t111111
0
260
Middleman on Production
5t111111
0
160
名古屋Ruby会議03 高速一言感想
5t111111
3
1k
ドキュメント翻訳懺悔のLT ~進捗ダメです~
5t111111
1
580
UFO演算子について
5t111111
0
310
Rubyと戯れるOSS DTM
5t111111
4
740
Rubyの拡張をCrystalで書いてみる
5t111111
0
100
YARV INTRODUCTION
5t111111
0
86
Other Decks in Programming
See All in Programming
リアーキテクチャxDDD 1年間の取り組みと進化
hsawaji
1
220
レガシーシステムにどう立ち向かうか 複雑さと理想と現実/vs-legacy
suzukihoge
14
2.2k
AWS Lambdaから始まった Serverlessの「熱」とキャリアパス / It started with AWS Lambda Serverless “fever” and career path
seike460
PRO
1
260
ペアーズにおけるAmazon Bedrockを⽤いた障害対応⽀援 ⽣成AIツールの導⼊事例 @ 20241115配信AWSウェビナー登壇
fukubaka0825
6
1.9k
役立つログに取り組もう
irof
28
9.6k
.NET のための通信フレームワーク MagicOnion 入門 / Introduction to MagicOnion
mayuki
1
1.5k
3rd party scriptでもReactを使いたい! Preact + Reactのハイブリッド開発
righttouch
PRO
1
600
シェーダーで魅せるMapLibreの動的ラスタータイル
satoshi7190
1
480
EventSourcingの理想と現実
wenas
6
2.3k
どうして僕の作ったクラスが手続き型と言われなきゃいけないんですか
akikogoto
1
120
Amazon Qを使ってIaCを触ろう!
maruto
0
400
シールドクラスをはじめよう / Getting Started with Sealed Classes
mackey0225
4
640
Featured
See All Featured
Bash Introduction
62gerente
608
210k
Six Lessons from altMBA
skipperchong
27
3.5k
5 minutes of I Can Smell Your CMS
philhawksworth
202
19k
Being A Developer After 40
akosma
86
590k
Code Reviewing Like a Champion
maltzj
520
39k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
169
50k
Practical Orchestrator
shlominoach
186
10k
Mobile First: as difficult as doing things right
swwweet
222
8.9k
Designing for Performance
lara
604
68k
GitHub's CSS Performance
jonrohan
1030
460k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
Transcript
RACC INTRODUCTION Hirofumi Wakasugi (@5T111111)
None
3BDDͷհ RACC INTRODUCTION
ݴޠॲཧܥʹ͓͚ΔίϯύΠϥͷࣄ RACC INTRODUCTION ࣈ۟ղੳ MFYJDBMBOBMZTJT wೖྗจࣈྻΛτʔΫϯʹׂ UPLFOJ[F wࣈ۟ղੳͷػߏΛ୲͏ͷΛࣈ۟ղੳث
MFYFS ͱ͍͏ ߏจղੳ TZOUBYBOBMZTJT wτʔΫϯ͔Β"45Λߏங͢Δ wߏจղੳͷػߏΛ୲͏ͷΛߏจղੳث QBSTFS ͱ͍͏ ҙຯղੳ TFNBOUJDTBOBMZTJT wʜ ࠷దԽ DPEFPQUJNJ[BUJPO wʜ όΠφϦίʔυੜ DPEFHFOFSBUJPO wʜ
3BDDQBSTFSHFOFSBUPS RACC INTRODUCTION
ݴޠॲཧܥʹ͓͚ΔίϯύΠϥͷࣄ RACC INTRODUCTION ࣈ۟ղੳ MFYJDBMBOBMZTJT wೖྗจࣈྻΛτʔΫϯʹׂ UPLFOJ[F wࣈ۟ղੳͷػߏΛ୲͏ͷΛࣈ۟ղੳث
MFYFS ͱ͍͏ ߏจղੳ TZOUBYBOBMZTJT wτʔΫϯ͔Β"45Λߏங͢Δ wߏจղੳͷػߏΛ୲͏ͷΛߏจղੳث QBSTFS ͱ͍͏ ҙຯղੳ TFNBOUJDTBOBMZTJT wʜ ࠷దԽ DPEFPQUJNJ[BUJPO wʜ όΠφϦίʔυੜ DPEFHFOFSBUJPO wʜ
QBSTFSHFOFSBUPSͬͯԿͰ͔͢ RACC INTRODUCTION
QBSTFSHFOFSBUPSͱ RACC INTRODUCTION w ͦͷ໊ͷ௨ΓʮQBSTFSΛੜ͢Δͷʯ w QBSTFSϓϩάϥϜͰ͋Δ w QBSTFSΛ։ൃ͢Δͷ Ұൠతʹ
େม w QBSTFSʹٻΊΒΕΔػೳ ಡΈ͘͢نଇԽ͍͢͠จ๏ͱ͔-"-3ͱ͔ ൚༻త ˣ QBSTFSΛࣗಈੜ͢ΔϓϩάϥϜ͕͋Δͱศར
QBSTFSHFOFSBUPS RACC INTRODUCTION w දతͳQBSTFSHFOFSBUPSʹɺ:BDDͦͷ্Ґޓͷ(/6#JTPO͕͋Δ .3*ͷίϯύΠϥͰ#JTPOΛ͍ͬͯΔ 4FFAQBSTFZAGPSEFUBJMT w
3BDD؆୯ʹݴ͏ͱ:BDDͷ3VCZ൛ จ๏ϑΝΠϧΛॻ͘͜ͱͰίʔυͷʮߏʯΛղੳ͢Δ εΫϦϓτΛ࡞Δ ྨࣅͷͷʹ1ZUIPOͷ1-:ͳͲ͕͋Δ
ࠓ͔ΒSBDDͷ͜ͱͬͱ͘ཧ༝͋Δʁ RACC INTRODUCTION w SBDDͰάάͬͯ͋Μ·Γ࠷ۙͷهࣄ͕ώοτ͠ͳ͍ΑͶʁ ͍ΖΜͳͱ͜ΖͰΘΕͯΔ͔Β͖ͬͱؒతʹ͍ͬͯΔ QBSTFSHFN 3VCPDPQͱ͔ͰΘΕͯΔͭ
ͷQBSTFSੜSBDD SVCFYͱ͔͔ͳΓ৽͍͠HFNͰSBDD͕ΘΕͯΔ w Ͱݴޠॲཧܥ͍͡Γ͍ͨਓ͔͠ඞཁͳ͍ΑͶʁ QBSTFSѻ͑ΔΑ͏ʹͳ͓ͬͯ͘ͱศརͰ͢ ޙड़
SBDDͷจ๏ϑΝΠϧ RACC INTRODUCTION DMBTT.Z1BSTFS SVMF JG@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͋Δ
SBDDͷจ๏ϑΝΠϧ RACC INTRODUCTION DMBTT.Z1BSTFS SVMF JG@TUNU*'FYQSUIFOFYQSFMTF&/% UIFO5)&/ ] FMTF&-4&FYQS ]
FYQS/6.#&3 ]*%&/5 ]453*/( ǘ FOE ࠨลʹ͋Δه߸ ඇऴه߸ͱ͍ͬͯ ׂ͞ΕͨΓଞͷه߸ (ྻ) ʹஔ͞ΕΔ ඇऴه߸ҰൠతʹখจࣈͰॻ͘
SBDDͷจ๏ϑΝΠϧ RACC INTRODUCTION DMBTT.Z1BSTFS SVMF JG@TUNU*'FYQSUIFOFYQSFMTF&/% UIFO5)&/ ] FMTF&-4&FYQS ]
FYQS/6.#&3 ]*%&/5 ]453*/( ǘ FOE ӈลʹ͚ͩ͋Δه߸ ऴه߸ͱ͍ͬͯ ͦΕҎ্ׂ͞ΕͨΓ͢Δ͜ͱͳ͍ ʮ͜ͷྫͰʯͯ͢େจࣈʹͳ͍ͬͯΔ
SBDDͷจ๏ϑΝΠϧ RACC INTRODUCTION DMBTT.Z1BSTFS SVMF JG@TUNU*'FYQSUIFOFYQSFMTF&/% UIFO5)&/ ] FMTF&-4&FYQS ]
FYQS/6.#&3 ]*%&/5 ]453*/( ǘ FOE ߏจղੳ͞ΕΔτʔΫϯྻ ྫ͑࣍ͷΑ͏ͳऴه߸ͷྻͰ͋Δ IF IDENT THEN STRING ELSE NUMBER END
SBDDͷจ๏ϑΝΠϧ RACC INTRODUCTION DMBTT.Z1BSTFS SVMF JG@TUNU*'FYQSUIFOFYQSFMTF&/% UIFO5)&/ ] FMTF&-4&FYQS ]
FYQS/6.#&3 ]*%&/5 ]453*/( ǘ FOE IF IDENT THEN STRING ELSE NUMBER END ͕ IF expr then expr else END ͷه߸ʹ߹க͠ if_stmtͱͯ͠ղऍ͞ΕΔ
ߏจղੳͷྲྀΕ RACC INTRODUCTION JGGMBH ǎGMBHJTUSVF FOE
ߏจղੳͷྲྀΕ RACC INTRODUCTION JGGMBH ǎGMBHJTUSVF FOE JGGMBHǎGMBHJTUSVFǏFOE ↓
ߏจղੳͷྲྀΕ RACC INTRODUCTION JGGMBHǎGMBHJTUSVFǏFOE ↓ *'*%&/5453*/(&/%
SBDDͷจ๏ϑΝΠϧ RACC INTRODUCTION DMBTT.Z1BSTFS SVMF JG@TUNU*'FYQSUIFOFYQSFMTF&/% UIFO5)&/ ] FMTF&-4&FYQS ]
FYQS/6.#&3 ]*%&/5 ]453*/( ǘ FOE *'*%&/5453*/(&/% ȕ *'FYQSFYQS&/% ȕ *'FYQS UIFO FYQS FMTF &/% ȕ JG@TUNU
3VCZͰنଇʹର͢ΔΞΫγϣϯ͕ॻ͚Δ RACC INTRODUCTION
RACC INTRODUCTION DMBTT.Z1BSTFS SVMF JG@TUNU*'FYQSUIFOFYQSFMTF&/% \ SFTVMUJGWBM<> WBM<> FOE ^
ǘ FYQS/6.#&3 \SFTVMUWBM<>UP@J^ ]*%&/5 \SFTVMUWBM<>^ ]453*/( \SFTVMUWBM<>^ ǘ FOE valͱresultنఆͷม໊
3BDD͕ੜ͢ΔQBSTFSͷίʔυ RACC INTRODUCTION
RACC INTRODUCTION ǘ NPEVMF@FWBM QBSTFSSCZ
EFG@SFEVDF@ WBM @WBMVFT SFTVMU SFTVMUWBM<>UP@J SFTVMU FOE NPEVMF@FWBM QBSTFSSCZ EFG@SFEVDF@ WBM @WBMVFT SFTVMU SFTVMUWBM<> SFTVMU FOE NPEVMF@FWBM QBSTFSSCZ EFG@SFEVDF@ WBM @WBMVFT SFTVMU SFTVMUWBM<> SFTVMU FOE EFG@SFEVDF@OPOF WBM @WBMVFT SFTVMU WBM<> FOE ǘ େྔͷ module_eval
RACC INTRODUCTION ǘ NPEVMF@FWBM QBSTFSSCZ
EFG@SFEVDF@ WBM @WBMVFT SFTVMU SFTVMUWBM<>UP@J SFTVMU FOE NPEVMF@FWBM QBSTFSSCZ EFG@SFEVDF@ WBM @WBMVFT SFTVMU SFTVMUWBM<> SFTVMU FOE NPEVMF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CTION w 3VCZͰΞΫγϣϯ͕ॻ͚Δͷ͕खܰ μοΫλΠϐϯάϝλϓϩ͕͞Δ͜ͱ͕ଟ͍ NFUIPE@NJTTJOHͰ3VCZίʔυʹॲཧΛҠৡ͢Δͱ͔ w
ύʔαʔαΫοͱॻ͚ΔͱԿ͔ͷઃఆϚΠάϨʔγϣϯͷॻ͖ࣺͯεΫϦϓτͱ͔͕ॻ͖͘͢ͳΔ 3BDDΛͬͨOHJOYઃఆϑΝΠϧͷղੳ IUUQTRJJUBDPNGVKJTIJOJUFNTEGCGEDE w --7.ͱ͔͋Δ͠ϓϩάϥϛϯάݴޠ࡞Γ͘͢ͳͬͯΔ͔Β৭ʑָ͍͠ ͔ ͨͩ--7.ͷ3VCZCJOEJOH͜Εͱ͍ͬͨͷ͕ͳ͍ MMWN@JS@GJMFQVUT TUS ʜʁ
ޚਗ਼ௌ༗͏ޚ࠲͍·ͨ͠ RACC INTRODUCTION w ࢀߟ 3BDDͷ͍ํ IUUQJMPWFSVCZOFUKBQSPKFDUTSBDDEPDVTBHFIUNM 3VCZΛഒ͏ͨΊͷຊແಓฤ
w εϖγϟϧαϯΫε !LPJD ˢͷʮഒʙʯͷຊΛڭ͑ͯ͘Εͨ