[go-nuts] Generating proto from go

2016-08-01 Thread Sankar
Hi I have a Golang server with a bunch of structs. The server was serving data over JSON happily till now. Suddenly, there is a need for using proto. Is there a way to automatically generate a .proto file given a set of golang structs ? Some structs contain arrays of instances of some of these

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

2016-08-01 Thread Lucio
On Saturday, 30 July 2016 02:52:25 UTC+2, Matt Harden wrote: > > I like submodules, but they do only work when you're using git and only > vendoring projects that also use git. > > >> >> It seems to me that the solution is staring us in the face. I know nothing about git submodules, but they ha

[go-nuts] Go 1.7 Release Candidate 4 is released

2016-08-01 Thread Chris Broadfoot
Hello gophers, We have just released go1.7rc4, a release candidate for Go 1.7. It is cut from release-branch.go1.7 at the revision tagged go1.7rc4. 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 ca

[go-nuts] Re: json murshal/unmarhsal struct that was got using custom interface type

2016-08-01 Thread Viacheslav Biriukov
Hi Nathan, Thank you for reply. Yes I thought about this approach. But it looks a little ugly. Every time you add new struct that can be used – you should don't forget to update switch. But it seems that there is no other way. Thank you! On Monday, 1 August 2016 22:09:57 UTC+3, nathan@do

Re: [go-nuts] GC direct bitmap allocation and Intel Cache Allocation Technology

2016-08-01 Thread Jesper Louis Andersen
On Sun, Jul 31, 2016 at 11:47 AM, EduRam wrote: > It appears it will be possible to allocate partial CPU L3 cache to > processes. If I remember correctly, the original idea for the CAT technology was to have "cache smashing" workloads on the same machines as other workloads. The problem is that

Re: [go-nuts] Using golang/cmd/pprof/internal in a Go program, and/or UNIX socket support in `go tool pprof`?

2016-08-01 Thread 'Nathan LeClaire' via golang-nuts
Hey Brad! Yes, end users. Generally, we can't make assumptions about what they have installed locally (e.g. Go toolchain) and I would like to provide a way for folks to "click a button" and get a fully symbolized profile to send to us. Doing this inside of an existing Go program would be ideal.

[go-nuts] Re: json murshal/unmarhsal struct that was got using custom interface type

2016-08-01 Thread nathan.leclaire via golang-nuts
Viacheslav, Your best bet here in my opinion is to have an intermediate object that contains type information which you Unmarshal into first to get the concrete type. Then, you have a switch to Unmarshal the remainder of the object into the real deal. We did a similar mechanic to this on Dock

Re: [go-nuts] Using golang/cmd/pprof/internal in a Go program, and/or UNIX socket support in `go tool pprof`?

2016-08-01 Thread 'Nathan LeClaire' via golang-nuts
Oh, interesting call out. Thanks Brad. For some reason I assumed pprof was a more general-purpose tool written in C++. Forget where I may have read that. On Mon, Aug 1, 2016 at 10:14 AM, Brad Fitzpatrick wrote: > Note that Go's "go tool pprof" is basically just > https://github.com/google/ppr

Re: [go-nuts] Using golang/cmd/pprof/internal in a Go program, and/or UNIX socket support in `go tool pprof`?

2016-08-01 Thread Brad Fitzpatrick
It used to be. It was rewritten in Go. On Mon, Aug 1, 2016 at 10:44 AM, Nathan LeClaire wrote: > Oh, interesting call out. Thanks Brad. For some reason I assumed pprof > was a more general-purpose tool written in C++. Forget where I may have > read that. > > On Mon, Aug 1, 2016 at 10:14 AM,

[go-nuts] const values of any types can't be compared to interface{} values?

