jemc changed the topic of #ponylang to: Welcome! Please check out our Code of Conduct => https://github.com/ponylang/ponyc/blob/master/CODE_OF_CONDUCT.md | Public IRC logs are available => http://irclog.whitequark.org/ponylang | Please consider participating in our mailing lists => https://pony.groups.io/g/pony
jemc has quit [Ping timeout: 268 seconds]
acarrico has quit [Ping timeout: 240 seconds]
acarrico has joined #ponylang
acarrico has quit [Ping timeout: 252 seconds]
jemc has joined #ponylang
jemc has quit [Ping timeout: 252 seconds]
endformationage has quit [Quit: WeeChat 1.9.1]
acarrico has joined #ponylang
freza has quit [*.net *.split]
malyn has quit [*.net *.split]
betawaffle has quit [*.net *.split]
Summertime has quit [*.net *.split]
so has quit [*.net *.split]
freza has joined #ponylang
Summertime has joined #ponylang
betawaffle has joined #ponylang
so has joined #ponylang
malyn has joined #ponylang
endformationage has joined #ponylang
ExtraCrispy has joined #ponylang
TwoNotes has joined #ponylang
<TwoNotes> Is there a way to copy an Array[U8] besides pushing in a loop? I need to copy data out of a buffer from an FFI
<TwoNotes> Tried @memmove but that does not set the destination size
<TwoNotes> I have a Pointer[U8] and a length. I need to make an Array[U8] from it
<TwoNotes> Line from_cpointer but *with* copying
<slfritchie> TwoNotes: Hmm, if you create a temp Array[U8] via Array.from_cpointer() and then use temparray.copy_to(), would that fit your need?
<vaninwagen> slfritchie: TwoNotes or what about creating an array, calling undefined() on it to set the size and then doing the @memmove ?
<slfritchie> Ah, sneaky. ^_^
<vaninwagen> This sounds mighty unsafe but maybe should have better support in stdlib
<vaninwagen> slfritchie: your copy_to trickshot sounds better imho as it doesnt need no ffi
ExtraCrispy has quit [Remote host closed the connection]
<TwoNotes> For now I just 'push' in a loop. I was just looking for a faster way
<TwoNotes> Another would be an other optional param to from_pointer that takes the size
TwoNotes has quit [Quit: Leaving.]