Talk on functional reactive programming, given at Ruby Manor 4.0.
If you weren’t there, I’m afraid this deck won’t be much use, as some of the slides had screen recordings of the terminal—you’ll have to wait for the video to go up to see those.
begin while true ready = IO.select([$stdin, socket]) ready[0].each do |io| data = io.read_nonblock(1_000_000) #YOLO if io.equal?($stdin) socket.write(data) elsif io.equal?(socket) $stdout.write(data) end end end rescue EOFError puts "A stream was closed. Shutting down." end Imperative Sunday, 7 April 13
cmd.action when nil if cmd.channel "PRIVMSG #{cmd.channel} :#{cmd.argument}" else cmd.argument end when :join "JOIN #{cmd.channel}" when :part "PART #{cmd.channel}" when :quit "QUIT :#{cmd.argument}" else nil end }.compact end Sunday, 7 April 13