Re: [go-nuts] Go list returning directory starting with underscore on Ubuntu

2018-04-24 Thread Dave Cheney
If the path start with _ then it is not within the list of directories in your GOPATH. -- 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: Need help in in implementing a method on an interface

2018-04-24 Thread alex . rou . sg
If GenericMethod is truly the same, as in not even using the struct fields from P1data/P2data then there is a way. You just need to create a new struct type in package main that implements GenericMethod and then in packages p1 and p2 you embed the struct and thus expose the method. package

[go-nuts] Need help in in implementing a method on an interface

2018-04-24 Thread rickyusminer
Hello all, I am golang beginner. And I have a problem with interfaces. Here is the problem where I have one main package with has an Interface I. and multiple sub packages each implementing interface I. So I have a method which is exactly the same for all sub packages. Is there a way I can

Re: [go-nuts] Go list returning directory starting with underscore on Ubuntu

2018-04-24 Thread rungta via golang-nuts
Even with GOPATH set correctly, this can happen if you're running `go list ./...` and any directory in your current path is called `testdata`. ie. ``` $ pwd /home/user/xyz/testdata/whatever/ $ go list ./... _/home/user/xyz/testdata/whatever/xxx ``` On Friday, March 2, 2018 at 3:49:41 AM UTC-5,

[go-nuts] how do i upgrade to latest version of go?

2018-04-24 Thread Dave Cheney
It depends on how you installed ypthe previous version of go. Home brew is popular on the Mac so follow their instructions for upgrading a package installed via brew. If you used one of the options from the golang org website, simply remove /usr/local/go and follow the instruction on the

[go-nuts] how do i upgrade to latest version of go?

2018-04-24 Thread JM
I currently have on my mac: go version go1.9 darwin/amd64 and want to upgrade to the latest. Thanks. -- 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] schollz/peerdiscovery - Pure-Go library for cross-platform local peer discovery using UDP broadcast

2018-04-24 Thread Dave Cheney
Looking at the code for Discover it is possible you are discarding several errors whose contents may explain the issue you see on windows. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails

Re: [go-nuts] best practices for gccgo and external packages

2018-04-24 Thread Ian Lance Taylor
On Tue, Apr 24, 2018 at 10:15 AM, Philip Brown wrote: > > On Tuesday, April 24, 2018 at 6:56:21 AM UTC-7, Ian Lance Taylor wrote: >> >> >> Sorry, you're quite right. I completely forgot that >> -buildmode=archive is the default for a non-main package. >> > > Okay, so just to

Re: [go-nuts] best practices for gccgo and external packages

2018-04-24 Thread Philip Brown
On Tuesday, April 24, 2018 at 6:56:21 AM UTC-7, Ian Lance Taylor wrote: > > > Sorry, you're quite right. I completely forgot that > -buildmode=archive is the default for a non-main package. > > Okay, so just to close the loop on information sharing, I think you are saying that

Re: [go-nuts] liteide x33.3 released

2018-04-24 Thread xiofen77
Yes thanks. But all those links are broken.. This should be ok : http://liteide.org -- 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: It was removed some packages from go.googlesource.com

2018-04-24 Thread theckman via golang-nuts
This should now be fixed. Here's the RCA: - https://github.com/golang/lint/issues/397#issuecomment-383994496 Cheers! -Tim On Monday, April 23, 2018 at 6:58:55 AM UTC-7, takanao ENDOH wrote: > > Hi, guys. > > Could not `go get golang.org/x/lint/golint` > . > Is

[go-nuts] Re: It was removed some packages from go.googlesource.com

2018-04-24 Thread gary . willoughby
OMG I didn't realize that repo had gone. I need to update some of my projects. Christ sake!!! On Tuesday, 24 April 2018 16:42:33 UTC+1, thec...@netflix.com wrote: > > Hey Gary, > > This isn't a leftpad moment. Your code can still be compiled, and there's > a not too invasive workaround: > > -

[go-nuts] Re: It was removed some packages from go.googlesource.com

2018-04-24 Thread theckman via golang-nuts
Hey Gary, This isn't a leftpad moment. Your code can still be compiled, and there's a not too invasive workaround: - https://github.com/golang/lint/issues/397#issuecomment-383752949 Our leftpad moment was a few months ago when this repo disappeared: - https://github.com/jteeuwen/go-bindata -

[go-nuts] Re: It was removed some packages from go.googlesource.com

2018-04-24 Thread gary . willoughby
This is Go's leftPad moment. Dependency management is a complete joke in Go! https://www.theregister.co.uk/2016/03/23/npm_left_pad_chaos/ On Monday, 23 April 2018 14:58:55 UTC+1, takanao ENDOH wrote: > > Hi, guys. > > Could not `go get golang.org/x/lint/golint` >

Re: [go-nuts] [ANN] oksvg and rasterx; SVG 2.0 path compliant renderer and rasterizer

2018-04-24 Thread andrey mirtchovski
> I’d have thought the case would be the same with the AGPL. https://opensource.google.com/docs/using/agpl-policy/ -- 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

