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 > >

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

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 > > > >

[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

[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

[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

[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

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"

[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

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

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.

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

[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

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

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

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

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

[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

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? > >

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

[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

[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

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,

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

[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

[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: > > >

[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

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

[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

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

[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

[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

[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

[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

[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

[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

[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

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

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

[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

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 > > > ###

[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 >

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

[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*

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

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