[go-nuts] Re: Getting a lot of i/o timeouts in Go 1.4

2016-06-16 Thread Dave Cheney
Have you adjusted th number of file descriptors available to your program, and the server you are connecting to? Have you used another program to verify that your target can handle the number of connections you are making? -- You received this message because you are subscribed to the Google

[go-nuts] Re: go1.7beta2 prints "too many values in struct initializer" when I ran "go test" for gopkg.in/vmihailenco/msgpack.v2

2016-06-17 Thread Dave Cheney
go test -work should do it. On Saturday, 18 June 2016 12:02:03 UTC+10, Hiroaki Nakamura wrote: > > Hi, > > Here are commands I used to set up gopkg.in/vmihailenco/msgpack.v2 > > go get -u gopkg.in/vmihailenco/msgpack.v2 > cd $GOPATH/src/gopkg.in/vmihailenco/msgpack.v2 > go get -u

[go-nuts] Re: benchmarking not working (always) go1.7beta

2016-06-18 Thread Dave Cheney
Without seeing the code (hint, hint) I'm guessing that your benchmark got optimised away. Here are some links with suggestions on how to make your benchmark reliable. http://dave.cheney.net/2013/06/30/how-to-write-benchmarks-in-go#compiler-optimisation

[go-nuts] Re: Discussion on "Vendoring edge case, critical problem"

2016-06-18 Thread Dave Cheney
Nope, vendoring remains unsuitable for library authors. On Sunday, 19 June 2016 15:14:57 UTC+10, Tyler Compton wrote: > > A user brought up a problem with the current vendoring setup regarding > exposing types of a vendored dependency. There was a lot of great > discussion and it seemed like

[go-nuts] Re: Discussion on "Vendoring edge case, critical problem"

2016-06-19 Thread Dave Cheney
If you mean forking their dependencies and rewiring their import paths, that is a possibility. But it leaves consumers of those packages in the same position as the thread the OP referenced because the same code is now known by two distinct import paths breaking type equality. -- You

RE: [go-nuts] Go test to run over sub packages?

2016-06-22 Thread Dave Cheney
Permitting symlinks inside GOPATH would introduce all the problems of one source package having multiple locations that currently plague users of the vendor/ feature. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this

[go-nuts] Re: Result is sometimes different despite using same value when encode by encoding/gob

2016-06-20 Thread Dave Cheney
To serialise the keys and values of a map and code would have to iterate over it for k,v := range m { // serialise k and v } But map iteration does not have a guaranteed ordering. This is why the result is not stable. On Tuesday, 21 June 2016 15:44:05 UTC+10, Harry wrote: > > Hello guys,

[go-nuts] Re: Go application hanging and throwing Proxy error: Request Canceled or I/O timeout

2016-06-28 Thread Dave Cheney
Your application has probably run out of file descriptors. On linux you can get a sense of the number of active file descriptors your program is using by looking in the /proc/$PID/fd directory. Where $PID is the process id of your program. /proc/$PID/limits will tell you the current limits

[go-nuts] 'go tool pprof' only shows "Type: CPU" and not a callgraph

2016-06-27 Thread Dave Cheney
What are the exact commands you used? It is easy to misuse proof, here is a slide with some of the gotchas. http://talks.godoc.org/github.com/davecheney/presentations/writing-high-performance-go.slide#11 -- You received this message because you are subscribed to the Google Groups

[go-nuts] Trying to verify io.Copy and underlying way of handling files.

2016-07-14 Thread Dave Cheney
io.Copy doesn't know anything about files, it works with any type that implements io.Reader and io.Writer. -- 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] What lead to the versionning debate?

2016-07-28 Thread Dave Cheney
Hello, You're pretty late to the discussion. Here's some background reading. https://getgb.io/rationale/ Dave -- 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: What lead to the versionning debate?

2016-07-28 Thread Dave Cheney
Yes, exactly. -- 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] Re: What lead to the versionning debate?

2016-07-28 Thread Dave Cheney
f behaviour for go get when a vendor > directory is detected and solve some of the issues related to type equality > (by having a single pkg path for a vendored package) ? > > > > On Friday, July 29, 2016 at 12:14:02 AM UTC+2, Dave Cheney wrote: >> >> Yes, exactly.

