Re: [go-nuts] liteide x30 released

2016-07-04 Thread Adrian Sampaleanu
Nice! Would you be able to provide QT5 binaries along with QT4, the way you do for OS X? On Monday, July 4, 2016 at 7:52:55 AM UTC-4, parais...@gmail.com wrote: > > Great news, I love liteide which is for me the best Go IDE, no question. I > love the embedded Go Playground too, quite handy when

[go-nuts] Compiling very old version of Golang...

2016-07-04 Thread Mike Lee
Hello, For this question please refer to commit 0cafb9ea3d3d34627e8f492ccafa6ba9b633a213 of the Go repository. This is a very early version of Go (2008). I was just curious as to how it looked at the start. I don't have any experience in compilers/language design, can someone tell me how

Re: [go-nuts] strings.SplitN(x, 1)

2016-07-04 Thread Matt Harden
Not quite always: https://play.golang.org/p/XEM4afSu57 On Mon, Jul 4, 2016 at 12:37 PM Tom Limoncelli wrote: > Does strings.SplitN(x, 1) always return []string{x}? > > https://play.golang.org/p/3vDg_BFfY9 > > If so, I think the docs would be more clear if this was spelled

[go-nuts] strings.SplitN(x, 1)

2016-07-04 Thread Tom Limoncelli
Does strings.SplitN(x, 1) always return []string{x}? https://play.golang.org/p/3vDg_BFfY9 If so, I think the docs would be more clear if this was spelled out. For example... *** strings.go-OLD Mon Jul 4 15:33:24 2016 --- strings.go Mon Jul 4 15:34:48 2016 *** *** 266,271 ---

Re: [go-nuts] Re: Golang Rabbit MQ Fanout Exchange Multiple Consumers

2016-07-04 Thread Ross Salas
This may help: http://activemq.apache.org/how-does-a-queue-compare-to-a-topic.html On Mon, Jul 4, 2016 at 8:22 AM, Giang Tran wrote: > it's because you use single queue for both of consumer, in fanout > exchange, message is copy to all the queue bind to this exchange. >

Re: [go-nuts] Unsure when two interfaces are considered identical

2016-07-04 Thread Jon Bodner
Ah, ok. I think I understand what you're saying. In my opinion, there's a difference between automatically type casting between a concrete type and an interface (or from one concrete type to another) and automatically casting between two compatible (or identical) interfaces. Not automatically

Re: [go-nuts] Unsure when two interfaces are considered identical

2016-07-04 Thread Constantin Konstantinidis
I understand your concern. What I like a lot in Go is the strong type side that requires strict structure including naming. I'm only pointing that if the compiler cannot "type" a result, it should always mention it. Regards, On Monday, July 4, 2016 at 5:16:57 PM UTC+2, Jon Bodner wrote: > > Hi

[go-nuts] Re: Golang Rabbit MQ Fanout Exchange Multiple Consumers

2016-07-04 Thread Giang Tran
it's because you use single queue for both of consumer, in fanout exchange, message is copy to all the queue bind to this exchange. Inorder to has 2 copy, you must have to use 2 queue(use different queue name). On Monday, July 4, 2016 at 10:09:03 PM UTC+7, Rakesh Goyal wrote: > > > > down

Re: [go-nuts] Unsure when two interfaces are considered identical

2016-07-04 Thread Jon Bodner
Hi Constantin, Thanks for responding. This is a case where I think the compiler should be perfectly capable of figuring out that ResultA and ResultB are identical, and allowing one to be substituted for the other. As the adapter shows, the compiler can figure this out when it's a return type,

Re: [go-nuts] function with goroutine returned will kill its goroutine?

2016-07-04 Thread Jan Mercl
On Mon, Jul 4, 2016 at 5:08 PM Kenshin Wang wrote: go func(i int) { for { next <- i i++ } }(start) > could anyone can explain why the output is this? A goroutine dies when it

Re: [go-nuts] Unsure when two interfaces are considered identical

2016-07-04 Thread Jon Bodner
Hi Ian, The issue you pointed at is exactly what I'd like to see. In my case, I'm providing an interface that matches what's in database/sql without creating an explicit dependency on database/sql (for cases when non-sql databases, or non-databases are used for data storage). I think this

Re: [go-nuts] Unused var written in closure

