Re: [go-nuts] Proposal: Add coloured output to go commands

2016-07-12 Thread Dan Kortschak
github.com/maruel/panicparse is a good package to do this if you need
it.

On Tue, 2016-07-12 at 22:26 -0700, Ian Lance Taylor wrote:
> On Tue, Jul 12, 2016 at 9:36 PM, Zac Pullar-Strecker  wrote:
> > Commands like go run, go build and go test amoung others should have
> > coloured output when an error occurs. it would make reading stack traces a
> > lot easier. I personally use the go run tool a lot during development
> > because I have no reason to keep a binary in the $GOPATH/bin directory when
> > it's likely to change in the next 5 minutes.
> >
> > github.com/fatih/color & github.com/kortschak/ct are os agnostic (Unix &
> > Windows,) packages for ANSI escape codes.
> > It would make sense to do this with a flag -c or -color and anyone who
> > wanted it perminantly could alias it.
> > I'm relatively new to the community so I wanted to post it here before
> > creating an issue on github. Are there any issues with doing this?
> 
> I think this is unlikely to be accepted.
> 
> Much more plausible would be a go-gettable colorizing filter that you
> can apply to the go tool output.  Then you could run a shell script
> that pipes go through that filter.
> 
> Ian


-- 
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 https://groups.google.com/d/optout.


Re: [go-nuts] Proposal: Add coloured output to go commands

2016-07-12 Thread Ian Lance Taylor
On Tue, Jul 12, 2016 at 9:36 PM, Zac Pullar-Strecker  wrote:
> Commands like go run, go build and go test amoung others should have
> coloured output when an error occurs. it would make reading stack traces a
> lot easier. I personally use the go run tool a lot during development
> because I have no reason to keep a binary in the $GOPATH/bin directory when
> it's likely to change in the next 5 minutes.
>
> github.com/fatih/color & github.com/kortschak/ct are os agnostic (Unix &
> Windows,) packages for ANSI escape codes.
> It would make sense to do this with a flag -c or -color and anyone who
> wanted it perminantly could alias it.
> I'm relatively new to the community so I wanted to post it here before
> creating an issue on github. Are there any issues with doing this?

I think this is unlikely to be accepted.

Much more plausible would be a go-gettable colorizing filter that you
can apply to the go tool output.  Then you could run a shell script
that pipes go through that filter.

Ian

-- 
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 https://groups.google.com/d/optout.


Re: [go-nuts] if something not perfect here

2016-07-12 Thread Ian Lance Taylor
On Tue, Jul 12, 2016 at 8:07 PM, wweir9  wrote:

> These are two screeshot from os/exec , it looks like that code below will
> always be true.
> len(c.Args) > 0
>
>
>
> 
>
>
> 
>
>
It's not absolutely required to use the Command function.

Ian

-- 
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 https://groups.google.com/d/optout.


[go-nuts] Proposal: Add coloured output to go commands

2016-07-12 Thread Zac Pullar-Strecker
Commands like go run, go build and go test amoung others should have 
coloured output when an error occurs. it would make reading stack traces a 
lot easier. I personally use the go run tool a lot during development 
because I have no reason to keep a binary in the $GOPATH/bin directory when 
it's likely to change in the next 5 minutes.

github.com/fatih/color & github.com/kortschak/ct are os agnostic (Unix & 
Windows,) packages for ANSI escape codes.
It would make sense to do this with a flag -c or -color and anyone who 
wanted it perminantly could alias it.
I'm relatively new to the community so I wanted to post it here before 
creating an issue on github. Are there any issues with doing this?

Thanks, Zac

-- 
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 https://groups.google.com/d/optout.


[go-nuts] if something not perfect here

2016-07-12 Thread wweir9


These are two screeshot from os/exec , it looks like that code below will 
always be true.
len(c.Args) > 0






-- 
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 https://groups.google.com/d/optout.


[go-nuts] Re: Go 1.7 Release Candidate 1 is released

2016-07-12 Thread Sathish VJ
On Mac, bash prompt, attempting to install go to custom location using 
package installation file go1.7rc1.darwin-amd64.pkg.  But it is always 
installed in /usr/local/bin.  

export GOROOT="/Users/username/coding/golang/go1.7.rc1"
export GOPATH="/Users/username/coding/golang/gopath"
export GOBIN="/Users/username/coding/golang/gopath/bin"  # with or without 
this, result is the same.
export PATH=$PATH:$GOBIN
export PATH=$PATH:$GOROOT/bin:/Users/vj/coding/golang/go_appengine

Folder for GOROOT, GOPATH, and GOBIN already exists.  

Is there any way I can get it to install in a custom path?  Or is there an 
issue in the pkg installation?

On Friday, 8 July 2016 10:20:34 UTC+5:30, Chris Broadfoot wrote:
>
> Hello gophers,
>
> We have just released go1.7rc1, a release candidate for Go 1.7.
> It is cut from release-branch.go1.7 at the revision tagged go1.7rc1.
>
> Please help us by testing your Go programs with the release, and report 
> any problems using the issue tracker:
>   https://golang.org/issue/new
>
> You can download binary and source distributions from the usual place: 
>   https://golang.org/dl/#go1.7rc1
>
> To find out what has changed in Go 1.7, read the draft release notes:
>   https://tip.golang.org/doc/go1.7
>
> Documentation for Go 1.7 is available at:
>   https://tip.golang.org/
>
> Cheers,
> Chris
>

-- 
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 https://groups.google.com/d/optout.


[go-nuts] What dependency management tool do you use?

