<rkallos>
How can I add an array member to a Pony struct? Suppose I have `struct foo {uint8_t arr[4];}`, I don't think I can quite use a Pony array there. What comes to mind, at least for a fixed-size array, is to have something like `var arr_0: U8 = 0`, `var arr_1: U8 = 0`, and so on. Is there a better way?
jemc has joined #ponylang
endformationage has quit [Quit: WeeChat 2.3]
srenatus has joined #ponylang
jemc has quit [Ping timeout: 268 seconds]
profetes_ has joined #ponylang
profetes_ has quit [Client Quit]
ExtraCrispy has joined #ponylang
profetes has quit [Ping timeout: 252 seconds]
acarrico has joined #ponylang
beardhatcode has joined #ponylang
beardhatcode has quit [Remote host closed the connection]
<SeanTAllen>
ive done very little with structs rkallos so sadly i can't help. perhaps jemc or vaninwagen might be able to help.
aturley has joined #ponylang
aturley_ has quit [Ping timeout: 258 seconds]
_whitelogger has joined #ponylang
EEVV has joined #ponylang
<EEVV>
Hello, does the `from_cpointer` function in `Array` class assume control for the cpointer? As in it frees it whenever the GC decides to? If so can someone please update the stdlib.ponylang.io to reflect this in the function (it would be nice)
aturley has quit [Read error: Connection reset by peer]
aturley_ has joined #ponylang
<SeanTAllen>
No it does not EEVV
<SeanTAllen>
Pony will gc memory that was allocated from its allocator
aturley_ is now known as aturley
<SeanTAllen>
If that pointer is to something that you say allocated with @malloc, then it will not be gc'd.
<EEVV>
SeanTAllen, so I should copy the contents from cpointer to a fresh array and do @free?
<EEVV>
the problem is I'm kind of new to pony and threading in general
<SeanTAllen>
beat me to it jemc
<EEVV>
maybe it would be good if I learned how to use git properly too... my biggest fear is merging
<jemc>
the nice thing about pony and other actor model languages is that you don't really need to understand "threading" in particular (which usually implies lots of things related to mutexes and the like, which aren't needed in Pony)
<EEVV>
yeah but the problem for me is what should I make into an actor
<EEVV>
I just kind of "go with the flow" pony says TCPConnection is actor, then I just stick with it
<jemc>
yeah, so there are a few different ways to think about "when should I make something an actor?", but the most basic place to start is: whenever you have the desire to *wait* for something, it should be an actor that listens for messages instead of a blocking operation
<EEVV>
one question: why not use latest LLVM?
<jemc>
we're working on it :)
<EEVV>
is it a huge difference?
<EEVV>
the API change
<jemc>
not huge, but the main issue is that LLVM doesn't commit to publishing a comprehensive changelog that describes everything that you might need to change
<jemc>
they do have a changelog, but it doesn't include everything, so updating involves a lot of incremental attempts and digging through history
<jemc>
we have an open branch right now where two of us are working on LLVM 7 support
<EEVV>
if you can spam me relevant tags I will look into it online
<EEVV>
also any people from the core team in europe?
<jemc>
yeah, we have a few in europe
<jemc>
Pony was conceived in the UK
<jemc>
one of our team members recently hosted a meetup in Berlin
<EEVV>
I guess most have jobs lol
<EEVV>
1s rejoin
EEVV has quit []
EEVV has joined #ponylang
<jemc>
rkallos: as you guessed, using a Pony `Array[U8]` won't be compatible with the C array
<jemc>
you'll need to use a Pony `Pointer[U8]`
<jemc>
then use `Array[U8].from_cpointer(ptr, 4)` to convert it to a Pony array
<EEVV>
hey have you guys considered using discord?
<SeanTAllen>
no
<SeanTAllen>
we havent discussed it
EEVV has quit [Quit: EEVV]
<jemc>
(it's worth noting that we are publicly opening a slack server today, for those who prefer such a medium over IRC