Upgrade to Pro — share decks privately, control downloads, hide ads and more …

kyon_mm * kaori_t_spicaにおける中置演算子(*)の定式化について

501e65e32870561d73b1158370766664?s=47 mzp
April 05, 2014

kyon_mm * kaori_t_spicaにおける中置演算子(*)の定式化について

501e65e32870561d73b1158370766664?s=128

mzp

April 05, 2014
Tweet

Transcript

  1. LZPO@NN LBPSJ@U@TQJDBʹ͓͚Δ தஔԋࢉࢠ ͷఆࣜԽʹ͍ͭͯ !N[Q

  2. ϓϨθϯτ͸Կ͕͍͍ͩΖ͏ • ΍ͬͺΓීஈ࢖͑Δ΋ͷ͕͍͍Αͳ͊ • ͦ͏͍͑͹ɺҰ෦ͷPHPίϛϡχςΟʹ͸ɺ݁ࠗॕ ͍ʹίϯύΠϥύονΛଃΔ෩श͕͋ΔΒ͍͠[ཁ ग़ల] • OCamlͷίϯύΠϥύονΛଃΖ͏!

  3. ͜Ε͕Ͱ͖ΔΑ͏ʹ͢Δ let kyon_mm = …… let kaori_t_spica = …… kyon_mm

    ❤️ kaori_t_spica // => “Happy Wedding!!”
  4. 0$BNMͷίϯύΠϥͷվ଄ྫ • opam(OCaml PAckage Manager)͸ύοέʔδ ͷΠϯετʔϧҎ֎ʹ΋ίϯύΠϥͷ੾Γସ͕͑Ͱ ͖Δ • opam switch

    —allͰίϯύΠϥҰཡΛݟͯΈ· ͠ΐ͏ ࢀߟIUUQPQBNPDBNMQSPDPN
  5. ެࣜϦϦʔε • 4.01.0: Official 4.01.0 release • 3.11.2: Official 3.11.2

    release • 3.12.1: Official 3.12.1 release • 4.00.0: Official 4.00.0 release • 4.00.1: Official 4.00.1 release • 4.01.0beta1: Beta1 release of 4.01.0
  6. USVOLͳίϯύΠϥͨͪ • 4.01.0dev+trunk: latest snapshot of the 4.1 branch •

    4.02.0dev+trunk: latest trunk snapshot
  7. USVOL ύον • 4.02.0dev+pr10: Add String.{split,rsplit} • 4.02.0dev+pr13: Add String.{cut,rcut}.

    • 4.02.0dev+pr14: Add absolute directory names to bytecode format for ocamldebug to use • 4.02.0dev+pr15: replace String.blit by String.unsafe_blit • 4.02.0dev+pr17: Cmm arithmetic optimisations • 4.02.0dev+pr18: Patch for issue 5584 • 4.02.0dev+pr2: Parse -.x**2. (unary -.) as -.(x**2.). Fix PR#3414 • 4.02.0dev+pr20: OCamlbuild: Fix the check of ocamlfind • 4.02.0dev+pr22: Add Ephemerons to OCaml • and more
  8. ͦͷଞͷΑ͘ΘΒͳౕ͍ • 4.00.0+fpɿ Runtime with frame-pointers (improved GDB & perf

    usage) • 4.00.1+BERɿ BER MetaOCaml (http://okmij.org/ftp/ML/MetaOCaml.html) • 4.00.1+alloc-profiling: support allocation profiling on x86_64 • 4.00.1+annot: Enable -binannot by default • 4.00.1+french: French translation of error messages • 4.00.1+mirage-unix: Mirage compiler for unix • 4.00.1+mirage-xen: Mirage compiler for xen • 4.00.1+open-types: add open extensible types to OCaml • 4.00.1+raspberrypi: Native backend for Raspberry-PI • 4.00.1+short-types: Better heuristic to display long type names • 4.01.0+jocaml: Official 4.01.0 release of JoCaml, that is, OCaml extended for concurrent and distributed programming.
  9. ஫ҙ఺ϥΠηϯεʹ͍ͭͯ :PVNBZNBLFNPEJpDBUJPOTUPUIF4PGUXBSFBOE EJTUSJCVUFZPVSNPEJpDBUJPOT JOBGPSNUIBUJT TFQBSBUFGSPNUIF4PGUXBSF TVDIBTQBUDIFT5IF GPMMPXJOHSFTUSJDUJPOTBQQMZUPNPEJpDBUJPOT ࢀߟIUUQDBNMJOSJBGSPDBNMMJDFOTFFOIUNM ίϯύΠϥΛվ଄ͯ͠΋͍͍͚Ͳɺͦͷ··ެ։ͨ͠Β μϝͩΑɻύονͳΒ0,ɻ

    ݪจ ҙ༁
  10. ੲͷվ଄ํ๏ 0$BNM.FFUJOHJO5PLZPʮେ᱈᱃ղ᪼Ꮣ଄֓આ3JEFZPVSPXO0$BNM2VJDL0$BNM.PE)PXUPʯ IUUQPDBNMKQ6TFST.FFUJOH

  11. None
  12. ໰୊఺ • ຖճɺίϯύΠϥͷେ൒ΛϦϏϧυ͢ΔͷͰ஗͍ • ެ։͢ΔͨͼʹύονΛ࡞Βͳ͍ͱ͍͚ͳ͍ͷͰ໘ ౗ • ࢖͏ʹ͸ύονΛద༻͠ͳ͍ͱ͍͚ͳ͍ͷͰ໘౗

  13. ΠϚυΩͳվ଄ํ๏ • 4.00Ҏ߱͸compiler-libs͕ಋೖ͞Εͨɻ • ίϯύΠϥΛߏ੒͢Δ֤Ϟδϡʔϧ(ύʔαɺܕਪ ࿦ثɺίʔυδΣωϨʔλ౳)͕ඪ४ϥΠϒϥϦʹ ͳ͍ͬͯΔɻ • ඪ४ϥΠϒϥϦʹͳ͍ͬͯΔͷͰɺOCaml͕࢖͑Ε ͹Ͳ͜Ͱ΋࢖͑Δɻ

    ࢀߟIUUQTCJUCVDLFUPSHDBNMTQPUUFSDPNQJMFSMJCTIBDL
  14. DPNQJMFSMJCTΛ༻͍ͨվ଄ • վ଄͍ͨ͠Ϟδϡʔϧ͚ͩΛஔ͖׵͑Δ • ύονͰͳ͍ͷͰ഑෍ɾར༻ָ͕ ύʔα ܕਪ࿦ ίʔυ ੜ੒ ίϯύΠϥϑϩʔ

    υϥΠό DPNQJMFSMJCT ύʔα վ ίϯύΠϥϑϩʔ վ υϥΠόվ
  15. վ଄ํ਑ • ϨΩαʔΛஔ͖׵͑ͯ❤️ΛதஔԋࢉࢠͷτʔΫϯͱ ͯ͠࢖͑ΔΑ͏ʹ͢Δ • ❤️ͷఆٛ͸ϓϩάϥϜΛ࢖͏ଆͰ༩͑ΔΑ͏ʹ͢Δ

  16. MFYFSNMMͷมߋ఺ ൈਮ rule token = parse (snip) | "!=" {

    INFIXOP0 "!=" } | "+" { PLUS } | "+." { PLUSDOT } | "-" { MINUS } | "-." { MINUSDOT } | "♥" { INFIXOP4("♥") } | "❤️" { INFIXOP4("♥") } (snip)
  17. σϞ let (❤️) _ _ = "Happy Wedding!!" ! let

    message = `kyon_mm ❤️ `kaori_t_spica ! let () = print_endline message
  18. ஫ҙ఺ • Ѫͷҙຯ͸ఆٛ͞Ε͍ͯ·ͤΜɻར༻ऀଆͰద੾ͳ ҙຯΛఆ͍ٛͯͩ͠͞ɻ • ԋࢉࢠ͸ӈ݁߹Ͱ͢ɻଞͷ૬खʹऔΒΕͳ͍Α͏ʹ ͝஫ҙ͍ͩ͘͞ɻ • ྫ: `a

    ❤️ `b❤️ `c= (`a ❤️ `b) ❤️ `c
  19. ࢀߟυΩϡϝϯτ • https://bitbucket.org/camlspotter/ compiler-libs-hack • https://github.com/mzp/ kyon_kao_wedding

  20. ผղ let (+++) _ _ = "Happy Wedding!!" let message

    = `kyon_mm ❤️ `kaori_t_spica $ ocamlc -pp ‘sed s/❤️/+++/‘ foo.ml
  21. ·ͱΊ • OCamlͷίϯύΠϥΛվ଄͢Δͱͨͷ͍͠ • compiler-libsͷ͓͔͛Ͱؾܰʹվ଄ɾެ։Ͱ͖ Δ • ͋͞ɺΈͳ͞Μ΋΍Γ·͠ΐ͏!