Created
March 18, 2016 20:11
-
-
Save jemc/dff14f448faea7a922e4 to your computer and use it in GitHub Desktop.
Pony example of just piping stdin to stdout.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
actor Main | |
let env: Env | |
new create(env': Env) => | |
env = env' | |
env.input(notify()) | |
be print(data: ByteSeq val) => | |
env.out.print(data) | |
fun tag notify(): StdinNotify iso^ => | |
object iso is StdinNotify | |
let parent: Main = this | |
fun ref apply(data: Array[U8] iso) => | |
parent.print(consume data) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment