[go-nuts] Re: Crash after sending thousands of http requests (go version go1.8.3 windows/amd64)

2017-06-05 Thread brainman
> Exception 0xc005 0x0 0x 0x7ffbea7bc8eb > PC=0x7ffbea7bc8ebx > > syscall.Syscall6(0x7ffbea7b8a80, 0x4, 0x4, 0x1138ad0, 0xc04223d3d0, > 0xc04223d3e0, 0x0, 0x0, 0xc0422f1a00, 0x30002, ...) > C:/Go/src/runtime/syscall_windows.go:174 +0x6b >

[go-nuts] Re: filago: Monitor a Linux process' opening and closing of files, including Unix pipes and sockets

2017-06-05 Thread Glen Newton
The functionality filago provides can be implemented with truss or strace. filago offers a simpler (to many) way of getting to this information, and can provide it in json as well. Thanks, Glen On Monday, June 5, 2017 at 3:25:20 PM UTC-4, Simon Ritchie wrote: > > Does this have some

Re: [go-nuts] Scheduler time profiling

2017-06-05 Thread Ian Lance Taylor
On Mon, Jun 5, 2017 at 4:24 PM, wrote: > > Hi golang-nuts. I am trying to profile the runtime environment scheduler > proc.go and have few questions. > > 1) I was wondering if the pprof profiler is good for profiling the runtime > environment or would my numbers be skewed

[go-nuts] Re: filago: Monitor a Linux process' opening and closing of files, including Unix pipes and sockets

2017-06-05 Thread Glen Newton
Sorry about that: link to github: https://github.com/gnewton/filago Thanks, Glen On Friday, June 2, 2017 at 11:56:34 PM UTC-4, Glen Newton wrote: > > Monitor open files (via /proc/pid) of a process. Lists time when it first > sees the file open (which may be later than when the file actually

[go-nuts] Scheduler time profiling

2017-06-05 Thread akashina
Hi golang-nuts. I am trying to profile the runtime environment scheduler proc.go and have few questions. 1) I was wondering if the pprof profiler is good for profiling the runtime environment or would my numbers be skewed due to the overhead of pprof? 2) regarding the GODEBUG. Till what

[go-nuts] Re: Is there any golang package available for building mongodb query from plain logic expression string or URL?

2017-06-05 Thread Ray Yang
Thanks for letting me know that "left-pad" thing. I didn't know it before you mentioned it here. Parsing a URL string and constructing a BSON object are easy if the criteria is like this: A.B="foo" AND C.D=true However, if the query is like this, I'm not sure if it still can be done

[go-nuts] how to interpret debug/pprof/heap

