[go-nuts] Re: [security] Go 1.7.4 and Go 1.6.4 are released

2016-12-01 Thread Uli Kunitz
I find it unfortunate that the fix for #17276 "time: TestLoadFixed failure" has not been included in go1.7.4. So tests in all.bash (to buiild from source) will fail on a fully patched Ubuntu 14.04 LTS. I expect go tool dist test to fail on all Linux

Re: [go-nuts] fatal error: bad pointer in write barrier

2016-12-01 Thread Ian Lance Taylor
On Thu, Dec 1, 2016 at 4:47 PM, 'Florian Uekermann' via golang-nuts wrote: > > I just had a fairly strange not reproducible panic. I have no idea whether > this could be a go bug or if the C library I am using is buggy. In case it > looks like a go bug I should

[go-nuts] fatal error: bad pointer in write barrier

2016-12-01 Thread 'Florian Uekermann' via golang-nuts
I just had a fairly strange not reproducible panic. I have no idea whether this could be a go bug or if the C library I am using is buggy. In case it looks like a go bug I should probably post this on the issue tracker. Does anyone have an idea whether this is useful or if I should just forget

Re: [go-nuts] Can't understand the nil argument passing to function difference

2016-12-01 Thread Ian Lance Taylor
On Thu, Dec 1, 2016 at 1:46 PM, Sergey Parilin wrote: > > Could anyone explain why it happens? Why nil checking is working for the > first case and doesn't work for rest of cases? https://golang.org/doc/faq#nil_error Ian -- You received this message because you are

Re: [go-nuts] TestMissingGOPATHGetWarnsIfNotExists is failing for me behind a proxy on go1.8beta1

2016-12-01 Thread Ian Lance Taylor
On Thu, Dec 1, 2016 at 1:33 PM, Andrew O'Neill wrote: > > I ran "./all.bash" on go1.8beta1 from my work machine and the test > TestMissingGOPATHGetWarnsIfNotExists failed. The proxy settings are correct > for git but not set in my environment. The output is below. Not sure

[go-nuts] Re: [security] Go 1.7.4 and Go 1.6.4 are released

2016-12-01 Thread Chris Broadfoot
Quick update: go1.7.4 was tagged with the wrong commit. It has been updated from: go1.7.4 0ad8bf4122de7396f771ed12f86934ea3177d6cf to go1.7.4 6b36535cf382bce845dd2d272276e7ba350b0c6b If you built from the go1.7.4 tag at 0ad8b, the version will be incorrectly reported as "go1.7.3". The binaries

Re: [go-nuts] Re: Downloading go1

2016-12-01 Thread Edward Muller
I could, but for other $reasons I'd rather not if I don't have to. I will if it's lost to history though. On Thu, Dec 1, 2016 at 2:10 PM James Bardin wrote: > > Can you build it from source? > The repo of course contains the entire history. > > > > On Thursday, December 1,

[go-nuts] Re: Downloading go1

2016-12-01 Thread James Bardin
Can you build it from source? The repo of course contains the entire history. On Thursday, December 1, 2016 at 4:57:30 PM UTC-5, freeformz wrote: > > For $reasons I need to download the original linux amd64 version of go1. > > Older go versions are stored under >

[go-nuts] [security] Go 1.7.4 and Go 1.6.4 are released

2016-12-01 Thread Chris Broadfoot
Two security-related issues were recently reported, and to address these issues we have just released Go 1.6.4 and Go 1.7.4. We recommend that all users update to one of these releases (if you're not sure which, choose Go 1.7.4). The issues addressed by these releases are: On Darwin, user's

[go-nuts] Re: Why does a "concurrent" Go GC phase appear to be stop-the-world?

2016-12-01 Thread Will Sewell
I just wrote up our investigation in this blog post: https://blog.pusher.com/golangs-real-time-gc-in-theory-and-practice/ It includes an animation of the GC algorithm that my colleague James Fisher made. I think this could be valuable as a standalone resource. If any of you have any feedback,

[go-nuts] Re: Weird behavior C.GoString

2016-12-01 Thread Felipe Santos
The string is: mismatched parenthesis Em quinta-feira, 1 de dezembro de 2016 16:32:42 UTC-2, Felipe Santos escreveu: > > Sure, > If I compare the two strings with a Go compare function it is different > because of the last char > > Em quinta-feira, 1 de dezembro de 2016 16:25:45 UTC-2, Didier

[go-nuts] Re: Weird behavior C.GoString

2016-12-01 Thread Felipe Santos
Sure, If I compare the two strings with a Go compare function it is different because of the last char Em quinta-feira, 1 de dezembro de 2016 16:25:45 UTC-2, Didier Spezia escreveu: > > Sorry for the silly question, but since you do not have any \n or > separator after the %X, > are you sure

[go-nuts] Re: net/http and errors.

2016-12-01 Thread mb . dhananjay
> if err, ok := err.(*url.Error); ok { > if err, ok := err.Err.(*net.OpError); ok { > if err, ok := err.Err.(*net.DNSError); ok { > fmt.Println("DNS ERROR:", err) > } > } > } > This works as expected. :-) On Monday, November 28, 2016 at 9:32:55 PM UTC+1, Dave Cheney wrote: > > Indeed. Does