[go-nuts] Will too many cases in a select block affect program efficiency much?

2016-07-28 Thread Dave Cheney
How many case blocks are you considering? There is some setup cost that is linear with the number of selectable channels, but as a select stmt usually blocks the setup cost is not usually considered the limiting factor. -- You received this message because you are subscribed to the Google

[go-nuts] Re: What lead to the versionning debate?

2016-07-29 Thread Dave Cheney
How about a tag? which developers should be doing as part of any mature release process. -- 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] Best practice for sets in go?

2016-07-26 Thread Dave Cheney
If saving one byte per entry is important for your application, the latter is your choice. The former has nicer properties that you can use the single value form of map access, if m[key] { // found } I'd say the former is the right choice for 97.25% of general use cases. -- You received

Re: [go-nuts] Re: What lead to the versionning debate?

2016-07-29 Thread Dave Cheney
That documention is incorrect. The language spec assigns no meaning to the import path. The complier assigns the meaning that a compiled package must exists in a subdirectory with a name that matches the import part, plus .a, in a path provided by the -I flag. The go tool goes further to

[go-nuts] Re: return statement

2016-07-29 Thread Dave Cheney
*s++ is a statement, not an expression. You cannot write x := *s++ so you also cannot write return *s++ On Saturday, 30 July 2016 12:32:03 UTC+10, CH S Phani wrote: > > Hello All, > > The below statement does not compile in Go language. The compilation error > is "syntax error: unexpected ++

[go-nuts] Increase speed of repeated builds

2016-08-11 Thread Dave Cheney
Can you please post some details. -- 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] Re: Why doesn't std lib use the method in this article to make err variables constant?

2016-08-03 Thread Dave Cheney
Because we cannot change symbols covered by the Go 1 contract. On Thursday, 4 August 2016 14:20:18 UTC+10, T L wrote: > > http://dave.cheney.net/2016/04/07/constant-errors > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from

[go-nuts] Re: How to wait for specified amount of time in a loop without timer overhead

2016-08-04 Thread Dave Cheney
I think it would be cheaper to call time.Sleep than spinning on runtime.Gosched. -- 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: Data locality in large slices

2016-08-04 Thread Dave Cheney
I believe rsc once quipped "If it doesn't have to be correct, I can make [this code] very fast". I don't think you can make performance comparisons between two pieces of code if one is incorrect. -- You received this message because you are subscribed to the Google Groups "golang-nuts"

[go-nuts] How to wait for specified amount of time in a loop without timer overhead

2016-08-04 Thread Dave Cheney
If you're going to sleep, does it matter if time.Sleep has a cost? -- 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

[go-nuts] Re: Increase speed of repeated builds

2016-08-11 Thread Dave Cheney
You mentioned timing your build with -x, can you please provide those details. -- 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] Bug: gomobile on iOS 10 crashes after app is suspended+resumed

2016-08-14 Thread Dave Cheney
Please file a bug. -- 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

Re: [go-nuts] runtime.Caller ->

2016-08-14 Thread Dave Cheney
The autogenerated miranda method only happens if you are calling through an interface method that is provided by an embedded type. If you're doing something like func log(...) { pc := runtime.Callers(1) // get the caller of log } It shouldn't be a problem. On Monday, 15 August 2016

[go-nuts] Re: Increase speed of repeated builds

2016-08-12 Thread Dave Cheney
out > -L $WORK -L /Users/jp/git/project/pkg/darwin_amd64 -extld=clang > -buildmode=exe -buildid=66dc2ac41b6b8158286be8a6b59f302b6ff26b19 -X > main.CacheId=8d815e7 $WORK/site_www2.a > mkdir -p /Users/jp/git/project/bin/ > mv $WORK/site_www2/_obj/exe/a.out /Users/jp/git/projec

[go-nuts] context race

2016-08-13 Thread Dave Cheney
Receiving from a closed channel immediately returns the channel types zero value. -- 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: Understanding HTTP server latencies

2016-07-19 Thread Dave Cheney
Keep an eye on the ℅ steal column in vmstat to make sure you're getting all the CPU you are paying for. -- 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] Where can I get the documents explaining arguments of "go build" flags?

2016-07-20 Thread Dave Cheney
-gcflags are passed to go tool compile, -ldflags are passed to go tool link. -- 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] goimports has been updated

