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
atk has quit [Quit: Well this is unexpected.]
atk has joined #ponylang
jaro has quit [Ping timeout: 244 seconds]
brainproxy has joined #ponylang
endformationage has quit [Quit: WeeChat 1.9.1]
<vaninwagen> ein_ you are right. Sorry about the confusion. The primitive is only used on pony side to associate a certain type with the pointer. It is only used as a type argument.
<vaninwagen> You can work with pointers that way if the struct is allocated/created in C land.
khan has joined #ponylang
<vaninwagen> So with the color constructors from your lib that works fine
<vaninwagen> Such a struct will never be garbage collected though
<vaninwagen> For such a struct to be properly freed, you either need to do it manually at some point or use a wrapper class and use its finalizer `fun _final()` to free that pointer when the class is garbage collected.
khan has quit [Quit: khan]
khan has joined #ponylang
khan has quit [Client Quit]
khan has joined #ponylang
<vaninwagen> The type argument has no influence on the memory being occupied by the pointer btw
<vaninwagen> In this particular case
brainproxy has quit [Ping timeout: 260 seconds]
irx[m] has quit [Ping timeout: 255 seconds]
srenatus has quit [Ping timeout: 240 seconds]
srenatus has joined #ponylang
irx[m] has joined #ponylang
khan has quit [Read error: Connection reset by peer]
khan has joined #ponylang
khan has quit [Ping timeout: 255 seconds]
einStrauch has joined #ponylang
<einStrauch> @vaninwagen i've read the response after i've left, and that's about what i expected tbh
<einStrauch> one thing i'm still wondering about, tho, is that the color-struct is not necessarily a pointer per sé
<einStrauch> and stack-allocated
<einStrauch> would it not just be discarded on function exit anyway then, like e.G. integer types etc.?
<einStrauch> incidentally, the rason i'm resisting wrapping it all in a class is that one of the associated functions requests an array of the type
<einStrauch> having to allocate 2 such arrays, and copy the primitive array into the wrapped one seems incredibly wasteful
ExtraCrispy has joined #ponylang
khan has joined #ponylang
m6w6 has quit [Quit: ZNC - http://znc.in]
m6w6 has joined #ponylang
m6w6 has quit [Remote host closed the connection]
m6w6 has joined #ponylang
khan has quit [Quit: khan]
alxs has joined #ponylang
alxs has quit [Quit: Computer's gone to sleep. ZZZzzz…]
khan has joined #ponylang
alxs has joined #ponylang
_andre has joined #ponylang
_andre has quit [Client Quit]
_andre has joined #ponylang
khan has quit [Quit: khan]
aturley has joined #ponylang
brainproxy has joined #ponylang
alxs has quit [Quit: Computer's gone to sleep. ZZZzzz…]
alxs has joined #ponylang
jmiven has quit [Quit: pan]
jmiven has joined #ponylang
endformationage has joined #ponylang
jaro has joined #ponylang
alxs has quit [Quit: Computer's gone to sleep. ZZZzzz…]
alxs has joined #ponylang
alxs has quit [Quit: Computer's gone to sleep. ZZZzzz…]
brainproxy has quit [Quit: WeeChat 2.1]
ExtraCrispy has quit [Remote host closed the connection]
einStrauch has quit [Ping timeout: 252 seconds]
alxs has joined #ponylang
alxs has quit [Client Quit]
acarrico has joined #ponylang
alxs has joined #ponylang
khan has joined #ponylang
kempe has quit [Ping timeout: 245 seconds]
alxs has quit [Quit: Computer's gone to sleep. ZZZzzz…]
<vaninwagen> einStrauch in the case of pointers to stack allocated structs you need to take great care with your pointers and not leak them somewhere out of their scope. Maybe you are better off using pony structs instead of pointers?
kempe has joined #ponylang
<vaninwagen> Copying wrapper classes sounds indeed stupid
user10032 has joined #ponylang
<vaninwagen> But i have to admit i am by far no ffi expert, maxbe someone else with more experience here wanna step in
alxs has joined #ponylang
acarrico has quit [Quit: Leaving.]
alxs has quit [Quit: Computer's gone to sleep. ZZZzzz…]
alxs has joined #ponylang
khan has quit [Quit: khan]
alxs has quit [Quit: Computer's gone to sleep. ZZZzzz…]
alxs has joined #ponylang
alxs has quit [Quit: Computer's gone to sleep. ZZZzzz…]
alxs has joined #ponylang
alxs has quit [Quit: Computer's gone to sleep. ZZZzzz…]
atk is now known as atk_t
atk_t is now known as _Atk
alxs has joined #ponylang
alxs has quit [Quit: Computer's gone to sleep. ZZZzzz…]
aturley has quit [Quit: aturley]
aturley has joined #ponylang
user10032 has quit [Quit: Leaving]
_Atk is now known as atk
acarrico has joined #ponylang
brainproxy has joined #ponylang
bimawa2 has joined #ponylang
jaro_ has joined #ponylang
betawaffle has quit [Excess Flood]
betawaffle has joined #ponylang
aturley has quit [Ping timeout: 240 seconds]
jaro has quit [Ping timeout: 240 seconds]
bimawa1 has quit [Ping timeout: 260 seconds]
aturley has joined #ponylang