[go-nuts] Re: Language is a platform, which golang still does not pay attention to !!!

2018-04-05 Thread T L
On Thursday, April 5, 2018 at 1:26:19 PM UTC-4, bingj...@gmail.com wrote: > > Almost 10 years golang appears in the world. 10 years is not a short > duration. I think if it is not popular until 2020, it will never be popular. > > Golang is designed for cloud and internet areas. Really? > > The

Re: [go-nuts] Re: Language is a platform, which golang still does not pay attention to !!!

2018-04-05 Thread Tyler Compton
Go does not run in a VM like JVM and CLR languages do, but Go provides a "language as a platform"-like feel by allowing for code that is by and large platform-independent. It is true that executables have to be built for each platform but that has benefits of its own. Java applications require the

[go-nuts] colorful go test output

2018-04-05 Thread Alex Efros
Hi! When we run `go test` (without package param) it doesn't redirect os.Stdout, so it's possible to detect is it a TTY and enable color output: unix.IoctlGetTermios(int(os.Stdout.Fd()), ioctlReadTermios) But when we run `go test .` (with package param) it does redirect os.Stdout, so it's

Re: [go-nuts] Re: Is there a memory leak on Rob Pike's demo codes?

2018-04-05 Thread T L
On Thursday, April 5, 2018 at 3:32:53 AM UTC-4, Jan Mercl wrote: > > On Thu, Apr 5, 2018 at 9:10 AM T L > wrote: > > > yes. it is a resource leak. > > It's not necessarily a leak. It's a possible leak. > > And digging even deeper: it's implementation defined. Non-reachable

[go-nuts] Re: Language is a platform, which golang still does not pay attention to !!!

2018-04-05 Thread matthewjuran
> > I think if it is not popular until 2020, it will never be popular. I’m not sure popularity is a shared goal in the community; the original goal is to solve problems at Google. Matt On Thursday, April 5, 2018 at 12:26:19 PM UTC-5, bingj...@gmail.com wrote: > > Almost 10 years golang

Re: [go-nuts] Re: Is there a memory leak on Rob Pike's demo codes?

2018-04-05 Thread 'Bryan Mills' via golang-nuts
To answer the original question about how to detect the leak: if you have a leak, the “goroutine” profile from runtime/pprof will show an ever-increasing number of goroutines with the same stack trace. Detecting such a leak in a unit or

[go-nuts] Re: Language is a platform, which golang still does not pay attention to !!!

2018-04-05 Thread Dave Cheney
Indeed. Please do not conflate popularity with ubiquity. Formula one is a very popular sport, but not everyone needs to do 180mph down the straight away for their daily commute. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe

[go-nuts] Flutter and golang

2018-04-05 Thread Tong Sun
Saw a recent discussion on Flutter and golang, which seems to me to be going the wrong way, because I didn't see the magic word "FIDL " being mentioned. So I'd like to share my finding about that, First of all, about the Flutter: On February 27, 2018,

[go-nuts] Re: Language is a platform, which golang still does not pay attention to !!!

2018-04-05 Thread T L
On Thursday, April 5, 2018 at 6:32:46 PM UTC-4, matthe...@gmail.com wrote: > > I think if it is not popular until 2020, it will never be popular. > > > I’m not sure popularity is a shared goal in the community; the original > goal is to solve problems at Google. > > Matt > But it solves the

Re: [go-nuts] Re: Is there a memory leak on Rob Pike's demo codes?

2018-04-05 Thread Jan Mercl
On Thu, Apr 5, 2018 at 9:10 AM T L wrote: > yes. it is a resource leak. It's not necessarily a leak. It's a possible leak. And digging even deeper: it's implementation defined. Non-reachable channels can be collected and goroutines blocked on them killed without changing

Re: [go-nuts] proposal: advise using SetFinalizer to detect resource leaks

2018-04-05 Thread 'Axel Wagner' via golang-nuts
On Thu, Apr 5, 2018 at 1:58 PM, Mateusz Czaplinski wrote: > Reading from it and handling the errors is left to user. > Then why would this need to live in the stdlib? For example here is a quick and dirty implementation that allows the same functionality, without having to

Re: [go-nuts] proposal: advise using SetFinalizer to detect resource leaks

2018-04-05 Thread Mateusz Czaplinski
Reading from it and handling the errors is left to user. There are many possible ways to handle it, so it's hard to guess in the finalizer what user wants: a) print them on stderr b) push them to some logging infrastructure c) just plain ignore them (default behavior) User may not want or

Re: [go-nuts] proposal: advise using SetFinalizer to detect resource leaks

2018-04-05 Thread 'Axel Wagner' via golang-nuts
Of course this happens when you don't test your code ^^ Here is a version without compilation errors and with a quick demo: https://play.golang.org/p/ykO4igrC0b1 On Thu, Apr 5, 2018 at 2:06 PM, Axel Wagner wrote: > On Thu, Apr 5, 2018 at 1:58 PM, Mateusz

Re: [go-nuts] proposal: advise using SetFinalizer to detect resource leaks

2018-04-05 Thread 'Axel Wagner' via golang-nuts
What would the runtime.Leaks channel do with the received errors? Why can't you just do the same thing from the finalizer itself? On Thu, Apr 5, 2018 at 1:43 PM, Mateusz Czapliński wrote: > Based on a recent discussion on reddit, and a reply by BowsersaurusRex: > > "In

Re: [go-nuts] Go 1.8 or higher on Solaris sparc64.

2018-04-05 Thread Aram Hăvărneanu
The solaris/sparc64 Go port project has been discontinued until further notice. -- Aram Hăvărneanu -- 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

[go-nuts] Re: Is there a memory leak on Rob Pike's demo codes?

2018-04-05 Thread T L
On Wednesday, April 4, 2018 at 11:32:10 AM UTC-4, wilby yang wrote: > > I am new to golang and I am not sure if it is a stupid question. I am > reading the slides of Rob Pike on go concurrency patterns in 2012. I > think there is a resource leak in the below function. As the function will >

Re: [go-nuts] proposal: advise using SetFinalizer to detect resource leaks

2018-04-05 Thread Mateusz Czaplinski
I replied on the issue; in short, if the proposal gets dismissed, I'll take my chances at creating a third-party package with some super simple API, and then try advertising it here, on reddit, and maybe to other packages. On Thu, Apr 5, 2018 at 2:14 PM, Axel Wagner

[go-nuts] Re: How can I pass the parameter to a Http handler function

2018-04-05 Thread rugwirobaker
This thread saved me many hours of my life. -- 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] Language is a platform, which golang still does not pay attention to !!!

2018-04-05 Thread bingjunyin
Almost 10 years golang appears in the world. 10 years is not a short duration. I think if it is not popular until 2020, it will never be popular. Golang is designed for cloud and internet areas. Really? The creators of golang have a lot of experience in C and C++. And golang borrows features

Re: [go-nuts] Hosting godoc internally for private git server

2018-04-05 Thread Michael Levine
How can I make godoc being run on local source code use the godoc templates/assets properly from a locally hosted version of godoc? I tried the following: $ godoc -templates="$GOPATH/src/github.com/golang/gddo/gddo-server/assets" -html path/to/local/library > ~/destination/path/library.html

[go-nuts] Re: Language is a platform, which golang still does not pay attention to !!!

2018-04-05 Thread 'Eric Johnson' via golang-nuts
I have a different perspective On Thursday, April 5, 2018 at 10:26:19 AM UTC-7, bingj...@gmail.com wrote: > > Almost 10 years golang appears in the world. 10 years is not a short > duration. I think if it is not popular until 2020, it will never be popular. > > Golang is designed for cloud and