2016-07-15 Thread Dave Cheney
Why not put non go code in another directory tree? That seems much simpler. -- 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] TLS

2016-06-27 Thread Dave Cheney
If you want to make a connection to a server take speaks TLS, you can use https://godoc.org/crypto/tls#Dial If you want to make a connection to a web server that uses HTTPS, the net/http package does this automatically for you. If you can share some more details about what you are trying to

[go-nuts] calling file.Write() concurrently

2016-07-05 Thread Dave Cheney
Why do you want to avoid a mutex? -- 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] Re: A proposal for generic in go

2016-07-05 Thread Dave Cheney
Lol, Doug Cheney. -- 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

Re: [go-nuts] calling file.Write() concurrently

2016-07-05 Thread Dave Cheney
A better solution would be to compose a new Writer wrapping the existing one with a mutex. -- 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] New Context method in http.Request, what can we do with it?

2016-07-07 Thread Dave Cheney
1.7 will be released in August. You can try Go 1.7 today in beta form and I just say the first release candidate has been tagged and will be out in the next 24 hours. On Friday, 8 July 2016 13:30:00 UTC+10, jonathan...@gmail.com wrote: > > Anyone have an idea when 1.7 will be out? > > On

[go-nuts] Re: Channels not working

2016-08-05 Thread Dave Cheney
You could simplify your program by removing the go statement. There is no concurrency if one goroutine hands one piece work off to another then sleeps for the result; it's simpler to just do the work yourself. -- You received this message because you are subscribed to the Google Groups

[go-nuts] Re: Channels not working

2016-08-05 Thread Dave Cheney
Please check your errors. On Saturday, 6 August 2016 08:38:54 UTC+10, Jon Strauss wrote: > > Hello, > I have the following code: > > package main > > import "fmt" > import "encoding/hex" > import "os" > > func main() { >var bytes []byte >var channel chan []byte > >file,_

[go-nuts] Re: Go API checker

2016-08-05 Thread Dave Cheney
Add your change to this file https://github.com/golang/go/blob/master/api/except.txt On Saturday, 6 August 2016 02:37:33 UTC+10, stable.p...@gmail.com wrote: > > Hello, > > I have made some changes to a part of the go standard library. I am > testing these to see if they help me do what I need

[go-nuts] Re: Channels not working

2016-08-05 Thread Dave Cheney
Your program exits because the channel is buffered, so the main goroutine exits immediately once it has sent the value to the channel. Once the main goroutine returns, the program will exit. On Saturday, 6 August 2016 08:38:54 UTC+10, Jon Strauss wrote: > > Hello, > I have the following code: >

[go-nuts] Re: Go package management proposal process

2016-08-05 Thread Dave Cheney
Hello, I wish to nominate myself to be part of the working group. I have written up my position statement here: https://gist.github.com/davecheney/48c07d20f8cf38cce61c940d7bd55644 I am seeking a second for my nomination. Thank you Dave On Friday, 29 July 2016 17:46:01 UTC+10, Peter Bourgon

Re: [go-nuts] Why can't interface value be constant?

2016-08-06 Thread Dave Cheney
Because an interface is a run time data structure, it cannot contain constants because they don't exist at run time. On Saturday, 6 August 2016 19:14:26 UTC+10, T L wrote: > > > > On Saturday, August 6, 2016 at 3:58:52 PM UTC+8, Dave Cheney wrote: >> >> It is not possib

Re: [go-nuts] Why can't interface value be constant?

2016-08-06 Thread Dave Cheney
It is not possible. Constants only exist at compile time. -- 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] Why can't interface value be constant?

2016-08-06 Thread Dave Cheney
Interfaces don't describe data, they describe behaviour. If you don't want the behaviour to be changeable, use a concrete type. On Saturday, 6 August 2016 19:30:22 UTC+10, T L wrote: > > > > On Saturday, August 6, 2016 at 5:19:08 PM UTC+8, Dave Cheney wrote: >> >> Becau

Re: [go-nuts] Re: godoc question

2016-08-09 Thread Dave Cheney
This is not a Go 1.7 regression, so not a blocker on the 1.7 final release next week. On Tuesday, 9 August 2016 18:45:02 UTC+10, ksug wrote: > > Thanks Dave. Could you clarify what you mean by "This is not a 1.7 > blocker"? > -- You received this message because you are subscribed to the

