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
Clojure 1.9 概要紹介
Search
OHTA Shogo
September 25, 2017
Programming
4
1.3k
Clojure 1.9 概要紹介
2017/09/25のLisp meetup #56の発表資料です。
OHTA Shogo
September 25, 2017
Tweet
Share
More Decks by OHTA Shogo
See All by OHTA Shogo
テンクーでのClojure活用事例
athos
0
240
軽量デバッグツールPostmortemの紹介.pdf
athos
1
180
Clojure 1.10 概要紹介
athos
3
600
やってみる!clojure.spec
athos
4
920
kitchen-async: a promising (?) Promise library, or a poor man's core.async
athos
3
390
ここ最近のClojureScript
athos
5
1.6k
(= ? (+ nREPL Docker))
athos
0
470
clojure.specの話
athos
3
2.2k
clojure.specの話(仮)
athos
2
330
Other Decks in Programming
See All in Programming
rbs-inlineを導入してYARDからRBSに移行する
euglena1215
1
260
月間4.5億回再生を超える大規模サービス TVer iOSアプリのリアーキテクチャ戦略 - iOSDC2024
techtver
PRO
1
810
Jakarta EE meets AI
ivargrimstad
1
380
エンジニア1年目で複雑なコードの改善に取り組んだ話
mtnmr
3
1.9k
REXML改善のその後
naitoh
0
190
マイグレーションコード自作して File-Based Routing に自動移行!! ~250 ページの歴史的経緯を添えて~
cut0
1
260
null or undefined
susisu
23
6.2k
Lessons by WebAssembly app in production on CDN Edge Computing Service
tetsuharuohzeki
0
180
GenU導入でCDKに初挑戦し、悪戦苦闘した話
hideg
0
150
A New Era of Testing
mannodermaus
2
290
労務ドメインを快適に開発する方法 / How to Comfortably Develop in the Labor Domain
yuki21
1
250
Our Websites Need a Lifestyle Change, Not a Diet
ryantownsend
0
140
Featured
See All Featured
The Straight Up "How To Draw Better" Workshop
denniskardys
230
130k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
8.9k
A Philosophy of Restraint
colly
202
16k
Agile that works and the tools we love
rasmusluckow
327
20k
[RailsConf 2023] Rails as a piece of cake
palkan
48
4.6k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
278
13k
Designing the Hi-DPI Web
ddemaree
278
34k
Bootstrapping a Software Product
garrettdimon
PRO
304
110k
Raft: Consensus for Rubyists
vanstee
135
6.5k
A Tale of Four Properties
chriscoyier
155
22k
Learning to Love Humans: Emotional Interface Design
aarron
270
40k
The Brand Is Dead. Long Live the Brand.
mthomps
53
38k
Transcript
$MPKVSF֓ཁհ -JTQNFFUVQPO !BUIPT
֓ཁ ‣ ͷϦϦʔε͕ؒۙ CFUB͕ઌिΑ͏͘ϦϦʔε DGϦϦʔε݄ BMQIBϦϦʔε݄ དྷ݄ͷ$POKʹ߹ΘͤͯϦϦʔεͷՄೳੑ
‣ pOBMϦϦʔεʹ͚ͯͷओཁͳมߋΛ͓͞Β͍
$MPKVSFͷओཁͳมߋ ‣ DMPKVSFTQFD ‣ ໊લۭ͖ؒͭϚοϓ OBNFTQBDFENBQT ‣ /B/*OG*OGͷ৽͍͠֎෦දݱ
DMPKVSFTQFD ‣ ड़ޠΛϕʔεʹͨ͠σʔλ༷ͷهड़"1* ৄࡉʮDMPKVSFTQFDʯͰݕࡧ ‣ ҎԼͷ༻్ʹ͑Δ υΩϡϝϯςʔγϣϯ
όϦσʔγϣϯ ౷ҰతͳΤϥʔϨϙʔτ ϓϩύςΟϕʔεςετ 4ࣜͷߏจղੳ ‣ ·ͩΞϧϑΝѻ͍ TQFDBMQIBͱͯ͠$MPKVSFຊମͱಠཱʹ։ൃ͞Ε͍ͯ͘༧ఆ
$MPKVSF͔Βͷߏ ‣ $MPKVSF͕TQFDBMQIBͱDPSFTQFDTBMQIBʹґଘ͢Δߏʹ ‣ TQFDBMQIB TQFDͷػೳఆٛ ‣ DPSFTQFDTBMQIB
$MPKVSFͷίΞϥΠϒϥϦͷεϖοΫఆٛ $MPKVSF TQFDBMQIB DPSFTQFDT BMQIB
DMKίϚϯυ ‣ ͜Ε·Ͱͷ$MPKVSFKBSͭΛμϯϩʔυͯ͘͠Ε͑ ͕ͨɺ͔ΒTQFDBMQIBͱDPSFTQFDBMQIBʹґଘ ‣ ґଘϥΠϒϥϦΛղܾͯ͠$MPKVSFΛ͑Δঢ়ଶʹ͢Δख ஈͱͯ͠DMKίϚϯυ͕༻ҙ͞Εͨ ‣ “brew install
clojure”Ͱ$MPKVSF͕͑ΔΑ͏ʹ ଞͷύοέʔδϚωʔδϟʹਵ࣌Ճ͞ΕΔ༧ఆ
TQFDϕʔεͷϚΫϩߏจνΣοΫ ‣ ϚΫϩʹରͯ͠εϖοΫΛఆ͓ٛͯ͘͠ͱɺίϯύΠϥ͕ ࣗಈతʹߏจ͕εϖοΫʹ߹͍ͬͯΔ͔ΛνΣοΫ ‣ ౷Ұతͳํ๏ͰΤϥʔΛฦͯ͘͠ΕΔ
ʲએʳ1JOQPJOUFS ‣ ࡞ͷεϖοΫΤϥʔϨϙʔλ1JOQPJOUFSͰɺεϖοΫ ΤϥʔΛ͔Γ͘͢දࣔͯ͘͠ΕΔʂ ϋΠϥΠτ͖ͭ
EPDͷTQFDαϙʔτ
ड़ޠؔͷ֦ॆ ‣ boolean? ‣ int? pos-int? neg-int? nat-int? ‣ double?
bigdec? ‣ ident? simple-ident? qualified-ident? ‣ simple-symbol? qualified-symbol? ‣ simple-keyword? qualified-keyword? ‣ bytes? ‣ indexed? ‣ uuid? uri? ‣ seqable? ‣ any?
໊લۭ͖ؒͭϚοϓ ‣ TQFD໊લۭ͖ؒͭͷΩʔϫʔυΛଟ༻ ϚοϓͷΩʔͱͯ͠͏ࡍʹɺҰҙͷҙຯΛ࣋ͨͤΔͨΊ ‣ ͯ͢ͷΩʔ͕ಉ໊͡લۭؒͰम০͞Ε͍ͯΔ߹ͷলུه๏ #:foo{:a 1, :b
2} (require ‘[foo.core :as foo]) #::foo{:a 1, :b 2} #::{:a 1, :b 2} {:foo/a 1, :foo/b 2} {:foo.core/a 1, :foo.core/b 2} {:user/a 1, :user/b 2}
໊લۭ͖ؒͭϚοϓͷଋറ ‣ ϚοϓͷଋറͰ໊લۭ͖ؒͭͷΩʔϫʔυΛѻ͍ ͍͢Α͏ʹ
/B/*OG*OGͷ৽͍͠֎෦දݱ ‣ ৽ͨʹ##ͱ͍͏ϦʔμʔϚΫϩ͕Ճ͞Εͨ /B/##NaN *OpOJUZ##Inf *OpOJUZ##-Inf ‣
ʹఏҊ͞Εɺӽ͠ͰΑ͏͘࠾
ͦͷଞͷมߋ ‣ *reader-resolver*ͰγϯϘϧΩʔϫʔυͷղܾͷ ํ͕QMVHHBCMFʹ ‣ InstϓϩτίϧͷՃ ‣ swap-vals! reset-vals! ‣
halt-whenτϥϯεσϡʔα
·ͱΊ ‣ $MPKVSFϦϦʔε͕ؒۙ ‣ DMPKVSFTQFDΛத৺ͱͨ͠มߋ͕Γࠐ·Εͨ ‣ TQFDࣗମ·ͩΞϧϑΝѻ͍ͷ·· ͳͷͰɺ༷มߋ ͋Γ͏Δ ͕ͩɺ͕Ұ୴ϦϦʔε͞ΕΕϓϩμΫτ
Ͱຊ֨తʹΘΕ࢝ΊΔ͜ͱ͕༧͞ΕΔ
ࢀߟจݙ ‣ DIBOHFTNE IUUQTHJUIVCDPNDMPKVSFDMPKVSFCMPCNBTUFSDIBOHFTNEDIBOHFTUPDMPKVSFJOWFSTJPO ‣ "CPVUTQFD IUUQTDMPKVSFPSHBCPVUTQFD ‣
3FBEQSJOUSPVOEUSJQGPS *OpOJUZBOE/B/ IUUQTEFWDMPKVSFPSHKJSBCSPXTF$-+