[go-nuts] RE: Go package/version management, vendoring, dep, gb, etc...

2017-02-05 Thread Dave Cheney
If your code has a dependency on github.com/pkg/log then place the contents of that repository into $PROJECT/vendor/src/github.com/pkg/log Where $PROJECT is the root of your gb project. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubs

[go-nuts] RE: Go package/version management, vendoring, dep, gb, etc...

2017-02-05 Thread Jeff Kayser
Hi, Dave. Thank you for your clarifications about how gb works. I appreciate your specific examples of how to get the needed code into the gb directory trees. I didn’t know about git submodules or the gb-vendor plugin; I’ll check it out. Jeff Kayser Jibe Consulting | Managing Principal Con

[go-nuts] Re: How to run go testing code with "go run"

2017-02-05 Thread Manlio Perillo
Il giorno sabato 4 febbraio 2017 23:59:34 UTC+1, Tong Sun ha scritto: > > I know all go testing code are invoked with "*go test*", however, I want > to easily test out some of the test code of the package I'm trying, so the > easiest way is to test them out as-is, but with "*go run*" instead. Is

[go-nuts] Re: [Beginner question] Which language supports more concurrency models: Go or Java?

2017-02-05 Thread Kiswono Prayogo
Fastest concurrent map that I found (and use): github.com/OneOfOne/cmap On Monday, 6 February 2017 11:03:03 UTC+7, yins...@gmail.com wrote: > > Question is in the title. > > I want to learn more about concurrency. So I am looking for a language > that can teach me the greatest number of concurren

[go-nuts] Re: Is there something wrong with performance of select in a for loop

2017-02-05 Thread fwang2002
each go routine only handle less than 10 events concurrently, why you said it's 100? I found if serverDone is not globally defined, the result is better, but still not as expected. 在 2017年2月6日星期一 UTC+8上午3:00:15,fwan...@gmail.com写道: > > I make a test to see the performance of select, and found t

[go-nuts] Re: Go package/version management, vendoring, dep, gb, etc...

2017-02-05 Thread Dave Cheney
On Monday, 6 February 2017 15:03:03 UTC+11, Jeff Kayser wrote: > > Hi, Manlio. > > Thank you for your reply! > > The project is an application, however, I’m planning to write the > underlying components so they are reusable, so they can be leveraged > elsewhere. Since I will be using the pac

[go-nuts] RE: Go package/version management, vendoring, dep, gb, etc...

2017-02-05 Thread Jeff Kayser
Hi, Manlio. I like your idea of putting the reusable code in a separate Git repository, and then vendoring it into the application project. That makes a lot of sense. I hadn't thought of that. Thanks for the idea. I also like the idea of making it an internal package, and move it to a separ

Re: [go-nuts] About 64bits alignment

2017-02-05 Thread T L
On Monday, February 6, 2017 at 12:44:38 PM UTC+8, Ian Lance Taylor wrote: > > On Sun, Feb 5, 2017 at 8:15 PM, T L > > wrote: > > > > In fact, I still have another question needs to be clarify: what does > the > > "word" in "The first word in a global variable or in an allocated struct > or

Re: [go-nuts] About 64bits alignment

2017-02-05 Thread Ian Lance Taylor
On Sun, Feb 5, 2017 at 8:15 PM, T L wrote: > > In fact, I still have another question needs to be clarify: what does the > "word" in "The first word in a global variable or in an allocated struct or > slice" mean? > A field with the same length with int values? In this case it means a 64-bit valu

Re: [go-nuts] About 64bits alignment

2017-02-05 Thread Ian Lance Taylor
On Sun, Feb 5, 2017 at 11:55 AM, T L wrote: > > In short, when structs and slices are used as the non-first fields of other > structs, > then the struct and slice fields may be not 64bit aligned on 32bit OSes. > > But what about arrays? Can the first word in an allocated array be relied > upon to

Re: [go-nuts] Is there something wrong with performance of select in a for loop

