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: 260 seconds]
_whitelogger has joined #ponylang
aedigix has quit [Ping timeout: 256 seconds]
chemist69 has quit [Ping timeout: 260 seconds]
chemist69 has joined #ponylang
gmcabrita has quit [Quit: Connection closed for inactivity]
jemc has joined #ponylang
jemc has quit [Ping timeout: 264 seconds]
jemc has joined #ponylang
j14159_ has joined #ponylang
M4GNV5_ has joined #ponylang
K4rolis has quit [*.net *.split]
j14159 has quit [*.net *.split]
M4GNV5 has quit [*.net *.split]
j14159_ is now known as j14159
K4rolis has joined #ponylang
amclain has quit [Quit: Leaving]
jemc has quit [Ping timeout: 264 seconds]
vaninwagen has joined #ponylang
graaff has joined #ponylang
Peter__ has joined #ponylang
Peter__ has quit [Quit: Page closed]
gmcabrita has joined #ponylang
vaninwagen has quit [Ping timeout: 260 seconds]
vaninwagen has joined #ponylang
_andre has joined #ponylang
vaninwagen has quit [Ping timeout: 264 seconds]
vaninwagen has joined #ponylang
graaff has quit [Quit: Leaving]
vaninwagen has quit [Ping timeout: 260 seconds]
K4rolis has quit [Ping timeout: 256 seconds]
unbalancedparen has joined #ponylang
unbalancedparen has left #ponylang [#ponylang]
jemc has joined #ponylang
obadz has quit [Ping timeout: 256 seconds]
obadz has joined #ponylang
kr1shnak has joined #ponylang
TwoNotes has joined #ponylang
amclain has joined #ponylang
K4rolis has joined #ponylang
TwoNotes has quit [Ping timeout: 240 seconds]
TwoNotes has joined #ponylang
TwoNotes has left #ponylang [#ponylang]
<staticassert> has anyone thought about dependency injection? It seems like it would be nice to just say "I'm an actor and I need someone to pass me a Database actor" - and isntead of having to pass around a database actor's name you could just autowire it in
<jemc> staticassert: using an `interface` should meet exactly that goal
<jemc> instead of accepting an argument with a concrete type, use an interface type with the methods you need
<staticassert> I think that's solving a different problem. DI would mean I don't construct anything, I just ask for things, and some configuration that exists somewhere provides it. With interfaces, I'd get some of the benefits - like easier testing, but it wouldn't quite by the same.
<jemc> I think that what you're talking about can be solved with a combination of interfaces and careful design patterns to be sure that you're designing your code in such a way that it can be done as you describe, with the "configuration that exists somewhere" just being the higher-level code that sets up and executes your classes/actors
<jemc> also, I think "don't construct anything" is a bit of a red herring - if you use type parameters, you should be able to call constructors even when you don't know the concrete type
TwoNotes has joined #ponylang
vaninwagen has joined #ponylang
TwoNotes has quit [Quit: Leaving.]
<obadz> SeanTAllen: new website is great!
<staticassert> pony is M:N threading right? Does that mean that IO in a userland thread blocks other userland threads that are mapped to the same OS thread? Or does the runtime manage this?
Matthias247 has joined #ponylang
<jemc> staticassert: there have been some discussions about how to mitigate the effect, but yes, currently any long-running synchronous operation in an actor will block that scheduler thread
<jemc> the general recommendation is to not avoid *synchronous* I/O as much as possible
<staticassert> cool, thanks. have those discussions been during sync calls or somewhere written down?
<jemc> IIRC the discussion happened in last week's sync call, near the beginning
<jemc> could be wrong though - it was definitely a recent one
<jemc> sylvan had an idea about how to detect when to spin up another scheduler thread for the same logical "core"
<jemc> it was just an idea, though - not yet subjected to a lot of careful thought
<jemc> the current recommendation is that if you get into situations where that is a problem, you need to consider redesigning your data flow to be more asynchronous somewhere
<jemc> with any long-running blocking operations being a general anti-pattern
<SeanTAllen> obadz: thank you. more coming.
<SeanTAllen> staticassert: that depends on your definition of M:N
<SeanTAllen> there are many actors. but pony doesn't have threads. there are schedulers which by default, is set to the number of CPUs you have a available and schedulers run actors.
<SeanTAllen> there's not a thread per actor or anything like that
<SeanTAllen> you can use the --ponythreads option to change the number of schedulers
<SeanTAllen> depending on OS you can pin schedulers to CPUs which will give you excellent performance.
<SeanTAllen> when we run on linux we pin the pony threads plus use --ponypinasio to pin the asio thread as well
<SeanTAllen> basically what i am saying staticassert is that pony does not have green threads and that is often what people mean by M:N
<jemc> quick correction to a typo of mine I just noticed above
<jemc> I said "the general recommendation is to not avoid *synchronous* I/O as much as possible"
<jemc> it had an unintentional double-negative: "not avoid"
<jemc> I meant "the general recommendation is to avoid *synchronous* I/O as much as possible"
<jemc> hopefully that was clear from context, but this should clear up any confusion
jemc has quit [Quit: WeeChat 1.4]
jemc has joined #ponylang
Matthias247 has quit [Read error: Connection reset by peer]
vaninwagen has quit [Ping timeout: 246 seconds]
obadz has quit [Ping timeout: 264 seconds]
obadz has joined #ponylang