<SeanTAllen>
are you around to talk about what I did to make that work?
<fluttershy_>
yes
<SeanTAllen>
ok so two things
<SeanTAllen>
1. you almost never need for a field of a class to be an iso
<SeanTAllen>
go for ref like i did, it will make your life much easier.
<SeanTAllen>
the only time you need an iso is if you are packing it with data (like TCPConnection does with its read buffer) and then handing that packed up data off to another actor and starting over with an empty iso again
<SeanTAllen>
2. the compiler is not very smart of what happens inside of a constructor so everything in a constructor is tag. your problem was trying to access the matrix field in the constructor. yes, you initialized it and in this case, that is an easy thing to see but there are many cases that are hard to determine so right now the compiler defaults to "every field is
<SeanTAllen>
tag until the constructor is finished"
<SeanTAllen>
by finished, that means "all fields are initialized" so i'm going to gist a 2nd way to do this in a moment...
<SeanTAllen>
so your problem had nothing to with consuming
<fluttershy_>
hemmm ok I see, I wanted to use iso because i didn't want to copy the matrix in case I have a big one and to do in place transpose and when finishing transpose back.
<fluttershy_>
oh never mind I understand
<fluttershy_>
thanks
jemc has quit [Read error: Connection reset by peer]
<SeanTAllen>
fluttershy_: are you planning on send the matrix back out of the actor it gets sent to?
<fluttershy_>
yes
<SeanTAllen>
ok
<SeanTAllen>
so you might want to do as an iso for the field, check out how that is handled with TCPConnection and its read buffer.
<fluttershy_>
yes I'll, there is still a lot to learn :)
virtual_lark has quit [Remote host closed the connection]
nyarum has joined #ponylang
nyarum has quit [Ping timeout: 255 seconds]
<fluttershy_>
so far what i understand is If I have something to share between actors before I call the behavior I need to create another alias in which I recover to sendable (iso|val|tag), I can't recover a ref to iso here the array is considered tag : https://is.gd/6otf1g
jemc has joined #ponylang
jemc has quit [Ping timeout: 246 seconds]
jemc has joined #ponylang
Matthias247 has joined #ponylang
endformationage has joined #ponylang
<SeanTAllen>
everything is "tag" in a constructor until all fields of the object have been initialized
nyarum has joined #ponylang
<SeanTAllen>
you still around fluttershy_ ?
nyarum has quit [Ping timeout: 258 seconds]
<fluttershy_>
yes
<fluttershy_>
ok but here I am out of the constructor
<fluttershy_>
I am trying to recover inside the behavior
<fluttershy_>
do you mean that I have to init all vector inside create otherwise will always be considered tag ?
Matthias247 has quit [Read error: Connection reset by peer]
<fluttershy_>
so even when initialized all fields in create : https://is.gd/iwZIpS still have the problem