Re: [go-nuts] [ANN] oksvg and rasterx; SVG 2.0 path compliant renderer and rasterizer

2018-04-24 Thread matthewjuran
I’m curious if some companies juggle the GPL. I guess if the app is used internally only then there’s no problem with accidentally requiring a proprietary program to be released as source code to the world. I’d have thought the case would be the same with the AGPL. Do people count as

Re: [go-nuts] Type func binding and interfaces

2018-04-24 Thread matthewjuran
> > I'd suggest starting with the basic algorithm without any abstraction > (just hard-code in the type you want to store), then benchmark/tweak > the algorithm, and only then try to make it general. This is my conclusion too. Abstracting the code is a lot of churn if we’re not sure

Re: [go-nuts] Type func binding and interfaces

2018-04-24 Thread Louki Sumirniy
Reading through the wikipedia description of a heap, and especially a binary heap... it's a heap. But that's not a sexy name! Technically it's not a heap because it sorts left to right, heaps sort bottom to top. I am stripping down my code and directly declaring the struct variables as

Re: [go-nuts] [ANN] oksvg and rasterx; SVG 2.0 path compliant renderer and rasterizer

2018-04-24 Thread Zellyn
On Tuesday, April 24, 2018 at 9:38:36 AM UTC-4, matthe...@gmail.com wrote: > > For Go you may want to consider the AGPL which also requires any network >> app to provide its source code. These GNU licenses are from the Free >> Software Foundation which has a traditionally radical philosophy

[go-nuts] Re: About start with Capital letter as public API and golang's no generic

2018-04-24 Thread matthewjuran
Here's the generics discussion: https://github.com/golang/go/issues/15292 Matt On Tuesday, April 24, 2018 at 9:06:10 AM UTC-5, Deven You wrote: > > I am a newbie on Golang and find go syntax is pretty concise and I like it. > > However, the syntax for public API seems a little trouble for me. >

Re: [go-nuts] About start with Capital letter as public API and golang's no generic

2018-04-24 Thread Shawn Milochik
As for the capitalization: You'll get used to it. As for the generics: There have been literally thousands of discussions about this, and it's way too much for me to summarize here. Do a search and you'll see the state of things. -- You received this message because you are subscribed to the

[go-nuts] About start with Capital letter as public API and golang's no generic

2018-04-24 Thread devyoudw
I am a newbie on Golang and find go syntax is pretty concise and I like it. However, the syntax for public API seems a little trouble for me. Whenever I import a package, say: import dwu I need use a var or function with Capital first letter identifier: dwu.MyFunction dwu.MyVar I wonder

Re: [go-nuts] best practices for gccgo and external packages

2018-04-24 Thread Ian Lance Taylor
On Mon, Apr 23, 2018 at 10:32 PM, Philip Brown wrote: > On Mon, Apr 23, 2018 at 9:23 PM, Ian Lance Taylor wrote: >> >> >> There is no -buildmode=archive. Using -buildmode=c-archive should >> work if that is what you want to do. >> > > ORLLY? :-} > > $ go help

Re: [go-nuts] [ANN] oksvg and rasterx; SVG 2.0 path compliant renderer and rasterizer

2018-04-24 Thread matthewjuran
> > On the other hand oksvg is completely de novo, so I can slap whatever > license I want on that package. I take it people here prefer the Go > license? Can anyone briefly describe the difference? I will definitely > change it if someone can give me a good reason. I just want to make it as

Re: [go-nuts] Type func binding and interfaces

2018-04-24 Thread Louki Sumirniy
I spent a bit of time thinking about all the indirections in my code and decided I'm going hybrid functional/procedural on this, and minimising the visible overhead that the OOP constructs are clearly creating. One nice thing about Go's hostile attitude towards OOP is that when you find the way

Re: [go-nuts] Type func binding and interfaces

2018-04-24 Thread roger peppe
On 24 April 2018 at 12:59, Louki Sumirniy wrote: > I'll just be brief this time and hit the points quickly: > > Yes, technically it is a Complete Binary Tree but you won't find a Complete > Implementation of one anywhere, I have looked, and there isn't. The

Re: [go-nuts] Allow name : type declarations?

2018-04-24 Thread Ian Lance Taylor
On Tue, Apr 24, 2018 at 4:37 AM, Hugh Fisher wrote: > > On Tuesday, April 24, 2018 at 2:52:36 PM UTC+10, Ian Lance Taylor wrote: >> >> >> Thanks for the note. The truth is, regardless of the merits of this >> suggestion, it's too late to make this kind of change to the

[go-nuts] SIP and Diameter libraries in golang

2018-04-24 Thread Jayanth Acharya
Hi, Spent some time to search for SIP (Session Initiation Protocol) and Diameter protocol libraries in golang. Went through the projects listed here: https://golanglibs.com/search?q=sip=top For SIP, the list seems to have few probable candidate projects, but none that is functionally

Re: [go-nuts] Type func binding and interfaces

