[go-nuts] Re: Go misfeature?

2017-10-25 Thread T L
On Wednesday, October 25, 2017 at 4:51:08 AM UTC-4, Harald Fuchs wrote: > > I got bitten by what I'd say is a misfeature in Go: > > type T1 struct { > T2 > T3 > } > > type T2 struct { > T4 > } > > type T3 struct { > foo int > } > > type T4 struct { >

[go-nuts] Subject: Go 1.9.2 and Go 1.8.5 are released

2017-10-25 Thread Chris Broadfoot
Hi gophers, We have just released Go versions 1.9.2 and 1.8.5, minor point releases. These releases include fixes to the compiler, linker, runtime, documentation, go command, and the crypto/x509, database/sql, log, and net/smtp packages. They include a fix to a bug introduced in Go 1.9.1 and Go

Re: [go-nuts] Memory leak when calling highly parallel goroutines

2017-10-25 Thread Michael Jones
Rob, perhaps it is not clear to you that what you describe is not a memory leak. Imagine this: Rob to car wash robot: "Robot, Wash each car in the parking lot, one after another" Robot #1: OK Rob to parking lot robot: "Robot, Park a million cars in the parking lot" Robot #2: OK. Rob: "OMG! We

Re: [go-nuts] Go misfeature?

2017-10-25 Thread Ian Lance Taylor
On Wed, Oct 25, 2017 at 1:43 AM, Harald Fuchs wrote: > > I got bitten by what I'd say is a misfeature in Go: > > type T1 struct { > T2 > T3 > } > > type T2 struct { > T4 > } > > type T3 struct { > foo int > } > > type T4 struct { > foo int >

Re: [go-nuts] Memory leak when calling highly parallel goroutines

2017-10-25 Thread Ian Lance Taylor
On Wed, Oct 25, 2017 at 12:06 AM, wrote: > > I've got a nasty memory leak. It appears that Go won't reclaim memory when > goroutines are called in a highly parallel fashion. > > To illustrate the issue I've written a simple example below. When I run this > on my

[go-nuts] Re: [ANN] Cross-platform HTML/CSS GUI library

2017-10-25 Thread Ain
On Wednesday, October 25, 2017 at 3:39:42 PM UTC+3, Serge Zaitsev wrote: > > Hey all, > > I made a tiny library that provides a cross-platform web UI for Go apps. > > https://github.com/zserge/webview > Looks intresting, thanks for making it available! > > Apart from the app architecture,

[go-nuts] [ANN] Cross-platform HTML/CSS GUI library

2017-10-25 Thread Serge Zaitsev
Hey all, I made a tiny library that provides a cross-platform web UI for Go apps. https://github.com/zserge/webview No dependencies on Windows and Mac. Gtk-Webkit is only required on Linux and OpenBSD. Resulting binaries are much smaller and less resource-hungry comparing to Electron.

[go-nuts] edit configuration:cannot find go file with main in package 'gods-master/examples'

2017-10-25 Thread starliao2017
I want to run a programme,so I set the edit configuration but catch a error:cannot find go file with main in package 'gods-master/examples'. so how to slove this problem? -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this

[go-nuts] Multiple Goroutine timeout

2017-10-25 Thread desaiabhijit
I am expecting to show url1 (2 sec ), url2 (4 sec ) but not url3( 6 sec) where timeout is 5 sec but program showing only url1 value Please help https://play.golang.org/p/aMOoSEHjmZ Thanks in advance Rgds, Abhi package main import "fmt" import "time" func InvokeUrl1(u string, val chan<-

Re: [go-nuts] Go misfeature?

