<phvse>
is there a way of changing a ref to a val?
<phvse>
hmm I might be thinking about this wrong
<phvse>
I've got an Array[U8 val] iso from receive function and I want to print it out & send it to the server
<phvse>
printing it out requires a box and sending it requires a val
phvse has quit [Remote host closed the connection]
<SeanTAllen>
You have a loca variable or a field that is an iso?
_whitelogger has joined #ponylang
<SeanTAllen>
regarding printing env.out.print(SOMETHING)... out is an actor, so you are sending to another actor so you can't print AND send somewhere else
<SeanTAllen>
you could send a copy for printing
<SeanTAllen>
if the iso you want to send is a local variable you can do
<SeanTAllen>
env.out.print(consume my_something)
<SeanTAllen>
if its a field, that's different, lets say your field is a string iso
<SeanTAllen>
like
<SeanTAllen>
let _my_field: String iso
<SeanTAllen>
what you need to do is a destructive read
<SeanTAllen>
let old = _my_field = recover String end
<SeanTAllen>
so, previous value of _my_field is bound to old and _my_field is now bound to the new String