2016-08-01 Thread T L
ex: package main > > func main() { > // error: illegal constant expression: *int == interface {} > _ = (*int)(nil) == interface{}(nil) > } > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiv

Re: [go-nuts] Using golang/cmd/pprof/internal in a Go program, and/or UNIX socket support in `go tool pprof`?

2016-08-01 Thread Brad Fitzpatrick
Note that Go's "go tool pprof" is basically just https://github.com/google/pprof You can vendor that into the Docker daemon and have the server profile itself and send the all-in-one output over the unix socket to the docker command line tool, which users can then run and file a bug report with th

[go-nuts] json murshal/unmarhsal struct that was got using custom interface type

2016-08-01 Thread Viacheslav Biriukov
Hi, I want to marshal/unmarshal object for saving in key/value storage. The question is: if I got this object using function, that accepts interface type, lets say for example: base.Pricer. And there are more than one type struct that satisfy this interface. I know while marshaling what type

[go-nuts] const values of any types can't be compared to interface{} values?

2016-08-01 Thread T L
ex: package main > > func main() { > // error: illegal constant expression: *int == interface {} > _ = (*int)(nil) == interface{}(nil) > } > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiv

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

2016-08-01 Thread Sam Vilain
On 7/29/16 5:51 PM, Matt Harden wrote: > I like submodules, but they do only work when you're using git and > only vendoring projects that also use git. Or vendoring any dependency which can be mirrored to git, which is essentially all of them. Sam -- You received this message because you are s

[go-nuts] Re: GC direct bitmap allocation and Intel Cache Allocation Technology

2016-08-01 Thread rlh
Thanks for pointing this out. While it isn't clear how this is applicable to the sweep free alloc work it does seem relevant to the mark worker's heap tracing which can charitable be described as a cache smashing machine. The mark worker, loads an object from a random location in memory, sca

Re: [go-nuts] Re: How Go GC perform with 128GB+ heap

2016-08-01 Thread Jesper Louis Andersen
On Mon, Aug 1, 2016 at 6:38 AM, 'Sugu Sougoumarane' via golang-nuts < golang-nuts@googlegroups.com> wrote: > Instead, if you ran something like 10x instances of the same program, > you'll end up using the same resources, but will get much better > performance, and your code will be much simpler.

Re: [go-nuts] How Go GC perform with 128GB+ heap

2016-08-01 Thread Jesper Louis Andersen
On Sun, Jul 31, 2016 at 5:31 AM, wrote: > It's a new area to me, store tons of GB in a GC language. Set up an SLA for the service: * 99th percentile: 99 of 100 requests are under 5ms processing time. * 99.99th percentile: of 10.000 requests are under 25ms processing time. * 99.th per

[go-nuts] Re: How Go GC perform with 128GB+ heap

2016-08-01 Thread rlh
I think the high bit here is that the Go community is very aggressive about GC latency. Go has large users with large heaps, lots of goroutines, and SLOs similar to those being discussed here. When they run into GC related latency problems the Go team works with them to root cause and address t

[go-nuts] Re: html/template function not defined

2016-08-01 Thread Matt Silverlock
Where is the code for parsing your templates and apply the FuncMap? On Saturday, July 30, 2016 at 7:05:39 AM UTC-7, alex.b...@leadinglocally.com wrote: > > > Since, I have made 2 more float-to-int functions and they work fine. > > To solve this I'm having to pre-marshal my json before I execute t

Re: [go-nuts] How Go GC perform with 128GB+ heap

2016-08-01 Thread Chris Randles
Consul and etcd use Boltdb (https://github.com/boltdb/bolt) which uses an mmap-ed 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 golang-nuts+unsubscr...@g

[go-nuts] gomobile installation problem

2016-08-01 Thread Dave Cheney
Something is interfering with your computer accessing that URL. Probably a proxy, anti virus, or wifi captive portal. -- 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] gomobile installation problem

2016-08-01 Thread vejdani . shojae
Hi all dears I'm beginner in golang and i interested to install gomobile and test it. unfortunately when i going to install gomobile using: "go get golang.org/x/mobile/cmd/gomobile" it broken and give this error massage: package golang.org/x/mobile/cmd/gomobile: unrecognized import path " golan

Re: [go-nuts] How Go GC perform with 128GB+ heap

2016-08-01 Thread almeida . pedro . pf
Tested some offheap implementations, bigcache (https://github.com/allegro/bigcache) has a bench inside the project. Running on my bride veryy old i5 notebook, this is the results with GODEBUG=gctrace=1: https://gist.github.com/anonymous/53dfb936e32a4755b7cb3a6695f66548 The test allocate some

Re: [go-nuts] Re: How Go GC perform with 128GB+ heap

2016-08-01 Thread Michael Jones
The nature of the cache is very important. It is easy to create and manage your own memory arena if that is a comfortable solution. (As in, do you want/need full Go GC generality in the cache contents? If so, the Go overhead may be best for that task--it is very good--but if not, say 100M 1k byte s

[go-nuts] Re: howto kill pipe process using gopkg.in/pipe.v2

2016-08-01 Thread Walter Garcia
Wow men, excellent your job. I will try to test, is very clean your example. I will post my example when finish the test. 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

Re: [go-nuts] Re: How Go GC perform with 128GB+ heap

2016-08-01 Thread Peter Herth
If you can perform your task with 10 independent processes, it means that they are not competing for the same resource, and consequently, it should run as well, if run within the same process. It all depends whether there are critical paths where a common resource needs to be locked. And a program

[go-nuts] How Go GC perform with 128GB+ heap

2016-08-01 Thread Henry
The best way is to create a prototype, mock your worst situation, and measure it. -- 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...@google