[go-nuts] Why have an empty default case when sending heartbeats

2017-10-01 Thread Tamás Gulácsi
To skip send if nothing is receiving, avoiding the block. -- 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

[go-nuts] Second nested done case in a select statement

2017-10-01 Thread Tamás Gulácsi
done may happen before value arriving from valStream. -- 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,

Re: [go-nuts] Rewriting a realtime game server from Node.js to Golang

2017-10-01 Thread Henrik Johansson
No not at all. If you can write a game engine in any language you should be fine just try to avoid too big design decisions too early so that once you get a better grasp of Go you can more easily refactor. mån 2 okt. 2017 kl 06:13 skrev Aaron : > Hi I am in a process of

[go-nuts] Why have an empty default case when sending heartbeats

2017-10-01 Thread go-question
In the following snippet for having a function representing work send a heartbeat to any listeners. Why is a select statement used in `sendPulse` instead of just executing `heartbeat <- struct{}{}`? And why provide an empty default case? doWork := func( done <-chan interface{}, pulseInterval

[go-nuts] Second nested done case in a select statement

2017-10-01 Thread go-question
What is the purpose of the second nested <-done case in the code snippet below? Wouldn't the first <-done case handle the cancellation? orDone := func(done, c <-chan interface{}) <-chan interface{} { valStream := make(chan interface{}) go func() { defer close(valStream) for { select { case

[go-nuts] Rewriting a realtime game server from Node.js to Golang

2017-10-01 Thread Aaron
Hi I am in a process of rewriting a realtime game server from Node.js to Golang. It's two to three thousand lines of code in Node.js. But I have no previous Golang experience so it's hard to measure the workload. Do you think it is better for me to do some other bigger projects before I start

Re: [go-nuts] Building golang libraries

2017-10-01 Thread Ian Lance Taylor
On Fri, Sep 29, 2017 at 10:43 PM, wrote: > > Can you please provide me for Ubuntu See https://golang.org/cmd/go and https://golang.org/s/execmodes . If those don't help, please ask a more specific question. Ian -- You received this message because you are subscribed

Re: [go-nuts] Memory issues when spawning 1 million go routines that communicate on a channel

2017-10-01 Thread Ian Lance Taylor
On Sat, Sep 30, 2017 at 9:29 AM, wrote: > > From what I understand reading and a few comments from the gopher slack, > this is because go is not releasing memory back to OS but holds it for a > longer in case it needs this, if that makes sense? It would be really > helpful, if

Re: [go-nuts] os/exec stdout bytes.Buffer and timeout behavior?

2017-10-01 Thread Ian Lance Taylor
On Sun, Oct 1, 2017 at 2:40 PM, roger peppe wrote: > One might argue that Run should respect the context deadline even in the > presence of pipes that don't EOF. Fair point. Ian > On 29 Sep 2017 22:26, "Ian Lance Taylor" wrote: >> >> On Fri, Sep 29, 2017

Re: [go-nuts] os/exec stdout bytes.Buffer and timeout behavior?

2017-10-01 Thread roger peppe
One might argue that Run should respect the context deadline even in the presence of pipes that don't EOF. On 29 Sep 2017 22:26, "Ian Lance Taylor" wrote: > On Fri, Sep 29, 2017 at 12:33 PM, Alex Buchanan > wrote: > > > > package main > > > > import (

[go-nuts] Re: go get exits command line in windos

2017-10-01 Thread Sotirios Mantziaris
i think i figured it out: git is in the latest version 2.14.2 i downgraded git to 2.14.1.windows.1 and voila all things work again. On Sunday, October 1, 2017 at 3:39:26 PM UTC+3, Sotirios Mantziaris wrote: > > the log is the following: > > cd . > git clone https://github.com/mantzas/adaptlog

[go-nuts] Re: go get exits command line in windos

2017-10-01 Thread Sotirios Mantziaris
the log is the following: cd . git clone https://github.com/mantzas/adaptlog D:\dev\goprojects\src\github.com\mantzas\adaptlog cd D:\dev\goprojects\src\github.com\mantzas\adaptlog git submodule update --init --recursive cd D:\dev\goprojects\src\github.com\mantzas\adaptlog git show-ref cd

[go-nuts] Re: go get exits command line in windos

2017-10-01 Thread Sotirios Mantziaris
On Sunday, October 1, 2017 at 3:33:04 PM UTC+3, Sotirios Mantziaris wrote: > > git is available on my path > windows defender (av) is disabled > check out

[go-nuts] Re: go get exits command line in windos

2017-10-01 Thread Sotirios Mantziaris
git is available on my path windows defender (av) is disabled check out the attached gif. this was a fresh windows 10 install all component (go, git) have been installed with chocolatey. BTW: mingw works fine. can i enable some logs of go get to see what is happening? On Sunday, October 1, 2017

[go-nuts] Re: go get exits command line in windos

2017-10-01 Thread Dave Cheney
try go get -x On Sunday, 1 October 2017 23:33:04 UTC+11, Sotirios Mantziaris wrote: > > git is available on my path > windows defender (av) is disabled > check out the attached gif. > > this was a fresh windows 10 install > all component (go, git) have been installed with chocolatey. > BTW: mingw

[go-nuts] Re: git submodule vs normal go vendoring

2017-10-01 Thread paul . totterman
> > can anyone tell me the pros/cons of using git submodule update instead of > godep govendor etc... ? We used to use git submodules, but have now switched to https://github.com/golang/dep . Much recommended. Cheers, Paul -- You received this message because you are subscribed to the

[go-nuts] Re: Link not performed when 'go install'

2017-10-01 Thread Hallgeir Holien
Thank you! On Sunday, October 1, 2017 at 12:50:51 PM UTC+2, Dave Cheney wrote: > > The command you want is > > go get -u github.com/golang/dep/cmd/dep > > You should never need the -a flag unless something is broken with your Go > installation, so you should fix that, not apply -a

[go-nuts] Re: Link not performed when 'go install'

2017-10-01 Thread Dave Cheney
The command you want is go get -u github.com/golang/dep/cmd/dep You should never need the -a flag unless something is broken with your Go installation, so you should fix that, not apply -a unconditionally. -- You received this message because you are subscribed to the Google Groups

[go-nuts] Re: Link not performed when 'go install'

2017-10-01 Thread Hallgeir Holien
The full command is go get -a -x github.com/golang/dep &> goact.txt The output is attached. On Sunday, October 1, 2017 at 10:39:52 AM UTC+2, Dave Cheney wrote: > > Linking will only be performed if the package you go get'd is a main > package. > > For example > > go get golang.org/x/tools > >

[go-nuts] go get exits command line in windos

2017-10-01 Thread Dave Cheney
Av, anti virus, software. -- 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

[go-nuts] go get exits command line in windos

2017-10-01 Thread Dave Cheney
Go get shells out to git, is git available in your path? Also, most problems with windows are caused by an software, can you try disabling it ? -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving

[go-nuts] go get exits command line in windos

2017-10-01 Thread Sotirios Mantziaris
Hi, after a re-installation of windows 10 where go get was working fine it does not work now. Every go command works fine except for go get which terminates the command line. Any ideas? -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To

[go-nuts] Re: Link not performed when 'go install'

2017-10-01 Thread Dave Cheney
Linking will only be performed if the package you go get'd is a main package. For example go get golang.org/x/tools Will get the tools repo, but will not build any commands because the commands are in the path go get golang.org/x/tools/cmd/... What is the full command you ran, and what is

Re: [go-nuts] git submodule vs normal go vendoring

2017-10-01 Thread Peter Mogensen
On 2017-10-01 06:38, JM wrote: > can anyone tell me the pros/cons of using git submodule update instead > of godep govendor etc... ? > > git submodule update --init --recursive Your build depend on that command succeeding. If sub-repos are not under your control that can be a serious problem