Re: [go-nuts] Modern Garbage Collection Article

2016-12-19 Thread andrey mirtchovski
My apologies to the original author, but the "state of the art" of modern garbage collectors is not acceptable if it means this: "To run dex in process, the Gradle daemon needs a larger heap. It currently has 1024 MB. For faster builds, increase the maximum heap size for the Gradle

Re: [go-nuts] Modern Garbage Collection Article

2016-12-19 Thread Konstantin Khomoutov
On Mon, 19 Dec 2016 20:56:39 -0800 (PST) Tyler Compton wrote: > https://medium.com/@octskyward/modern-garbage-collection-911ef4f8bd8e#.c48w4ifa7 > > Thoughts? How accurate is this article? If it is, why, historically, > is the work being done on the GC so concentrated on

Re: [go-nuts] Modern Garbage Collection Article

2016-12-19 Thread Tyler Compton
Thank you for your input! > Throwing more cores at the problem is a sensible approach on modern hardware. Since the cores are no longer getting faster, making your code run faster on a single core is not the optimal design for the hardware of the near future. I had not considered increasing

[go-nuts] Re: Modern Garbage Collection Article

2016-12-19 Thread Dave Cheney
> If it is, why, historically, is the work being done on the GC so concentrated on pause times? Predictable latency is good for servers. On Tuesday, 20 December 2016 15:56:39 UTC+11, Tyler Compton wrote: > > > https://medium.com/@octskyward/modern-garbage-collection-911ef4f8bd8e#.c48w4ifa7 > >

Re: [go-nuts] Modern Garbage Collection Article

2016-12-19 Thread Ian Lance Taylor
On Mon, Dec 19, 2016 at 8:56 PM, Tyler Compton wrote: > https://medium.com/@octskyward/modern-garbage-collection-911ef4f8bd8e#.c48w4ifa7 > > Thoughts? How accurate is this article? If it is, why, historically, is the > work being done on the GC so concentrated on pause times?

[go-nuts] Modern Garbage Collection Article

2016-12-19 Thread Tyler Compton
https://medium.com/@octskyward/modern-garbage-collection-911ef4f8bd8e#.c48w4ifa7 Thoughts? How accurate is this article? If it is, why, historically, is the work being done on the GC so concentrated on pause times? For more discussion:

[go-nuts] Re: How has your company adopted Go ?

2016-12-19 Thread Diego Medina
In our case, our original product was a web app, written in Scala, as our data starting growing, we had to move from real time queries to our database plus some data manipulation to precalculating/storing the data in a ready to server manner. This worked well for a while, but eventually our

Re: [go-nuts] How can i sort array inside struct

2016-12-19 Thread sergien . evgeny
Thanks a lot! I've tried pass pointers, but i forgot to pass & in Sort method. вторник, 20 декабря 2016 г., 0:24:14 UTC+5 пользователь Jan Mercl написал: > > > On Mon, Dec 19, 2016 at 8:16 PM > wrote: > > > This code does not do anything. > > The code does sort the array.

Re: [go-nuts] How can i sort array inside struct

2016-12-19 Thread Jan Mercl
On Mon, Dec 19, 2016 at 8:16 PM wrote: > This code does not do anything. The code does sort the array. It's just the copy of the array passed to sort.Sort that's get sorted. That's because array is a plain old value type. A pointer receiver methods fix it:

[go-nuts] How can i sort array inside struct