2017-10-25 Thread 'Axel Wagner' via golang-nuts
On Wed, Oct 25, 2017 at 11:02 AM, Lutz Horn wrote: > This prints "foo=2" which surprised me because I was unaware that T1 >> had got another foo via T3 (with less composition depth). >> >> If I put T4 directly into T1, Go would detect the ambiguity of t1.foo >> (because the

Re: [go-nuts] Multiple Goroutine timeout

2017-10-25 Thread Ian Lance Taylor
As far as I can see your GetUrlValues function only ever prints one string. Ian On Wed, Oct 25, 2017 at 6:30 AM, wrote: > I am expecting to show url1 (2 sec ), url2 (4 sec ) but not url3( 6 sec) > where timeout is 5 sec > > but program showing only url1 value > > Please

Re: [go-nuts] Re: Go misfeature?

2017-10-25 Thread Ian Lance Taylor
On Wed, Oct 25, 2017 at 7:10 AM, Harald Fuchs wrote: > Ian Lance Taylor writes: > >> On Wed, Oct 25, 2017 at 1:43 AM, Harald Fuchs >> wrote: >>> >>> I got bitten by what I'd say is a misfeature in Go: >>> >>> type T1 struct { >>>

[go-nuts] Re: [ANN] Cross-platform HTML/CSS GUI library

2017-10-25 Thread Serge Zaitsev
Thanks for the feedback! You know when the app is terminated because that's when the main loop ends (e.g. Loop() returns false, or Run() just returns). So you can write any code after webview.Run() and it will be executed when user presses close button. App icon is something on my list.

Re: [go-nuts] import a "main" package

2017-10-25 Thread Ian Lance Taylor
On Tue, Oct 24, 2017 at 10:02 PM, Alex Buchanan wrote: > Interesting, thanks. Let me try to clarify my idea with some simple code: > > // file lives at github.com/buchanae/foobar/foobar.go > package foobar > > func Foobar() string { > return "foobar" > } > > func main() { >

[go-nuts] Re: Go misfeature?

2017-10-25 Thread Harald Fuchs
Ian Lance Taylor writes: > On Wed, Oct 25, 2017 at 1:43 AM, Harald Fuchs > wrote: >> >> I got bitten by what I'd say is a misfeature in Go: >> >> type T1 struct { >> T2 >> T3 >> } >> >> type T2 struct { >> T4 >> } >> >> type T3 struct

Re: [go-nuts] Multiple Goroutine timeout

2017-10-25 Thread Shulhan
On Wed, 25 Oct 2017 06:30:09 -0700 (PDT) desaiabhi...@gmail.com wrote: > I am expecting to show url1 (2 sec ), url2 (4 sec ) but not url3( 6 > sec) where timeout is 5 sec > > but program showing only url1 value > > Please help > > https://play.golang.org/p/aMOoSEHjmZ > > Thanks in advance >

Re: [go-nuts] Multiple Goroutine timeout

2017-10-25 Thread desaiabhijit
Thanks for the reply How to gather all the values into CH and return to print Thanks On Wednesday, October 25, 2017 at 7:41:34 PM UTC+5:30, M. Shulhan wrote: > > On Wed, 25 Oct 2017 06:30:09 -0700 (PDT) > desaia...@gmail.com wrote: > > > I am expecting to show url1 (2 sec ), url2 (4 sec )

[go-nuts] Re: Go 1.9.2 and Go 1.8.5 are released

2017-10-25 Thread Nathan Kerr
I updated my release related resources: - Go Release Timeline - When Should You Upgrade Go? Nathan On Thursday, October 26, 2017 at 1:52:13 AM UTC+2, Chris Broadfoot wrote: > >

[go-nuts] Re: [golang-dev] Subject: Go 1.9.2 and Go 1.8.5 are released

2017-10-25 Thread Michael Hudson-Doyle
I've updated my snaps with both these releases, so users with the snap already installed should get them soon, or snap install --classic --channel 1.9/stable go on an ubuntu or ubuntu-like system if you want to try them out :) Cheers, mwh On 26 October 2017 at 12:51, Chris Broadfoot

RE: [go-nuts] Memory leak when calling highly parallel goroutines

2017-10-25 Thread 'Rob Archibald' via golang-nuts
Thanks for your help on this! I really appreciate it. I've been pulling my hair out for weeks on this issue, so I truly appreciate any help you can offer. The way this runs in my production app is similar to how it works in the example app I provided. A request is sent to a web server and then

Re: [go-nuts] Memory leak when calling highly parallel goroutines

2017-10-25 Thread 'Rob Archibald' via golang-nuts
Thanks Ian, It is a memory leak because the memory continues to grow for as long as the loop continues to run. If you change the code example I gave to an infinite loop you'll see that it grows infinitely. I had it stop at 1000 for demonstration purposes because each scan request that my

Re: [go-nuts] Memory leak when calling highly parallel goroutines

2017-10-25 Thread Ian Lance Taylor
On Wed, Oct 25, 2017 at 10:21 AM, Rob Archibald wrote: > > It is a memory leak because the memory continues to grow for as long as the > loop continues to run. If you change the code example I gave to an infinite > loop you'll see that it grows infinitely. I had it stop at

Re: [go-nuts] Re: awesome-go project on golang github organization

2017-10-25 Thread Tyler Compton
It may not be a good idea to put the burden of awesome-go on the Go team, since it's been pointed out in the past that they don't have extra cycles. I suspect that's still the case. On Tue, Oct 24, 2017 at 4:08 PM Dan Kortschak wrote: > I have similar sentiments.

[go-nuts] Re: Is there a workflow engine written in GO

2017-10-25 Thread Samuel Lampa
You might want to check out http://scipipe.org We developed it and are currently using it to run cheminformatics pipelines (data mangling, machine learning etc) on a HPC cluster, at http://pharmb.io at Uppsala University. Cheers // Samuel On Friday, May 8, 2015 at 2:30:20 PM UTC+2, Sriram

RE: [go-nuts] Memory leak when calling highly parallel goroutines

2017-10-25 Thread Tamás Gulácsi
Just blind shots: resp.Body.Close(), sync.Pool the buffers, Limit concurrency - the simplest is a make(chan struct{}, 512) ans push/pull empry tokens to it. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop

[go-nuts] go-any: a more generic way to download Go versions

2017-10-25 Thread jra
If anyone is interested, I have made a tiny update to the tool used to download and run release candidates which makes it useful for any version number: https://github.com/jeffallen/build/commit/dfeb16f0a5edb0c0c2a8278962812ce100f63bff I find it useful, you might too. If someone from the Go

[go-nuts] Go misfeature?

2017-10-25 Thread Harald Fuchs
I got bitten by what I'd say is a misfeature in Go: type T1 struct { T2 T3 } type T2 struct { T4 } type T3 struct { foo int } type T4 struct { foo int } func main() { t1 := T1{ T2{ T4{ 1, }, }, T3{

Re: [go-nuts] sync.Map performance problem

2017-10-25 Thread Konstantin Khomoutov
On Fri, Oct 20, 2017 at 11:50:42PM -0700, barce show wrote: > I use sync.Map in my program to support access concurrently, but witin two > hours with less than 50 clients, my program run out all of my cpu, so I go > back to read the pkg document, and I find this sentence > > "For use cases

[go-nuts] Re: A tour of go - Since a couple days ago the line numbers started to render on the right side or the margin line (instead of left).

2017-10-25 Thread jra
I see that as well with Chrome and Firefox. When I used the instructions to run a local copy of the tour to debug it, the problem went away. So it has something to do with how it is run/served from golang.org.

Re: [go-nuts] Go misfeature?

2017-10-25 Thread Lutz Horn
This prints "foo=2" which surprised me because I was unaware that T1 had got another foo via T3 (with less composition depth). If I put T4 directly into T1, Go would detect the ambiguity of t1.foo (because the composition depth is the same). There is no ambiguity because `T4.foo` is not