[go-nuts] Re: Weird behavior C.GoString

2016-12-01 Thread Didier Spezia
Sorry for the silly question, but since you do not have any \n or separator after the %X, are you sure the extra characters do not come from the next fmt.Printf in your code? On Thursday, December 1, 2016 at 5:25:41 PM UTC+1, Felipe Santos wrote: > > Hi, > > I am trying to link C++ shared lib

[go-nuts] Does there exist a curated list of all Go Gopher images?

2016-12-01 Thread Jack
Is there a list/page/album/etc somewhere of every reusable Go Gopher image and it's associated license/author? -- 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

[go-nuts] Re: New Proposal: Add support for pprof profiler labels

2016-12-01 Thread Michael Matloob
After a lot of discussion, I've updated the proposal issue with a new API design. Please comment if you have feedback. Issue: golang.org/issue/17280 Michael On Tue, Oct 18, 2016 at 11:38 AM Michael Matloob wrote: Hello Gophers! I've proposed adding a mechanism to the

[go-nuts] Re: net.Conn.Read() performance

2016-12-01 Thread James Bardin
Conn.Read is a much higher level construct the using the syscalls directly. The largest part of the overhead is coordinating with the network poller. There's also a slight overhead of using the net.Conn interface, so asserting the value to a *net.TCPConn may save you a little (though I'm not

Re: [go-nuts] go test -bench -benchmem, allocs/op mystery

2016-12-01 Thread Erwin
> The build flag -gcflags=-m will cause the compiler to report which > allocations escape to the heap. > > Give that a try and see what it tells you. It doesn't report any escape info for that function. I did figure it out by outcommenting parts of the function, it turns out that scratch :=

[go-nuts] Weird behavior C.GoString

2016-12-01 Thread felipegs
Hi, I am trying to link C++ shared lib to my Go program. When I convert a C string (* char) to Go string using C.GoString it adds an extra char, in a not deterministic way. I print the bytes of my string inside C++ shared lib and it's correct, with \0 on the end. //Shared lib code for(int j =

Re: [go-nuts] Re: locks and "happens before" withing a goroutine

2016-12-01 Thread Jesper Louis Andersen
On Thu, Dec 1, 2016 at 10:38 AM Daniel Fanjul < daniel.fanjul.alcu...@gmail.com> wrote: > > > Inside a single goroutine the code proceeds in statement order. > The code generated by the compiler, right? Of course, it is typically the > processor who reorders. But what is the limit of the reorder?

Re: [go-nuts] synchronise read from two channels

2016-12-01 Thread omarshariffdontlikeit
Yup I thin I was frying my brain on this - it also led to questions such as "if I read a worker from the channel and there ISNT a URL waiting how do I write back into the channel making it available - what if more than one go routine is reading from the channel... etc" I knew I was over

Re: [go-nuts] synchronise read from two channels

2016-12-01 Thread Jesper Louis Andersen
On Wed, Nov 30, 2016 at 6:07 PM wrote: > Hi, I'm having a bit of a slow day... I'm trying to synchronise two reads > from two channels and can't get my fuzzy head round the problem. > > Go doesn't have support for an (atomic) read from multiple channels at once.

[go-nuts] a gameserver framework with golang

2016-12-01 Thread sydnash1
hello everyone: i'm a new for golang,and recently i write a gameserver framework which is like skynet. the git repository is http://github.com/sydnash/lotou It contains a slave/master mode RPC and communication, and each service can be run in one goroutine. It maybe

[go-nuts] Re: Go @ Work

2016-12-01 Thread Kiswono Prayogo
Hi, if I may ask, what language do your company previously use before switch to Golang? On Saturday, 31 March 2012 00:27:36 UTC+7, hcatlin wrote: > > Just thought I'd stop in and post something saying "hi" to the group. > I work at > Moovweb where we power some of the biggest e-commerce sites'

[go-nuts] December Blog Post Series

2016-12-01 Thread Brian Ketelsen
The December Blog Post series has begun.  We won't post daily links here, but you can catch them all at https://blog.gopheracademy.com The introductory post is here:   https://blog.gopheracademy.com/advent-2016/introduction/ Special thanks to Damian Gryski for coordinating and herding cats this

