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

すごいErlang楽しく学んだ!

kei-q
October 16, 2015

 すごいErlang楽しく学んだ!

表参道.rb #5の発表資料です。
http://omotesandorb.connpass.com/event/20289/

kei-q

October 16, 2015
Tweet

More Decks by kei-q

Other Decks in Technology

Transcript

  1. @kei_q 1 2 • ͓࢓ࣄ: JSON APIΛ࡞ͬͯӡ༻ • Ruby/Rails •

    Swift, Objective-C 2 ࠷͓ۙ΋͠Ζ͍ͱࢥ͏΋ͷ: cloudformationͷupdate-stackͱpolicy 1 झຯͰ࢖͍ͬͯΔݴޠ: Ruby, Haskell 3
  2. ͳͥErlangΛֶ΅͏ͱࢥ͔ͬͨ • ো֐଱ੑͷߴ͞ʹ͍ͭͯ஌Γ͍ͨe1 • ElixirͷલʹErlangΛ͓͍͑ͨ͞e2 • ࣌Ӎಊ BOT αʔόʔͷهࣄΛΈͯڵຯ͕Θ͍ͨ e2

    ࢿྉΛಡΜͩΓErlangͷmoduleΛཧղ͢ΔͨΊʹErlangΛಡΊͨ΄͏͕ḿΓͦ͏ͱࢥͬͨ e1 ໷͙ͬ͢Γ຾Γ͍ͨ 6
  3. 7

  4. Erlangͷಠಛͳจ๏ t1 loop(N) -> receive some_standard_message -> N + 1;

    other_message -> N-1; {get_count, Pid} -> Pid ! N, loop(N); update -> ?MODULE:loop(N); end. ͍͢͝Erlangຊͷ෇࿥AΛઌʹ໨Λ௨͢ͷ͓͢͢Ί t1 ຤ඌͷه߸Ҏ֎ʹ΋andalsoͱ͔atomͱม਺ͷ໋໊ͱ͔ൺֱԋࢉࢠͱ͔͍Ζ͍Ζಠಛ 9