<autodidaddict>
Hmm.. I think I might be able to accomplish this by doing something like let promise = Promise[String] promise.next[None](collector.~collect()) where collector is an actor holding an array of strings, every time collect gets called it adds to the list of strings. When I'm done, I can tell collector send its collection somewhere
<autodidaddict>
I feel like there's got to be a simpler way to achieve this pattern
autodidaddict has quit [Ping timeout: 260 seconds]
<SeanTAllen>
SimonJF: that's already been updated but the documentation only gets updated there on release. If you check the source, you'll see its been updated. Thanks for noticing though. In general, YES! to PRs. For documentation that is the ponyc repo. The documentation is generated from the docstrings in the source in packages. Also welcome SimonJF.
<SeanTAllen>
autodidaddict: I don't have a good pattern for you. sorry. I haven't needed to work out anything for that. If you come up with something good, can I suggest doing a new entry in patterns.ponylang.org ?
aceluck has quit [Remote host closed the connection]
aceluck has joined #ponylang
<SeanTAllen>
Are you cross compiling Pony? We have a sorry lack of documentation on that front. If you could assist in putting some together, let me know.
Matthias247 has quit [Read error: Connection reset by peer]
aceluck has quit [Ping timeout: 240 seconds]
plietar has joined #ponylang
oldmanmike has quit [Ping timeout: 276 seconds]
jemc has quit [Ping timeout: 255 seconds]
<SimonJF>
SeanTAllen: thanks very much! :)
oldmanmike has joined #ponylang
jemc has joined #ponylang
jemc has quit [Client Quit]
jemc has joined #ponylang
jemc has quit [Ping timeout: 240 seconds]
jemc has joined #ponylang
jemc has quit [Ping timeout: 248 seconds]
aceluck has joined #ponylang
jemc has joined #ponylang
obadz has quit [Quit: WeeChat 1.8]
obadz has joined #ponylang
plietar has quit [Remote host closed the connection]
plietar has joined #ponylang
plietar has quit [Ping timeout: 255 seconds]
jemc has quit [Ping timeout: 240 seconds]
Matthias247 has joined #ponylang
plietar has joined #ponylang
plietar has quit [Remote host closed the connection]
jemc has joined #ponylang
endformationage has joined #ponylang
serejkus has quit [Quit: Page closed]
aceluck has quit [Remote host closed the connection]
aceluck has joined #ponylang
jemc has quit [Ping timeout: 276 seconds]
aceluck has quit [Ping timeout: 255 seconds]
<cquinn>
@SeanTAllen related to doc, I plan on chipping in there a bit. One question I had was around the voice used in method comments. In Java, method commends are in a descriptive (3rd person) voice vs a prescriptive (2nd person) voice. http://www.oracle.com/technetwork/articles/java/index-137868.html
<cquinn>
Pony seems to be a bit of a mix. Should we choose a style and follow that when cleaning up and fleshing out the pony doc?
jemc has joined #ponylang
<cquinn>
OK, unrelated question: Is it possible to execute a subprocess in Pony and block for the resulting streams and return code? I saw that @jemc spawns git using @system in pony-stable, but I need more control over env and capturing stdout. I could use the process package, but then I'll have to restructure my logic to be actors and state machines all the way down... any other ideas?
<jemc>
> execute a subprocess in Pony and block
<jemc>
cquinn: the "and block" part is something you're not going to find in an idiomatic pony package
<cquinn>
ha, ok, that's what I've been looking for.
<jemc>
blocking is an anti-pattern in pony
<jemc>
I'd really suggest doing the refactoring to allow the response to arrive asynchronously
<cquinn>
Yeah, true. But for cli tools it is very convenient.
<cquinn>
I am trying to decide whether to hack in a blocking exec wrapper, or rethink my logic to be async.
<jemc>
I'm not sure what's driving your notion that "state machines all the way down" would become a requirement if you did the async route
<jemc>
if you want to talk about specifics, I'd be happy to help you brainstorm
<cquinn>
well, for example, I'd like to port over a VCS library from Golang that is used by Glide to manage retrieving Go packages from repos like git and hg.
<cquinn>
so, for example, it makes sync calls to git to find out things about the repo and then operates on the things returned in stdout.
<cquinn>
It seems to me that an object like that would need to be an actor to receive the result of the git call async. And then it would have to be a state machine in effect to perform multiple operations in sequence.
<cquinn>
Or, use something like Promises.
<jemc>
without talking about specific situations it's hard to be sure what the best pattern to suggest is, but I suspect that all of those synchronous return values could be refactored to deal in callbacks and/or promises
<cquinn>
oh, yes. I like that RFC. You're right that Promises are probably the right way to do this. I'll look at them some more and get my head around them.
<SeanTAllen>
cquinn: i'm not sure i understand your doc question. is there context that i'm missing?
<SeanTAllen>
i think you are responding to my cross compiling question but that isnt method docs so i'm slightly at a loss to interpret your question.
<cquinn>
just context in my head :). That response just reminded me that I wanted to ask this question
<cquinn>
Let me find an example.
<cquinn>
OK, like Array.create: """Create an array with zero elements, but space for len elements."""
<cquinn>
But a descriptive approach would say "Creates an array..."
<cquinn>
in the cli package I used a descriptive voice. Like """Adds an additional child command to this parent command."""
<SeanTAllen>
Given our lack of documentation overall, I'm happy for new documentation that is clear and helpful regardless of voice
<SeanTAllen>
Voice is not something that is a concern to me right now
vaninwagen has joined #ponylang
<cquinn>
OK, sure. If I add doc I'll tend to do it with a descriptive voice, and might "fix" other doc in the same source to match.
<SeanTAllen>
I'm not a fan of "fixing"
<SeanTAllen>
If we want to have a discussion on voice, we can do that
<SeanTAllen>
but it should be a discussion
<SeanTAllen>
there is no "fix"
<SeanTAllen>
going through and making tons of voice changes without a discussion is bad form imo
<SeanTAllen>
unless its some large percentage in one voice compared to another
<cquinn>
sure, I agree. So I would like to bring it up to have the conversation at some point.
<SeanTAllen>
if you want to bring it up, you can
<cquinn>
I guess I'll then match the voice already used in each file.
<cquinn>
in the mean time that is
<cquinn>
ok
<SeanTAllen>
personally i'd rather see the effort go to adding missing documentation
<SeanTAllen>
i think matching voice is reasonable
<SeanTAllen>
if there's a dominant voice, we should certainly use it
<SeanTAllen>
i dont believe there is at the moment
<cquinn>
True. I was just thinking that having a guideline would make it easier to contribute.
<SeanTAllen>
sadly i dont think that is keeping people from contributing docs
<SeanTAllen>
i wish it was
<SeanTAllen>
and we could fix that and people would start contributing documentation
<SeanTAllen>
ive spent over a year trying to get folks to want to contribute docs and other less "sexy" stuff and made very little progress
<SeanTAllen>
this could be because im a bad messenger or a general problem with getting folks to want to work on documentation or both
<jemc>
cquinn: for whatever it's worth, I don't prefer "the descriptive voice" you're mentioning - I prefer "Create an array" over "Creates an array"
<SeanTAllen>
descriptive voice is verboten in the greenspace!
<cquinn>
greenspace?
<jemc>
it's the pony sync call joke name for my homestead here in washington - a play on the term "whitespace"
<cquinn>
ha, ok :)
<cquinn>
I don't have a string opinion, but I do like consistency. The prescriptive voice reads well in the comments inline with the code, but I think descriptive reads better in the generated doc. More user-focused.
<cquinn>
I guess it is quite easy to clean up the voice later if we end up with a lot of doc without a consistent voice. I will not stress about it for now :)
<jemc>
> More user-focused.
<jemc>
see I was just thinking that the other voice was more user-focused :D
<jemc>
it finishes the sentence "call this method when you (as a user) want to..."
<cquinn>
Q:"what does this function do?" A:"It creates a foo and returns the result"
<cquinn>
ah, but I see your point
<jemc>
yeah, so for this other voice, the question is "what do *you* want to do?"
<jemc>
it's definitely a small point :)
<cquinn>
I could get behind that too :)
<SeanTAllen>
i hope the greenspace is neither than it is here in brooklyn jemc. its another disgusting summer in nyc.
<cquinn>
It's in the mid 80's here in silicon valley. but not humid at least.
jemc has quit [Ping timeout: 240 seconds]
oldmanmike has quit [Ping timeout: 255 seconds]
endformationage has quit [Quit: WeeChat 1.7]
oldmanmike has joined #ponylang
Matthias247 has quit [Read error: Connection reset by peer]
oldmanmike has quit [Ping timeout: 240 seconds]
oldmanmike has joined #ponylang
aceluck has joined #ponylang
aceluck has quit [Ping timeout: 240 seconds]
plietar has joined #ponylang
plietar has quit [Remote host closed the connection]
plietar has joined #ponylang
<cquinn>
How does one set the working dir when running a process under ProcessMonitor?
vaninwagen has quit [Ping timeout: 276 seconds]
oldmanmike has quit [Ping timeout: 260 seconds]
<cquinn>
Hm. It seems like ProcessMonitor._child() would have to call @chdir() before @execve()