2016-07-12 Thread Matt Silverlock
gvt - simple but robust: https://github.com/FiloSottile/gvt

-- 
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 https://groups.google.com/d/optout.


Re: [go-nuts] Rel in path package

2016-07-12 Thread Ian Lance Taylor
On Tue, Jul 12, 2016 at 5:17 PM, Anmol Sethi  wrote:
> Why is there no function in the path package to get relative paths, like 
> filepath.Rel?

When would you want to use it?

Ian

-- 
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 https://groups.google.com/d/optout.


[go-nuts] any way to save an image to 8-bit indexed png format?

2016-07-12 Thread sleepy
I need to shrink images to as small as possible with an acceptable quality.
found https://tinypng.com/ could convert the image to 8-bit indexed png, 
which is best fit my requirement.

however, I need to do this by my go program, any hints for this?

thanks in advance.

-- 
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 https://groups.google.com/d/optout.


Re: [go-nuts] http.Handler method name

2016-07-12 Thread Nigel Tao
On Wed, Jul 13, 2016 at 6:14 AM, Anmol Sethi  wrote:
> If you were to redesign it now, would you name the method Handle?

Also speaking personally, yes.

-- 
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 https://groups.google.com/d/optout.


Re: [go-nuts] Plurality of package naming

2016-07-12 Thread 'Thomas Bushnell, BSG' via golang-nuts
That's advice for a very different style of language than Go.

Go does not have "objects" in the sense of that post. A Go interface, for
example, does not "have lots of instance variables, lots of arguments, and
pass lots of data around probably."

A class is not a struct is not a Go interface.

Thomas

On Tue, Jul 12, 2016 at 4:23 PM Nathan Fisher 
wrote:

> There's a good oop blog article on the caveats of naming classes (struct)
> ending in -er.
>
> http://objology.blogspot.co.uk/2011/09/one-of-best-bits-of-programming-advice.html?m=1
>
> I know the reader/writer interface kind of flies in the face of this but I
> think that's partly associated with it being an interface and its focus on
> one method.
>
> Personally if it's RESTy I'd opt for BlahResource where Blah is the
> resource that it manages which will probably map to an underlying
> serialisable struct with additional REST elements (eg next, self, etc).
>
> On Tue, 12 Jul 2016 at 17:41, Sam Whited  wrote:
>
>> On Tue, Jul 12, 2016 at 9:19 AM, Rayland  wrote:
>> > When does it make sense for a package to be named in plural? For
>> example,
>> > I'm currently working on a MVC framework and for me it makes sense to
>> have a
>> > "controller" package as opposed to "controllers", but I saw that Beego
>> > prefers plural for the same case.
>>
>> Generally speaking, try to consider how your users will write things
>> that use your package and not what's actually in it. For instance,
>> which makes the better API:
>>
>> controller.New()
>>
>> or:
>>
>> controllers.NewController()
>>
>> The second is redundant, so I'd argue that the first one will look
>> better in your users code. However, given the example:
>>
>> byte.Split(b []byte)
>>
>> vs.
>>
>> bytes.Split(b []byte)
>>
>> the second may be more expected because you're operating on a collection.
>>
>> Of course, both of these are just my opinion, but it's just to
>> illustrate how I generally think about picking a name. Instead of
>> "what will my code in the package look like" think "what will my users
>> write using this package?"
>>
>> —Sam
>>
>> --
>> 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 https://groups.google.com/d/optout.
>>
> --
> 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 https://groups.google.com/d/optout.
>

-- 
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 https://groups.google.com/d/optout.


Re: [go-nuts] Plurality of package naming

2016-07-12 Thread Nathan Fisher
There's a good oop blog article on the caveats of naming classes (struct)
ending in -er.
http://objology.blogspot.co.uk/2011/09/one-of-best-bits-of-programming-advice.html?m=1

I know the reader/writer interface kind of flies in the face of this but I
think that's partly associated with it being an interface and its focus on
one method.

Personally if it's RESTy I'd opt for BlahResource where Blah is the
resource that it manages which will probably map to an underlying
serialisable struct with additional REST elements (eg next, self, etc).

On Tue, 12 Jul 2016 at 17:41, Sam Whited  wrote:

> On Tue, Jul 12, 2016 at 9:19 AM, Rayland  wrote:
> > When does it make sense for a package to be named in plural? For example,
> > I'm currently working on a MVC framework and for me it makes sense to
> have a
> > "controller" package as opposed to "controllers", but I saw that Beego
> > prefers plural for the same case.
>
> Generally speaking, try to consider how your users will write things
> that use your package and not what's actually in it. For instance,
> which makes the better API:
>
> controller.New()
>
> or:
>
> controllers.NewController()
>
> The second is redundant, so I'd argue that the first one will look
> better in your users code. However, given the example:
>
> byte.Split(b []byte)
>
> vs.
>
> bytes.Split(b []byte)
>
> the second may be more expected because you're operating on a collection.
>
> Of course, both of these are just my opinion, but it's just to
> illustrate how I generally think about picking a name. Instead of
> "what will my code in the package look like" think "what will my users
> write using this package?"
>
> —Sam
>
> --
> 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 https://groups.google.com/d/optout.
>

-- 
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 https://groups.google.com/d/optout.


[go-nuts] Re: [ANN] Vermeer - physically based rendering (raytracing) with Go

2016-07-12 Thread anthony Place
am interesting in ray-tracing, but unfortunately you seem to have done a 
bit a optimisation for SSE4, and got rid of other architectures support, so 
my core 2 and arm based machines cant use it.

