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

Streem

 Streem

東京Ruby会議11 招待講演

Yukihiro Matsumoto

May 28, 2016
Tweet

More Decks by Yukihiro Matsumoto

Other Decks in Programming

Transcript

  1. Powered by Rabbit 2.1.8   # simple echo server on

    port 8007 tcp_server(8007) | each{|sock| sock | sock } simple echo server
  2. Powered by Rabbit 2.1.8   # simple netcat on port

    8007 sock = tcp_socket("localhost", 8007) stdin | sock sock | stdout simple netcat client
  3. Powered by Rabbit 2.1.8   # seq(100) returns a stream

    of numbers from 1 to 100. # stdout is an output destination. seq(100) | map{|x| if (x % 15 == 0) "FizzBuzz" else if (x % 3 == 0) "Fizz" else if (x % 5 == 0) "Buzz" else x } | stdout
  4. Powered by Rabbit 2.1.8   # simple netcat on port

    8007 sock = tcp_socket("localhost", 8007) stdin | sock sock | stdout simple netcat client