[go-nuts] array indexed by derived type?

2018-10-06 Thread Steven Roth
Is there a way to declare an array (or slice) that is indexed by a type derived from int, rather than indexed by int? My intent is to have the compiler complain if I index the array/slice with a generic int rather than the specific int-derived type I'm supposed to use. This will help verify

[go-nuts] Traverse directory without infinite loops while following symlinks

2018-10-06 Thread rob solomon
I've been trying to do something simple like this, but I'm not interested in following symlinks.  Here I just am interested in summing all subdirectories from my start directory.  But I'm not geting consistent sums, especially if I start from my home directory. I guess I'm not handling

Re: [go-nuts] `go mod download -json` does not product valid json?

2018-10-06 Thread thepudds1460
Hi kalekold, It looks like it is a stream of JSON objects? If so, I suspect this is expected? See related discussion here (for 'go list -m -u -json' in this case), along with sample code for parsing: https://github.com/golang/go/issues/27655 --thepudds On Saturday, October 6, 2018 at

[go-nuts] Re: splitting package question

2018-10-06 Thread T L
You can make some tests to check the final binary sizes, which will not spend you much time. :) The official linker does try to remove many unused functions. Unused functions really need more time to compile. On Saturday, October 6, 2018 at 10:08:43 AM UTC-4, Vasiliy Tolstov wrote: > > Hi! > I

Re: [go-nuts] `go mod download -json` does not product valid json?

2018-10-06 Thread 'kalekold' via golang-nuts
It should be: [{ "Path": "github.com/fatih/color", "Version": "v1.7.0", "Info": "/media/Data/Projects/Go/pkg/mod/cache/download/ github.com/fatih/color/@v/v1.7.0.info", "GoMod": "/media/Data/Projects/Go/pkg/mod/cache/download/ github.com/fatih/color/@v/v1.7.0.mod", "Zip":

[go-nuts] Why is the method net.PacketConn.ReadFrom named as that? Isn't ReadInto more natural?

2018-10-06 Thread T L
. -- 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 golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.

[go-nuts] Re: How to monitor "Out of memory" crash

2018-10-06 Thread T L
"out of memory" in Go is not a real (or general) panic It is a fatal error and will crash your program without a saving mechanism. https://groups.google.com/forum/#!topic/golang-dev/wUEWhk2jtHM https://github.com/golang/go/issues/16843

Re: [go-nuts] `go mod download -json` does not product valid json?

2018-10-06 Thread Ian Davis
On Sat, 6 Oct 2018, at 3:07 PM, 'kalekold' via golang-nuts wrote: > `go mod download -json` does not product valid json? Is this a known > issue or am I missing something? Do you have an example that shows the invalid json? -- You received this message because you are subscribed to the Google

[go-nuts] splitting package question

2018-10-06 Thread Vasiliy Tolstov
Hi! I have some data that can be formatted with json, text and binary form. Does i need to split this on three parts (json, text, binary) to avoid compile time and run time overhead (and disk size of resulted binary) if user want to use only one format (for example binary). Or go compiler remove

[go-nuts] `go mod download -json` does not product valid json?

2018-10-06 Thread 'kalekold' via golang-nuts
`go mod download -json` does not product valid json? Is this a known issue or am I missing something? -- 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

[go-nuts] Re: Announcing a Fyne GUI toolkit

2018-10-06 Thread R Srinivasan
1. What are the "distribution" considerations? Considering Windows targets - can we have all the required libraries bundled in the final executable? 2. Can the apps be cross built? i.e. Built on Linux for macOS and windows`targets? thanks for pointers, srini On Friday, September 14,

[go-nuts] ACCU 2019 conference and pre-conference workshops

2018-10-06 Thread Russel Winder
In case you missed it, the ACCU 2019 call for proposals is now open. https://cfp.conference.accu.org Whilst there is lots of C and C++ content, there is also Java, Kotlin, Python, Ruby, D, etc. Meson, CMake, Git, Mercurial, Breezy, TDD, BDD, etc. It's a conference about programming, programming

Re: [go-nuts] go:nosplit

2018-10-06 Thread Scott Cotton
On Sat, 6 Oct 2018 at 08:57, Scott Cotton wrote: > > > On Fri, 5 Oct 2018 at 23:26, Ian Lance Taylor wrote: > >> On Fri, Oct 5, 2018 at 2:10 PM, Scott Cotton wrote: >> > > >> In fact >> we definitely do want to add other preemption checks that occur at >> points other than function entry

Re: [go-nuts] go:nosplit

2018-10-06 Thread Scott Cotton
On Sat, 6 Oct 2018 at 02:10, Ian Lance Taylor wrote: > On Fri, Oct 5, 2018 at 3:21 PM, Scott Cotton wrote: > > > > On Fri, 5 Oct 2018 at 23:46, Scott Cotton wrote: > >> > >> Thanks much for the info. > >> > >> Do you have any more pointers about how one may assess whether or ensure > >> that a