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

mruby 入門

mruby 入門

Cf82bda9b67750da164786b916d6d050?s=128

Tatsushi Demachi

December 02, 2017
Tweet

More Decks by Tatsushi Demachi

Other Decks in Programming

Transcript

  1. *OUSPEVDUJPOUP NSVCZ ͳ͕ͷ3VCZͷձCZ!UBUTVTIJ@E

  2. 8IP w Ͱ·ͪͨͭ͠ 5XJUUFS!UBUTVTIJ@E  w Πϯϑϥ԰ʢαʔόɺωοτϫʔΫͳͲʣ w ࠷ۙ͸΋ͬͺΒ(P࢖͍

  3. 8IBU`TNSVCZ w 3VCZͷܰྔ࣮૷ʢ*40ఆٛͷ෦෼࣮૷ʣ w จ๏͸3VCZޓ׵ w ओʹΞϓϦέʔγϣϯ૊ࠐΈ༻్ʹ։ൃ w Ϗϧυ࣌ʹඞཁͳݴޠػೳͷΈΛ૊ࠐΈ w

    ৄࡉ͸IUUQTHJUIVCDPNNSVCZNSVCZࢀর
  4. 8IFSFJTJUVTFE w OHY@NSVCZʢOHJOYͷ֦ுϞδϡʔϧʣ w OHJOYͷઃఆɺ֦ுΛ3VCZจ๏Ͱॻ͚Δ w )0ʢ)551αʔόʣ w αʔόͷ੍ޚΛ3VCZจ๏Ͱॻ͚Δ w

    NJUBNBFʢߏ੒؅ཧπʔϧ*UBNBFNSVCZ൛ʣ w ୯ҰόΠφϦͷίϚϯυϥΠϯπʔϧ w 3VCZ%4-Ͱॻ͔Εͨߏ੒ఆٛΛॲཧՄೳ
  5. )PXUPJOTUBMM

  6. 3FRVJSFNFOU w $$PNQJMFS w -JOLFS w "SDIJWFS w -JC$MJCSBSJFTBOEIFBEFST w

    #JTPO w 3VCZ
  7. #VJME w HJUDMPOFIUUQTHJUIVCDPNNSVCZ NSVCZHJU w DENSVCZ w NJOJSBLF

  8. #JOBSJFT w NJSCʢJSC૬౰ʣ w NSCDʢNSVCZ7.όΠτίʔυίϯύΠϥʣ w NSVCZʢSVCZ૬౰ʣ w NSVCZTUSJQʢ%FCVHηΫγϣϯ࡟আπʔϧʣ w

    NSECʢσόοΨʣ
  9. -JCSBSJFT w MJCNSVCZ@DPSFB
 TSDҎԼͱύʔαͷΈΛؚΉίΞϥΠϒϥϦ w MJCNSVCZB
 NSCMJC NSCHFN΋ؚΉNSVCZϥΠϒϥϦ

  10. %FNP DPNQJMF SVONJSCBOE NSVCZ

  11. #VJMEDPOpHVSBUJPO w Ϗϧυઃఆ͸CVJME@DPOpHSCϑΝΠϧͰࢦఆ w .36#:@$0/'*(؀ڥม਺ͰCVJME@DPOpHSC ͷύεΛࢦఆ

  12. #VJMEDPOpHTFDUJPO w 5PPMDIBJO w $DPNQJMFS w -JOLFS w "SDIJWFS w

    1BSTFS(FOFSBUPS w NSCHFNT w FUDʜ
  13. NSCHFN w NSVCZʹ͓͚Δ֦ுػߏ w $ BOEPS 3VCZͰॻ͘͜ͱ͕Ͱ͖Δ w NSVCZ࣮ߦܥ MJCNSVCZB

    ʹ௚઀૊ࠐ·ΕΔ w NSVCZίΞػೳͷҰ෦΋࣮͸NSCHFN
  14. )PXUPVTFNSCHFN w CVJME@DPOpHSCͰࢦఆ w (FN#PYͰࢦఆ w ར༻͍ͨ͠NSCHFNͷఆٛΛ·ͱΊ͓͚ͯΔ ࢓૊Έ w CVJME@DPOpHSCͰݺͼग़ͯ͠ར༻͢Δ

  15. NSCHFNSFGFSFODFUZQF w NSCHFNࢀরઌ͸Լهͷछྨ͕͋Δ w ϑΝΠϧύε w ϦϞʔτ(JUϦϙδτϦ w (JUIVC w

    #JUCVDLFU w NHFN w NHFNMJTU IUUQTHJUIVCDPNNSVCZNHFNMJTU ʹ·ͱΊ ΒΕ͍ͯΔNSCHFN
  16. NSCHFNTUSVDUVSF GEM_NAME <- Name of GEM !"" include <- Header

    for Ruby extension !"" mrblib <- Source for Ruby extension !"" src <- Source for C extension !"" test <- Test code (Ruby) !"" mrbgem.rake <- GEM specification #"" README.md <- Readme for GEM
  17. NSCHFNSBLF w NSCHFNͷఆٛϑΝΠϧ w MJDFOTF w BVUIPS w TVNNBSZ w

    WFSTJPO w ґଘؔ܎ w FUDʜ
  18. &YBNQMF 3VCZPOMZ

  19. $FYUFOTJPO w NSCHFNʹ͸ɺԼهͷೋͭͷؔ਺͕ඞཁ w NSC@(&./".&@HFN@JOJU NSC@TUBUF  w ҰൠతʹϞδϡʔϧɺΫϥεɺϝιουͳͲͷఆٛ Λߦ͏

    w NSC@(&./".&@HFN@pOBM NSC@TUBUF  w NSVCZ֎͔ΒׂΓ౰ͯͨϝϞϦͳͲͷ੔ཧͳͲΛ ߦ͏
  20. &YBNQMF $ 3VCZIZCSJE

  21. $PODMVTJPO w $ 3VCZͰ༰қʹϥϯλΠϜ͕֦ுՄೳ w ΞϓϦέʔγϣϯͷ಺෦ߏ଄Λద੾ʹެ։͢Ε ͹ɺNSVCZ͔Βࣗ༝ʹ੍ޚՄೳ w ϥϯλΠϜʹ௚઀૊ࠐ·ΕΔͷͰɺ୯ҰόΠφϦ Խ΋Մೳ

  22. 3FGFSFODFT.BUFSJBMT w IUUQTHJUIVCDPNNSVCZNSVCZ w IUUQTHJUIVCDPNNSVCZNSVCZCMPC NBTUFSEPDHVJEFTDPNQJMFNE w IUUQTHJUIVCDPNNSVCZNSVCZCMPC NBTUFSEPDHVJEFTNSCHFNTNE w

    IUUQTHJUIVCDPNUBUTVTIJEOBSVCZ NSVCZFYBNQMF