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
vaninwagen has quit [Quit: Connection closed for inactivity]
dougmacdoug has quit [Quit: dougmacdoug]
jemc has quit [Ping timeout: 248 seconds]
jemc has joined #ponylang
jemc has quit [Ping timeout: 248 seconds]
chasegeaton has joined #ponylang
jemc has joined #ponylang
jemc has quit [Ping timeout: 268 seconds]
dougmacdoug has joined #ponylang
<strmpnk> I'm trying to understand the impact of this change: https://github.com/ponylang/ponyc/pull/2499 I'm not sure I see an obvious way to use iftype when my return value is exactly A from the parameter.
<strmpnk> An example would be a `class X[A: Any #read]` with a field of type `(A | None)` and a partial method which returns an A and calls error otherwise.
<strmpnk> `match field | let a: A => a else error end` used to work. I see that this is broken intentionally but maybe I'm missing how the feature is supposed to be implemented (documentation around this part of the language seems to be sparse or missing).
<SeanTAllen> do you have a small example of the problem you can put in the playground and drop a link here strmpnk ?
<strmpnk> Yeah. Let me remove some of my experimental code first and recompile with master ponyc.
<strmpnk> My actual code has an array but a single point as a field shows the problem.
<strmpnk> Oh, I pasted with one edit missing.
<strmpnk> Had to had the parial apply back and remove it from update.
<SeanTAllen> so that...
<SeanTAllen> works
<SeanTAllen> what was the problem?
<strmpnk> Works with the release compiler but it fails with a " this capture violates capabilities, because the match would need to differentiate by capability at runtime instead of matching on type alone" error on master.
<SeanTAllen> ah
<SeanTAllen> ok
<strmpnk> So that specific commit is the one that breaks the code.
<strmpnk> I'm trying to understand the intended alternative code.
<strmpnk> But iftype isn't documented and I'm not sure if it applies here.
<SeanTAllen> Looking at it, the reason it complains is, I think that it will never be A
<strmpnk> It clearly can be though. It's confused by the None alternative.
<SeanTAllen> how can _data be something other than None?
<strmpnk> With update.
<strmpnk> My example runs and returns 42.
jemc has joined #ponylang
<strmpnk> I just default it to none for this toy example.
<SeanTAllen> ah update is missing
<SeanTAllen> im not sure how this compiled before
<strmpnk> ?
<SeanTAllen> o wait
<strmpnk> I see it in the code on the playground.
<SeanTAllen> sorry copy and paste fail
<SeanTAllen> i missed the update()
<SeanTAllen> it was below the fold for me
<SeanTAllen> that changes everyhting
<strmpnk> Sorry that it's contrived but I wanted to keep it minimal.
<SeanTAllen> im definitely the wrong person to help with that praetonus would definitely be better
<SeanTAllen> thats an area that I get confused with
<strmpnk> Same. Generics in Pony seem very powerful but I don't have a good enough handle yet so I was surprised to see this when I recompiled (I haven't been using a packaged compiler .. maybe I should switch to a tagged release.)
<strmpnk> I'll open an issue and link the PR.
<SeanTAllen> jemc might know.
acarrico has joined #ponylang
<strmpnk> I've opened https://github.com/ponylang/ponyc/issues/2584 to track it.
<SeanTAllen> strmpnk: its a bug
acarrico has quit [Ping timeout: 240 seconds]
<SeanTAllen> i talked to Benoit and he says "ya that is a bug"
<SeanTAllen> which is good because i was totally confused and was thinking "that must be a bug"
<strmpnk> I had the same reaction but many times I just underestimated how smart the compiler was being.
<SeanTAllen> i think of the compiler as wicked dumb but told what to do by smart people
<SeanTAllen> Imagine me as Cal Naughton Jr from Talladega Nights when I say that... https://www.youtube.com/watch?v=dao908l9k0M
<strmpnk> lol. I love that scene.
<SeanTAllen> Now Im watching mitchell and webb thanks to twitter
khan has quit [Quit: khan]
khan has joined #ponylang
mollymorphic has quit [Ping timeout: 252 seconds]
SenasOzys has quit [Ping timeout: 268 seconds]
khan has quit [Client Quit]
khan has joined #ponylang
chasegeaton has quit [Ping timeout: 245 seconds]
dougmacdoug_ has joined #ponylang
brainproxy has joined #ponylang
<dougmacdoug_> if I pass val objects around which actor is responsible for gc when there are no more handles?
dipin has quit [Quit: dipin]
<strmpnk> The actor that creates something will eventually collect it.
<strmpnk> The current GC follows the ORCA protocol. There's a paper on it that's pretty accessible. In general, it uses Pony's own actor messaging to create a sort of delayed reference count for sent capabilities.
<dougmacdoug_> so if i have 1 actor creating a bunch of objects for other actors to use (as vals) .. the objects expire frequently .. so I am thinking about creating an actor that recreates itself.. is that a pattern in pony?
<strmpnk> I wouldn't know... I'm still working on learning Pony but I would gather that it's not from the code I've read.
<dougmacdoug_> yeah. me too.. i have done a bit with pony but I am just getting to the point now where I am trying to use a lot of actors and passing a lot of data.. so its becoming a concern
<strmpnk> It certainly makes sense to have multiple actors if you thing the reclamation work is too high for one but I'm not sure the actors will be your bottleneck at that point.
<strmpnk> Instead, the allocating actor could do less work, ensuring computations are never blocking resource collections.
<dougmacdoug_> pony doesnt gc until the actor is no longer referenced.. so my plan is essentially clone the allocating actor and let it expire so it can gc all the old objects it created
<dougmacdoug_> unless thats not true
<strmpnk> As usual, see if you can measure the time being spent first. I don't have a good intuition around that vs the way jemalloc interacts with the schedulers so I'd definitely try to run a few variants to see how the runtime behaves.
<strmpnk> Oh? Actors should GC when they are in a receivable state, regardless of tags.
<strmpnk> Many pony systems have long running actors. Of course shutting an actor down will mean it's collected references and that can't be done until the count goes to zero, but it shouldn't have much overhead outside of memory bookkeeping if you aren't using the actor anymore.
<dougmacdoug_> well, i have to get the messaging system working first then run some tests under load and measure the memory .. then i will decide if I need to build a phoenix actor
<strmpnk> Definitely follow up with what you find. It's always good to hear how things are working for people.
<dougmacdoug_> will do
dougmacdoug has quit [Quit: dougmacdoug]
endformationage has quit [Quit: WeeChat 1.9.1]
chasegeaton has joined #ponylang
patroclos has joined #ponylang
jemc has quit [Ping timeout: 248 seconds]
_whitelogger has joined #ponylang
_whitelogger_ has quit [Remote host closed the connection]
chasegeaton has quit [Ping timeout: 260 seconds]
dougmacdoug_ has quit [Ping timeout: 260 seconds]
sleeplessy has quit [Quit: WeeChat 1.9.1]
patroclos has quit [Ping timeout: 260 seconds]
johshoff has quit [Ping timeout: 240 seconds]
codec1 has joined #ponylang
khan has quit [Quit: khan]
khan has joined #ponylang
khan has quit [Remote host closed the connection]
vaninwagen has joined #ponylang
vaninwagen has quit [Client Quit]
vaninwagen has joined #ponylang
<vaninwagen> i was reading https://blog.jessfraz.com/post/nerd-sniped-by-binfmt_misc/ . i read about gorun, which is a cheap trick for a go shebang which just compiles and executes the file in the background.
<vaninwagen> it was so cheap that i thought i had to do the same: https://github.com/mfelsche/ponyrun
<vaninwagen> tl;dr: you can now just do with this: $ ./hello.pony
<vaninwagen> consider this more a joke than sth. serious, but i learned some stdlib apis along the way :)
codec1 has quit [Quit: Leaving.]
codec1 has joined #ponylang
johshoff has joined #ponylang
codec1 has quit [Quit: Leaving.]
codec1 has joined #ponylang
codec1 has quit [Client Quit]
codec1 has joined #ponylang
codec1 has quit [Quit: Leaving.]
SenasOzys has joined #ponylang
khan has joined #ponylang
codec1 has joined #ponylang
acarrico has joined #ponylang
dipin has joined #ponylang
alxs has joined #ponylang
alxs has quit [Quit: Computer's gone to sleep. ZZZzzz…]
alxs has joined #ponylang
vaninwagen has quit [Ping timeout: 255 seconds]
vaninwagen has joined #ponylang
SenasOzys has quit [Ping timeout: 240 seconds]
SenasOzys 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…]
alxs has joined #ponylang
Praetonus has joined #ponylang
jemc has joined #ponylang
alxs has quit [Quit: Computer's gone to sleep. ZZZzzz…]
alxs has joined #ponylang
alxs has quit [Client Quit]
alxs has joined #ponylang
alxs has quit [Client Quit]
alxs has joined #ponylang
alxs has quit [Quit: Computer's gone to sleep. ZZZzzz…]
codec1 has quit [Ping timeout: 252 seconds]
brainpro1 has joined #ponylang
brainproxy has quit [Ping timeout: 240 seconds]
alxs has joined #ponylang
patroclos has joined #ponylang
khan has quit [Quit: khan]
khan has joined #ponylang
khan has quit [Client Quit]
khan has joined #ponylang
SenasOzys has quit [Remote host closed the connection]
SenasOzys has joined #ponylang
alxs has quit [Quit: Computer's gone to sleep. ZZZzzz…]
user10032 has joined #ponylang
inoas has joined #ponylang
khan has quit [Quit: khan]
khan has joined #ponylang
khan has quit [Client Quit]
khan has joined #ponylang
alxs has joined #ponylang
Praetonus has quit [Quit: Leaving]
khan has quit [Quit: khan]
khan has joined #ponylang
khan has quit [Quit: khan]
khan has joined #ponylang
alxs has quit [Quit: Computer's gone to sleep. ZZZzzz…]
jemc has quit [Ping timeout: 248 seconds]
SenasOzys has quit [Ping timeout: 256 seconds]
jemc has joined #ponylang
SenasOzys has joined #ponylang
chasegeaton has joined #ponylang
codec1 has joined #ponylang
alxs has joined #ponylang
chasegeaton has quit [Ping timeout: 260 seconds]
chasegeaton has joined #ponylang
vaninwagen has quit [Quit: WeeChat 2.0.1]
acarrico has quit [Ping timeout: 255 seconds]
brainpro1 has quit [Read error: Connection reset by peer]
brainproxy has joined #ponylang
alxs has quit [Quit: Computer's gone to sleep. ZZZzzz…]
alxs has joined #ponylang
codec1 has quit [Read error: Connection reset by peer]
codec1 has joined #ponylang
chasegeaton has quit [Quit: Leaving]
alxs_ has joined #ponylang
alxs has quit [Ping timeout: 248 seconds]
inoas has quit [Ping timeout: 240 seconds]
brainpro1 has joined #ponylang
alxs_ has quit [Quit: Computer's gone to sleep. ZZZzzz…]
brainproxy has quit [Ping timeout: 252 seconds]
inoas has joined #ponylang
brainpro1 has quit [Ping timeout: 268 seconds]
patroclos has quit [Ping timeout: 265 seconds]
brainpro1 has joined #ponylang
khan has quit [Quit: khan]
khan has joined #ponylang
brainpro1 has quit [Ping timeout: 240 seconds]
khan has quit [Client Quit]
khan has joined #ponylang
brainpro1 has joined #ponylang
inoas has quit [Quit: inoas]
inoas has joined #ponylang
khan has quit [Quit: khan]
khan has joined #ponylang
inoas has quit [Ping timeout: 248 seconds]
khan has quit [Client Quit]
khan has joined #ponylang
brainpro1 has quit [Ping timeout: 268 seconds]
brainpro1 has joined #ponylang
khan has quit [Quit: khan]
khan has joined #ponylang
khan has quit [Client Quit]
khan has joined #ponylang
user10032 has quit [Quit: Leaving]