2016-12-19 Thread sergien . evgeny
This code does not do anything. package main import ( "fmt" "sort" ) type coll struct{ arr [4]int } func (c coll) Len() int{ return len(c.arr) } func (c coll) Less(i,j int) bool{ return c.arr[i]

Re: [go-nuts] Re: How has your company adopted Go ?

2016-12-19 Thread Justin Israel
Here are some high level slides I put together, for a demo about the timeline of my company (Weta Digital) getting introduced to Go talks.godoc.org/github.com/justinfx/demos/go_at_weta/go_at_weta.slide It was a slow process, and it wasn't any kind of full switch over. Just using the right tool

Re: [go-nuts] Gob encoding of maps is not consistent, should this be fixed?

2016-12-19 Thread Jan Mercl
On Mon, Dec 19, 2016 at 5:06 PM Tom Payne wrote: > Note that consistent encoding of the same value is *not* specified in the list of goals in https://blog.golang.org/gobs-of-data (in fact it is not mentioned at all). However, it could be considered a desirable feature :) Map

Re: [go-nuts] Re: Go on AIX

2016-12-19 Thread matthieu . sarter . external
I am also working on an AIX port, from another version (GCC 7 on AIX 6.1). For now, I have been able to complete the build, but lots of tests are failing. Some of the changes I made require to be reworked, as I did them just to allow the build to progress, to have an idea about the amount of

[go-nuts] Gob encoding of maps is not consistent, should this be fixed?

2016-12-19 Thread Tom Payne
This example demonstrates that the Gob encoding of the same map value varies: https://play.golang.org/p/DZRV9i0uf_ This is because the encoder iterates over the map using a for ... range loop and the iteration order for maps is not defined:

[go-nuts] Re: How has your company adopted Go ?

2016-12-19 Thread gary . willoughby
It should always be 'use the best tool for the job'. If Go seems like a good fit for a task, use it. We've used Go for creating web services accessed via restful API's and it works great. I've personally used Go to create command line utilities to help with development. We've also used it to

Re: [go-nuts] howto: compile template against well-known structure ?

2016-12-19 Thread Andy Balholm
I don’t know if this will be helpful to you or not, but I’ve made a package that is basically a copy/paste of the autoescaping logic from html/template, but modified to work at runtime instead of when compiling a template: github.com/andybalholm/escaper

[go-nuts] Re: are functions garbage collected?

2016-12-19 Thread adonovan via golang-nuts
On Monday, 19 December 2016 06:52:40 UTC-5, Jason E. Aten wrote: > > In the context of having a REPL for Go (and the new plugin support!) where > we would generate functions at runtime, I'm curious if the garbage > collector could be made to scan (perhaps on cue) some designated sub-space > for

Re: [go-nuts] are functions garbage collected?

2016-12-19 Thread Jan Mercl
On Mon, Dec 19, 2016 at 2:22 PM Jason E. Aten wrote: > 1) there was always https://golang.org/pkg/reflect/#MakeFunc > > 2) and now with the 1.8 plugin support: https://github.com/dragonfax/go_repl_plugin_example None of the above generates a function (think machine code) at

Re: [go-nuts] are functions garbage collected?

2016-12-19 Thread Jason E. Aten
1) there was always https://golang.org/pkg/reflect/#MakeFunc 2) and now with the 1.8 plugin support: https://github.com/dragonfax/go_repl_plugin_example On Mon, Dec 19, 2016 at 6:11 AM, Konstantin Khomoutov < flatw...@users.sourceforge.net> wrote: > On Mon, 19 Dec 2016 03:52:40 -0800 (PST) >

[go-nuts] How has your company adopted Go ?

2016-12-19 Thread Tieson Molly
What arguments or factors have contributed to your company adopting Go? Many businesses see switching to a new language or even using a new language side by side with their existing language choice as a business risk. Best regards, Ty -- You received this message because you are

Re: [go-nuts] are functions garbage collected?

2016-12-19 Thread Konstantin Khomoutov
On Mon, 19 Dec 2016 03:52:40 -0800 (PST) "Jason E. Aten" wrote: > In the context of having a REPL for Go (and the new plugin support!) > where we would generate functions at runtime, I'm curious if the > garbage collector could be made to scan (perhaps on cue) some >

[go-nuts] are functions garbage collected?

2016-12-19 Thread Jason E. Aten
In the context of having a REPL for Go (and the new plugin support!) where we would generate functions at runtime, I'm curious if the garbage collector could be made to scan (perhaps on cue) some designated sub-space for unreachable functions? Is my assumption correct that functions are not

[go-nuts] Re: howto: compile template against well-known structure ?

2016-12-19 Thread Egon
On Monday, 19 December 2016 13:04:23 UTC+2, mhh...@gmail.com wrote: > > hi, thanks. > > tbh, i m not sure i feel like i want to do php-like dev in go. > I m not even certain that the apparent gain in flexibility and speed of > development really worth it. > Guts tell me this is like giving

[go-nuts] Re: howto: compile template against well-known structure ?

2016-12-19 Thread mhhcbon
hi, thanks. tbh, i m not sure i feel like i want to do php-like dev in go. I m not even certain that the apparent gain in flexibility and speed of development really worth it. Guts tell me this is like giving the wrong tools to the wrong worker to do the wrong job. A front end dev won t

Re: [go-nuts] Packaging Test Utilities in a Project

2016-12-19 Thread Henry
Thanks. It does work. I suppose I had wrong assumptions on how the 'internal' package works. I thought it is usable only by its immediate parent package. It turns out it is usable by any other packages that share the same parent as the internal package. Thanks again, everyone! :) Henry On

[go-nuts] Re: What's the -buildid for?

2016-12-19 Thread Dave Cheney
The build id is a hash of the package's source and tags. It allows the Go tool to detect when a package is compiled with different tags or when a source file is removed from the source directory. On Monday, 19 December 2016 18:41:04 UTC+11, sca...@gmail.com wrote: > > When I run go build -x, I

[go-nuts] Re: gomobile: support/v7/app vs app

2016-12-19 Thread Elias Naur
Use a package rename for one of the imports: import sapp "android.support.v7.app.AppCompatActivity" And then use "sapp" for the support library app Java package. - Elias man. 19. dec. 2016 kl. 06.59 skrev andrey mirtchovski : > The main activity in the reverse example