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
420
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
590
UFO演算子について
5t111111
0
320
Rubyと戯れるOSS DTM
5t111111
4
740
Rubyの拡張をCrystalで書いてみる
5t111111
0
110
YARV INTRODUCTION
5t111111
0
88
Other Decks in Programming
See All in Programming
モバイルアプリにおける自動テストの導入戦略
ostk0069
0
110
創造的活動から切り拓く新たなキャリア 好きから始めてみる夜勤オペレーターからSREへの転身
yjszk
1
130
Go の GC の不得意な部分を克服したい
taiyow
2
770
ゆるやかにgolangci-lintのルールを強くする / Kyoto.go #56
utgwkk
1
370
短期間での新規プロダクト開発における「コスパの良い」Goのテスト戦略」 / kamakura.go
n3xem
2
170
テストコード文化を0から作り、変化し続けた組織
kazatohiei
2
1.5k
Stackless и stackful? Корутины и асинхронность в Go
lamodatech
0
690
tidymodelsによるtidyな生存時間解析 / Japan.R2024
dropout009
1
770
create_tableをしただけなのに〜囚われのuuid編〜
daisukeshinoku
0
240
【re:Growth 2024】 Aurora DSQL をちゃんと話します!
maroon1st
0
770
Fibonacci Function Gallery - Part 1
philipschwarz
PRO
0
210
CSC305 Lecture 25
javiergs
PRO
0
130
Featured
See All Featured
GraphQLの誤解/rethinking-graphql
sonatard
67
10k
Facilitating Awesome Meetings
lara
50
6.1k
A Modern Web Designer's Workflow
chriscoyier
693
190k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
45
2.2k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
Mobile First: as difficult as doing things right
swwweet
222
9k
Producing Creativity
orderedlist
PRO
341
39k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
0
97
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
330
21k
Art, The Web, and Tiny UX
lynnandtonic
298
20k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
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@TUNU*'FYQSUIFOFYQSFMTF&/% UIFO5)&/ ] FMTF&-4&FYQS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BSTFS 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@FWBM QBSTFSSCZ EFG@SFEVDF@ WBM @WBMVFT SFTVMU SFTVM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ϯάϝλϓϩ͕͞Δ͜ͱ͕ଟ͍ NFUIPE@NJTTJOHͰ3VCZίʔυʹॲཧΛҠৡ͢Δͱ͔ w
ύʔαʔαΫοͱॻ͚ΔͱԿ͔ͷઃఆϚΠάϨʔγϣϯͷॻ͖ࣺͯεΫϦϓτͱ͔͕ॻ͖͘͢ͳΔ 3BDDΛͬͨOHJOYઃఆϑΝΠϧͷղੳ IUUQTRJJUBDPNGVKJTIJOJUFNTEGCGEDE w --7.ͱ͔͋Δ͠ϓϩάϥϛϯάݴޠ࡞Γ͘͢ͳͬͯΔ͔Β৭ʑָ͍͠ ͔ ͨͩ--7.ͷ3VCZCJOEJOH͜Εͱ͍ͬͨͷ͕ͳ͍ MMWN@JS@GJMFQVUT TUS ʜʁ
ޚਗ਼ௌ༗͏ޚ࠲͍·ͨ͠ RACC INTRODUCTION w ࢀߟ 3BDDͷ͍ํ IUUQJMPWFSVCZOFUKBQSPKFDUTSBDDEPDVTBHFIUNM 3VCZΛഒ͏ͨΊͷຊແಓฤ
w εϖγϟϧαϯΫε !LPJD ˢͷʮഒʙʯͷຊΛڭ͑ͯ͘Εͨ