2016-07-04 Thread Ian Lance Taylor
On Sun, Jul 3, 2016 at 11:57 PM, Gordon Klaus wrote: > Ok, so strictly speaking there is no bug. Both gc and gccgo are > spec-compliant; gc just opts not to raise an error in this case. (One might > say it is a bug that gc doesn't raise the error consistently, but I

[go-nuts] Re: How does iota affect the types of the subsequent constants in a constant declaration?

2016-07-04 Thread GMA_OWNER via golang-nuts
Le lundi 4 juillet 2016 02:25:06 UTC, Jingguo Yao a écrit : > > Take the following code as an example: > > > package main > import ( > "fmt" > ) > const ( > First int64 = iota > Second > ) > const ( > One int64 = 1 > Two = 2 > ) > func main() { > fmt.Printf("First type: %T, Second

[go-nuts] Re: can't install gomobile

2016-07-04 Thread teja . neotech
I am also facing the same problem but I didn't understand the solution given by @Elias Naur please could you elaborate on the solution so I can get it working. On Saturday, July 2, 2016 at 8:26:58 AM UTC+5:30, JM wrote: > > windows pro on 64x. Anyone know what's going on here? Im using the >

[go-nuts] function with goroutine returned will kill its goroutine?

2016-07-04 Thread Kenshin Wang
> > > package main > > import "fmt" > > func main() { > ca := createCounter(2) > cb := createCounter(102) > for i := 0; i < 5; i++ { > a := <-ca > fmt.Printf("A %d \nB %d \n", a, <-cb) > } > > } > > func createCounter(start int) chan int { > next := make(chan int) > go func(i int) { > for { >

Re: [go-nuts] Unsure when two interfaces are considered identical

2016-07-04 Thread Constantin Konstantinidis
It seems to me that the compiling error is adequate guidance. fmt.Printf("%v %T",V.Calculate(2,8)) displays 10 %!T(MISSING) ie Calculate returns a untyped value. If you try to set the type by using the standard interface of type CalcB fmt.Println(ib.Calculate(CalcB(i)).Result()) then the

Re: [go-nuts] redirect already running processes stdout

2016-07-04 Thread Konstantin Khomoutov
On Fri, 1 Jul 2016 13:22:09 -0700 (PDT) ethanlewis...@gmail.com wrote: [...] > I have multiple applications that have a lot of command line flags and > didn't want to have to worry about executing them threw os.exec. But this is super-simple to have in fact. In the simplest case just stick

Re: [go-nuts] Re: Go-worker or goworker?

2016-07-04 Thread Charl Matthee
Hi, On Sat, 2 Jul 2016 at 18:17 pjmul...@gmail.com wrote: I need to make the same decision now. What path did you take? > This is a pretty old post of mine. But to answer your question, I ended up going with *goworker*. We still use it in production and it has

Re: [go-nuts] liteide x30 released

2016-07-04 Thread paraiso . marc
Great news, I love liteide which is for me the best Go IDE, no question. I love the embedded Go Playground too, quite handy when it comes to try new stuff in Go. Le lundi 4 juillet 2016 03:52:29 UTC+2, visualfc a écrit : > > Hi, all > liteide x30 released! > This version bug fix, support go1.7,

Re: [go-nuts] why is my program retaining memory when len([]byte)>16384 ?

2016-07-04 Thread mhhcbon
Hi, thanks for help! But the problem might just be that you're writing many more bytes to > your encoder than you're reading from the file. > Did you mean i should write it so ? Write(srcBuf[0:lenRead]) nrRead, err := src.Read(bufRead); // read from file if err!= nil { break

[go-nuts] Re: Matrix Library && colour uint32's vs uint8's

2016-07-04 Thread Constantin Konstantinidis
I noticed that you also use the image/color package. There uint8 are indeed mention for Color func. You fill in your matrix using uint8() but the type of the image might be lost between your routines as explained in https://blog.golang.org/go-image-package as you use src (generic) and not

Re: [go-nuts] Re: Relaxing rules on slice comparison: would it make sense?

2016-07-04 Thread Chad
I realize that the issue might be about changing/ adding a builtin: - either add a builtin deep value Comparison function (via reflection) - or add a snapshot type refinement which triggers the allocation of an immutable copy of a reference type (and we would recover the behaviour

Re: [go-nuts] Unused var written in closure

2016-07-04 Thread Gordon Klaus
Ok, so strictly speaking there is no bug. Both gc and gccgo are spec-compliant; gc just opts not to raise an error in this case. (One might say it is a bug that gc doesn't raise the error consistently, but I don't think the spec says anything about consistency, only optionality.) In any case, I