[go-nuts] Re: Go is two times slower than python code?

2016-12-01 Thread Nate Finch
Generally, the answer is, don't use regular expressions. This is good advice in any language and for almost any problem. In this specific case, if you care about speed, write some more specific code that does what you need instead of falling back on regular expressions. On Wednesday,

[go-nuts] Re: synchronise read from two channels

2016-12-01 Thread omarshariffdontlikeit
Just as a follow up for anyone else - in the end I used two simple stacks for available and active lists of workers and simply popped a worker of the available stack when a url came in, assigned it to the worker and then pushed it to the active stack. Job done! On Thursday, December 1, 2016 at

Re: [go-nuts] Help me beat Erlang, SkynetBenchmark challenge

2016-12-01 Thread Michael Jones
A variation, slightly faster: https://play.golang.org/p/OzzJWRu6KL One problem with “do nothing” benchmarks is that they test limits that are not real-life limits. I get about 3 million channel sends per second on my laptop and your benchmark is hitting that or else close to it. If you were

[go-nuts] Re: Go is two times slower than python code?

2016-12-01 Thread Rich
Have you tried searching https://godoc.org for a PCRE that may suite better? https://godoc.org/github.com/glenn-brown/golang-pkg-pcre/src/pkg/pcre On Tuesday, March 9, 2010 at 9:52:16 AM UTC-5, Alex Dong wrote: > > I'm writing a simple 'word picker' using golang and python. It > basically

[go-nuts] Re: Large 2D slice performance question

2016-12-01 Thread Mandolyte
Wow, this will take some time to digest. Regrettably I have required training today and won't be able to even play with this until tomorrow. In my (parent,child), there are 304K unique parent values and 1.05M unique child values. Of course many child values are also parent values. Thus, total

Re: [go-nuts] Help me beat Erlang, SkynetBenchmark challenge

2016-12-01 Thread Roger Alsing
There are other merits to actors, like supervision, distributed by default etc. Different tools, different usecases, some overlap.. Roger Den torsdag 1 december 2016 kl. 12:24:35 UTC+1 skrev Michael Jones: > > Here is an idea for you. 35% faster on my macbook pro: > >

Re: [go-nuts] Help me beat Erlang, SkynetBenchmark challenge

2016-12-01 Thread Michael Jones
Here is an idea for you. 35% faster on my macbook pro: https://play.golang.org/p/3Mb5pR0V0J Michael From: on behalf of Roger Alsing Date: Thursday, December 1, 2016 at 12:52 AM To: golang-nuts

[go-nuts] GOPATH default value in Go 1.8

2016-12-01 Thread Tamás Gulácsi
You can set it to whatever you want. This is only a default - not too annoying as $HOME, and less hidden than .local/go -- 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

Re: [go-nuts] GOPATH default value in Go 1.8

2016-12-01 Thread Peter Mogensen
On 2016-12-01 11:18, Manlio Perillo wrote: I have read the Go 1.8 release notes and I found that now GOPATH has a default value. This is a great thing: I have always I thought that GOPATH is one of the weak point in the Go toolchain, both when I started programming in Go and when I read the Go

[go-nuts] GOPATH default value in Go 1.8

2016-12-01 Thread Manlio Perillo
I have read the Go 1.8 release notes and I found that now GOPATH has a default value. This is a great thing: I have always I thought that GOPATH is one of the weak point in the Go toolchain, both when I started programming in Go and when I read the Go Programming language book. However I think

Re: [go-nuts] Re: locks and "happens before" withing a goroutine

2016-12-01 Thread Daniel Fanjul
> Within a single goroutine, the happens-before order is the order expressed by the program. If this is true, why is the order of 'a = 1; b = 2;' not ensured? I think you may be forgetting that "compilers and processors may reorder the reads and writes executed within a single goroutine" >

[go-nuts] Re: Large 2D slice performance question

2016-12-01 Thread Egon
See whether this works better: https://gist.github.com/egonelbre/d94ea561c3e63db009718e227e506b5b *There is a lot of room for improvements, (e.g. for your actual dataset increase defaultNameCount).* *PS: Avoid csv package for writing files, use bufio and Write directly... csv does some extra

[go-nuts] Re: synchronise read from two channels

2016-12-01 Thread omarshariffdontlikeit
Yeah I kinda figured I was coming to this wrong way - my tired brain had an unterminated loop. Thanks for the pointers! (all puns intended) On Wednesday, November 30, 2016 at 5:08:06 PM UTC, omarsharif...@gmail.com wrote: > > Hi, I'm having a bit of a slow day... I'm trying to synchronise two