<endformationage>
Realize that calling .> increment on inc1 / inc2 in main's constructor only sends the message for the behavior to be run, and that it actually occurs sometime afterward.
<endformationage>
I think causality is applicable all the time, that is an actor always executes it's messages in the order recieved.
<endformationage>
Just in this case, due to perhaps pony's scheduler and the way constructors work?, the print message is always recieved before any increment messages get to main..
flutter42 has joined #ponylang
flutter42 has left #ponylang [#ponylang]
flutter42 has joined #ponylang
<SeanTAllen>
fluttershy_: casuality exists between actors
<SeanTAllen>
for example
<SeanTAllen>
Incrementer.>increment(this)
<jemc>
fluttershy_: endformationage is right here - causality holds, but in your example, there is no causal relationship between the `main.increment` calls and the `env.out.print` call
<SeanTAllen>
will occur before calls to main.increment
<SeanTAllen>
there's no connection between those and the print though
<jemc>
for this particulat example is you have to figure out a way to make "the incremementer actors are done making their calls" event *cause* the "main should print itself" event
<jemc>
for a start, you could move the `this.print` call in `Main` to be a `main.print` call in the `Incrementer` actors, after they finish their iteration
<jemc>
but then you'd obviously get two calls to `Main.print` - one for each `Incrementer`
<jemc>
so instead you'd probably want to make the `Incrementer`s call `main.finish`, or something like that, and introduce some kind of "expectation" in Main that its going to receive those two `Main.finish` calls before it should print itself
<jemc>
a good example of this message flow in a nontrivial application is in `ponytest` - for "long tests" (ones that involve asynchronous activity), you have to send `TestHelper.complete` to let it know that this particular test case is done
<jemc>
and one all the completions are received, that *causes* the test runner to print the final stats for your tests
<jemc>
fluttershy_: note that if causality worked the way you were expecting it to in your example, Pony wouldn't be able to parallelize *anything*, and we'd just have the equivalent of a single-threaded program :)
<jemc>
because if you expected it to finish all the calls caused by the increment calls, before moving on the the print call, the it would also have to finsih all the calls caused by the first increment call before moving to the second increment call, so nothing would be parallel
<jemc>
in other words, it would just be executing in serial, as a depth-first tree
<endformationage>
jemc: Thanks for pointing out ponytest as an example. Also sounds like this could be another to add to the patterns list. :p
<adam]>
Are actor constructors executed asynchronously (like behaviors)? They seem to be from testing, but the tutorial doesn't document that they are.
<endformationage>
adam]: Yes, constructors are behaviors.
<adam]>
thanks!
<adam]>
just actor constructors, though, right? Class constructors don't somehow act as behaviors?
<jemc>
adam]: correct
<jemc>
if that's not in the tutorial, it definitely should be
<SeanTAllen>
@jemc is the tutorial loading for you?
<SeanTAllen>
im getting 0kb returned
flutter42 has quit [Ping timeout: 255 seconds]
kempe has joined #ponylang
flutter62 has joined #ponylang
TheLemonMan has joined #ponylang
<jemc>
SeanTAllen same
flutter45 has joined #ponylang
flutter62 has quit [Ping timeout: 258 seconds]
flutter45 has quit [Ping timeout: 240 seconds]
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
flutter29 has joined #ponylang
Matthias247 has joined #ponylang
pduncan has joined #ponylang
TheLemonMan has joined #ponylang
pduncan has quit [Ping timeout: 246 seconds]
_andre has quit [Quit: leaving]
<SeanTAllen>
this was happening the Andy end of last week. it might be related to the specific server we are getting directed to.
<SeanTAllen>
Andy is fine now
<SeanTAllen>
it loads for me fine in Chrome but not Safari or curl/wget
<SeanTAllen>
is also fine for me in firefox
flutter29 has quit [Ping timeout: 246 seconds]
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
flutter24 has joined #ponylang
<jemc>
still broken for me (in firefox)
TheLemonMan has joined #ponylang
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
Matthias247 has quit [Read error: Connection reset by peer]