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
bimawa has joined #ponylang
bimawa has quit [Ping timeout: 240 seconds]
bimawa has joined #ponylang
bimawa has quit [Ping timeout: 240 seconds]
jaro has quit [Ping timeout: 255 seconds]
aturley has joined #ponylang
aturley_ has joined #ponylang
aturley has quit [Ping timeout: 248 seconds]
aturley_ has quit [Quit: aturley_]
jaro has joined #ponylang
bimawa has joined #ponylang
bimawa has quit [Ping timeout: 260 seconds]
dipin has quit [Quit: dipin]
<jdhorwitz> So this might be a stupid question, but when would you use behaviors vs functions? I'm coming from a lot of JavaScript lately, so I'm familiar with async vs sync code, but I'm struggling to know when to use a function and when to use a behavior
bimawa has joined #ponylang
bimawa has quit [Ping timeout: 256 seconds]
brainproxy has quit [Ping timeout: 268 seconds]
bimawa has joined #ponylang
bimawa has quit [Ping timeout: 240 seconds]
brainproxy has joined #ponylang
bimawa has joined #ponylang
bimawa has quit [Ping timeout: 240 seconds]
bimawa has joined #ponylang
brainproxy has quit [Ping timeout: 256 seconds]
bimawa has quit [Ping timeout: 264 seconds]
endformationage has quit [Quit: WeeChat 1.9.1]
brainproxy has joined #ponylang
bimawa has joined #ponylang
brainproxy has quit [Ping timeout: 248 seconds]
bimawa has quit [Ping timeout: 248 seconds]
<vaninwagen> jdhorwitz: the key difference is async vs sync execution. everything happens in an actor. So if you call a function, you have sequential execution, and when you call a behaviour you pass the boundary of sequential execution. A behaviour will be executed within another actor, possibly on another thread at any time after invoking the behaviour
<vaninwagen> And, currently you only get garbage collection between behaviour execution. So only when a behaviour is done, the GC can kick in.
<vaninwagen> If you never use other actors and thus behaviours you eventually run into memory issues
<vaninwagen> Also if you want concurrency, you need behaviours, as one behaviour will only execute on one thread/core
brainproxy has joined #ponylang
brainproxy has quit [Ping timeout: 248 seconds]
brainproxy has joined #ponylang
brainproxy has quit [Ping timeout: 276 seconds]
brainproxy has joined #ponylang
khan has quit [Quit: khan]
bimawa has joined #ponylang
brainproxy has quit [Ping timeout: 240 seconds]
bimawa has quit [Ping timeout: 260 seconds]
brainproxy has joined #ponylang
brainproxy has quit [Ping timeout: 265 seconds]
bimawa has joined #ponylang
brainproxy has joined #ponylang
bimawa has quit [Ping timeout: 260 seconds]
bimawa has joined #ponylang
bimawa has quit [Ping timeout: 248 seconds]
brainproxy has quit [Ping timeout: 255 seconds]
user10032 has joined #ponylang
brainproxy has joined #ponylang
bimawa has joined #ponylang
brainproxy has quit [Ping timeout: 260 seconds]
brainproxy has joined #ponylang
brainproxy has quit [Ping timeout: 248 seconds]
dipin has joined #ponylang
dipin has quit [Client Quit]
_whitelogger has joined #ponylang
brainproxy has joined #ponylang
SenasOzys has joined #ponylang
SenasOzys has quit [Remote host closed the connection]
SenasOzys has joined #ponylang
brainproxy has quit [Ping timeout: 276 seconds]
dipin has joined #ponylang
<SeanTAllen> jdhorwitz: i think you are thinking about it from the wrong angle. you use behaviors to communicate between actors. the question is... "when do i need actors?" here's a techique that i've found works with folks new to the actor model. try to imagine that you have people working together to solve you problem. each person can do some part of the job. you want enough people to get it done quickly, but not so many that there's
<SeanTAllen> too muhc overhead managing them. So, how would you model your problem in that case. What would each person be responsible for?
dipin has quit [Quit: dipin]
dipin has joined #ponylang
brainproxy has joined #ponylang
dipin has quit [Client Quit]
PrsPrsBK has quit [Quit: PrsPrsBK]
PrsPrsBK has joined #ponylang
<jdhorwitz> Thanks all, I think I am looking at it from the Javascript async/sync which is not the correct way. Perhaps I need to look into the actor model itself more deeply
<SeanTAllen> That would probably help jdhorwitz
brainproxy has quit [Ping timeout: 240 seconds]
bimawa has quit [Ping timeout: 256 seconds]
brainproxy has joined #ponylang
brainproxy has quit [Ping timeout: 264 seconds]
brainproxy has joined #ponylang
bimawa has joined #ponylang
endformationage has joined #ponylang
brainproxy has quit [Ping timeout: 256 seconds]
bimawa has quit [Ping timeout: 268 seconds]
betawaffle has quit [Ping timeout: 244 seconds]
betawaffle has joined #ponylang
brainproxy has joined #ponylang
brainproxy has quit [Ping timeout: 260 seconds]
brainproxy has joined #ponylang
ExtraCrispy has quit [Read error: Connection reset by peer]
brainproxy has quit [Ping timeout: 240 seconds]
bimawa has joined #ponylang
bimawa has quit [Ping timeout: 265 seconds]
brainproxy has joined #ponylang
bimawa has joined #ponylang
bimawa has quit [Ping timeout: 264 seconds]
voldyman has joined #ponylang
khan has joined #ponylang
brainproxy has quit [Ping timeout: 248 seconds]
brainproxy has joined #ponylang
brainproxy has quit [Ping timeout: 264 seconds]
bimawa has joined #ponylang
brainproxy has joined #ponylang
bimawa has quit [Ping timeout: 248 seconds]
bimawa has joined #ponylang
brainproxy has quit [Ping timeout: 268 seconds]
brainproxy has joined #ponylang
bimawa has quit [Ping timeout: 256 seconds]
brainproxy has quit [Ping timeout: 256 seconds]
CcxWrk has quit [Remote host closed the connection]
user10032 has quit [Quit: Leaving]
brainproxy has joined #ponylang
brainproxy has quit [Ping timeout: 240 seconds]
brainproxy has joined #ponylang
SenasOzys has quit [Ping timeout: 256 seconds]
brainproxy has quit [Ping timeout: 256 seconds]
SenasOzys has joined #ponylang
bimawa has joined #ponylang
brainproxy has joined #ponylang
bimawa has quit [Ping timeout: 256 seconds]
bimawa has joined #ponylang
bimawa has quit [Ping timeout: 265 seconds]
bimawa has joined #ponylang
bimawa has quit [Ping timeout: 264 seconds]
bimawa has joined #ponylang
bimawa has quit [Ping timeout: 240 seconds]