Re: [go-nuts] Some problem I heard in my class: there are n chess players and they play with all others 1 game and no more than 1 game per day.

2019-01-28 Thread Anca Emanuel
Here is some play version to test it: https://play.golang.org/p/q-Ikcv3kTW9 Notice the line: // Change the number of players here ! It works ok for small number of players. (no more than 200) -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To

Re: [go-nuts] Binary only package stub file

2019-01-28 Thread Aakash das
+golang-nuts. On Tue, Jan 29, 2019 at 1:20 PM Aakash das wrote: > Thanks for the reply, Ian. I have an additional question. Given a Go > binary package file in '.a' format, would it be possible to extract > dependencies for the said binary package using some tool? My end goal is > to automate

[go-nuts] Re: go 1.11.4 build issue

2019-01-28 Thread gocss
what are the needed packages for ubuntu 18.04 to build for android ? On Friday, January 25, 2019 at 3:52:04 PM UTC-5, gocss wrote: > > xubuntu 18.04 LTS > > ./buildall.bash > > 2 areas of concern ... how to resolve? > > #1 ) ### Building linux-riscv64 > go tool compile: exit status 2 >

Re: [go-nuts] Re: The performance comparation of Golang and Java

2019-01-28 Thread Rodolfo
In my poor opnion: 1. Golang is a programming language that not need a virtual machine, It communicate directly with kernel, making use of all resource hardware better than Java. 2. Golang uses goroutines that consume only 2k of memory instead of 2MB(minimun) of threads used in Java. 3. With

[go-nuts] Re: The performance comparation of Golang and Java

