[julia-users] Re: idiom for WITH-OUTPUT-TO-STRING

2014-11-11 Thread harven
julia version 0.3.3 julia rdstdout, wrstdout = redirect_stdout() (Pipe(open, 0 bytes waiting),Pipe(open, 0 bytes waiting)) julia print(hello) julia s = readavailable(rdstdout) hello Using a IOBuffer() is more idiomatic though. Look at the source of the filter function for

[julia-users] Re: idiom for WITH-OUTPUT-TO-STRING

2014-11-09 Thread Sal Mangano
Strings are immutable so I doubt this is supported. You can use: IOBuffer([*size*]) → IOBuffer http://docs.julialang.org/en/release-0.1/stdlib/base/#Base.IOBuffer Create an in-memory I/O stream, optionally specifying how much initial space is needed. You can also do string interpolation:

[julia-users] Re: idiom for WITH-OUTPUT-TO-STRING

2014-11-09 Thread Max Suster
*julia * foo*bar