[go-nuts] Re: godoc question

2016-08-09 Thread Dave Cheney
Looks like a bug in godoc.org (and maybe godoc). This is not a 1.7 blocker, in code the constant is untyped. On Tuesday, 9 August 2016 16:41:19 UTC+10, ksug wrote: > > Hi all, > > Package github.com/hashicorp/raft contains the following block of code: > > > = > const ( >

[go-nuts] Re: memory allocations in net-related modules

2016-08-02 Thread Dave Cheney
You cannot, the address of sa escapes to the heap because it is returned to the caller. The solution may be to refactor the method to take a *syscall.SockaddrInet4 that was allocated in the caller, but that is not something that can be done as a consumer of the net package. On Tuesday, 2

[go-nuts] Re: Dynamic type cloning

2016-08-02 Thread Dave Cheney
TL;DR a shallow copy is easy, but it's almost never what you want. https://play.golang.org/p/wpWN3Znop8 Needing to copy an arbitrary value is usually an anti pattern as values can contain references to other values, which contain references to other values, which contain references to other

[go-nuts] Data locality in large slices

2016-08-03 Thread Dave Cheney
You need to use the values to ensure that compiler does not remove the code. Even if the compiler does not do this, your Intel CPU will, if effectively runs an ssa implementation in hardware and will spot the dead stores and skip the load. -- You received this message because you are

[go-nuts] Re: Data locality in large slices

2016-08-03 Thread Dave Cheney
Those arguments must live beyond the scope of the enclosing function. -- 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.

[go-nuts] Re: files, readers, byte arrays (slices?), byte buffers and http.requests

2016-07-02 Thread Dave Cheney
The hash is always the same because you ask for the hash value before writing any data through it with io.Copy. -- 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: Discussion on "Vendoring edge case, critical problem"

2016-06-20 Thread Dave Cheney
to the end user of the vendoring pkg. > I think any solution that meant code behaved differently depending on where it was on disk during compilation should be looked at with deep suspicion. > > On Sunday, June 19, 2016 at 10:52:34 PM UTC+2, Dave Cheney wrote: >> >> If

[go-nuts] Trivial file server responds with "Moved Permanently"?

2016-08-16 Thread Dave Cheney
Where does the 301 point? -- 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

Re: [go-nuts] Go 1.7 is released

2016-08-16 Thread Dave Cheney
Stripping go binaries is not tested and known to produce broken binaries. I recommend not doing this until strip/upx/whatever are tested as part of the unit tests which are run before each commit lands. -- You received this message because you are subscribed to the Google Groups "golang-nuts"

Re: [go-nuts] Go 1.7 is released

2016-08-16 Thread Dave Cheney
Until it's part of the ./all.bash test suite, it'll continue to break because it has never been proven to work. > On 17 Aug 2016, at 05:13, Michael Hudson-Doyle <michael.hud...@canonical.com> > wrote: > >> On 17 August 2016 at 08:31, Dave Cheney <d...@cheney.net

[go-nuts] Re: Migrating from a classic OO pattern

2017-02-01 Thread Dave Cheney
Superb advice, seconded. -- 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] Add section about use of underscores in file names to Go Code Review Comments

2017-02-01 Thread Dave Cheney
I think both are symptomatic of following a Javaesq style of one type per file. -- 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: Change to https://golang.org/doc/install

2017-02-03 Thread Dave Cheney
If you read the git history of the installation page you'll see we've pushed the GOROOT instruction lower and lower in the page. However the advice to set GOROOT has permeated to the Go zeitgeist and continues to be promulgated in tutorials and blog posts. On Saturday, 4 February 2017 00:26:46

[go-nuts] Re: Heap fragmentation: HeapProfile reported memory vs Memstats.HeapInUse

2017-02-01 Thread Dave Cheney
CYuvbGA > > GCtrace: > http://pastebin.com/M7VpehUE > > Please find the attached heap profile svg as well. > > The process RSS ~ 36G > > -- > Thanks, > Sarath > > On Thursday, February 2, 2017 at 1:36:25 AM UTC+5:30, Dave Cheney wrote: >> >> Can you please

