Re: [go-nuts] go runtime/stubs.go noescape

2019-10-15 Thread Kevin Malachowski
I believe the question was about the specific implementation of noescape, specifically the "exclusive or" in that unsafe expression. To the original poster: are you just curious why, or is there a more specific question you have? I'm assuming that function looks like that to correctly trick

Re: [go-nuts] go runtime/stubs.go noescape

2019-10-15 Thread Ian Lance Taylor
On Sat, Oct 12, 2019 at 1:47 AM tokers wrote: > > Recently I read some go source code and when I read the noescape function in > runtime/stubs.go, I have a doubt about it. > > // noescape hides a pointer from escape analysis. noescape is > // the identity function but escape analysis doesn't

[go-nuts] Re: [security] Go 1.13.2 and Go 1.12.11 pre-announcement

2019-10-15 Thread Katie Hockman
Hello gophers, As an update, the security releases of Go 1.13.2 and Go 1.12.11 have been moved to *Thursday, October 17*. We will use the extra time to ensure the fixes are complete and correct. Sorry for the inconvenience. Cheers, Katie on behalf of the Go team On Fri, Oct 11, 2019 at 5:21 PM

[go-nuts] Re: Compile Go application with multiple versions of C library

2019-10-15 Thread Igor Maznitsa
thats possible use preprocessing with golang too, but through some extra-tools, like maven-golang, example -- You received this message because you are subscribed to the Google Groups

[go-nuts] Re: go module & local package

2019-10-15 Thread Igor Maznitsa
mvn-golang also allows make multi-module go projects with locally situated modules, but it works through maven -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To

Re: [go-nuts] Re: random errors after upgrade to Go1.12 + MacOS High Sierra

2019-10-15 Thread Ulderico Cirello
the following minor released had this problem fixed. consider upgrading to the latest version, please. https://dl.google.com/go/go1.13.1.darwin-amd64.pkg - ccf On Tue, Oct 15, 2019 at 7:36 AM wrote: > I also have this problem, has you solved? > > 在 2019年2月27日星期三

[go-nuts] Re: random errors after upgrade to Go1.12 + MacOS High Sierra

2019-10-15 Thread minxinping0105
I also have this problem, has you solved? 在 2019年2月27日星期三 UTC+8上午5:10:21,Ulderico写道: > > Hi, > > > A colleague of mine is getting random errors after upgrading to Go 1.12 in > High Sierra, he would see among the errors these: > > svc.0 : fatal error: sync: inconsistent mutex state

Re: [go-nuts] [syscall_linux,go] doesn't have Ptrace API support for ARM64 architecture

2019-10-15 Thread Ian Lance Taylor
On Tue, Oct 15, 2019 at 5:53 AM wrote: > > I am working on delve (go debugger) to provide support for ARM64 platform > but syscall_linux,go doesn't support ARM64 platform. > for getting reg values through Ptrace, we added following code in > syscall_linux,go .. > > ptrace(PTRACE_GETREGSET,

[go-nuts] Re: Extending an array 'The right way'. Guidence needed!

2019-10-15 Thread Stuart Davies
Thanks. The copy command was the thing I missed. It does exactly what I need and I can control the extension of the backing array with fine detail. I assume the copy command is implemented efficiently but even if it just loops it is a packaged process and will have been optomised by the Go

[go-nuts] Re: go 1.13.1 (linux x64): Build and Test is slower.

2019-10-15 Thread Stuart Davies
Ok I will just get on with it. I am not is a position to compare performance when there are so many variables. I thought others might have had the same issue and there might be a simple explanation. We can close this discussion. On Tuesday, 15 October 2019 12:07:11 UTC+1, Stuart Davies

Re: [go-nuts] Re: Extending an array 'The right way'. Guidence needed!

