<doublec>
sebastian_: map_stateful maps from a State to a State, so I changed the result from 'None' to 'State'. This means I have to return the modified state.
<doublec>
sebastian_: collect() takes a generic argument that defaults to an Array. Since you use a list we need to be explicit about it being a List, hence: collect[List[State]]
Praetonus has joined #ponylang
sebastian_ has joined #ponylang
sebastian_ has quit [Ping timeout: 240 seconds]
endformationage has quit [Quit: WeeChat 1.9]
user10032 has quit [Quit: Leaving]
samuell has joined #ponylang
MaybeDragon has joined #ponylang
_andre has joined #ponylang
ShalokShalom_ has joined #ponylang
ShalokShalom has quit [Ping timeout: 240 seconds]
ShalokShalom_ is now known as ShalokShalom
wintermoo has joined #ponylang
wintermoo is now known as rewsd_
rewsd_ has left #ponylang [#ponylang]
<kjekac>
hi all! currently trying to write some Pony code after reading the tutorial. is "classes are for data, actors are for behavior" a useful rule-of-thumb?
<kjekac>
sorry, realize that's an unfortunate choice of words. I don't mean "behaviors" as in the language construct, but as in "this is what my program should do" (as opposed to "this is how my program should store and handle its data")
acarrico has joined #ponylang
<SeanTAllen>
kjekac: kind of?
<SeanTAllen>
classes are good for "do" but not "communication"
<SeanTAllen>
so it depends on how you define "what my program should do"
<SeanTAllen>
that said, it sounds like a reasonable rule of thumb to start with
<SeanTAllen>
one thing that helped me when i started was i added documentation to parts of the standard library and got to see what was an actor and what was a class.
<SeanTAllen>
that might be helpful for you as well.
sebastian_ has joined #ponylang
<kjekac>
SeanTAllen: ah, that makes sense, especially that classes are for "do" but not "communication", but I also realize that I need to refine my notions of what those two concepts constitute.
<kjekac>
for example, I realized just now, that if multiple actors should be able to write to some data structure, that has to be handled by an actor, even though "write" feels more like "do" than like "communication" to me, at least intuitively.
<kjekac>
add documentation is probably a good idea if I have further problems moving forward. :)
<kjekac>
might come back with some other specific questions though.
<sebastian_>
doublec: Thanks for the tips! That all makes sense, and works inside the Pony Playground, but when I try it locally I still get an error: https://pastebin.com/raw/9xMU7f7G
<sebastian_>
Is there some difference between flags used by the Playground and just running ponyc? Or a substantial version difference?