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

Scheme On The Browser

Edward Fox
December 14, 2017

Scheme On The Browser

2017/12/14
Nihonbashi.js #3 100star以下限定!細かすぎて伝わらない自作ライブラリ選手権
https://nihonbashi-js.connpass.com/event/72065/

Edward Fox

December 14, 2017
Tweet

More Decks by Edward Fox

Other Decks in Technology

Transcript

  1. Scheme On The Browser
    EDWARD FOX 2017/12/14
    @Nihonbashi.js #3 100starҎԼݶఆʂࡉ͔͗ͯ͢఻ΘΒͳ͍ࣗ࡞ϥΠϒϥϦબखݖ

    View full-size slide

  2. @edwardkenfox
    Edward Fox
    ɾΤϯδχΞ@Reproגࣜձࣾ
    ɾ୅ʑ໦ͷํ͔Βདྷ·ͨ͠
    ɾRuby, JavaScript, AWS
    ɾϒϥ΢βٕज़શൠ, PWA, Vue.js

    View full-size slide

  3. ಥવͰ͕͢Έͳ͞Μ

    View full-size slide

  4. REPLͬͯීஈ
    ࢖͍·͢ΑͶʁ

    View full-size slide

  5. REPL
    ɾRead-Eval-Print Loop ͷུ
    ɾCLIͰىಈ͢Δݴޠॲཧܥ͕Ұൠత
    ɾJSͳΒNode.jsɺRubyͳΒirb΍pryɺ
    Pythonͱ͔PHPͱ͔Haskellͱ͔…

    View full-size slide

  6. WEBϖʔδ࡞ͬͯΔͱ͖
    ;ͱը໘্ʹREPL͕ཉ͍͠ͱ
    ࢥͬͨ͜ͱ͋Γ·ͤΜ͔ʁ

    View full-size slide

  7. ͦΕ΋JavaScriptͰ͸ͳ͘
    ผͷݴޠͰʂ

    View full-size slide

  8. ʢͪͳΈʹ๻͸͋Μ·Γͳ͍Ͱ͢ʣ

    View full-size slide

  9. Nihonbashi.jsͰൃද͢ΔωλͷͨΊʹ
    ͦ͏ࢥ͏ਓͷͨΊʹ࡞Γ·ͨ͠

    View full-size slide

  10. scheme-on-the-browser

    View full-size slide

  11. ʲ஫ҙࣄ߲ʳ

    View full-size slide

  12. ※໎ϥΠϒϥϦ࿮Ͱ͢

    View full-size slide

  13. େتརͷճ౴ͩͱࢥͬͯ
    ฉ͍͍ͯͩ͘͞
    ͓΋Ζ͍ͱࢥͬͯ΋Β͑ͨΒ
    ࠲෍ஂͷϊϦͰ ͍ͩ͘͞

    View full-size slide

  14. scheme-on-the-browser
    ɾLispͷํݴͰ͋ΔSchemeͷॲཧܥΛ
    WebAssemblyͰίϯύΠϧͨ͠΋ͷ
    = ϒϥ΢βͰಈ͘SchemeͷREPL

    View full-size slide

  15. ʢຊ౰͸rubyΛϒϥ΢βಈ͔͔ͨͬͨ͠
    ͚Ͳ࠳ંͨ͜͠ͱ͸ൿີʣ

    View full-size slide

  16. ͱΓ͋͑ͣσϞ
    https://edwardkenfox.com/playground/scheme-on-the-browser/

    View full-size slide

  17. scheme-on-the-browser
    ɾC++Ͱॻ͔ΕͨSchemeͷॲཧܥΛEmscriptenͰ
    wasmʹίϯύΠϧ
    ɾॲཧܥࣗମ͸Schemeݴޠͷαϒηοτ
    ɾindex.html -> index.js -> index.wasm
    ͱϩʔυ࣮͠ߦ͞ΕΔ

    View full-size slide


  18. ɾͱͯ͠ಡΈࠐΉ͚ͩͰ<br/>WEBϖʔδͰREPL͕࢖͑Δ<br/>ɾwasm͔ͩΒ࣮ߦ͕଎͍<br/>

    View full-size slide


  19. ɾtypo === ࢮ
    ɾʢʣͷ਺ؒҧ͑Δͱऴྃ
    ɾpromptͳͷͰଞͷॲཧΛϒϩοΫ͢Δ
    ɾJS͔Β৮Εͳ͍

    View full-size slide

  20. ͋Γ͕ͱ͏͍͟͝·ͨ͠

    View full-size slide