2019-01-28 Thread Topget
It will be better if someone could give me the example(s) to show the advantage of Golang (vs Java). Thanks. 在 2019年1月25日星期五 UTC+8上午10:21:14,Topget写道: > > I have tested several simple functions with Golang and Java. To my > surprise, Java sometimes is faster than Golang(especially in recursive

Re: [go-nuts] Re: performance of go mod verify

2019-01-28 Thread Joseph Lorenzini
Hi pudds, I’ve run go mod verify multiple times on my laptop for the same module. The elapsed time for the command to run is always 25 seconds or thereabouts. So I figured that whatever caching might be there, I would be getting it. I can try this with go mod vendor and see if that helps but I’d

Re: [go-nuts] Unbuffed channel vs Buffered channel.

2019-01-28 Thread Ian Lance Taylor
On Mon, Jan 28, 2019 at 4:44 PM 伊藤和也 wrote: > > Questions: > 1. As the name says, doesn't an unbuffered channel use a buffer? Sorry, I'm not sure what you are asking. An unbuffered channel does not use a buffer. A buffered channel does use a buffer. > 2. If so, does an unbuffered channel use

[go-nuts] Unbuffed channel vs Buffered channel.

2019-01-28 Thread 伊藤和也
Questions: 1. As the name says, doesn't an unbuffered channel use a buffer? 2. If so, does an unbuffered channel use a stack to send and receive a value? 3. As the name says, does an buffered channel use a buffer? -- You received this message because you are subscribed to the Google Groups

Re: [go-nuts] Some problem I heard in my class: there are n chess players and they play with all others 1 game and no more than 1 game per day.

2019-01-28 Thread Anca Emanuel
On Sunday, January 27, 2019 at 3:42:35 AM UTC+2, Lutz Horn wrote: > > Hi Anca, > > Am 26.01.19 um 09:27 schrieb Anca Emanuel: > > How do you make an planing for that event ? > > > > Here is my > > implementation: > https://github.com/ancaemanuel/comb/blob/master/chess_tournament.go > > > >

Re: [go-nuts] Binary only package stub file

2019-01-28 Thread Ian Lance Taylor
On Mon, Jan 28, 2019 at 1:56 PM Aakash das wrote: > > Hello everyone, > The requirements for binary only source file has changed in Go 1.10. Could > you please guide me to the steps that are needed for making binary only > package work with Go 1.10. I couldn't find any example on generating a

Re: [go-nuts] Why makechan distinguish elements do not contain pointers or contain pointers?

2019-01-28 Thread Ian Lance Taylor
On Sun, Jan 27, 2019 at 6:21 PM wrote: > > It is in line 899 and line 914 of the malloc.go file. > > 899 spc := makeSpanClass(sizeclass, noscan) > 914 s = largeAlloc(size, needzero, noscan) Thanks, I wasn't aware of that. Looks like we have spans that contain only objects without pointers, and

[go-nuts] Binary only package stub file

2019-01-28 Thread Aakash das
Hello everyone, The requirements for binary only source file has changed in Go 1.10. Could you please guide me to the steps that are needed for making binary only package work with Go 1.10. I couldn't find any example on generating a stub source '.go' file with dependencies explicitly specified.

Re: [go-nuts] go install touches the result file even if no changes

2019-01-28 Thread 'Tim Hockin' via golang-nuts
If you want to see why people give me a hard time: https://github.com/kubernetes/kubernetes/blob/master/build/root/Makefile.generated_files And that's AFTER a massive simplification. On Mon, Jan 28, 2019 at 11:55 AM Ian Lance Taylor wrote: > > On Mon, Jan 28, 2019 at 11:44 AM Tim Hockin wrote:

Re: [go-nuts] go install touches the result file even if no changes

2019-01-28 Thread Sam Whited
On Mon, Jan 28, 2019, at 19:44, 'Tim Hockin' via golang-nuts wrote: > People already chide me for my affinity for baroque > Makefiles... I use bmake too; and here I was all this time thinking that the "b" stood for "BSD". —Sam -- You received this message because you are subscribed to the

[go-nuts] Re: performance of go mod verify

2019-01-28 Thread thepudds1460
Hi Joe, Sorry, I realized I pasted in the wrong quote from the documentation. I meant to include this quote instead (from https://golang.org/cmd/go/#hdr-Module_downloading_and_verification): "The go command maintains, in the main module's root directory alongside go.mod, a file named go.sum

Re: [go-nuts] go install touches the result file even if no changes

2019-01-28 Thread Ian Lance Taylor
On Mon, Jan 28, 2019 at 11:44 AM Tim Hockin wrote: > > Of course you are right, as usual. I just felt like that was a lot of > hoop-jumping. People already chide me for my affinity for baroque > Makefiles... If you can assume that you are using GNU make, the Makefile language is Turing

[go-nuts] Re: performance of go mod verify

2019-01-28 Thread thepudds1460
Hi Joe, As far as I know, I think it is computing the SHA256 of the dependencies: https://github.com/golang/go/blob/release-branch.go1.11/src/cmd/go/internal/dirhash/hash.go#L25 Personally, I wouldn't expect that to get pathologically worse with more dependencies. Also, just as you can often

Re: [go-nuts] go install touches the result file even if no changes

2019-01-28 Thread 'Tim Hockin' via golang-nuts
Of course you are right, as usual. I just felt like that was a lot of hoop-jumping. People already chide me for my affinity for baroque Makefiles... On Sat, Jan 26, 2019 at 11:01 AM Ian Lance Taylor wrote: > > On Fri, Jan 25, 2019 at 7:55 PM Tim Hockin wrote: > > > > Fair point, of course. >

[go-nuts] performance of go mod verify

2019-01-28 Thread Joseph Lorenzini
All: I'd like to run go mod verify as part of the CI/CD. If the verify fails, the build fails. However, the amount of time it takes to run for a small project is making me question whether that's viable. I don't actually know of any documentation that explains how slow or fast one should

Re: [go-nuts] Re: Is it possible to export a variable from main package? If impossible, why?

2019-01-28 Thread 'Borman, Paul' via golang-nuts
Not sure if this has been answered. Yes, you can make a global value public in the main package, but it is more or less meaningless as there is no way for another package to import your main package. It is possible there is some way that it might happen in the testing infrastructure, but that

Re: [go-nuts] Re: Existing code for order-preserving concurrent work queue?

2019-01-28 Thread roger peppe
FWIW I wrote *https://godoc.org/github.com/juju/utils/parallel#Run * for exactly this kind of use case. It doesn't explicitly mention the values in the API because it's easier (and more type safe) to let the body of the closure write directly