2018-04-24 Thread Louki Sumirniy
I'll just be brief this time and hit the points quickly: Yes, technically it is a Complete Binary Tree but you won't find a Complete Implementation of one anywhere, I have looked, and there isn't. The concept has been rejected without being tested by anyone who has considered it at least what

[go-nuts] Re: Accessing Slices Made From Same Array Concurrently

2018-04-24 Thread Mandolyte
While not quite the same problem, this post describes something similar in concept, "banking strings" in a single large byte slice to avoid GC pressures. https://syslog.ravelin.com/whats-all-that-memory-for-e89522e1c2c6 On Friday, April 20, 2018 at 11:26:08 PM UTC-4, Kaveh Shahbazian wrote: >

Re: [go-nuts] Allow name : type declarations?

2018-04-24 Thread Hugh Fisher
On Tuesday, April 24, 2018 at 2:52:36 PM UTC+10, Ian Lance Taylor wrote: > > > Thanks for the note. The truth is, regardless of the merits of this > suggestion, it's too late to make this kind of change to the language. > > Ian > Yeah I know, but there's talk of a Go 2 at some stage... --

Re: [go-nuts] Type func binding and interfaces

2018-04-24 Thread roger peppe
On 24 April 2018 at 09:58, Louki Sumirniy wrote: > > > On Tuesday, 24 April 2018 11:15:34 UTC+3, rog wrote: >> >> On 23 April 2018 at 19:58, Louki Sumirniy >> wrote: > > >> >> > I set many of those identifiers to export because I wanted

Re: [go-nuts] Type func binding and interfaces

2018-04-24 Thread Louki Sumirniy
Looking more into "Complete" binary trees, it's somewhat relevant in that this structure probably should be pushed upwards and the upper reaches of the tree made as complete as possible. Given a random source of data to fill the tree with, the odds are that the middle values will dominate due

Re: [go-nuts] Type func binding and interfaces

2018-04-24 Thread Louki Sumirniy
I just dug into the data structure spec for Btrfs, figuring it would have trees in it, and no, they are not implemented in the way I am working here either. Yes, it may well be that I am on a wild goose chase with this, but hey, I've learned an awful lot of cool stuff now that will serve me

Re: [go-nuts] Type func binding and interfaces

2018-04-24 Thread Louki Sumirniy
On Tuesday, 24 April 2018 11:15:34 UTC+3, rog wrote: > > On 23 April 2018 at 19:58, Louki Sumirniy > wrote: > > > I set many of those identifiers to export because I wanted to keep > separate > > derived libraries that replaced the storage types embedded into

Re: [go-nuts] Re: Accessing Slices Made From Same Array Concurrently

2018-04-24 Thread Kaveh Shahbazian
Final code is here: https://github.com/dc0d/bufferpool I hope I got it right! On Monday, April 23, 2018 at 9:48:20 PM UTC+4:30, Kaveh Shahbazian wrote: > > @rog Thanks! Three-value slice operator was a very nice hint. > > The original intention was to implement a buffer-pool (pool of []byte) >

Re: [go-nuts] Type func binding and interfaces

2018-04-24 Thread roger peppe
On 23 April 2018 at 19:58, Louki Sumirniy wrote: > The type function bindings are not the problem, the problem is the fact that > despite in every other way the signatures match, they will not be found by > the compiler to bind to the type, and thus the need to

[go-nuts] Re: On Accepting Interfaces and Structs

2018-04-24 Thread Louki Sumirniy
In the process of answering your questions I realised there was a number of changes I needed to make to my code, here is the state of it at the commit I just made with this in mind: (this is a permalink and shows how it is at this exact stage)

[go-nuts] Re: On Accepting Interfaces and Structs

2018-04-24 Thread Louki Sumirniy
I looked at the OP again and I have created a struct embedding with interface type for a similar purpose as you have in mind. I'm not sure how to condense it exactly, but I'll just explain the salient points: 1. The data has to be referred to via an interface{} which you load with a

[go-nuts] Re: On Accepting Interfaces and Structs

2018-04-24 Thread Kaveh Shahbazian
Thanks @Louki, The names are absolutely made up and are just for the purpose of demonstration. The problem is the package state, one whole package to just hold a type. On Tuesday, April 24, 2018 at 10:36:29 AM UTC+4:30, Louki Sumirniy wrote: > > The name could use some work, stutter is a no-no

[go-nuts] Re: go lang best practices and git repo structure for newbies

2018-04-24 Thread Louki Sumirniy
This git repository shows an example of all the common conventions for build layout https://github.com/golang-standards/project-layout On Tuesday, 24 April 2018 08:26:49 UTC+3, vteja...@gmail.com wrote: > > Thank you Matt, I will start reading as you mentioned. > > BR, > Teja > > On Monday,

[go-nuts] Re: On Accepting Interfaces and Structs

2018-04-24 Thread Louki Sumirniy
The name could use some work, stutter is a no-no in Go. What kind of state does it hold? User profiles? MMO game world database? Is your scope too broad? I see that it looks like a geography database, so it would make more sense to call it 'geo' or something like this. Also, for such a database