2017-02-05 Thread Ian Lance Taylor
On Sun, Feb 5, 2017 at 6:53 PM, wrote: > I attached the code. Build and run it, and look the cpu usage. > Each time when comment out one of serverDone case, the cpu usage will down > about 5% in my book. > When all the serverDone case are commented out, the cpu is still about 5%, > not good compa

Re: [go-nuts] About 64bits alignment

2017-02-05 Thread T L
On Monday, February 6, 2017 at 3:55:35 AM UTC+8, T L wrote: > > > > On Monday, February 6, 2017 at 3:14:22 AM UTC+8, Ian Lance Taylor wrote: >> >> On Sun, Feb 5, 2017 at 10:52 AM, T L wrote: >> > Ian, thanks for the answers. >> > >> > But I still not very confirm on many points. >> > >> > U

[go-nuts] RE: Go package/version management, vendoring, dep, gb, etc...

2017-02-05 Thread Jeff Kayser
Hi, Manlio. Thank you for your reply! The project is an application, however, I’m planning to write the underlying components so they are reusable, so they can be leveraged elsewhere. Since I will be using the packages to build an app, I need to make sure the builds are reproducible. ☺ I ha

[go-nuts] [Beginner question] Which language supports more concurrency models: Go or Java?

2017-02-05 Thread yinsi . rio
Question is in the title. I want to learn more about concurrency. So I am looking for a language that can teach me the greatest number of concurrency models. It seems that Java supports these models: - Plain old threads & locks - In addition, Java also has various concurrent data structur

Re: [go-nuts] Is there something wrong with performance of select in a for loop

2017-02-05 Thread fwang2002
I attached the code. Build and run it, and look the cpu usage. Each time when comment out one of serverDone case, the cpu usage will down about 5% in my book. When all the serverDone case are commented out, the cpu is still about 5%, not good compared to nodejs. 在 2017年2月6日星期一 UTC+8上午3:16:15,I

[go-nuts] why "go test -coverprofile" report "unknown command"?

2017-02-05 Thread Yulei Xiao
I execute ```go test -coverprofile```, but it always report "unknown command", I can not find the reason. go test -coverprofile /tmp/test0.cov -coverpkg=github.com/clm/agent,github.com/clm/cfg,github.com/clm/cli,github.com/clm/cm,github.com/clm/cm/common,github.com/clm/cm/monitor,github.com/clm

[go-nuts] Re: Go 1.6.1 Link problem on Windows:

