Re: [go-nuts] GC problem

2017-05-01 Thread Sokolov Yura
GC is triggered *after* allocation than crosses boundary. So your second allocation is actually tries to complete before first allocation freed. And Ubuntu with 4GB memory doesn't allow to allocate 4GB memory cause overcommit is not enabled by default. Use C/C++, or buy more memory, or change y

[go-nuts] Testing reflect.type for equality with another type

2017-05-01 Thread nz
Hi As far as I can tell two reflect.Type's should be equal, but they fail equality (==) test, printing the reflect.Type using "%#v" of the types yields identical values &reflect.rtype{size:0x8, ptrdata:0x8, hash:0xdd3884e8, tflag:0x1, align:0x8, fieldAlign:0x8, kind:0x36, alg:(*reflect.typeAlg

[go-nuts] "Selling" Go to Management

2017-05-01 Thread 'Eric Johnson' via golang-nuts
Just answered a question on Quora today that might be helpful: https://www.quora.com/Why-would-anyone-program-in-Go/answer/Eric-Johnson-157?share=ca0e6b40&srid=zEgo -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group a

Re: [go-nuts] Re: Go + Android NDK + Intel Processor

2017-05-01 Thread Elias Naur
On Mon, May 1, 2017 at 9:30 PM Tomi Häsä wrote: > The situation with MIPS seems intriguing. There were promises of Android > MIPS devices for last year: > > > http://www.pcworld.com/article/2601040/first-mobile-device-with-mips-64bit-processor-coming-in-2016.html > > State of MIPS regarding Andro

[go-nuts] Re: Go + Android NDK + Intel Processor

2017-05-01 Thread Tomi Häsä
The situation with MIPS seems intriguing. There were promises of Android MIPS devices for last year: http://www.pcworld.com/article/2601040/first-mobile-device-with-mips-64bit-processor-coming-in-2016.html State of MIPS regarding Android could be quite dead, if you can trust this discussion: h

Re: [go-nuts] GC problem

2017-05-01 Thread Jesper Louis Andersen
What (i think) is happening is that the GC runs concurrently with your program. After the call f(8) you have 2.2 gigabyte memory allocated. When you start the call to f(9) the GC starts a mark phase, but concurrently to that your program allocates 2.2 gigabyte more space. And before it manages to c

[go-nuts] Re: Go + Android NDK + Intel Processor

2017-05-01 Thread Elias Naur
I've updated the Wiki page. Go Mobile supports arm, arm64, 386 and amd64 devices and emulators today. - elias On Monday, May 1, 2017 at 6:10:30 PM UTC+2, Tomi Häsä wrote: > > Yet another newbie question, sorry. > > What does this part in the Gomobile wiki mean: > > "Note: Currently only ARM dev

Re: [go-nuts] GC problem

2017-05-01 Thread peterGo
I am unable to reproduce your issue. $ cat /proc/meminfo | grep 'MemTotal' MemTotal:3946772 kB $ uname -v -p -r -s Linux 4.4.0-75-generic #96-Ubuntu SMP Thu Apr 20 09:56:33 UTC 2017 x86_64 $ go version go version go1.8.1 linux/amd64 $ cat ssd.go package main import ( "fmt" "runtim

Re: [go-nuts] strange benchmark result: inline is slower than function calls

2017-05-01 Thread peterGo
T L, .go : https://play.golang.org/p/GPGO7YnLxh Peter On Monday, May 1, 2017 at 1:15:38 PM UTC-4, peterGo wrote: > > T L, > > First, keep things simple. Delete the main function; it's an irrelevant > complication. Use shorter function names. Start simply and build one > feature at a time.

Re: [go-nuts] strange benchmark result: inline is slower than function calls

2017-05-01 Thread peterGo
T L, First, keep things simple. Delete the main function; it's an irrelevant complication. Use shorter function names. Start simply and build one feature at a time. Function is exactly like except that variables are substituted for the function parameter. Function is exactly lik

[go-nuts] Go + Android NDK + Intel Processor

2017-05-01 Thread Tomi Häsä
Yet another newbie question, sorry. What does this part in the Gomobile wiki mean: "Note: Currently only ARM devices and ARM emulating AVDs are supported." https://github.com/golang/go/wiki/Mobile I found this page: "Android supports 3 different processor architectures: ARM, Intel and MIPS." h

[go-nuts] [ANN] Strange Loop 2017 CFP closes May 8th!

2017-05-01 Thread Alex Miller
Strange Loop 2017 https://thestrangeloop.com Sept 28-30, 2017 St. Louis, MO The Strange Loop conference is currently holding their open call for presentations. We are looking for both two hour workshops and 40 minute sessions for this year's event. Requested topics include: * Programming langu

Re: [go-nuts] interface assignment

2017-05-01 Thread feilengcui008
Thanks for the clear explanation! 在 2017年5月1日星期一 UTC+8下午9:55:30,Ian Lance Taylor写道: > > On Mon, May 1, 2017 at 6:03 AM, feilengcui008 > wrote: > > > > I have made a little testing about interface assignment and searched > the > > source code about interface runtime functions like convI2I,

Re: [go-nuts] GC problem

