[go-nuts] about golang escape analysis

2017-12-02 Thread 刘桂祥
package main import "testing" var gbuf []byte var gi int func BenchmarkCopy1(b *testing.B) { b.ReportAllocs() for i := 0; i < b.N; i++ { m := make(map[string]int, 5) for i := 0; i < 5; i++ { m["100"] = i } for key := range m { copyIface1(key, key) } } } func BenchmarkCopy2(b *testing.B) {

Re: [go-nuts] Elphaba Chess

2017-12-02 Thread Hugh S. Myers
yeah I guess, sick transom gloria monday and such… On Sat, Dec 2, 2017 at 11:57 PM, Ian Lance Taylor wrote: > On Sat, Dec 2, 2017 at 11:37 AM, wrote: > > > > Google is not going to be happy if somebody uses Go to compete against > > Google. > > I

Re: [go-nuts] Elphaba Chess

2017-12-02 Thread Ian Lance Taylor
On Sat, Dec 2, 2017 at 11:37 AM, wrote: > > Google is not going to be happy if somebody uses Go to compete against > Google. I think that Go is a nice language, but it's not so nice that it would make any difference whether a Google competitor used Go or used some other

Re: [go-nuts] Dangers of package renaming

2017-12-02 Thread Lars Seipel
On Sat, Dec 02, 2017 at 07:33:05AM -0800, Jonathan Hall wrote: > I maintain an open-source Go package with a few dozen followers. > (github.com/flimzy/kivik) > > I'm planning to transfer/rename the package to a new organization (new > package name to be: github.com/go-kivik/kivik). > > I

Re: [go-nuts] Re: Elphaba Chess

2017-12-02 Thread as
Transitive property abused for emphasis. On Saturday, December 2, 2017 at 7:06:15 PM UTC-8, hsmyers wrote: > > err…wouldn't that be "C an Bell product…" Bell Labs and all. > > On Sat, Dec 2, 2017 at 7:12 PM, as wrote: > >> Calling Go a Google product makes as much sense as

Re: [go-nuts] Re: Elphaba Chess

2017-12-02 Thread Hugh S. Myers
err…wouldn't that be "C an Bell product…" Bell Labs and all. On Sat, Dec 2, 2017 at 7:12 PM, as wrote: > Calling Go a Google product makes as much sense as calling C a Nokia > product. > > > On Friday, November 24, 2017 at 7:23:06 PM UTC-8, Hugh Aguilar wrote: >> >> I

[go-nuts] Re: Elphaba Chess

2017-12-02 Thread as
Calling Go a Google product makes as much sense as calling C a Nokia product. On Friday, November 24, 2017 at 7:23:06 PM UTC-8, Hugh Aguilar wrote: > > I invented a chess variation called: Elphaba Chess > This is just like International Chess except that the queen can't capture > the

Re: [go-nuts] Elphaba Chess

2017-12-02 Thread matthewjuran
That math is wrong, doing a three-depth search would take more like 250 seconds, not half a second. My next level of computer player would maybe do a one-depth search for about 250 milliseconds. Matt On Saturday, December 2, 2017 at 6:13:34 PM UTC-6, matthe...@gmail.com wrote: > > The plan

Re: [go-nuts] Elphaba Chess

2017-12-02 Thread matthewjuran
The plan for my variation is to extend my "easy computer" move rating system into traversing the tree of possible positions, maybe something like three deep which would take about half a second to compute with my unoptimized engine. Stockfish probably has much more effort put into such a thing

Re: [go-nuts] Elphaba Chess

2017-12-02 Thread Dave Cheney
Jan your message is unwelcoming and unwarranted. Please refrain from ad hominem arguments in the future. -- 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] Re: GC SW times on Heroku (Beta metrics)

2017-12-02 Thread Henrik Johansson
I am sorry, I was unclear. The app uses very little ram but the provisioned available memory is 512 MB. I will try to experiment with GC toggles as you suggest and report back. Thx! On Sat, Dec 2, 2017, 22:18 rlh via golang-nuts wrote: > Hard telling what it

[go-nuts] Re: GC SW times on Heroku (Beta metrics)

2017-12-02 Thread rlh via golang-nuts
Hard telling what it going on. 35MB, even for 1 CPU, seems very small. Most modern system provision more than 1GB per HW thread though I've seen some provision as little as 512MB. GOGC (SetGCPercent) can be adjust so that the application uses more of the available RAM. Running with

Re: [go-nuts] Elphaba Chess

2017-12-02 Thread Jan Mercl
On Sat, Dec 2, 2017, 20:38 wrote: > > Google is not going to be happy if somebody uses Go to compete against > Google. > This is where I stopped considering any of your future posts worth my attention. Disclaimer: I'm not affiliated with Google in any way except

Re: [go-nuts] Elphaba Chess

2017-12-02 Thread hughaguilar96
On Saturday, December 2, 2017 at 7:00:55 AM UTC-7, matthe...@gmail.com wrote: > > Writing a chess engine is easier than you may think, those algorithms are > meant to speed up computer moves and computer analysis, neither of which > are necessary to play the game. My engine has none of that

[go-nuts] Dangers of package renaming

2017-12-02 Thread Jonathan Hall
I maintain an open-source Go package with a few dozen followers. (github.com/flimzy/kivik) I'm planning to transfer/rename the package to a new organization (new package name to be: github.com/go-kivik/kivik). I understand that GitHub will maintain a redirect from the old location to the new

Re: [go-nuts] Elphaba Chess

2017-12-02 Thread matthewjuran
Stockfish, not Clownfish - sorry. An option is hosting the Stockfish engine over HTTP or TCP, that way Go can be used for calling into Stockfish (cgo), you get experience with Go networking (the use case with likely the best online support), and your interface can be anything that does HTTP or

[go-nuts] Re: profiling webserver with pprof and router middleware

2017-12-02 Thread skaldendudler
I finally found the problem!!! Since I am using a custom mux, I needed to register the pprof handler funcs to my custom router

Re: [go-nuts] aws lambda native support for go in a few weeks

2017-12-02 Thread Henrik Johansson
Now we have to rewrite all our apps to use Lambda :D Joking aside, it is cool and good news! lör 2 dec. 2017 kl 00:38 skrev JM : > just announced this week at re:invent. also cloud 9 the new dev ide also > supports go. > > In case anyone cares ^^^ > > -- > You received

[go-nuts] GC SW times on Heroku (Beta metrics)

2017-12-02 Thread Henrik Johansson
Hi, I am befuddled by GC SW times on several seconds (seen 20s once) in the metrics page for our app. There are several things that are strange but perhaps I am misreading it. The same metrics page reports Max Total 35 MB out of which 1 MB s swap the rest RSS. The response times on the service is