2017-06-05 Thread Steven Roth
Hi, folks, I'm trying to track down a memory leak in a web server application, and I'm having a hard time making sense of the output of the heap dumps emitted by the net/http/pprof handlers. One of the dumps starts with: heap profile: 5: 192080 [47408: 90679856] @ heap/1048576 1: 155648 [1:

[go-nuts] Is there any golang package available for building mongodb query from plain logic expression string or URL?

2017-06-05 Thread DV
This seems pretty trivial, tbh. You just parse the URL query string and construct a JSON doc out of it? Go's philosophy in general is that it's better to just write the code yourself sometimes, even multiple times, than to pull in a dependency. Especially for something like this. Do you

[go-nuts] Re: In-memory secondary index

2017-06-05 Thread Dragos Harabor
Something like this? https://github.com/hashicorp/go-memdb Though it may have more features than you need. Or features that you don't yet know you want :-) On Monday, June 5, 2017 at 3:28:33 AM UTC-7, James Pettyjohn wrote: > > I'm loading a set of structs in memory and will be frequently using

[go-nuts] Re: Confusing type rules

2017-06-05 Thread conrad via golang-nuts
Thanks both! On Saturday, June 3, 2017 at 5:22:20 PM UTC-7, Xio Fen wrote: > > To answer the first point - the keyword is "*assignable*" here - an slice > []int{1,23} is not assignable to a slice []I where I is a type of int. See > https://golang.org/ref/spec#Assignability > > ( also golang

[go-nuts] Re: Copy map with empty interfaces

2017-06-05 Thread Egon
On Monday, 5 June 2017 18:11:00 UTC+3, Chun Zhang wrote: > > Unfortunately it does not give any info. :( > Can you upload the code somewhere? Other ideas: 1. set environment variable GODEBUG to cgocheck=2 2. try valgrind - maybe it picks something up (not sure how well it works) 3. try

[go-nuts] filago: Monitor a Linux process' opening and closing of files, including Unix pipes and sockets

2017-06-05 Thread Simon Ritchie
Does this have some advantage over truss (or under Linux, strace)? -- 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] {CGO,VM}-free SQLite (ATM Linux/Intel only, pre-alpha)

2017-06-05 Thread Jan Mercl
https://github.com/cznic/sqlite -- -j -- 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: go get in parallel

2017-06-05 Thread mhhcbon
hi, in immediate terms, assuming you have something like go get a go get b go get c Can this https://github.com/mh-cbon/cct#usage be of help ? I did not tested, but it should be, cct -add -timeout 20 go get a cct -a 1 go get b ... cct -wait 1 I m sorry it looks likes i have not implemented

Re: [go-nuts] go get in parallel

2017-06-05 Thread Ian Lance Taylor
On Mon, Jun 5, 2017 at 8:14 AM, wrote: > > I've got a few jenkins jobs that end up doing quite a lot of go-getting as > part of a clean build process. I find the slowest bit of the whole process > is go get sequentially resolving/downloading everything. Would making this >

[go-nuts] Crash after sending thousands of http requests (go version go1.8.3 windows/amd64)

2017-06-05 Thread Cheyi Lin
Hi, I’m writing a http poller that send concurrent HTTP requests to retrieve the monitoring data, put the results into a queue then consume them by several workers that send HTTP requests to our log aggregators. At the beginning everything works well, about 9 hours later the program crashes and

[go-nuts] Re: Golang, SQL and ORM avoidance techniques

2017-06-05 Thread Ren Thraysk
Wrote something similar recently. One difference is that I moved the rows.Scan call into the passed in function. type Scannable interface { Scan(...interface{}) error } func scanIntoUser(u *store.User) func(s Scannable) error { return func(s Scannable) error { return s.Scan(, , , ) } }

[go-nuts] go get in parallel

2017-06-05 Thread david
Hi All, I've got a few jenkins jobs that end up doing quite a lot of go-getting as part of a clean build process. I find the slowest bit of the whole process is go get sequentially resolving/downloading everything. Would making this parallel be doable? Would it be desirable? Am I doing

[go-nuts] Re: Copy map with empty interfaces

2017-06-05 Thread Tamás Gulácsi
Can you simplify it with map[string]interface{}? Otherwise, the error indicates impedance mismatch between C++ and Go. This is hard to debug - put printf everywhere, print the allocated/freed/sent/received pointers (%p), and _reduce_ the program line-by-line, till the error vanishes. -- You

[go-nuts] Re: Copy map with empty interfaces

2017-06-05 Thread Chun Zhang
Hi, Tamas, Thanks for the reply! The key is a string for my current use. After the data v is retrieved, it is compared with a new data coming from the wire. And then based on the comparison, the new data, which is a newly created piece of memory contains same type of data, will be sent to a

[go-nuts] Re: idea: generic methods on slices with some generic type support []string.Map(string) []string => [].Map() []

2017-06-05 Thread Egon
On Monday, 5 June 2017 16:26:25 UTC+3, utyug...@mail.com wrote: > > I gave you a simple problem, don't over think it. A Set data structure > with a simple api that can work out-of-the-box - just as slices and maps > with the builtins. I kept the requirements minimal. I'd like to see your >

[go-nuts] Re: idea: generic methods on slices with some generic type support []string.Map(string) []string => [].Map() []

2017-06-05 Thread mhhcbon
On Sunday, June 4, 2017 at 6:25:17 PM UTC+2, Egon wrote: > > I think you are missing the point of my comment. > > I'm all for generics, but I also can survive without them without much of > a problem. (I'm even maintaining >

[go-nuts] Re: idea: generic methods on slices with some generic type support []string.Map(string) []string => [].Map() []

2017-06-05 Thread mhhcbon
as anyway the thread has completely derived, its the right place to put about that. I recently read about stanford choosing to use JS over Java for some its courses. https://www.theregister.co.uk/2017/04/24/stanford_tests_javascript_in_place_of_java/ I can t understand. If a beginner ask me

[go-nuts] Re: idea: generic methods on slices with some generic type support []string.Map(string) []string => [].Map() []

2017-06-05 Thread mhhcbon
I want to emphases that go generate is so far an awesome solution, but not a definitive answer. Yes, it could made easier, about that, its already great that all the tools we need are written in go itself, this is really really really helpful. On Monday, June 5, 2017 at 5:59:46 AM UTC+2,

[go-nuts] Re: Need some help on my basic "Backup size" calculator

2017-06-05 Thread Egon
See filepath.Walk (https://golang.org/pkg/path/filepath/#Walk) If you wish to recurse with ioutil.ReadDir or File.Readdir (https://golang.org/pkg/os/#File.Readdir), you have to do it manually. Nested structs -- it depends what you are doing. I would simplify it to: type Stat struct {