Re: [go-nuts] Re: A better way of events notification from cgo to go side

2017-09-22 Thread remus clearwater
Sorry for getting back so late. Here is the conclusion after many testing: 1. C Call Go is the best method as far as I could find (Thanks Ian!): √ The latency could nearly always keep less than 100us no matter the system is under light load or moderated heavy load. 2. Socketpair ( Thanks

Re: [go-nuts] Question regarding compiler internals

2017-09-22 Thread Robert Griesemer
Hi Jacob; As you have probably figured out yourself by now, coming up with some syntax for parametrized types (and perhaps even a set of formalized rules) is the easy part of a complete implementation. If you have been working on the existing compiler, you must have adjusted the

[go-nuts] What will happen if the go and cgo's malloc return overlapped ?

2017-09-22 Thread Remus Clearwater
>From this thread , we know: > The GC ignores pointers it knows nothing about. (by Ian) So we have this code in cmd/cgo/out.go

Re: [go-nuts] Re: What will happen if the go and cgo's malloc return overlapped ?

2017-09-22 Thread Remus Clearwater
> So, if the reservation scheme breaks down, it is possible that a C pointer > is allocated, and then freed, and the C allocator releases the memory, > but the dangling pointer survives, and the Go allocator allocates that > space, and the C dangling pointer somehow gets into Go, where it is >

[go-nuts] Re: Go on ARM 32bit and 64bit resources and groups

2017-09-22 Thread ajstarks
I built the openvg library and its clients on the Raspberry Pi. See:[ https://github.com/ajstarks/openvg Other examples are in https://twitter.com/ajstarks/status/905198211274559488 and referenced in https://speakerdeck.com/ajstarks/go-for-information-displays In general I treat the Raspberry

[go-nuts] Re: Golang, Google App Engine, Windows 10

2017-09-22 Thread Sotirios Mantziaris
Hi, i am a happy long time user of windows. i am developing go the last two years and can do almost the same things as in Linux. Visual Studio Code with the go plugin is fantastic with debugging support using delve. If you want to compile for Linux you can do it from windows with "GOOS=linux

Re: [go-nuts] Re: What will happen if the go and cgo's malloc return overlapped ?

2017-09-22 Thread Ian Lance Taylor
On Fri, Sep 22, 2017 at 4:58 PM, Remus Clearwater wrote: >> So, if the reservation scheme breaks down, it is possible that a C pointer >> is allocated, and then freed, and the C allocator releases the memory, >> but the dangling pointer survives, and the Go allocator

[go-nuts] Magefiles - a makefile replacement using go

2017-09-22 Thread Nate Finch
https://github.com/magefile/mage A mage file is any regular go file marked with a build target of "mage" and in package main. // +build mage package main You may have any number of magefiles in the same directory. Mage doesn't care what they're named aside from normal go filename rules. All

[go-nuts] Re: What will happen if the go and cgo's malloc return overlapped ?

2017-09-22 Thread Gernot Reisinger
C/C++ runtime library allocations and Go memory allocation do not "overlap". C/C++ runtime and Go heap will reserve memory pages on which they operate from the operating system. This will ensure, that both memory management systems will use non overlapping memory areas. Am Freitag, 22.

Re: [go-nuts] golang and linking

2017-09-22 Thread willow.pine.2011
Thanks. That is what I am looking for. On Thu, Sep 21, 2017 at 8:49 PM, Ian Lance Taylor wrote: > On Thu, Sep 21, 2017 at 3:25 PM, wrote: > > Hi, I have a project which requires multiple --ldflags or -ldflags. I > > noticed that go build only uses

Re: [go-nuts] Re: What will happen if the go and cgo's malloc return overlapped ?

2017-09-22 Thread Ian Lance Taylor
On Fri, Sep 22, 2017 at 6:54 AM, Remus Clearwater wrote: > > Hi Gernot, do you mean that the virtual address space used for `mmap` > calling by go malloc and glibc's are always different? If the virtual > address > space of go malloc and glibc's are designed to be

Re: [go-nuts] Golang, Google App Engine, Windows 10

2017-09-22 Thread Andy Balholm
One reason might be if you’re using a server version of Windows. For some reason, the Linux subsystem is only for consumer versions. Andy > On Sep 21, 2017, at 5:50 AM, Rob Shelby wrote: > > Why would I use Cygwin over Bash For Windows? > > On Thursday, September

[go-nuts] Re: Question regarding compiler internals

2017-09-22 Thread Jacob McCollum
Keith, The genreal idea is that type parameters can only be specified in 2 places right now: on package-level type definitions and on package-level function definitions. I am waffling on the viability of allowing methods on already-parameterized types to specify type parameters as well, but

[go-nuts] Best practices for internal repository management

2017-09-22 Thread charles . allen
Hi all, I have a question regarding modern best practices for go repositories. As we are building out services in go, we still have the opportunity now to refactor the service code pretty dynamically. So now is a good time to check and see if we're growing the repositories in a reasonable way.