Re: [go-nuts] Re: is it possible to speed up type assertion?

2017-02-02 Thread Dave Cheney
0.44ns/op is about 2.2.ghz, the compiler has optimised away your microbenchmark. -- 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] $GOPTAH/bin and $PATH

2017-02-02 Thread Dave Cheney
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.

[go-nuts] Re: troubleshooting 100% cpu peg - runtime._ExternalCode ?

2017-02-06 Thread Dave Cheney
> Since there is nothing that changes in the processes over time, the fact that it kicks in after a few minutes makes me think it may be a garbage collection issue. Running with GODEBUG=gctrace=1 will confirm / deny this hypothesis. On Tuesday, 7 February 2017 16:06:09 UTC+11, Jason E. Aten

[go-nuts] Re: troubleshooting 100% cpu peg - runtime._ExternalCode ?

2017-02-06 Thread Dave Cheney
I think there are more data races in your product http://paste.ubuntu.com/23946008/ On Tuesday, 7 February 2017 16:42:28 UTC+11, Jason E. Aten wrote: > > the race is fixed in the latest push; > a572f570c52f70c9518bc1b3e3319ff9e2424885; it was an artifact of adding > logging levels, and would

[go-nuts] Re: troubleshooting 100% cpu peg - runtime._ExternalCode ?

2017-02-06 Thread Dave Cheney
None whatsoever I'm afraid On Tuesday, 7 February 2017 16:53:45 UTC+11, Jason E. Aten wrote: > > > On Monday, February 6, 2017 at 11:49:42 PM UTC-6, Dave Cheney wrote: > >> The give away is the frequency of the gc lines. gc 15 (the 15th gc event) >> happened at 1314 se

[go-nuts] Re: troubleshooting 100% cpu peg - runtime._ExternalCode ?

2017-02-06 Thread Dave Cheney
> did manage to catch the processing running away again, this time at 300%, and I got some output with gctrace=1 as you suggested. I'm not sure how to read the lines though; could you advise Dave? The give away is the frequency of the gc lines. gc 15 (the 15th gc event) happened at 1314

[go-nuts] storing transaction in context

2017-02-06 Thread Dave Cheney
I'd say store that context in your transaction value, not the other way around. -- 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: Are external test packages recommended?

2017-02-04 Thread Dave Cheney
On Sunday, 5 February 2017 15:39:55 UTC+11, so.q...@gmail.com wrote: > I generally favor "external test packages", that is having "_test" as a > suffix to my test package names. > For example, "package foo" (foo.go) would have a test file (foo_test.go) > named "package foo_test" > > > I do so

[go-nuts] Re: storing transaction in context

2017-02-07 Thread Dave Cheney
I guess it depends on how long your transaction lasts for; it doesn't sound like it lives for that long. IMO the advice about storing contexts in other objects is more about "don't put this into a long lived object", like your server's main loop or something. On Wednesday, 8 February 2017

[go-nuts] Re: how to get a pprof cpu profile written to disk?

2017-02-07 Thread Dave Cheney
^C will exit the program before the defer in your main can run. I recommend using my profiling package, github.com/pkg/profile https://dave.cheney.net/2014/10/22/simple-profiling-package-moved-updated On Wednesday, 8 February 2017 08:55:33 UTC+11, Jason E. Aten wrote: > > How does one reliably

[go-nuts] Re: how to get a pprof cpu profile written to disk?

2017-02-07 Thread Dave Cheney
net/http/pprof is your best option If you can't make that fly, then you can use my profile package; just keep a reference to the value returned from profile.Start() and call its Stop method to write out the profile On Wednesday, 8 February 2017 09:03:30 UTC+11, Jason E. Aten wrote: > >

Re: [go-nuts] Re: troubleshooting 100% cpu peg - runtime._ExternalCode ?

2017-02-07 Thread Dave Cheney
You mentioned that this was reproducible with 1.7.x. it might be worth sticking to that version to avoid having to concurrently debug this external code issue. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and

[go-nuts] RE: Go package/version management, vendoring, dep, gb, etc...

2017-02-05 Thread Dave Cheney
If your code has a dependency on github.com/pkg/log then place the contents of that repository into $PROJECT/vendor/src/github.com/pkg/log Where $PROJECT is the root of your gb project. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To

