[go-nuts] Re: Scheduler discrepancy between Linux and OS X with Gosched()

2018-04-02 Thread Dave Cheney
A printf, especially the first one in the program is likely to cause the goroutine going off to the write(2) syscall to block long enough that a new thread is created to replace it. Once the original thread comes back from the syscall it will find that it has nothing to do, as you set runtime G

[go-nuts] Can I do Windows printing in Go?

2018-04-02 Thread Stillshot
I don't know if this is the correct place for asking a question like this but as I've asked in several other places, was hoping this would get me somewhere. I have working for quite a while to try and print PDFs using Go. As the rest of my application is in Go I really want to get this to work

[go-nuts] Scheduler discrepancy between Linux and OS X with Gosched()

2018-04-02 Thread brianblakewong
I've run into some mysterious behavior, where Gosched() works as expected in Mac OS X, but only works as expected in Ubuntu if I put a logging statement before it. I originally posted this on Stack Overflow but was directed here. Post: https://stackoverflow.com/questions/49617451/golang-schedul

Re: [go-nuts] corrupt stack?

2018-04-02 Thread quanstro
after upgrading to 1.9 (50% reduction) and finding a data race we didn't see in testing, we're still hunting down about 1 crash per 67 million hours of runtime. needless to say, the economical thing to do is to ignore the problem, but it sure bugs (!) me. the correct number of crashes is 0. -

Re: [go-nuts] API fixes for sync.Mutex and friends?

2018-04-02 Thread andrey mirtchovski
this is https://github.com/golang/go/issues/8005, i believe. On Mon, Apr 2, 2018 at 5:37 PM, Andrew Pennebaker wrote: > Some Go types like sync.Mutex have a subtle API issue, where the objects > really shouldn't be copied or passed around into different function calls, > e.g. to a goroutine worke

[go-nuts] API fixes for sync.Mutex and friends?

2018-04-02 Thread Andrew Pennebaker
Some Go types like sync.Mutex have a subtle API issue, where the objects really shouldn't be copied or passed around into different function calls, e.g. to a goroutine worker. However, this is not enforced by the current API, but merely mentioned in the documentation, which is easily ignored. I

[go-nuts] Re: Need DontCloseOnExec, or Fcntl, or both

2018-04-02 Thread phil
I should add that, since yesterday, I have figured out how to actually implement this, and have opened an issue to allow for a code submission. https://github.com/golang/go/issues/24649 -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsub

Re: [go-nuts] Re: panic propagation can be blocked by blocking defer function

2018-04-02 Thread Marvin Renich
* 'Bryan Mills' via golang-nuts [180402 15:10]: > This is indeed a subtle pattern, but it's not clear to me how often it > comes up in practice, and preventing deferred function calls from blocking > could result in all kinds of other unwanted side effects. I'd like to point out that the proble

[go-nuts] vgo tooling support

2018-04-02 Thread Naitik Shah
Looking around I haven't found support for vgo in tools like gocode, godef, guru, not to mention the variety of other tools used behind the scenes by vim-go. Anyone know of forks, workarounds etc to help make using vgo today easier? -Naitik -- You received this message because you are subscribe

[go-nuts] Re: panic propagation can be blocked by blocking defer function

2018-04-02 Thread 'Bryan Mills' via golang-nuts
This is indeed a subtle pattern, but it's not clear to me how often it comes up in practice, and preventing deferred function calls from blocking could result in all kinds of other unwanted side effects. I'm curious: how did you end up with the `wg.Add` call so far from the deferred `Wait`, and

Re: [go-nuts] Justifying dot imports using comments

2018-04-02 Thread Paul Jolly
Speaking as someone who has written a few (albeit simple) code generators that parse Go code, dot imports are a nightmare from my perspective because it makes it impossible to work out from just imports alone whether an identifier belongs to the current package or not. Put another way, if you disa

[go-nuts] Justifying dot imports using comments

2018-04-02 Thread Kaveh Shahbazian
Why isn't it possible to justifying a dot import using a comment (like blank imports)? (Go 1.10.1, golint, ubuntu) -- 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

[go-nuts] Error running vgo with go1.10.1 on darwin

2018-04-02 Thread Tushar Madhukar
Hi, While working through https://research.swtch.com/vgo-tour, I get an error running vgo on mac os x (Sierra, 10.12.6): » vgo vgo objabi: cannot find GOMIPS I was expecting it to show the help page. There was a similar issue reported here and the

Re: [go-nuts] Re: Go 1.10.1 and Go 1.9.5 are released

2018-04-02 Thread Michel Casabianca
Hi Gophers, I have updated my list of Go interfaces for these releases : http://sweetohm .net/article/go-interfaces.en.html Enjoy! 2018-03-31 6:54 GMT+02:00 Lucio : > I just updated the sources, compiled tip in /home/lucio/Project/go, then > elsewhere checked out "-b go1.10.1". > > It is usuall

Re: [go-nuts] Re: asn1: tags don't match

2018-04-02 Thread Maciej Gałkowski
I am glad I could help :) CHOICE would be nice, but I don't think it will happen (I don't have a source for this claim), but it is easy enough to unmarshal something to a asn1.RawValue and switch on the Tag field. If you want to know how to use the golang's asn1 library efficently you could ha