[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 G

[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] Magefiles - a makefile replacement using go

2017-09-22 Thread snmed
Hi Nate Awesome, i never liked make files and fortunately i could use npm scripts to build front and backend. I'm glad to see an alternative to make files in go, i will give it a try. Cheers Sandro -- You received this message because you are subscribed to the Google Groups "golang-nuts" gro

[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

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 allocates that >> space, and t

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 > tr

[go-nuts] How to read multi-page TIFF image?

2017-09-22 Thread Tad Vizbaras
No problem reading single page TIFF images using: "golang.org/x/image/tiff". It works great. Question: how to read multi-page scanned TIFFs? How to access pages 2, 3, etc.? -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from

Re: [go-nuts] Best practices for internal repository management

2017-09-22 Thread Shawn Milochik
I'm also interested in hearing opinions on this. We do the latter (many repos), and have over 250 of them. This causes some difficulties, especially because Github's search *sucks*[1]. Onboarding: People need to *find out about *the repos they need, have permission to access them, etc. Reading cod

[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.

Re: [go-nuts] Question regarding compiler internals

2017-09-22 Thread Jacob McCollum
Robert, I appreciate your detailed response. Based on the code and your explanation, it seems that gc's type checking goes far more in-depth than necessary for the cases I need to analyze. In that case, it seems to me that my best course of action would be to implement my own type verification lo

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 21, 2017 at 8:17:04 AM UTC-4

[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 tha

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

2017-09-22 Thread Rich
I've not used bash for windows, so I don't really know whats available for it. Cygwin is a product that has been around for a very long time so it's mature, and has a great package management system, and a very large selection of packages to include xwindows apps, kde, gnome etc. It's just what

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 different intentionally, > could

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 the last --ldflags of the commandline. Is > >

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

2017-09-22 Thread Remus Clearwater
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 different intentionally, could you please tell me where I could found the specs and guarantees?

Re: [go-nuts] `ltrace` yields "Couldn't find .dynsym or .dynstr in "/proc/*/exe" with binaries generated by "go build *.go"

2017-09-22 Thread Sen Han
Sorry I've taken so long to reply. Thanks Konstantin and Dave. In the implementation and usage of distributed lock leases, it is always essential to use the monotonic time API to measure the time interval. But in the implementation of the time package (go 1.9), there is fallback and the go applic

[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. Septem

[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] 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 cmd/compile/inter

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 So

[go-nuts] Re: Guidance in naming.

2017-09-22 Thread Gabriel Aszalos
If it offers consistency within your product then I think it definitely makes sense for everybody involved in working with this code. The people involved will know the business related terminology, I assume. I think the key here is to provide consistent documentation. Then you have absolutely n