[go-nuts] Re: Go package/version management, vendoring, dep, gb, etc...

2017-02-05 Thread Dave Cheney
. Since I will be using the packages to build an app, I need to > make sure the builds are reproducible. ☺ > > I had a very helpful email exchange with Dave Cheney, and he suggested gb > + semver. With the current lack of convergence on go package > versioning/dependency manage

[go-nuts] Re: Heap fragmentation: HeapProfile reported memory vs Memstats.HeapInUse

2017-02-01 Thread Dave Cheney
Can you please run your program with GODEBUG=1 and paste the output. btw, which version of Go and which OS? On Thursday, 2 February 2017 02:26:45 UTC+11, Sarath Lakshman wrote: > > I have tried waiting long enough for the process to release memory back to > OS as well as debug.FreeOSMemory(). >

Re: [go-nuts] Re: Tracking down logic lock

2017-01-26 Thread Dave Cheney
Start with the basics like go vet which will spot a lock being copied by value. Then check for each place you call Lock, there is a defer statement on th next line. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group

[go-nuts] Re: I know finalizers are not promised to be called, but is it too not promised?

2017-01-28 Thread Dave Cheney
On Sunday, 29 January 2017 01:42:08 UTC+11, T L wrote: > > > > On Saturday, January 28, 2017 at 10:33:08 PM UTC+8, Dave Cheney wrote: >> >> >> >> On Sunday, 29 January 2017 01:25:20 UTC+11, T L wrote: >>> >>> >>> >>

[go-nuts] Re: I know finalizers are not promised to be called, but is it too not promised?

2017-01-28 Thread Dave Cheney
On Sunday, 29 January 2017 01:25:20 UTC+11, T L wrote: > > > > On Saturday, January 28, 2017 at 9:33:51 PM UTC+8, C Banning wrote: >> >> From the doc: "The finalizer for obj is scheduled to run at some >> arbitrary time after obj becomes unreachable. There is no guarantee that >> finalizers

Re: [go-nuts] Re: I know finalizers are not promised to be called, but is it too not promised?

2017-01-28 Thread Dave Cheney
If you find a piece of code that uses a finaliser for the correct operation of that program, that code is broken. -- 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] Re: building go1.7.5 ... api check failed

2017-01-28 Thread Dave Cheney
Do you have GOROOT set? This error can occur when GOROOT is set incorrectly. On Sunday, 29 January 2017 03:06:18 UTC+11, gocss wrote: > > building in xubuntu 16.04 LTS > > # API check > stat /csspc/etc/go/src/cmd/api/run.go: no such file or directory > 2017/01/28 10:51:46 Failed: exit status

RE: [go-nuts] Is Go too strict for nesting function callings?

2017-01-25 Thread Dave Cheney
I think you're talking about a different example to TL. -- 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] Is Go too strict for nesting function callings?

2017-01-25 Thread Dave Cheney
It was just a turn of phrase, it's not a real rule. -- 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,

RE: [go-nuts] Is Go too strict for nesting function callings?

2017-01-25 Thread Dave Cheney
I see it that the g(f()) special case is just that,a special case, added to make common use case less tedious. It's not an invitation to extend its rubbery semantics to all classes of function call. -- You received this message because you are subscribed to the Google Groups "golang-nuts"

Re: [go-nuts] Is Go too strict for nesting function callings?

2017-01-25 Thread Dave Cheney
I think you misunderstand. The exception is this form func f() (int, boo) func g1(int, bool) g1(f()) Not this form func g2(int, int, bool) g2(1, f()) The exception is the former form which is a special case for convenience. This special case creates confusion when people try the second

Re: [go-nuts] Re: Tracking down logic lock

2017-01-26 Thread Dave Cheney
Pro tip: optimise for correctness before performance. -- 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

[go-nuts] Is Go too strict for nesting function callings?

2017-01-25 Thread Dave Cheney
The confusion comes, like most cases in go, where a little syntactic sugar has been added to make the common case more appealing, but has the side effect of making the less common case more jarring. g1(f()) Is th exception to the rule. By _not_ requiring the caller to capture each value

[go-nuts] Re: building go1.7.5 ... api check failed

