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

Proken002

 Proken002

D12b0581b8218af98bf3014af3eeaac3?s=128

Kohei YOSHIDA

December 26, 2011
Tweet

Transcript

  1. ୞ࠓϓϩδΣΫλʔͷௐ੔த 1

  2. LIGHTWEIGHT LANGUAGE ͷ͢ʍΊ 1೥A૊ ٢ా ߉ฏ ϥΠϒίʔσΟϯά͋ΔΑ 2

  3. ͋͐͡Μͩ 1. ͓લͩΕΑ 2. Lightweight LanguageͬͯԿऀΑ 3. Pythonͬͯૉఢ΍Μʁ 4. ͜͜·Ͱ࿩͖͚ͯͨ͠ͲɺԿ͔࣭໰͋Δʁ

    5. ϥΠϒίʔσΟϯάūŖŖŖŖŖŖŖŖŖŖŖ 3
  4. ͓લͩΕΑ ͍ͪͶΜ͍ͤ খֶ[56]೥ੜͷ࣌ʹϓϩάϥϛϯά࢝ΊΔ ͸͡Ίͯͷݴޠ͸JavaScript খֶੜͷ͓࣌ۚṶ͚ͷͨΊʹPHPͰωοτγϣοϓ࡞Δ 2೥໨Pythonista PHPΛdisͬͯΔਓ Vimmer Web /

    Lightweight Language / RedBull !! HaskellΛ࢝Ίͨ ← new ! 4
  5. LIGHTWEIGHT LANGUAGE Lightweight Languageʹ͍ͭͯɺ ΢ΣϒͰఏڙ͞ΕΔϑϦʔඦՊ ࣄయɺʮ΢ΟΩϖσΟΞʯͰௐ΂ ͨΑɻ 5

  6. ܰྔϓϩάϥϛϯάݴޠ ʢLightweight Language͔Βసૹʣ ܰྔϓϩάϥϛϯάݴޠʢ͚͍Γΐ͏ϓϩάϥϛϯά͛Μ͝ɺLightweight Language,LLʣͱ͸ɺ೔ຊʹ͓͍ͯεΫϦϓτݴޠΛࢦ͢δϟϯά ϦογϡͰɺऔΓճ͠ʹ༏Εɺίʔυͷ࡞੒΍मਖ਼͕༰қͱݟͳ͞ΕΔϓϩάϥϛϯάݴޠͷ͜ͱΛࢦ͢ɻ CGI΍WebΞϓϦέʔγϣϯͷຄڵʹ൐͍ɺεΫϦϓτݴޠ͕৽ن։ൃͷओ໾ʹ༂Γग़͕ͨɺ೔ຊʹ͓͍ͯεΫϦϓτݴޠͱ͍͏දݱ͕ෆద੾ ͩͱߟ͑ɺܰྔϓϩάϥϛϯάݴޠͱݺͿਓʑ͕ݱΕΔΑ͏ʹͳͬͨɻΏ͑ʹɺҰൠʹLLʹ෼ྨ͞ΕΔPerlɺPythonɺPHPɺRubyͳͲͷϓϩ άϥϛϯάݴޠͷυΩϡϝϯτʹ͸ɺεΫϦϓτݴޠͱهड़͞Ε͍ͯΔࣄ͕ଟ͍ɻ ͳ͓ɺ೔ຊʹ͓͚Δܰྔϓϩάϥϛϯάݴޠͷӳޠදه͸Lightweight

    Languageʢ୯਺ܗʣͰ͋ΓɺӳޠݍͰݟΒΕΔLightweight Languages ʢෳ਺ܗʣ·ͨ͸Lightweight programming languagesͰ͸ͳ͍ɻ ໨࣍ [ඇදࣔ] 1 1 ܰྔϓϩάϥϛϯάݴޠͷྺ࢙ 2 2 ܰྔϓϩάϥϛϯάݴޠͷྫ 3 3 ܰྔϓϩάϥϛϯάݴޠͷϦιʔεফඅྔ 4 4 ӳޠݍʹ͓͚ΔLightweight programming language 5 5 ؔ࿈߲໨ ܰྔϓϩάϥϛϯάݴޠͷྺ࢙ [ฤू] εΫϦϓτݴޠ͸1960೥୅͔Βͷྺ࢙͕͋Δ͕ɺLLͱ͍͏୯ޠͷॳग़͸2001೥ͷLL1: Lightweight Languages WorkshopͩͱࢥΘΕΔɻ2002 ೥ʹIBM developersWorksͷهࣄʰIBM Lightweight Services, Part 1: Server-side scriptingʱʹɺຊจʹઆ໌෇Ͱa lightweight languageͱ͍͏ද ه͕͕͋ͬͨɺԤถͰ͸LLͱ͍͏୯ޠ͸ఆண͠ͳ͔ͬͨɻ ೔ຊͰ͸2004೥ʹLightweight language magazine͕ൃച͞ΕɺLLͱ͍͏୯ޠ͕ࢄݟ ͞ΕΔΑ͏ʹͳͬͨɻ2003೥Ҏલ͸΄ͱΜͲ࢖ΘΕ͍ͯͳ͍ɻओཁͳΠϯλʔωοτɾϝσΟΞʹܰྔϓϩάϥϛϯάݴޠͱ͍͏දݱ͕ݱΘ ΕΔͷ͸ಉ࣌ظ͔ΒͰ͋Δɻ2004೥ʹϚΠίϛδϟʔφϧɺ2007೥ʹ@IT΍CodeZineʹܰྔϓϩάϥϛϯάݴޠͱ͍͏දݱ͕ݱΘΕ͍ͯΔɻ ܰྔϓϩάϥϛϯάݴޠͷྫ [ฤू] ݱࡏɺ೔ຊͰҰൠʹLLͱݴͬͨ৔߹ɺ͓͓ΉͶҎԼΑ͏ͳεΫϦϓτݴޠΛࢦ͢ɻ ▪ AWK 6
  7. ཁ͢Δʹ…… ɾ೔ຊޠͰ͸ܰྔϓϩάϥϛϯάݴޠ ɾεΫϦϓτݴޠ ɾϓϩάϥϚͷෛ୲ͷܰྔԽ ɾಈ࡞͕ܰྔʢϦιʔεΛ৯Θͳ͍ʣͳΘ͚Ͱ͸ͳ͍ ɾಈతܕ෇͚ݴޠͰ͋Δ͜ͱ͕ଟ͍ ɾΠϯλϓϦλ → ίϯύΠϧෆཁ ɾओʹWebͰ࢖ΘΕͯΔ

    ɾJavaScript, Perl, PHP, Python, Ruby 7
  8. ϝϦοτ ؆୯ʹهड़Ͱ͖Δ ίϯύΠϧෆཁ ΠϯλϥΫςΟϒγΣϧ [CGT]UIΞϓϦ͕ࢥ͍ͷ··(※ͨͩ͠ϓϩάϥϚ࣍ୈ) σϝϦοτ ࣮ߦ଎౓͕஗͍ ܕ΍ϝϞϦ؅ཧͳͲͷ஌͕ࣝܽམ͢ΔՄೳੑ 8

  9. PYTHONͬͯૉఢ΍Μʁ JavaScript:ϒϥ΢βαΠυ, ࠷ۙ͸αʔόʔαΠυͰΞπΠ Perl:ෳࡶ೉ಡ, ݴޠͷ։ൃ͸ଓ͍͍ͯΔ͕མͪ໨ PHP:ߴػೳςϯϓϨʔτΤϯδϯҎ্Ͱ΋ҎԼͰ΋ͳ͍ Ruby: Α͘Pythonͱରൺ͞ΕΔ, ೔ຊ੡ 9

  10. օ͞Μɺ͝ଘ஌͔ͱ͸ࢥ͍·͕͢ 10

  11. Pythonͱ͸…… ΦϥϯμਓͷGuido van Rossum͕։ൃ ֦ுࢠ.py[cw]? Lightweight Languageͷ୅ද֨ WebʹݶΒͣɺ׆༂ൣғ͕޿͍ Google3େݴޠͷ1ͭ χγΩϔϏͷΞΠίϯ͕ಛ௃త

    ւ֎Ͱ͸ϝδϟʔ,ɹ೔ຊͰ΋࠷ۙීٴͷஹ͠ υϥϚʮϒϥοσΟɾϚϯσΠʯϋοΫγʔϯͰ׆༂ 11
  12. Pythonͱ͸…… ΠϯσϯτͰίʔυϒϩοΫΛද͢ ΫϥεϕʔεͷΦϒδΣΫτࢦ޲ݴޠ ๛෋ͳύοέʔδ HaskellʹӨڹΛड͚ͨඒ͍͠ߏจ ఏڙ͞ΕΔػೳ͸࠷খݶ →໨తͱίʔυ͕1:1ͰରԠ͢ΔͨΊඒ͍͠ →ເ͸ແݶେ ※͋͘·Ͱ΋ݸਓͷओ؍ʹجͮ͘ҙݟͰ͢ɻ୞ࠓͷ࣌ؒफڭઓ૪͸ड͚෇͚͍ͯ·ͤΜɻ 12

  13. Hello, Python!! ΋͠ࠓ͋ͳͨͷखݩʹMac, LinuxϚγϯ͕͋ΔͳΒ…… ͔Β࢝·Δ࿀͕͋Δ……͸ͣʂʂ $ python >> print(‘Hello, Python’)

    13
  14. ͜͜·Ͱ࿩͖͚ͯͨ͠Ͳɺ Կ͔࣭໰͋Δʁ 14

  15. ϥΠϒίʔσΟϯάūŖŖŖŖŖŖ 15