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
samuell has quit [Quit: Leaving]
Candle has quit [Ping timeout: 252 seconds]
Candle has joined #ponylang
jemc has quit [Ping timeout: 260 seconds]
hamstah has quit [Remote host closed the connection]
_whitelogger has joined #ponylang
jemc has joined #ponylang
jemc has quit [Quit: WeeChat 1.9]
endformationage has quit [Quit: WeeChat 1.9.1]
endformationage has joined #ponylang
endformationage has quit [Quit: WeeChat 1.9.1]
dipin has quit [Quit: dipin]
samuell has joined #ponylang
vaninwagen has joined #ponylang
notsgnik has joined #ponylang
<notsgnik> Hello Pony community, I'm learning pony language and I'm almost done, I'm yet still struggling with how a beaviour will report that the duty is done to the main actor
<notsgnik> if anyone has a bit of time to explain me in private, he would be a helpfully kind person :)
samuell has quit [Remote host closed the connection]
<SeanTAllen> notsgnik: what do you mean "report that the duty is done to the main actor"? behaviors dont report they are done. they are asynchronous.
samuell has joined #ponylang
<notsgnik> well if i can pass a pointer to something that will be checked periodically by the main actor he can report that he is done and concurency is not an issue
<SeanTAllen> i dont understand
<SeanTAllen> i think you are making some assumptions
<SeanTAllen> but im not sure what they are
<SeanTAllen> what is it that you imagine in happening that requires this to be done?
<notsgnik> i have a two dimensional array containing zeros that is part of a class
<notsgnik> then i have actor containing a behavior that will turn them into ones
<notsgnik> the class will figure out the size of the array and run multiple behaviors on it
<notsgnik> while calling them the class should give them a pointer to an array where they should put a 1 to the offset corresponding
<notsgnik> this array will be checked periodicaly to find out if all beaviours have been executed
<SeanTAllen> sorry, i'm not really following
<SeanTAllen> are you asking how you can know when asynchronous work is done?
<notsgnik> yep
<SeanTAllen> ok
<SeanTAllen> so
<SeanTAllen> moving backwards for a moment
<notsgnik> :)
<SeanTAllen> is there a fixed numbers of behaviors that need to be run?
<notsgnik> yes
<SeanTAllen> so in that situation, i normally create some sort of "supervising actor"
<SeanTAllen> it dispatches out the work and as each actor finishes the work it needs to do, it reports back with the finished work
<SeanTAllen> the supervising actor knows how many it is waiting to hear from, it keeps track of which have completed and when all are completed, its kicks off the next step
<SeanTAllen> so the supervising actor is the only one mutating a data structure that represents completed work
<notsgnik> how do they report thne?
<SeanTAllen> "they" is actors doing "work"?
<notsgnik> yep
<notsgnik> they need a pointer to something or a signal, don't they ?
<SeanTAllen> you dont have pointers in pony
<SeanTAllen> you can have a tag reference to an actor
<SeanTAllen> hold on
<SeanTAllen> doing a really simplified example
<SeanTAllen> thats a really simple version of the basic pattern
<SeanTAllen> that you can enhance to have more than 1 worker
<notsgnik> thanks a lot SeanTAllen, you are cool :D i'll check that right away :)
<SeanTAllen> you're welcome notsgnik
<notsgnik> thanks i've understand now
<notsgnik> i'll play with this , pony is really a cool language :D
<SeanTAllen> glad that was helpful notsgnik
<SeanTAllen> happy Ponying!
jmiven has quit [Quit: co'o]
jmiven has joined #ponylang
_andre has joined #ponylang
Praetonus has joined #ponylang
dlowe has joined #ponylang
trevorriles has joined #ponylang
dougmacdoug has joined #ponylang
dougmacdoug has left #ponylang [#ponylang]
dipin has joined #ponylang
vaninwagen has quit [Ping timeout: 260 seconds]
trevorriles has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
trevorriles has joined #ponylang
vaninwagen has joined #ponylang
vaninwagen has quit [Quit: Ex-Chat]
vaninwagen has joined #ponylang
codec_ has joined #ponylang
<codec_> Hi
<dlowe> Hi, codec_
<codec_> quick question, can an actor ask to run the garbage collector for itself?
<Praetonus> codec_: Yes, see the `pony_triggergc` function in pony.h
<Praetonus> You'll have to call it through the FFI
<codec_> nice! by the way do you happen to know if an actor can ask to have a preemptive threading model?
<codec_> with optionally a way to run the gc if the actor "is preemtep"?
<Praetonus> There is no preemtive scheduling in the runtime, so that won't be possible
<codec_> is it possible that it can be added?
vaninwagen has quit [Ping timeout: 260 seconds]
mgartner has joined #ponylang
<mgartner> Hello, I'm wondering why Pony does not error during compilation when a function is over-typed. For example, when the return type of the function is (U64 | String) but only a U64 can ever be returned, Pony does not error, and it seems like it should. Here's an example: https://gist.github.com/mgartner/be3a3e0d2102a6b7fe35c7d7df92a5e9
nisanharamati has joined #ponylang
endformationage has joined #ponylang
mgartner has quit [Quit: Page closed]
samuell has quit [Remote host closed the connection]
trevorriles has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
trevorriles has joined #ponylang
codec_ has quit [Quit: Page closed]
<SeanTAllen> codec_ its under discussion
Ho has joined #ponylang
dipin has quit [Quit: dipin]
<SeanTAllen> mgartner: that would be an interesting RFC. would need to account for interfaces and traits default methods.
Ho has quit [Ping timeout: 260 seconds]
dipin has joined #ponylang
dipin has quit [Client Quit]
vaninwagen has joined #ponylang
trevorriles has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
samuell has joined #ponylang
vaninwagen has quit [Ping timeout: 240 seconds]
samuell has quit [Quit: Leaving]
dipin has joined #ponylang