2017-02-05 Thread saurabh . deoras
Hi Folks, Putting dll's in the same folder as my GO code solved the problem as suggested here: https://github.com/veandco/go-sdl2 Thanks, Saurabh On Wednesday, April 20, 2016 at 7:06:28 PM UTC-7, Dorival Pedroso wrote: > > Hi, > > I'm just wondering what is the cause of the following error (mul

[go-nuts] Re: Go package/version management, vendoring, dep, gb, etc...

2017-02-05 Thread Manlio Perillo
On Sun, Feb 5, 2017 at 11:39 PM, Jeff Kayser wrote: > Hi, Manlio. > > Thank you for your reply! > > The project is an application, however, I’m planning to write the underlying > components so they are reusable, so they can be leveraged elsewhere. Since I > will be using the packages to build a

[go-nuts] Re: Go 1.6.1 Link problem on Windows:

2017-02-05 Thread saurabh . deoras
Hi Folks, So some good news on the issue but still not out of woods. After getting rid of all statically built libs and replacing them by dll's, I was able to compile and link against GO code. So far so good, but when running a test I get an error code: exit status 3221225781 getting closer :)

[go-nuts] Re: Does my gofmt work wrongly or I don't understand something ?

2017-02-05 Thread howardcshaw
What were you expecting to happen? The documentation says: Both pattern and replacement must be valid Go expressions. In the pat‐ tern, single-character lowercase identifiers serve as wildcards match‐ ing arbitrary sub-expressions; those expressions will be substitut

Re: [go-nuts] How to idiomatically display chained errors?

2017-02-05 Thread Lars Seipel
On Sat, Feb 04, 2017 at 12:08:20AM -0800, so.qu...@gmail.com wrote: > The following would print out "ERROR: Foo() ERROR: Bar() ERROR: > stdlib.Func() something went wrong with this standard function call", which > feels obviously wrong. Leave out the "ERROR" string as well as the gratuitous pare

Re: [go-nuts] About 64bits alignment

2017-02-05 Thread T L
On Monday, February 6, 2017 at 3:14:22 AM UTC+8, Ian Lance Taylor wrote: > > On Sun, Feb 5, 2017 at 10:52 AM, T L > > wrote: > > Ian, thanks for the answers. > > > > But I still not very confirm on many points. > > > > Up to now, there are two places mention the alignments in Go. > > > >

Re: [go-nuts] Is there something wrong with performance of select in a for loop

2017-02-05 Thread Ian Lance Taylor
On Sun, Feb 5, 2017 at 12:11 AM, wrote: > I make a test to see the performance of select, and found the result is not > good. > > I make 1000 SeqQueue objects and run its messageLoop function (which does a > small piece of work, and is listed as below) in 1000 separate go routines. > The CPU cost

Re: [go-nuts] About 64bits alignment

2017-02-05 Thread Ian Lance Taylor
On Sun, Feb 5, 2017 at 10:52 AM, T L wrote: > Ian, thanks for the answers. > > But I still not very confirm on many points. > > Up to now, there are two places mention the alignments in Go. > > The first is in the end of Go spec: > > > Size and alignment guarantees > > For the numeric types, the f

[go-nuts] Is there something wrong with performance of select in a for loop

2017-02-05 Thread fwang2002
I make a test to see the performance of select, and found the result is not good. I make 1000 SeqQueue objects and run its messageLoop function (which does a small piece of work, and is listed as below) in 1000 separate go routines. The CPU cost is more than 20%. If I make the ticker 1 second,

Re: [go-nuts] About 64bits alignment

2017-02-05 Thread T L
Ian, thanks for the answers. But I still not very confirm on many points. Up to now, there are two places mention the alignments in Go. The first is in the end of Go spec: Size and alignment guarantees For the numeric types , the following sizes ar

Re: [go-nuts] Go Fonts: request for feedback

2017-02-05 Thread Aram Hăvărneanu
On Fri, Feb 3, 2017 at 8:12 PM, roger peppe wrote: > Perhaps a slightly esoteric request: I'd love to see the fonts made > available in Plan 9 (acme compatible) font format. I tried doing the > conversion and all bar one font size looked terrible. I also ask for this, and confirm that the convers

[go-nuts] Re: Really weird timezone behavior.

2017-02-05 Thread Uli Kunitz
The Playground doesn't appear to support correct timezone info. The time package is modified on the Playground. Your program runs as expected on my local machine. You are certainly aware that it is not properly formatted and doesn't do proper error handling. On Saturday, February 4, 2017 at 7:

[go-nuts] Re: Go package/version management, vendoring, dep, gb, etc...

2017-02-05 Thread Manlio Perillo
Il giorno domenica 5 febbraio 2017 06:35:18 UTC+1, jeffk...@gmail.com ha scritto: > > I can’t seem to converge on a decent package/version management scheme. I > asked Dave Cheney, and he recommended that I email this list. > > > > I’ve written a Go project. I started with a directory tree li

[go-nuts] Re: Are external test packages recommended?

2017-02-05 Thread so . query
I see the distinction, thanks for the feedback and confirmation! On Saturday, February 4, 2017 at 9:48:48 PM UTC-8, Dave Cheney wrote: > > On Sunday, 5 February 2017 15:39:55 UTC+11, so.q...@gmail.com wrote: > > I generally favor "external test packages", that is having "_test" as a > suffix to

[go-nuts] Handshake failed when using builtin TLS package: no cipher suite supported by both client and server

2017-02-05 Thread Alexandr Emelin
When using builtin TLS for http/websocket server I noticed that handshakes from some old browser clients fail. The reason why I find this strange is that other TLS implementations work with those connections without any problems. I used ssllabs.com/ssltest/ to