2017-01-28 Thread Dave Cheney
You must not set GOROOT when building from source. It is not necessary and will lead to confusing error messages if you at GOROOT -- 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,

[go-nuts] Re: Go UDP performance

2017-02-20 Thread Dave Cheney
Can you share some more details 1. which version of Go 2. which operating system 3. where are you sending from / to, is it over localhost, does the other side care about acknowledging receipt 4. can you show your code 5. have you profiled your code? What resource is limiting the throughput of

[go-nuts] Panic when highly concurrent MySQL queries

2017-02-16 Thread Dave Cheney
Can you share that code, it looks like you haven't checked the error from the previous call. -- 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] Expressing test dependence

2017-02-24 Thread Dave Cheney
Within the testing package you choice is t.Skip and some set of package level variables. Maybe the more involved testing frameworks like convoy or gocheck offer more final version of t.Fatal. However, from the situation you've presented it feels to me that your solving the wrong problem. If

Re: [go-nuts] How to Build and Install Go 1.7.4 in OpenBSD 5.9

2017-02-20 Thread Dave Cheney
It looks like one test in the os/exec package failed during the tests which are run during ./all.bash --- FAIL: TestStdinCloseRace (0.04s) exec_test.go:267: Kill: os: process already finished FAIL FAILos/exec 0.371s At this point Go is fully built, so you may wish to ignore this

Re: [go-nuts] Re: Struggling with working directory

2017-02-13 Thread Dave Cheney
Those instructions are wrong, I've written to the author and asked them to remove the incorrect information. Please follow the installation instructions on the golang.org website, they are well tested and known to work well. https://golang.org/doc/install On Tuesday, 14 February 2017 09:07:54

[go-nuts] about the memclr optimization

2017-02-10 Thread Dave Cheney
It's neither, its undefined. -- 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] Are the tests in the Go source code considered "Unit" tests?

2017-02-14 Thread Dave Cheney
I consider the testing package ideal for unit tests, acceptable for functional tests and out of its depth for integration testing. You can do it, but you end up writing a lot of scaffolding, see the cmd/go tests. -- You received this message because you are subscribed to the Google Groups

[go-nuts] 2016 Go User Survey results

2017-02-12 Thread Dave Cheney
I raised https://github.com/golang/go/issues/19050 to track this. -- 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

Re: [go-nuts] [Proposal] Std Lib Logging Abstraction

2017-02-13 Thread Dave Cheney
There is an active discussion thread over on the development list -> https://groups.google.com/forum/#!topic/golang-dev/F3l9Iz1JX4g -- 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

[go-nuts] Re: Compressing 2.5 GB data trims files

2017-02-15 Thread Dave Cheney
Or use https://godoc.org/io/ioutil#ReadFile By really you don't need to buffer all the data in memory, io.Copy will do that for you in, err := os.Open(input) check(err) defer in.Close() out, err := os.Create(output) gz := gzip.New.Writer(out) _, err = io.Copy(gz, in) check(err) err = gz.Close()

[go-nuts] Re: Can't find textflag.h in Fedora 25 when getting gonum/floats

2017-01-19 Thread Dave Cheney
It looks like you've install gccgo, not go (sometimes called golang-go by operating system vendors). If you uninstall gccgo and install Go from the website, https://golang.org/dl/, it should work fine. On Thursday, 19 January 2017 22:03:10 UTC+11, Alessandro Re wrote: > > Hello, > few months

[go-nuts] Re: exec.Command("cp", "-r", "./*.json", artifact.dir fails with exit status 1

2017-01-16 Thread Dave Cheney
The problem is expanding shell meta characters like *, ? and ~ is a property of the _shell_, as Dan mentioned above. You are executing a command directly so the shell is not involved and cannot expand *.json into a list of files ending with .json. A cheap solution to this might be something

[go-nuts] go ssh package packet lenght too large

2017-01-19 Thread Dave Cheney
While I appreciate you writing this in Go, wouldn't this scripting be better done in shell? What's likely happening is the SSH server on your device only supports older insecure algorithms, which ironically are more common amongst security hardware. -- You received this message because you

[go-nuts] Re: Increase speed of repeated builds

2016-08-15 Thread Dave Cheney
That looks like the case. Do you include a large amount of static data in the site_www2 package? -- 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

  1   2   3   4   5   6   7   >