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

Comment that actually works

Comment that actually works

https://icare.connpass.com/event/261601/

【iCARE Dev Meetup #36】Rejected CFP 供養会 2022
での発表資料です。

Masafumi Okura

November 16, 2022
Tweet

More Decks by Masafumi Okura

Other Decks in Programming

Transcript

  1. ಈ࡞͠ͳ͍ίϝϯτ͸


    ͨͩͷίϝϯτͳͷͰ


    ಈ࡞͢ΔίϝϯτΛ࡞ͬͨ
    ʲiCARE Dev Meetup #36ʳRejected CFP ڙཆձ 2022
    OKURA Masafumi, 2022-11-16

    View full-size slide

  2. ϓϩϙʔβϧ

    View full-size slide

  3. མͪͨʘ(^o^)ʗ

    View full-size slide

  4. ϓϩϙʔβϧ͸


    બͿଆ΋େม

    View full-size slide

  5. མͪΔʹѱ͍


    Ͱ͸ͳ͍

    View full-size slide

  6. ࣗݾ঺հ
    • ໊લɿେ૔խ࢙ʢ͓͓͘Β·͞;Έʣ


    • ॴଐɿϑϦʔϥϯε


    • ՝֎׆ಈɿKaigi on RailsɺAlbaɺGrow.rbͳͲ


    • झຯɿᘖᘣɺOSSɺొஃɺίϛϡχςΟࢀՃͳͲ

    View full-size slide

  7. ͓୊ɿಈ࡞͢ΔίϝϯτΛ࡞ͬͨ࿩
    1.ͳͥ࡞Ζ͏ͱࢥͬͨͷ͔ʁ


    2.ͲͷΑ͏ʹ࣮૷ͨ͠ͷ͔ʁ


    3.ΞΠσΞΛࢥ͍͖ͭɺ࣮ݱ͢Δ·Ͱ

    View full-size slide

  8. ಈ࡞͢Δίϝϯτ

    View full-size slide

  9. Xa


    https://github.com/
    okuramasafumi/xa

    View full-size slide

  10. eXecutable


    annotation

    View full-size slide

  11. 1. ͳͥ࡞Ζ͏ͱ


    ࢥͬͨͷ͔

    View full-size slide

  12. ͦΕɺίϝϯτ


    ͡Όͳͯ͘΋


    Α͘ͳ͍ʁ

    View full-size slide

  13. ྫɿ


    ʮ͜ͷΫϥεΛܧঝͨ͠


    αϒΫϥε͸fooϝιουΛ


    ΦʔόʔϥΠυ͢Δ͜ͱʯ

    View full-size slide

  14. ίϝϯτ͕


    ͋ͬͯ΋


    ಡ·ΕΔͱ͸


    ݶΒͳ͍

    View full-size slide

  15. ίϝϯτ಺ͷࢦࣔ


    ͸ಈ࡞͸͠ͳ͍

    View full-size slide

  16. ಈ࡞͢Δίϝϯτ


    ͱ͸ʁ

    View full-size slide

  17. DSLͱͯ͠ͷ


    ίϝϯτ

    View full-size slide

  18. Rubyͷදݱྗ


    ͳΒՄೳͰ͸ʁ

    View full-size slide

  19. 2. ͲͷΑ͏ʹ


    ࣮૷ͨ͠ͷ͔

    View full-size slide

  20. 3. ΞΠσΞΛ


    ࢥ͍͖ͭɺ


    ࣮ݱ͢Δ·Ͱ

    View full-size slide

  21. ΞΠσΞΛ࣮ݱ͢ΔͨΊͷώϯτ
    I.ࠣࡉͳಈػΛେ੾ʹ͢Δ


    II.ݴޠΛΑ͘ཧղ͢Δ


    III.࡞Γଓ͚Δ

    View full-size slide

  22. ⅰ. ࠣࡉͳಈػΛ


    େ੾ʹ͢Δ

    View full-size slide

  23. ࣗ෼ҰਓͰ͸


    ͳ͍ͷ͔΋ʁ

    View full-size slide

  24. PoC


    (Proof of Concept)

    View full-size slide

  25. ਺࣌ؒͰ


    ࡞ͬͯΈΔ

    View full-size slide

  26. ⅱ. ݴޠΛΑ͘


    ཧղ͢Δ

    View full-size slide

  27. ݴޠ͸࠷΋


    جຊతͳπʔϧ

    View full-size slide

  28. XaʹඞཁͩͬͨRubyͷ஌ࣝ
    • ϒϩοΫͷத਎Λઐ༻ͷධՁΦϒδΣΫτͰinstance_eval͢Δ͜ͱ
    ͰɺͦͷΦϒδΣΫτͷதʹཁૉΛด͡ࠐΊΔ͜ͱ͕Ͱ͖Δ


    • ϝιουݺͼग़͠͸ׅހ͕লུͰ͖Δ


    • ฏจͬΆ͍ݟͨ໨΋࣮ݱͰ͖Δ


    • TracePointΛ࢖͑͹DSLͷ಺༰Λޙ͔ΒݕূͰ͖Δ

    View full-size slide

  29. ݴޠΛΑ͘ཧղ


    ͍ͯ͠ͳ͍ͱ


    ࡞Εͳ͍΋ͷ΋͋Δ

    View full-size slide

  30. ⅲ. ࡞Γଓ͚Δ

    View full-size slide

  31. Xa͸ࣗ෼͕࡞ͬͨ


    ͍͍ͩͨ7ݸ໨


    ͘Β͍ͷgem

    View full-size slide

  32. ࡞͖ͬͯͨgemͷҰ෦
    • YusoɿӡૹྉۚσʔλϕʔεɺॳΊͯ࡞͕ͬͨϝϯς͞Εͯͳ͍


    • AlbaɿJSONγϦΞϥΠβɺ୅ද࡞


    • rubocop-sensibleɿRuboCopͷطఆͷઃఆΛஔ͖׵͑Δ


    • necoɿίϚϯυύλʔϯͷ࣮૷ɺվमத


    • tiny_hooksɿίʔϧόοΫ࣮૷ɺActiveSupportΑΓ͔ͳΓ଎͍

    View full-size slide

  33. ౷Ұੑ͸ͳ͍

    View full-size slide

  34. ͋Ε͜Εࢼ͢

    View full-size slide

  35. ୅ද࡞ͷAlba͸


    ଟ෼4ͭ໨


    ͘Β͍ͷgem

    View full-size slide

  36. ࡞Γଓ͚Δ

    View full-size slide

  37. ΞΠσΞΛܗʹ


    ͢ΔͨΊʹඞཁͳ


    ΋ͷ

    View full-size slide

  38. ΞΠσΞͦͷ΋ͷ

    View full-size slide

  39. ΍ͬͯΈΑ͏ʂ

    View full-size slide

  40. Happy hacking!

    View full-size slide