2017-05-01 Thread Serhat Sevki Dincer
yazdı: Your program completes without any trouble on my machine, but do note if we enter the following in an emacs scratch buffer and hit C-j to use it as a glorified calculator: (/ (* 3e8 8) (* 1024 1024 1024)) 2.2351741790771484 If each element in your array takes up 8 bytes, which is the cas

Re: [go-nuts] interface assignment

2017-05-01 Thread Ian Lance Taylor
On Mon, May 1, 2017 at 6:03 AM, feilengcui008 wrote: > > I have made a little testing about interface assignment and searched the > source code about interface runtime functions like convI2I, and notice that > there are two situations where data may be copied or not: > (1) data not co

Re: [go-nuts] Defaulting build mode to PIE (and building go in PIE mode)

2017-05-01 Thread timo . teras
On Monday, May 1, 2017 at 3:56:32 PM UTC+3, timo@gmail.com wrote: > > > On Friday, April 28, 2017 at 5:11:19 PM UTC+3, Ian Lance Taylor wrote: >> >> On Thu, Apr 27, 2017 at 10:57 PM, wrote: >> It sounds like you are running into some version of >> https://golang.org/issue/18968. But to b

[go-nuts] interface assignment

2017-05-01 Thread feilengcui008
Hey, All: I have made a little testing about interface assignment and searched the source code about interface runtime functions like convI2I, and notice that there are two situations where data may be copied or not: (1) data not copied: assign another* interface type* variable to t

[go-nuts] [ANN] kurly - A replacement for the widely popular curl tool, written in Golang

2017-05-01 Thread David Peacock
Partly inspired by Tony Arcieri's "It's time for a memory safety intervention" blog post, partly just due to feeling it's the right time, and partly because why not, my friend Al S-M and I have kicked off a project to replace curl's HTTP(S) functionality with a new tool written in Golang. We've ta

Re: [go-nuts] Defaulting build mode to PIE (and building go in PIE mode)

2017-05-01 Thread timo . teras
Hi, On Friday, April 28, 2017 at 5:11:19 PM UTC+3, Ian Lance Taylor wrote: > > On Thu, Apr 27, 2017 at 10:57 PM, > > wrote: > > For Go 1.7 we just used the following patch: > > > https://git.alpinelinux.org/cgit/aports/plain/community/go/default-buildmode-pie.patch > > > and it seems to wor

[go-nuts] How to secure variables in memory?

2017-05-01 Thread Awn Umar
I was trying to find a solution to this exact problem too, and since I couldn't find one, I made my own library for it: https://github.com/libeclipse/memguard It's pure Go, thread-safe, and supports all major operating systems. -- You received this message because you are subscribed to the Goog

[go-nuts] Security at handling passwords

2017-05-01 Thread awnumar
I was looking for a solution to the same problem and couldn't find one. So I made a library that you might find useful: https://github.com/libeclipse/memguard It's pure Go, thread-safe, and supports all major operating systems. -- You received this message because you are subscribed to the Goo

[go-nuts] Re: [ANN] maintainer - Generate AUTHORS, CONTRIBUTING, and CHANGELOG for your GitHub repository.

2017-05-01 Thread Ce Gao
Hi, Thanks for your reply:) I tried to implement the logic about changelog generation in golang, but I found that it is reinvent the wheel. I think we could just use it if there are already some mature tools. 在 2017年5月1日星期一 UTC+8上午2:26:15,mhh...@gmail.com写道: > > False hopes :( > > https://gi

Re: [go-nuts] Re: Will deleting a key from a map in an iteration prevent some keys being iterated in the same iteration?

2017-05-01 Thread T L
On Monday, May 1, 2017 at 3:56:51 PM UTC+8, Paul Jolly wrote: > > I think the part of the spec you're after is under the heading: > https://golang.org/ref/spec#For_statements, specifically the sub-heading > of that link "For statements with range clause", specifically point 3 in > the enumerat

Re: [go-nuts] All the Go project history, live in RAM

2017-05-01 Thread Nyah Check
Nice work. Sent from my iPhone > On 30 Apr 2017, at 22:41, Brad Fitzpatrick wrote: > > Gophers, > > Want to analyze the Go project's Git, GitHub, and Gerrit history? > > Here a package to make it easy: > > https://godoc.org/golang.org/x/build/maintner/godata > > See the example: > >

Re: [go-nuts] Re: Will deleting a key from a map in an iteration prevent some keys being iterated in the same iteration?

2017-05-01 Thread Paul Jolly
I think the part of the spec you're after is under the heading: https://golang.org/ref/spec#For_statements, specifically the sub-heading of that link "For statements with range clause", specifically point 3 in the enumerated list: *The iteration order over maps is not specified and is not guarante

[go-nuts] Re: Will deleting a key from a map in an iteration prevent some keys being iterated in the same iteration?

2017-05-01 Thread T L
On Monday, May 1, 2017 at 3:50:11 PM UTC+8, T L wrote: > > for example > > for k, v := range m { > if SatisfySomeCondition(k, v) { > delete(m, k) > } > } > > will the above iteration guarantee to delete all k-v pairs from m? > will the above iteration guarantee to delete all k-v pairs satisfyin

[go-nuts] Will deleting a key from a map in an iteration prevent some keys being iterated in the same iteration?

2017-05-01 Thread T L
for example for k, v := range m { if SatisfySomeCondition(k, v) { delete(m, k) } } will the above iteration guarantee to delete all k-v pairs from m? -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiv