Clojure 1.9 概要紹介

E170ae2eb0adcf3d136ab0990f0ea671?s=47 OHTA Shogo
September 25, 2017

Clojure 1.9 概要紹介

2017/09/25のLisp meetup #56の発表資料です。

E170ae2eb0adcf3d136ab0990f0ea671?s=128

OHTA Shogo

September 25, 2017
Tweet

Transcript

  1. $MPKVSF֓ཁ঺հ -JTQNFFUVQPO !BUIPT

  2. ֓ཁ ‣ ͷϦϦʔε͕ؒۙ  CFUB͕ઌिΑ͏΍͘ϦϦʔε  DGϦϦʔε೥݄ BMQIBϦϦʔε೥݄  དྷ݄ͷ$POKʹ߹ΘͤͯϦϦʔεͷՄೳੑ΋

    ‣ pOBMϦϦʔεʹ޲͚ͯͷओཁͳมߋΛ͓͞Β͍
  3. $MPKVSFͷओཁͳมߋ ‣ DMPKVSFTQFD ‣ ໊લۭ͖ؒͭϚοϓ OBNFTQBDFENBQT  ‣ /B/*OG*OGͷ৽͍͠֎෦දݱ

  4. DMPKVSFTQFD ‣ ड़ޠΛϕʔεʹͨ͠σʔλ࢓༷ͷهड़"1*  ৄࡉ͸ʮDMPKVSFTQFDʯͰݕࡧ ‣ ҎԼͷ༻్ʹ࢖͑Δ  υΩϡϝϯςʔγϣϯ 

    όϦσʔγϣϯ  ౷ҰతͳΤϥʔϨϙʔτ  ϓϩύςΟϕʔεςετ  4ࣜͷߏจղੳ ‣ ·ͩΞϧϑΝѻ͍  TQFDBMQIBͱͯ͠$MPKVSFຊମͱ͸ಠཱʹ։ൃ͞Ε͍ͯ͘༧ఆ
  5. $MPKVSF͔Βͷߏ੒ ‣ $MPKVSF͕TQFDBMQIBͱDPSFTQFDTBMQIBʹґଘ͢Δߏ੒ʹ ‣ TQFDBMQIB  TQFDͷػೳఆٛ ‣ DPSFTQFDTBMQIB 

    $MPKVSFͷίΞϥΠϒϥϦͷεϖοΫఆٛ $MPKVSF TQFDBMQIB DPSFTQFDT BMQIB
  6. DMKίϚϯυ ‣ ͜Ε·Ͱͷ$MPKVSF͸KBSͭΛμ΢ϯϩʔυͯ͘͠Ε͹࢖͑ ͕ͨɺ͔Β͸TQFDBMQIBͱDPSFTQFDBMQIBʹґଘ ‣ ґଘϥΠϒϥϦΛղܾͯ͠$MPKVSFΛ࢖͑Δঢ়ଶʹ͢Δख ஈͱͯ͠DMKίϚϯυ͕༻ҙ͞Εͨ ‣ “brew install

    clojure”Ͱ$MPKVSF͕࢖͑ΔΑ͏ʹ  ଞͷύοέʔδϚωʔδϟʹ΋ਵ࣌௥Ճ͞ΕΔ༧ఆ
  7. TQFDϕʔεͷϚΫϩߏจνΣοΫ ‣ ϚΫϩʹରͯ͠εϖοΫΛఆ͓ٛͯ͘͠ͱɺίϯύΠϥ͕ ࣗಈతʹߏจ͕εϖοΫʹ߹͍ͬͯΔ͔ΛνΣοΫ ‣ ౷Ұతͳํ๏ͰΤϥʔΛฦͯ͘͠ΕΔ

  8. ʲએ఻ʳ1JOQPJOUFS ‣ ੿࡞ͷεϖοΫΤϥʔϨϙʔλ1JOQPJOUFSͰ͸ɺεϖοΫ ΤϥʔΛ෼͔Γ΍͘͢දࣔͯ͘͠ΕΔʂ ϋΠϥΠτ͖ͭ

  9. EPDͷTQFDαϙʔτ

  10. ड़ޠؔ਺ͷ֦ॆ ‣ 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?
  11. ໊લۭ͖ؒͭϚοϓ ‣ 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}
  12. ໊લۭ͖ؒͭϚοϓͷ෼഑ଋറ ‣ Ϛοϓͷ෼഑ଋറͰ΋໊લۭ͖ؒͭͷΩʔϫʔυΛѻ͍΍ ͍͢Α͏ʹ

  13. /B/*OG*OGͷ৽͍͠֎෦දݱ ‣ ৽ͨʹ##ͱ͍͏ϦʔμʔϚΫϩ͕௥Ճ͞Εͨ  /B/##NaN  *OpOJUZ##Inf  *OpOJUZ##-Inf ‣

    ೥ʹఏҊ͞Εɺ೥ӽ͠ͰΑ͏΍͘࠾୒
  14. ͦͷଞͷมߋ ‣ *reader-resolver*ͰγϯϘϧ΍Ωʔϫʔυͷղܾͷ ࢓ํ͕QMVHHBCMFʹ ‣ Instϓϩτίϧͷ௥Ճ ‣ swap-vals! reset-vals! ‣

    halt-whenτϥϯεσϡʔα
  15. ·ͱΊ ‣ $MPKVSFϦϦʔε͕ؒۙ ‣ ͸DMPKVSFTQFDΛத৺ͱͨ͠มߋ͕੝Γࠐ·Εͨ ‣ TQFDࣗମ͸·ͩΞϧϑΝѻ͍ͷ·· ͳͷͰɺ࢓༷มߋ΋ ͋Γ͏Δ ͕ͩɺ͕Ұ୴ϦϦʔε͞ΕΕ͹ϓϩμΫτ౳

    Ͱຊ֨తʹ࢖ΘΕ࢝ΊΔ͜ͱ͕༧૝͞ΕΔ
  16. ࢀߟจݙ ‣ DIBOHFTNE  IUUQTHJUIVCDPNDMPKVSFDMPKVSFCMPCNBTUFSDIBOHFTNEDIBOHFTUPDMPKVSFJOWFSTJPO ‣ "CPVUTQFD  IUUQTDMPKVSFPSHBCPVUTQFD ‣

    3FBEQSJOUSPVOEUSJQGPS *OpOJUZBOE/B/  IUUQTEFWDMPKVSFPSHKJSBCSPXTF$-+