2019-10-15 Thread Marvin Renich
* thatipelli santhosh [191015 08:07]: > Hi Marvin, > > I am curious to know if we approx 10 ( we don't know exact amount of > slice entries) add to slice. Slice will grow based on our size of data > and underlying array size but doing this create multiple underlying arrays > (more memory

[go-nuts] Re: Extending an array 'The right way'. Guidence needed!

2019-10-15 Thread Stuart Davies
Ok I will have a rethink. Is there a way I can control the expansion. I do not want to double the storage each time. I want to be able to control and limit the growth if necessary. Thanks for the assistance. I will re-read the article. On Tuesday, 15 October 2019 11:16:35 UTC+1, Stuart

[go-nuts] [syscall_linux,go] doesn't have Ptrace API support for ARM64 architecture

2019-10-15 Thread ossdev
Hi, I am working on* delve (go debugger)* to provide support for ARM64 platform but syscall_linux,go doesn't support ARM64 platform. for getting reg values through Ptrace, we added following code in syscall_linux,go .. ptrace(PTRACE_GETREGSET, pid, uintptr(elf.NT_PRSTATUS),

Re: [go-nuts] Re: Extending an array 'The right way'. Guidence needed!

2019-10-15 Thread thatipelli santhosh
Hi Marvin, I am curious to know if we approx 10 ( we don't know exact amount of slice entries) add to slice. Slice will grow based on our size of data and underlying array size but doing this create multiple underlying arrays (more memory resource utilization, processing). In such case,

Re: [go-nuts] Re: Extending an array 'The right way'. Guidence needed!

2019-10-15 Thread Marvin Renich
P.S. If you are still having trouble after reading the responses to your query, use the go playground (https://play.golang.org/) to create a simple program that demonstrates what you are trying, and post the link you get from clicking the "Share" button, and explain what you would like the output

[go-nuts] Re: question about runtime design

2019-10-15 Thread awh6al
Thank's ian. On Monday, October 14, 2019 at 1:53:23 PM UTC+1, Awhb Bal wrote: > > salam. Hi gophers can any one take a look at at this snippet of code > https://play.golang.org/p/qv0N0EN81tX > and answer me why should this panic at runtime, and why the compiler > does not catch this kind of

Re: [go-nuts] Re: Extending an array 'The right way'. Guidence needed!

2019-10-15 Thread Marvin Renich
[When you are replying to someone else's message, reply to that message, not your original message. Your reply lost the context of the message to which you were replying (Jan Mercl's).] * Stuart Davies [191015 07:24]: > My goal is to contain a list of integers that may extend to possibly a >

Re: [go-nuts] go 1.13.1 (linux x64): Build and Test is slower.

2019-10-15 Thread Miguel Angel Rivera Notararigo
Hello :) I think you need to give some samples of what you are doing because without that the people that know about how to solve that problem cant help you. Remember, there are a lot of factors that may increase the building time, could you share at least something like time go build with both

Re: [go-nuts] Extending an array 'The right way'. Guidence needed!

2019-10-15 Thread Wojciech S. Czarnecki
On Tue, 15 Oct 2019 03:16:35 -0700 (PDT) Stuart Davies wrote: Uh, the important citation got deleted somehow: [...] https://golang.org/ref/spec#Appending_and_copying_slices "If the capacity of s is not large enough to fit the additional values, append allocates a new, sufficiently large

Re: [go-nuts] Extending an array 'The right way'. Guidence needed!

2019-10-15 Thread Wojciech S. Czarnecki
On Tue, 15 Oct 2019 03:16:35 -0700 (PDT) Stuart Davies wrote: > Hi > > I have a slice backed by an array. > > My understanding is that I can extend the slice (append) up to the > capacity of the array. Its good understanding. > Append fails when the backing array indexes are exceeded.

[go-nuts] Re: Extending an array 'The right way'. Guidence needed!

2019-10-15 Thread Stuart Davies
My goal is to contain a list of integers that may extend to possibly a couple of thousand entries. Initial size is 100. Extensions add 50 entries at a time. I declared the array initially with: make([]int64, 100). I tried using the Append function but could not Append past the 100 entries.

[go-nuts] go 1.13.1 (linux x64): Build and Test is slower.

2019-10-15 Thread Stuart Davies
Hi. I use a low spec laptop that I take with me so I can work/play in the coffee shop! Since upgrading go to 1.13 I have noticed a significant slow down (2 to 3 times) in build and build for test especially when debugging. It is still fast compared to other languages I use but I was sooo

Re: [go-nuts] Extending an array 'The right way'. Guidence needed!

2019-10-15 Thread Jan Mercl
On Tue, Oct 15, 2019 at 12:16 PM Stuart Davies wrote: > I have a slice backed by an array. > > My understanding is that I can extend the slice (append) up to the capacity > of the array. I guess that by 'extend the slice' you mean reslicing. Yes, that can be done while len <= cap. However,

[go-nuts] Extending an array 'The right way'. Guidence needed!

2019-10-15 Thread Stuart Davies
Hi I have a slice backed by an array. My understanding is that I can extend the slice (append) up to the capacity of the array. After that I do not understand the correct procedure. Append fails when the backing array indexes are exceeded. So I have this temporary piece of code: if