Re: [go-nuts] signal.Notify + exec.CommandContext + cancel = erratic results

2017-09-19 Thread Art Mellor
Yes! That was what I needed - thanks! Art Mellor : a...@priestlyemus.com : 414-678-9011 On Tue, Sep 19, 2017 at 2:51 PM, Tamás Gulácsi wrote: > ``` > <-ctx.Done() > err := ctx.Err() > ``` > just before printing out the error. > > 2017. szeptember 19., kedd 20:02

Re: [go-nuts] signal.Notify + exec.CommandContext + cancel = erratic results

2017-09-19 Thread Art Mellor
Spoke too soon - if you make cancelTimeout bigger than sleepDur, it doesn't end after sleepDur, it blocks until the cancelTimeout fires. I'm going to stew on this some more. Art Mellor : a...@priestlyemus.com : 414-678-9011 On Tue, Sep 19, 2017 at 3:20 PM, Art Mellor wrote: >

Re: [go-nuts] signal.Notify + exec.CommandContext + cancel = erratic results

2017-09-19 Thread Art Mellor
One additional data point. If I add the following line right after 'r.cmd.Run()' in RunMe.Run, it works: time.Sleep(1 * time.Nanosecond) It seems that the context error takes a moment to be filled in properly... -- You received this message because you are subscribed to the Google Groups

[go-nuts] Go - language of the future!

2017-03-16 Thread Art Mellor
Interesting/fun article where Erik Bernhardsson analyzes data about moving from one programming language to another https://erikbern.com/2017/03/15/the-eigenvector-of-why-we-moved-from-language-x-to-language-y.html -- You received this message because you are subscribed to the Google Groups "go

Re: [go-nuts] Simple(?) timer program behaves erratically on ARM (and playground), but totally fine on x86 Ubuntu

2017-01-11 Thread Art Mellor
Thanks! I never would have found that. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://g

[go-nuts] Simple(?) timer program behaves erratically on ARM (and playground), but totally fine on x86 Ubuntu

2017-01-11 Thread Art Mellor
The code below implements a simple timer loop that doubles the amount of time it waits (up to a max) after each firing. It works fine on my x86 linux box, but behaves erratically on a Raspberry Pi ARM platform (and on the playground). I'm assuming I'm doing something bad, but it isn't clear at

[go-nuts] Re: Deleting the /r/golang subreddit

2016-11-28 Thread Art Mellor
I think some readers are missing the OP's attempt to invoke the wise words of Obi Wan Kenobi: https://www.youtube.com/watch?v=0znNiN0lYAQ On Thursday, November 24, 2016 at 8:57:22 PM UTC-6, Nathaniel Nutter wrote: > > Are all 25,171 subscribers scum and villainy? As a someone that reads > /r/go

[go-nuts] Re: Are short variable declarations necessary?

2016-10-21 Thread Art Mellor
One other use for := that I have seen (although I'm not necessarily a fan of this use) is to allow a function in a package to return a non-exported typed object. E.g. package foo type hidden struct {...} func FooProduce() *hidden {...} func FooConsume(h *hidden){...} -- pac

Re: [go-nuts] `go test` does not honor -ldflags

2016-10-04 Thread Art Mellor
Perhaps documenting the behavior is the best quick fix. Not knowing how 'main' gets altered - is it something that is predictable? If so, I don't think it is too terrible to document that so you can alter your command line appropriately. I personally use the feature to pass in build numbers an

Re: [go-nuts] `go test` does not honor -ldflags

2016-10-04 Thread Art Mellor
>From a user experience standpoint, I think the "Principle of least astonishment" would argue it is more of a bug than not https://en.wikipedia.org/wiki/Principle_of_least_astonishment -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscri