gmcabrita has quit [Quit: Connection closed for inactivity]
abbiya_ has quit [Remote host closed the connection]
abbiya has joined #ponylang
amclain has quit [Quit: Leaving]
rurban has joined #ponylang
rurban has left #ponylang [#ponylang]
jemc has joined #ponylang
jemc has quit [Ping timeout: 268 seconds]
vlark has joined #ponylang
kulibali has quit [Ping timeout: 240 seconds]
vlark is now known as virtual_lark
kulibali has joined #ponylang
m6w6 has joined #ponylang
chemist69 has quit [Ping timeout: 260 seconds]
chemist69 has joined #ponylang
virtual_lark has quit [Changing host]
virtual_lark has joined #ponylang
gmcabrita has joined #ponylang
rurban has joined #ponylang
_andre has joined #ponylang
prettyvanilla has quit [Read error: Connection reset by peer]
prettyvanilla has joined #ponylang
rurban has left #ponylang [#ponylang]
staticassert has joined #ponylang
CcxWrk has quit [Ping timeout: 260 seconds]
CcxWrk has joined #ponylang
CcxWrk has quit [Ping timeout: 258 seconds]
<staticassert>
So there's no concept of an actor 'dying' in pony right? So there wouldn't be a need for something like a supervisor tree?
<SeanTAllen>
there is no concept of dying
<SeanTAllen>
that is correct
<SeanTAllen>
actors "die" when they reach quiescance
<SeanTAllen>
that said, practical real world usage of pony, i've found that we are going to need something like a supervisor tree but it will probably end up being very different but as the same general purpoe
<staticassert>
It seems that Pony's "handle every error" means that error handling has to exist within an actor, as opposed to being able to isolate error handling code to your supervisors.
<staticassert>
Not sure how a supervision tree would look, some responsibilities would have to be inverted probably
CcxWrk has joined #ponylang
<SeanTAllen>
errors are handled but there are interesting bits such as...
<SeanTAllen>
if a socket closes, do you start another actor to resend (that is what you would need to do with stdlib)
<SeanTAllen>
what happens to buffered data?
<SeanTAllen>
how do you avoid losing data?
<SeanTAllen>
there are still error scenarios
<SeanTAllen>
and something needs to address
<SeanTAllen>
ideally this isnt purely ad-hoc with every programmer having to roll their own
<staticassert>
Yeah, agreed. I think in the presence of those potential failures the actor would die but its queue wouldn't disappear - a new actor would inherit it. That's how I've been doing it in my toy rust actor library.
<staticassert>
But you could easily mimick that with just resetting the actors state as a way to 'die' - the problem being oyu need some outside 'thing' to be like "Alright you've died like 50 times, time to propagate this"
<SeanTAllen>
it will be interesting to see what patterns folks develop and then discuss pros and cons and eventually bring something in
<staticassert>
The div by 0 thing seems like it would be solved by just allowing actors to die - runtime exceptions that can't be reasoned about at compile time but can be handled by supervision trees
<staticassert>
I think P-lang does something similar with unhandled messages killing the actor but that language is far more opaque than pony so I could be wrong
Praetonus has joined #ponylang
<SeanTAllen>
allowing actors to die creates a giant mess of other issues
jemc has joined #ponylang
<staticassert>
yeah, that doesn't surprise me
<thm>
ignoring the division by zero is an "interesting" way to deal with the dilemma between checked and unchecked exceptions present in Java
kulibali has quit [Quit: Going offline, see ya! (www.adiirc.com)]
<SeanTAllen>
the divide by 0 rule was impemented in Pony as a rare instance of bending to ergonomics. Originally it was an error, which lead to try/else/end everywhere for math operations and was apparently incredibly painful.
<SeanTAllen>
that predates me
<SeanTAllen>
by the time a couple years ago that sylvan sent me an email that said "look what i built", that was already in there, so i never experienced it
Praetonus has quit [Quit: Leaving]
gmcabrita has quit [Quit: Connection closed for inactivity]
gmcabrita has joined #ponylang
virtual_lark has quit [Ping timeout: 240 seconds]
hakvroot_ is now known as hakvroot
<staticassert>
I think div by zero can just be replaced with 'legitimate bugs' - how should actors handle transient, unexpected errors? Hopefully as I write more Pony that becomes clearer.
virtual_lark has joined #ponylang
jemc has quit [Ping timeout: 260 seconds]
dougmacdoug has quit [Remote host closed the connection]
jemc has joined #ponylang
xllndr has joined #ponylang
Praetonus has joined #ponylang
<xllndr>
hello
<staticassert>
o/
<bougyman>
\o
<staticassert>
Is there a way to get a circular iterator over an Array?
<Praetonus>
staticassert: There is itertools.Cycle
<staticassert>
thanks
<xllndr>
I am playing around with pony on 32-bit hardware, since ponyc version 0.11.0 I get a compile error. The following link shows the error, where the error occurs and a possible fix(a friend did the fix). http://pastebin.com/f8Nn0MEX
<SeanTAllen>
xllndr: can you open an issue on the GitHub. We dont have a 32 bit CI system so we do "best effort" to keep the 32 bit version working.
<xllndr>
SeanTAllen: Yes I can, but I need to get an account first.
_andre has quit [Quit: leaving]
jmiven has quit [Quit: co'o]
jmiven has joined #ponylang
_whitelogger has joined #ponylang
<xllndr>
cu
xllndr has quit [Ping timeout: 246 seconds]
jemc has quit [Ping timeout: 240 seconds]
staticassert_ has joined #ponylang
jemc has joined #ponylang
<staticassert_>
I'm trying to traverse directors in Pony. As a test I'm printing out whether the entries in a directory are files or directories. Despite having files in the parent directory it prints out "directory" + the name every time. Here is the program: https://gist.github.com/insanitybit/cda08cb70a13c3d6f06b4f637c392350
<staticassert_>
If I invert this and check info.directory I get the opposite behavior
<staticassert_>
Actually if I change that to info.directory it still always outputs "directory" + name
<staticassert_>
Oh, sorry, it actually *does* do the opposite behavior... forgot to compile before rerunning.
<staticassert_>
Basically it appears to me that .file and .directory always return true in this case.
<staticassert_>
Also, is there a way to create a SetIs[SomeActor] without a create function as a private immutable field. Or do I need to generate it in .create
<SeanTAllen>
I dont follow the last question staticassert_
<SeanTAllen>
do you mean have a field on an object that is private and initialize before the constructor?
<SeanTAllen>
like
<SeanTAllen>
let foo: SetIs[SomeActor] = foo.create() <=== shhhh try that
<staticassert_>
like 'let workers: SetIs[Searcher] = <create set here>'
<SeanTAllen>
let foo: SetIs[SomeActor] = SetIs[SomeActor] <== also works if "SetIs" is a concrete class
<SeanTAllen>
ditto for the first one
<SeanTAllen>
needs to be a concrete class
<staticassert_>
But like how would I say 'create a set of 100 of those actors in the set'
<SeanTAllen>
you mean you want to initialize it with 100 actors already in it?
<staticassert_>
yeah
<SeanTAllen>
where do these actors come from?
<SeanTAllen>
and why are you trying to avoid having a constructor?
<staticassert_>
not trying to avoid the constructor, more curious about initializing sugar
<staticassert_>
I guess like, as pseudocode, something like 'let foo: SetIs[SomeActor] = [SomeActor.create() for _ in 0..100]
<staticassert_>
but I think that's a stretch
<SeanTAllen>
you might be able to use an expression to initialize
<SeanTAllen>
haven't ever tried
<SeanTAllen>
only one way to find out
<staticassert_>
no biggie, just have to figure out how to iterate through a range in the constructor and that'll solve my problem
<SeanTAllen>
Range(0, somenumber)
<SeanTAllen>
gets you a range;
<staticassert_>
thanks
<SeanTAllen>
and you can use in a for if you call values on it to get the iterator
<SeanTAllen>
* i think
<SeanTAllen>
i dont use range a lot
<SeanTAllen>
so i always check to make sure
<SeanTAllen>
staticassert_: you have a bug in your gist
<staticassert_>
SeanTAllen: oh?
<SeanTAllen>
you call FilePath on target
<SeanTAllen>
every time
<SeanTAllen>
never changes
<SeanTAllen>
i believe you want to call it with `entry` not `target`
<staticassert_>
whoops -_-
<staticassert_>
thank you
<SeanTAllen>
you're welcome
Praetonus has quit [Quit: Leaving]
<staticassert_>
Looks like .values() doesn't work on a Range. I see that it implements Iterator, which has a has_next function though
<staticassert_>
and a next
<staticassert_>
Oh looks like it works without .values