I hope someone fancies trying it out - if so let me know how you get on!
>
>

-- 
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 https://groups.google.com/d/optout.


Re: [go-nuts] Need critiques on the usage of runtime.Gosched

2016-07-12 Thread bigdrum0
Hi Ian,

I actually made a typo in the code that I should have called defer Unlock() 
rather than Unlock directly at line 21. There shouldn't be any other race.

This is the fix, with some changes to better demonstrate the intention.
https://play.golang.org/p/yKd-81-cFY

The idea to use Gosched here is to yield to other gorountine which could 
potentially enqueue more fetch requests before making the remote call. 
(This was mainly inspired by what facebook did on a library on node.js, 
https://github.com/facebook/dataloader, that they schedule the batched 
remote call at the end of the current event loop).

But after reading the older posts here, supporting custom scheduling 
behavior is not a feature for the go runtime. So I would say this is a bad 
use of Gosched.

Thanks,
-bgd

On Sunday, July 10, 2016 at 8:20:24 PM UTC-4, Ian Lance Taylor wrote:
>
> On Sun, Jul 10, 2016 at 1:03 PM,   
> wrote: 
> > I came up with piece of code to use runtime.Gosched for batching 
> multiple 
> > requests  "auto-magically" from the client side. 
> > 
> > https://play.golang.org/p/QK1wbtgVLf 
> > 
> > It works and it is actually very useful for many scenarios, but I wonder 
> if 
> > this is a good/bad way of doing stuff like this, or is there a 
> better/more 
> > proper way to do it. 
> > 
> > (I know the actual scheduling behavior is not defined, but I don't need 
> the 
> > request to be strictly batched, just some degree of batching better than 
> > none.) 
>
> Your code looks pretty racy to me.  You should run it under the race 
> detector and fix any problems you discover (see 
> https://blog.golang.org/race-detector).  If you do that I think the 
> calls to runtime.Gosched will be pointless. 
>
> Ian 
>

-- 
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 https://groups.google.com/d/optout.


Re: [go-nuts] What dependency management tool do you use?

2016-07-12 Thread Henrik Johansson
I am unsure about pprof but running tests with race for example works
great. I would guess that it works.

On Tue, Jul 12, 2016, 16:41 Ian Davis  wrote:

> On Tue, Jul 12, 2016, at 09:23 PM, Henrik Johansson wrote:
>
> I use gb. I like it a lot and I have had no issues.
>
>
> A quick question: how well do tools like go pprof work when your source
> code is managed by gb, outside of the GOPATH?
>
> -- Ian
>
>
> --
> 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 https://groups.google.com/d/optout.
>

-- 
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 https://groups.google.com/d/optout.


Re: [go-nuts] What dependency management tool do you use?

2016-07-12 Thread Ian Davis
On Tue, Jul 12, 2016, at 09:23 PM, Henrik Johansson wrote:
> I use gb. I like it a lot and I have had no issues.
 
A quick question: how well do tools like go pprof work when your source
code is managed by gb, outside of the GOPATH?
 
-- Ian
 

-- 
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 https://groups.google.com/d/optout.


Re: [go-nuts] Generation of Strings - generation

2016-07-12 Thread 'Paul Borman' via golang-nuts
Something like https://play.golang.org/p/dZjaaorPcb ?

On Tue, Jul 12, 2016 at 1:54 PM, The MrU  wrote:

> Hi,
>
> I have this code https://play.golang.org/p/9o5TReZ7jT3
> 
>
> My idea was to generate all possible combinations pretty much this:
>
> aaa
> bbb
> ccc
> abb
> acc
> baa
> bbb
> bcc
> caa
> cbb
> ccc
> aba
> abb
> abc
>
> you get the picture I think.
>
> I got this solution but the objective is to simplify the solution without
> using channels if possible :
>
> package main
>
> import "fmt"
>
> func GenerateCombinations(alphabet string, length int) <-chan string {
>   c := make(chan string)
>
>   go func(c chan string) {
>   defer close(c)
>
>   AddLetter(c, "", alphabet, length)
>   }(c)
>
>   return c
> }
>
> func AddLetter(c chan string, combo string, alphabet string, length int) {
>   if length <= 0 {
>   return
>   }
>
>   var newCombo string
>   for _, ch := range alphabet {
>   newCombo = combo + string(ch)
>   c <- newCombo
>   AddLetter(c, newCombo, alphabet, length-1)
>   }
> }
>
> func main() {
>
>   list := "abc"
>
>   for combination := range GenerateCombinations(list, 3) {
>   if len(combination) == 3 {
>   fmt.Println(combination)
>   }
>
>   }
>
>   fmt.Println("Done!")
> }
>
> --
> 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 https://groups.google.com/d/optout.
>

-- 
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 https://groups.google.com/d/optout.


[go-nuts] Generation of Strings - generation

2016-07-12 Thread The MrU


Hi,

I have this code https://play.golang.org/p/9o5TReZ7jT3 


My idea was to generate all possible combinations pretty much this:

aaa
bbb
ccc
abb
acc
baa
bbb
bcc
caa
cbb
ccc
aba
abb
abc

you get the picture I think.

I got this solution but the objective is to simplify the solution without 
using channels if possible :

package main

import "fmt"

func GenerateCombinations(alphabet string, length int) <-chan string {
c := make(chan string)

go func(c chan string) {
defer close(c)

AddLetter(c, "", alphabet, length)
}(c)

return c
}

func AddLetter(c chan string, combo string, alphabet string, length int) {
if length <= 0 {
return
}

var newCombo string
for _, ch := range alphabet {
newCombo = combo + string(ch)
c <- newCombo
AddLetter(c, newCombo, alphabet, length-1)
}
}

func main() {

list := "abc"

for combination := range GenerateCombinations(list, 3) {
if len(combination) == 3 {
fmt.Println(combination)
}

}

fmt.Println("Done!")
}

-- 
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 https://groups.google.com/d/optout.


Re: [go-nuts] http.Handler method name

2016-07-12 Thread Anmol Sethi
wouldn’t that make for a very awkward exported name? http.HTTPHandler?

> On Jul 12, 2016, at 4:20 PM, Ian Lance Taylor  wrote:
> 
> On Tue, Jul 12, 2016 at 1:14 PM, Anmol Sethi  wrote:
>> If you were to redesign it now, would you name the method Handle?
> 
> Speaking personally, I think that either I would name the method
> Handle, or I would write
> 
> type HTTPHandler interface {
>HTTPHandle(...)
> }

-- 
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 https://groups.google.com/d/optout.


Re: [go-nuts] http.Handler method name

2016-07-12 Thread Ian Lance Taylor
On Tue, Jul 12, 2016 at 1:14 PM, Anmol Sethi  wrote:
> If you were to redesign it now, would you name the method Handle?

Speaking personally, I think that either I would name the method
Handle, or I would write

type HTTPHandler interface {
HTTPHandle(...)
}

-- 
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 https://groups.google.com/d/optout.


[go-nuts] [ANN] Nexer 1.1.0 code name: Mandy

2016-07-12 Thread Diego Cena
Hi all! 

I'm happy to announce a new release of nexer, available in github.

https://github.com/diegohce/nexer/releases/latest

What's new?:

   - Added tunnel to apt service (debian packages system)

See docs here: https://github.com/diegohce/nexer/blob/master/README.md

-- 
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 https://groups.google.com/d/optout.


[go-nuts] What dependency management tool do you use?

2016-07-12 Thread Johann Höchtl
I use godep. There has been lots of rumour lately to use gb.

What do others use?

If there is a blog post available somewhere comparing the pros and cons, 
please provide one.
I know https://github.com/golang/go/wiki/PackageManagementTools

I also like the idea of manul to use git submodules 
https://github.com/kovetskiy/manul


-- 
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 https://groups.google.com/d/optout.


Re: [go-nuts] http.Handler method name

2016-07-12 Thread Anmol Sethi
If you were to redesign it now, would you name the method Handle?

I’ve got a similar interface in my project and I was just wondering what the 
most idiomatic method name would be.
> On Jul 12, 2016, at 4:13 PM, Ian Lance Taylor  wrote:
> 
> On Tue, Jul 12, 2016 at 12:10 PM, Anmol Sethi  wrote:
>> Why is http.Handler’s method name ServeHTTP and not Handle? Handle seems to 
>> be more idiomatic.
> 
> I doubt there is any deep reason.  ServeHTTP dates back to when the
> Handler interface was introduced before the public release of Go
> (https://github.com/golang/go/commit/e73acc1b35f3490f3d800b4bf49da79630e808fc).
> It predates many of the idioms we've adopted over time.
> 
> Ian

-- 
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 https://groups.google.com/d/optout.


Re: [go-nuts] http.Handler method name

2016-07-12 Thread Ian Lance Taylor
On Tue, Jul 12, 2016 at 12:10 PM, Anmol Sethi  wrote:
> Why is http.Handler’s method name ServeHTTP and not Handle? Handle seems to 
> be more idiomatic.

I doubt there is any deep reason.  ServeHTTP dates back to when the
Handler interface was introduced before the public release of Go
(https://github.com/golang/go/commit/e73acc1b35f3490f3d800b4bf49da79630e808fc).
It predates many of the idioms we've adopted over time.

Ian

-- 
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 https://groups.google.com/d/optout.


[go-nuts] OS X Installer: Why modify $PATH instead of adding symbolic links to /usr/local/bin?

2016-07-12 Thread jsejcksn
Don't read this as a complaint. I'm trying to get feedback from code 
reviewers about the design decision regarding this behavior of the 
installer.

In my experience, most software for OS X that installs cli components 
installs to /usr/local/ and then creates symbolic links to executables in 
/usr/local/bin/, as not to modify my $PATH. However, the Go installer 
differs in approach by creating a new entry in /etc/paths.d/ for path_helper 

 
to read and then modify my $PATH. Can someone please explain the thinking 
behind this design decision? Is it more common on Linux to have a lot of 
path additions instead of symbolic links to executables? Was this something 
that was discussed and decided upon by the core team or just an arbitrary 
decision?

I'd love to get a better understanding of why this choice. I have never 
seen another software take this approach.



-- 
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 https://groups.google.com/d/optout.


[go-nuts] Re: go get failed showing unrecognised import path

2016-07-12 Thread Tamás Gulácsi


2016. július 12., kedd 7:29:53 UTC+2 időpontban 刘晓明Frank a következőt írta:
>
> I am trying to build a websocket-based signaling server in Go called in 
> Collider .
>
> I followed the guide in github/webrtc/apprtc/collider
>
> The command go get collidermain doesn't work and shows that:
>
>  
>
> package collidermain: unrecognized import path "collidermain"
>
> I tried the methods others come up with in stack overflow but they didn't 
> work.
>
> Thanks in advance for you help.
>

That code is not "go get"-able. Follow the 
https://github.com/webrtc/apprtc/blob/master/src/collider/README.md ! 

-- 
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 https://groups.google.com/d/optout.


[go-nuts] http.Handler method name

2016-07-12 Thread Anmol Sethi
Why is http.Handler’s method name ServeHTTP and not Handle? Handle seems to be 
more idiomatic.

-- 
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 https://groups.google.com/d/optout.


Re: [go-nuts] Plurality of package naming

2016-07-12 Thread Sam Whited
On Tue, Jul 12, 2016 at 9:19 AM, Rayland  wrote:
> When does it make sense for a package to be named in plural? For example,
> I'm currently working on a MVC framework and for me it makes sense to have a
> "controller" package as opposed to "controllers", but I saw that Beego
> prefers plural for the same case.

Generally speaking, try to consider how your users will write things
that use your package and not what's actually in it. For instance,
which makes the better API:

controller.New()

or:

controllers.NewController()

The second is redundant, so I'd argue that the first one will look
better in your users code. However, given the example:

byte.Split(b []byte)

vs.

bytes.Split(b []byte)

the second may be more expected because you're operating on a collection.

Of course, both of these are just my opinion, but it's just to
illustrate how I generally think about picking a name. Instead of
"what will my code in the package look like" think "what will my users
write using this package?"

—Sam

-- 
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 https://groups.google.com/d/optout.


[go-nuts] Re: overflow, underflow, carry, zero etc in integer ops

2016-07-12 Thread Uli Kunitz
You need compare the result with one summand to detect overflow.

See here: https://play.golang.org/p/3Uh0eFSbQW

Programming languages usually don't provide access to machine level flags, 
because they support combining multiple operations in one expression. For 
example what should the carry flag represent in an expression y = a + b + 
c. There are several strategies to deal with this shortcoming one approach 
is to calculate with 63-bit words and check use the highest bit as carry or 
do additional operations as you are doing.

I recommend to look into Harry S. Warren's book "Hacker's Delight" which 
contains numerous examples how to deal with such issues in a higher level 
language. Here is the web page for the book: http://www.hackersdelight.org/

-- 
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 https://groups.google.com/d/optout.


Re: [go-nuts] Plurality of package naming

2016-07-12 Thread roger peppe
I prefer the singular form unless pushed towards the plural for
some reason (for example, because we want both plural and
singular forms).

The plural package names in the stdlib are generally there
because the singular form is a reserved word or
keyword (strings, types, errors, bytes).



On 12 July 2016 at 15:19, Rayland  wrote:
> When does it make sense for a package to be named in plural? For example,
> I'm currently working on a MVC framework and for me it makes sense to have a
> "controller" package as opposed to "controllers", but I saw that Beego
> prefers plural for the same case.
>
> --
> 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 https://groups.google.com/d/optout.

-- 
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 https://groups.google.com/d/optout.


[go-nuts] Community feedback for my GSoC project

2016-07-12 Thread Suyash
Hi Gophers,

This is Suyash, and this year I was lucky enough to be selected for the 
prestigious Google Summer of Code program with the Performance Co-Pilot 
organization 
(https://summerofcode.withgoogle.com/projects/#6178186094182400).
 
As part of my project, I have been building a go library that implements 
the 
instrumentation API for PCP. The project is on GitHub at 
https://github.com/performancecopilot/speed. We just tagged the initial 
1.0.0-alpha release for the project and would like some feedback for our 
work. 

Some examples to demonstrate the features available in the initial release 
are in the examples
subdirectory of the package at 
https://github.com/performancecopilot/speed/tree/master/examples.

Please note that I am a new gopher and may have missed out on some things, 
and any feedback related to the API design or the source code would be 
extremely helpful.


Cheers!

Suyash

-- 
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 https://groups.google.com/d/optout.


[go-nuts] Re: net/http: request canceled while waiting for connection

2016-07-12 Thread Constantin Konstantinidis
Hello,

A simple search on https://github.com/golang/go/ will display various 
reasons. Is there a good reason to avoid upgrading to 1.6.2 and possibly 
1.7. Many issues were treated in the meantime.

Regards,

On Tuesday, July 12, 2016 at 12:15:48 PM UTC+2, DM wrote:
>
> Hi
>
> We making some http PUT calls to a web server using net/http. Some time in 
> the log we are seeing the below errors:-
>
> {"level":"error","message":"Put 
> http://blitz:2196/cache/api/v1/buckets/styloko/entities/product-xlarge-multi-sku-de898wa73oooindfas
> : *read tcp **172.16.84.112:2196* *:* *use of 
> closed network connection"*,"stackTraces":["/var/lib/jenkins/jobs/CI_
> styloko_pkg_creation/workspace/styloko/src/amenities/products/common/
> cache_manager.go(295)","/var/lib/jenkins/jobs/CI_styloko_
> pkg_creation/workspace/styloko/src/amenities/products/get/search/
> exactquery/node_response.go(127)","/usr/local/go/src/
> runtime/asm_amd64.s(2232)"],"timestamp":"2016-07-11T19:30:29+05:30"}
>
> {"level":"error","message":"Put 
> http://blitz:2196/cache/api/v1/buckets/styloko/entities/product-xlarge-multi-sku-mi162bg58vblindfas
> : *net/http: request canceled while waiting for connection"*
> ,"stackTraces":["/var/lib/jenkins/jobs/CI_styloko_pkg_creation/
> workspace/styloko/src/amenities/products/common/
> cache_manager.go(295)","/var/lib/jenkins/jobs/CI_styloko_
> pkg_creation/workspace/styloko/src/amenities/products/get/search/
> exactquery/node_response.go(127)","/usr/local/go/src/
> runtime/asm_amd64.s(2232)"],"timestamp":"2016-07-11T19:30:32+05:30"}
>
> Can some one please let me know when does the error "Use of closed 
> network connection", "request canceled while waiting for connection" can 
> come?
>
> I am using go 1.5 on Debian 8 64 Bit.
>
> Thanks,
> D
>

-- 
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 https://groups.google.com/d/optout.


[go-nuts] Plurality of package naming

2016-07-12 Thread Rayland
When does it make sense for a package to be named in plural? For example, 
I'm currently working on a MVC framework and for me it makes sense to have 
a "controller" package as opposed to "controllers", but I saw that Beego 
prefers plural for the same case.

-- 
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 https://groups.google.com/d/optout.


[go-nuts] overflow, underflow, carry, zero etc in integer ops

2016-07-12 Thread xiiophen
Is there an 'easy' way to get this cheap from integer ops 

eg to check for carry on addition of two uint8s I need to do something like

https://play.golang.org/p/IFuQcUgJlR

(best I can think of)

I really wanted something like

var a,b uint8 = 200,100
x,error : = a+b

gives x=44, with error.carry = true and error.overflow=true .. this 
suggestion wouldn't fit with multiple value assignments eg a,b = a+b,a-b 

my current method is very cludgy, and I doubt (?) it compiles to anything 
like the minimal assembler equivalent.  

Thinking about a builtin math error variable (different from the Error 
package) - functioning as struct{overflow,carry,negative,underflow etc bool}


This isn't going to happen or be fixed soon.. Is there an easier way, in 
terms of both efficiency (ie what it compiles to) and appearance (ie "do 
what I say" quality), ..  or any other thoughts ??

-- 
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 https://groups.google.com/d/optout.


[go-nuts] Re: New Context method in http.Request, what can we do with it?

2016-07-12 Thread Matt Silverlock
Sure, and that's why gorilla/mux uses context.Context internally.

gorilla/sessions (and mux) both existed well before context.Context did, 
and sessions can't be changed without breaking the public API. 


On Tuesday, July 12, 2016 at 4:20:59 AM UTC-7, parais...@gmail.com wrote:
>
> Don't you think it would be better to use context to hold session values 
> rather than using global variables like github.com/gorilla/sessions does 
> ? 
>
> Le lundi 11 juillet 2016 00:43:05 UTC+2, Matt Silverlock a écrit :
>>
>> Use it to pass connection/request-scoped values: that is, values that 
>> could only exist once you have a request. authentication tokens, user 
>> details, connection IDs: things that can't be known/generated before the 
>> connection has been received.
>>
>> e.g. gorilla/mux (https://github.com/gorilla/mux) uses it to pass 
>> route-matching information back to the user (i.e. for /user/:name, the 
>> :name value). Don't use context to pass app-level dependencies, as it makes 
>> testing, reasoning and debugging hard.
>>
>>
>>
>> On Thursday, July 7, 2016 at 4:03:18 PM UTC-7, Tyler Compton wrote:
>>>
>>> I'm really excited to see context.Context become a first class citizen 
>>> in Go 1.7. After using context, it feels like a natural way to write Go 
>>> network code and it fits naturally in the standard library. I'm trying to 
>>> figure out how I can improve existing code with the new features that come 
>>> with it.
>>>
>>> In Go 1.7, requests now can contain a context, and the context can be 
>>> changed. This seems really cool, but I don't know what exactly I can do 
>>> that I can't do before, other than what the documentation specifically 
>>> outlines: "For outgoing client requests, the context controls cancelation."
>>>
>>> Is there anything else we will be able to do that I should be looking 
>>> into? What are your plans?
>>>
>>

-- 
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 https://groups.google.com/d/optout.


[go-nuts] Re: GopherCon Denver 2016 will be livestreamed on Twitch

2016-07-12 Thread mhhcbon
will the video be posted on this ytb channel  ?
https://www.youtube.com/channel/UCO3LEtymiLrgvpb59cNsb8A

I hope so!

-- 
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 https://groups.google.com/d/optout.


[go-nuts] It is seems that GURU not support Chinese Characters well

2016-07-12 Thread ratstar . cn
Hi, all. I meet a problem when I use goclipse with guru.
When I add some Chinese Comments before "package" line,
an error occurs:
Error parsing 'guru description' result, for source struct update:
Error parsing JSON output: JSONObject["package"] not found.
Meanwhile, Go Tools Log displays following:
>> Running: guru -json describe 
E:\workspace\AutoDeployer\src\github.com\ratstars\ops-deployer\executor\sshbash\sshexecutor.go:#15,#15
{
"desc": "source file",
"pos": 
"E:\\workspace\\AutoDeployer\\src\\github.com\\ratstars\\ops-deployer\\executor\\sshbash\\sshexecutor.go:2:1"
}

Anyone have solutions?? Thx.

-- 
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 https://groups.google.com/d/optout.


Re: [go-nuts] ARM big-endian support roadmap

2016-07-12 Thread Ian Lance Taylor
On Tue, Jul 12, 2016 at 5:20 AM, Igor Gatis  wrote:
>
> AFAIK, big endian support for ARM is not available. Will it ever be
> supported?

If somebody works on it, and can provide a build machine for testing.
See https://github.com/golang/go/wiki/PortingPolicy .

> Out of curiosity, how hard is this task?

Probably pretty easy for someone with the hardware needed for testing.

Ian

-- 
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 https://groups.google.com/d/optout.


Re: [go-nuts] How to allocate memory from OS in compatible way.

2016-07-12 Thread Ian Lance Taylor
On Tue, Jul 12, 2016 at 1:05 AM,   wrote:
> GCC slow, not GC.

Sorry, my apologies for misreading.

Ian

> вторник, 12 июля 2016 г., 1:52:01 UTC+3 пользователь Ian Lance Taylor
> написал:
>>
>> On Mon, Jul 11, 2016 at 1:25 PM,   wrote:
>> > Ohh that slow gcc. Sad.
>>
>> The GC in general is quite fast.  If you have specific examples where
>> the GC does poorly, please open issues for them with test cases.
>> Thanks.
>>
>> Ian
>>
>> > понедельник, 11 июля 2016 г., 23:03:07 UTC+3 пользователь Ian Lance
>> > Taylor
>> > написал:
>> >>
>> >> On Mon, Jul 11, 2016 at 9:11 AM,   wrote:
>> >> > Thank for answer but I'm already implemented portable unmanaged
>> >> > memory
>> >> > pool
>> >> > (https://github.com/ardente/goal/blob/master/gut/mempool.go). I'm
>> >> > just
>> >> > looking for standard direct analogue (incliding mapping of fd -1) of
>> >> > unix's
>> >> > syscall.Mmap for windows. Looks like there is none. There is some
>> >> > rationale
>> >> > behind this or just lack of time/interest?
>> >>
>> >> This is not something most Go programs are expected to do.
>> >>
>> >> Most Go programs that need to allocate memory that is not controlled
>> >> by the Go garbage collector are programs that already use cgo.  Those
>> >> programs can use C.malloc, which works on all systems.
>> >>
>> >> Ian
>> >
>> > --
>> > 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...@googlegroups.com.
>> > For more options, visit https://groups.google.com/d/optout.
>
> --
> 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 https://groups.google.com/d/optout.

-- 
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 https://groups.google.com/d/optout.


[go-nuts] ARM big-endian support roadmap

2016-07-12 Thread Igor Gatis
AFAIK, big endian support for ARM is not available. Will it ever be
supported?

Out of curiosity, how hard is this task?

-- 
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 https://groups.google.com/d/optout.


Re: [go-nuts] liteide x30.2 released

2016-07-12 Thread paraiso . marc
Nice Ctrl+P to navigate between files work well , it's like to be able to 
navigate between Symbols too. With a drop down menu .

Le mardi 12 juillet 2016 09:09:15 UTC+2, visualfc a écrit :
>
> Hi, all
>
> LiteIDE x30.2 released, This version bug fix and build test for Go1.7 rc1
>
>
> ### 2016.7.12 Ver X30.2
> * LiteApp
> * add new vs-dard css, thanks [tupunco](https://github.com/tupunco)
> * fix and re-implement editor list menu
> * QuickOpen
> * QuickOpenFile skip same folder and same files
> * QuickOpneFile add current editor local files
>

-- 
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 https://groups.google.com/d/optout.


[go-nuts] Re: New Context method in http.Request, what can we do with it?

2016-07-12 Thread paraiso . marc
Don't you think it would be better to use context to hold session values 
rather than using global variables like github.com/gorilla/sessions does ? 

Le lundi 11 juillet 2016 00:43:05 UTC+2, Matt Silverlock a écrit :
>
> Use it to pass connection/request-scoped values: that is, values that 
> could only exist once you have a request. authentication tokens, user 
> details, connection IDs: things that can't be known/generated before the 
> connection has been received.
>
> e.g. gorilla/mux (https://github.com/gorilla/mux) uses it to pass 
> route-matching information back to the user (i.e. for /user/:name, the 
> :name value). Don't use context to pass app-level dependencies, as it makes 
> testing, reasoning and debugging hard.
>
>
>
> On Thursday, July 7, 2016 at 4:03:18 PM UTC-7, Tyler Compton wrote:
>>
>> I'm really excited to see context.Context become a first class citizen in 
>> Go 1.7. After using context, it feels like a natural way to write Go 
>> network code and it fits naturally in the standard library. I'm trying to 
>> figure out how I can improve existing code with the new features that come 
>> with it.
>>
>> In Go 1.7, requests now can contain a context, and the context can be 
>> changed. This seems really cool, but I don't know what exactly I can do 
>> that I can't do before, other than what the documentation specifically 
>> outlines: "For outgoing client requests, the context controls cancelation."
>>
>> Is there anything else we will be able to do that I should be looking 
>> into? What are your plans?
>>
>

-- 
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 https://groups.google.com/d/optout.


Re: [go-nuts] How to make bootstrap style reflect on golang template

2016-07-12 Thread Josh Kamau
If you inspect the browser console, are you serving the bootstrap css ??

I normally do something like this:
mux.Handle("/assets/", http.StripPrefix("/assets/",
http.FileServer(http.Dir("./assets"

And then my css link will be  /assets/bootstrap/css/bootstrap.min.css
where 'assets' is my public folder.


On Tue, Jul 12, 2016 at 6:57 AM,  wrote:

> i have been having major issues making bootstrap style reflect on my
> html/template output and i'm wondering if there's any other way to go about
> this. my code below
> INDEX.HTML
>
> {{define "head"}}Dead Or Injured
> 
> 
> 
>
> 
> 
> {{end}}
>
> {{define "body"}}
> 
> 
> Input your guess: 
> Submit
> 
> 
>
>
> 
> {{range .}}
> 
> {{.}}
> 
> {{end}}
> 
>
> {{end}}
>
> And this is BASE.HTML
>
> {{define "base"}}
> 
> {{template "head" .}}
> {{template "body" .}}
> 
> {{end}}
>
> index.html and base.html are in the same folder so i don't think the
> folder structure is a problem except you think otherwise.
> Here's main.go
> func main() {
>mongo.GetSession()
>
>r := mux.NewRouter().StrictSlash(false)
>fs := http.FileServer(http.Dir("public"))
>r.Handle("/public/", fs)
>r.HandleFunc("/", gamePage)
>r.HandleFunc("/game/submit", functions.Submit)
>r.HandleFunc("/game/highscoreinput", scoreInputPage)
>r.HandleFunc("/game/postUser", mongo.PostUser)
>r.HandleFunc("/game/highscores", mongo.RetrieveUsers)
>
>server := {
>Addr:":8080",
>Handler: r,
>}
>log.Println("Listening...")
>server.ListenAndServe()
> }
>
> After all these, the template works fine and all the pnly bit remaining is
> for it to shake off the boring interface and make use of the bootstrap
> provided. Thanks.
>
> --
> 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 https://groups.google.com/d/optout.
>

-- 
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 https://groups.google.com/d/optout.


[go-nuts] net/http: request canceled while waiting for connection

2016-07-12 Thread DM
Hi

We making some http PUT calls to a web server using net/http. Some time in 
the log we are seeing the below errors:-

{"level":"error","message":"Put 
http://blitz:2196/cache/api/v1/buckets/styloko/entities/product-xlarge-multi-sku-de898wa73oooindfas
: *read tcp **172.16.84.112:2196* *:* *use of 
closed network connection"*,"stackTraces":["/var/lib/jenkins/jobs/CI_
styloko_pkg_creation/workspace/styloko/src/amenities/products/common/
cache_manager.go(295)","/var/lib/jenkins/jobs/CI_styloko_
pkg_creation/workspace/styloko/src/amenities/products/get/search/
exactquery/node_response.go(127)","/usr/local/go/src/
runtime/asm_amd64.s(2232)"],"timestamp":"2016-07-11T19:30:29+05:30"}

{"level":"error","message":"Put 
http://blitz:2196/cache/api/v1/buckets/styloko/entities/product-xlarge-multi-sku-mi162bg58vblindfas
: *net/http: request canceled while waiting for connection"*
,"stackTraces":["/var/lib/jenkins/jobs/CI_styloko_pkg_creation/
workspace/styloko/src/amenities/products/common/
cache_manager.go(295)","/var/lib/jenkins/jobs/CI_styloko_
pkg_creation/workspace/styloko/src/amenities/products/get/search/
exactquery/node_response.go(127)","/usr/local/go/src/
runtime/asm_amd64.s(2232)"],"timestamp":"2016-07-11T19:30:32+05:30"}

Can some one please let me know when does the error "Use of closed network 
connection", "request canceled while waiting for connection" can come?

I am using go 1.5 on Debian 8 64 Bit.

Thanks,
D

-- 
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 https://groups.google.com/d/optout.


Re: [go-nuts] liteide x30.2 released

2016-07-12 Thread sphilippov
Thanks vfc, keep up good work!

вторник, 12 июля 2016 г., 10:09:15 UTC+3 пользователь visualfc написал:
>
> Hi, all
>
> LiteIDE x30.2 released, This version bug fix and build test for Go1.7 rc1
>
>
> ### 2016.7.12 Ver X30.2
> * LiteApp
> * add new vs-dard css, thanks [tupunco](https://github.com/tupunco)
> * fix and re-implement editor list menu
> * QuickOpen
> * QuickOpenFile skip same folder and same files
> * QuickOpneFile add current editor local files
>

-- 
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 https://groups.google.com/d/optout.


Re: [go-nuts] How to allocate memory from OS in compatible way.

2016-07-12 Thread sphilippov
GCC slow, not GC.
Yes, Go's GC is quite fast and I like it alot, but there is cases where 
non-generational GC performs poorly, for example large nets of short living 
objects. I hope the new TOC will improve situation.

вторник, 12 июля 2016 г., 1:52:01 UTC+3 пользователь Ian Lance Taylor 
написал:
>
> On Mon, Jul 11, 2016 at 1:25 PM,   
> wrote: 
> > Ohh that slow gcc. Sad. 
>
> The GC in general is quite fast.  If you have specific examples where 
> the GC does poorly, please open issues for them with test cases. 
> Thanks. 
>
> Ian 
>
> > понедельник, 11 июля 2016 г., 23:03:07 UTC+3 пользователь Ian Lance 
> Taylor 
> > написал: 
> >> 
> >> On Mon, Jul 11, 2016 at 9:11 AM,   wrote: 
> >> > Thank for answer but I'm already implemented portable unmanaged 
> memory 
> >> > pool 
> >> > (https://github.com/ardente/goal/blob/master/gut/mempool.go). I'm 
> just 
> >> > looking for standard direct analogue (incliding mapping of fd -1) of 
> >> > unix's 
> >> > syscall.Mmap for windows. Looks like there is none. There is some 
> >> > rationale 
> >> > behind this or just lack of time/interest? 
> >> 
> >> This is not something most Go programs are expected to do. 
> >> 
> >> Most Go programs that need to allocate memory that is not controlled 
> >> by the Go garbage collector are programs that already use cgo.  Those 
> >> programs can use C.malloc, which works on all systems. 
> >> 
> >> Ian 
> > 
> > -- 
> > 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...@googlegroups.com . 
> > For more options, visit https://groups.google.com/d/optout. 
>

-- 
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 https://groups.google.com/d/optout.