Streem

 Streem

東京Ruby会議11 招待講演

0ec4920185b657a03edf01fff96b4e9b?s=128

Yukihiro Matsumoto

May 28, 2016
Tweet

Transcript

  1. 50.

    Powered by Rabbit 2.1.8   # simple echo server on

    port 8007 tcp_server(8007) | each{|sock| sock | sock } simple echo server
  2. 56.

    Powered by Rabbit 2.1.8   # simple netcat on port

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

    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. 63.

    Powered by Rabbit 2.1.8   # simple netcat on port

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