[go-nuts] Re: go mod tidy fails with latest version of a module

2018-08-31 Thread Kaveh Shahbazian
Got help on the matter. Problem is with echo itself. After v3.2.2 they have dropped the letter v from tags. -- 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 gol

[go-nuts] Re: go mod tidy fails with latest version of a module

2018-08-31 Thread Kaveh Shahbazian
echo has a version v3.1.0-rc.1 with a not standard format. That's why it works with v3.0.0+incompatible. Or at least that's my guess. -- 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 i

[go-nuts] go mod tidy fails with latest version of a module

2018-08-31 Thread Kaveh Shahbazian
With this line in go.mod: require github.com/labstack/echo v3.3.5 For go mod tidy it fails with: go: finding github.com/labstack/echo v3.3.5 go: errors parsing go.mod: /home/path-to/draftmod/go.mod:6: invalid module version "v3.3.5": unknown revision v3.3.5 But if the line get changed to: req

Re: [go-nuts] Alternate syntax for Go2 generics and contracts

2018-08-31 Thread Scott Cotton
I think the draft is a very good start. In fact, there are many times when I find myself wondering whether to use interfaces when something like a contract in that draft is a more natural fit. I would encourage the authors to consider that math std lib package for float32 as a test case that w

Re: [go-nuts] Re: How to setup your development environment using Go modules

2018-08-31 Thread Shulhan
On Fri, 31 Aug 2018 10:54:43 -0700 (PDT) Seth Hoenig wrote: > On Friday, August 31, 2018 at 12:22:28 PM UTC-5, Victor wrote: > > > > Hello everyone. I'm looking for best practices on how to setup your > > development environment using Go modules. > > > > Let assume a situation when you work on a

Re: [go-nuts] Re: How to setup your development environment using Go modules

2018-08-31 Thread Seth Hoenig
`go.mod.local` was one idea. Another idea is to have a sort of "publish local" semantics, where the go tool has support for something like -devel tags, which override the defined in go.mod. So then you would "publish" the next version to your local mod cache (just creating/updating the module

[go-nuts] go mod impressions

2018-08-31 Thread Vasily Korytov
Hi, I've experimented with GO111MODULE preview in Go 1.11 release, two things to note so far: 1. go mod vendor pulled in vendor folder the .travis.yml file which apparently I don't want there (govendor filters it by default) 2. I've decided to clean up my GOPATH and start from scratch. I moved

Re: [go-nuts] Re: How to setup your development environment using Go modules

2018-08-31 Thread Wojciech S. Czarnecki
On Sat, 01 Sep 2018 06:57:21 +0930 Dan Kortschak wrote: > While this seems to be the correct way to do it, it also seems like a > very obvious point of entry for human error. Looks like we need `go.mod.local` ASAP. In many workplaces a mishap leak of internal paths to the outside, even with op

Re: [go-nuts] Re: How to setup your development environment using Go modules

2018-08-31 Thread Dan Kortschak
While this seems to be the correct way to do it, it also seems like a very obvious point of entry for human error. We have tooling to prevent incorrect commits of files using gitignore and hgingnore and yet people still accidentally commit files that should not end up in repositories. Now the situ

[go-nuts] Re: How to setup your development environment using Go modules

2018-08-31 Thread Victor
Seth, thanks! It looks great but what about production vs development builds? I assume I can add that line to my go.mod when I develop it on my Mac, but can I reuse the same go.mod file when I do a production build ? Certainly during a production build I would like NOT to use "replace". Or shou

[go-nuts] Re: How to setup your development environment using Go modules

2018-08-31 Thread Seth Hoenig
On Friday, August 31, 2018 at 12:22:28 PM UTC-5, Victor wrote: > > Hello everyone. I'm looking for best practices on how to setup your > development environment using Go modules. > > Let assume a situation when you work on a project where you write a go > package (call it Pkg) and an applicatio

Re: [go-nuts] Re: Are Go floats smarter?

2018-08-31 Thread Michael Jones
yes. another way to say it is that money is best considered integral in terms of some chosen "minimum accounting unit" which in the case of USD might be a dollar, a cent (1/100 dollar), or a finer thing, such as 1/100 or 1/1000 of a cent. This allows crossfooting to work, balances to zero, and othe

[go-nuts] How to setup your development environment using Go modules

2018-08-31 Thread Victor
Hello everyone. I'm looking for best practices on how to setup your development environment using Go modules. Let assume a situation when you work on a project where you write a go package (call it Pkg) and an application (App) that uses that package Pkg and keep writing code in both. Using GOP

Re: [go-nuts] Alternate syntax for Go2 generics and contracts

2018-08-31 Thread Daniela Petruzalek
I agree with Tristan in regards to orthogonality. Seeing the draft with all those complexities added to the language made me quite uneasy about this proposal. When I first started learning Go I was one of the first people to raise a hand and complain about the lack of generics in the language. Now

Re: [go-nuts] Re: Is the go 1.11 godoc tool 'module-aware'?

2018-08-31 Thread John Shahid
Agniva De Sarker writes: > We will shift over the features from godoc to "go doc" before removing > support, so that the output remains consistent. I think there is already an > open issue for exactly what you have shown above. So no worries, things > will be the same. Great, thanks! > > O

Re: [go-nuts] Re: Are Go floats smarter?

2018-08-31 Thread Ken MacDonald
Financial applications are, indeed, typically written using some sort of integer representation; some that I've worked with require smaller than "penny" level representations, say, for commodity pricing. I have seen accounting done with floating point. It didn't end well. One of the problems is tha

[go-nuts] Re: Fail build on missing dependencies

2018-08-31 Thread distributed
Thank you for your overview and the links. Using -mod=readonly together with go install indeed does what I want. -- 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] [ANN] gonreli - use go http handlers in nodejs

2018-08-31 Thread Marcelo Pires
Hello gophers, this is a POC in early stages check out the example -- 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

[go-nuts] Re: Reference to type satisfying a specified interface

2018-08-31 Thread Akram Ahmad
Gotcha, Eric. And OMG! Test conversions taking more than 9 hours *would* be, um, a slight problem!! Best of luck, plus I'm happy to hear that in Go you seem to have found a tool that fits the job :-) Me too, I'm right there behind you in working on grokking and understanding the idioms

Re: [go-nuts] Alternate syntax for Go2 generics and contracts

2018-08-31 Thread Tristan Colgate
Also, and I think this probably applies to the existing syntax in the design. This example seems like a pathological use of generics. What would be the advantage over just declaring the function takes a Stringer? Am I missing something (presumably this is potentially avoids the interface call allo

Re: [go-nuts] Coming to Go (from Java / Scala / Clojure).

2018-08-31 Thread Akram Ahmad
Yep, I'm most definitely enjoying my Go experience, Sameer—Thanks for the note, as well as for the pointer to the wiki with stories on migrating (non-Go) codebases to Go! Very cool, and I got it bookmarked now. Speaking of codebases, I've lately been intensively working in

Re: [go-nuts] Alternate syntax for Go2 generics and contracts

2018-08-31 Thread 'Axel Wagner' via golang-nuts
A contract can include multiple type parameters: https://go.googlesource.com/proposal/+/master/design/go2draft-contracts.md#mutually-referential-type-parameters AIUI your syntax can't cover that. And FWIW, I find the syntax of contracts in the doc far less "magic" than yours, but YMMV of course. O

[go-nuts] Re: runtime: invalid pc-encoded table (invalid runtime symbol table)

2018-08-31 Thread Ewan Walker
Krzysztof, thanks for that information - I believe I know what might be causing that crash now. On Thursday, August 30, 2018 at 4:43:15 PM UTC-4, Krzysztof Kowalczyk wrote: > > The second issue is a bug in runtime, which might be fixed in 1.11 ( > https://github.com/golang/go/issues/24925 and >

[go-nuts] Re: Fail build on missing dependencies

2018-08-31 Thread thepudds1460
Hi, A few quick comments. There is a there is fair amount of flexibility to adjust the default behavior for the go tooling in terms of when it updates `go.mod`, when it is allowed to reach out to the network, when it uses the vendor directory, etc. In your case, you could consider something l

[go-nuts] Alternate syntax for Go2 generics and contracts

2018-08-31 Thread Manlio Perillo
I just read the "official" proposal for Go2 generics and contracts. The current proposal makes the function syntax more complex, and the syntax for the contract is a bit magic. What about something like: type stringer template contract (x stringer) { var s string = x.String()

Re: [go-nuts] Coming to Go (from Java / Scala / Clojure).

2018-08-31 Thread Sameer Ajmani
I'm glad to hear you're enjoying Go! Thanks for the article. Others have written their stories, too; I found this wiki page recently that focuses on stories about migrating codebases to Go from other languages: https://github.com/golang/go/wiki/FromXToGo On Thu, Aug 30, 2018 at 8:03 AM Akram Ahmad

Re: [go-nuts] multilingual, multiplatform system - golang - idl

2018-08-31 Thread Wojciech S. Czarnecki
On Fri, 31 Aug 2018 03:59:05 -0700 (PDT) R Srinivasan wrote: > Looking for pointers and/or recommendations on interface definition > languages that can support go, C, C++, python, (maybe) C#. Message exchange > amongst linux, windows and > bare metal. (Assuming IoT/microcontrollers) https://

[go-nuts] multilingual, multiplatform system - golang - idl

2018-08-31 Thread R Srinivasan
All Looking for pointers and/or recommendations on interface definition languages that can support go, C, C++, python, (maybe) C#. Message exchange amongst linux, windows and bare metal. thanks in advance, srini -- You received this message because you are subscribed to the Google Groups "go

Re: [go-nuts] Reference to type satisfying a specified interface

2018-08-31 Thread Wojciech S. Czarnecki
On Thu, 30 Aug 2018 18:41:48 -0700 (PDT) Eric Raymond wrote: > Oh, actually, I have one other issue; how to translate virtual methods in a > Python base class into Go's object model. Inheritance based domain models do not translate directly to go's composition based ones. Forget "virtual". Forg

Re: [go-nuts] Some background on reposurgeon and my Go translation problem

2018-08-31 Thread Jan Mercl
On Fri, Aug 31, 2018 at 11:48 AM Eric Raymond wrote: > I did experiment with that. Unfortunately, the source code it produced when I ran it on my stuff was an unmaintainable mess. > Possibly correct, I don't know - but I couldn't trust it because I can't read it. Yup, not surprising considering

[go-nuts] Fail build on missing dependencies

2018-08-31 Thread distributed
Consider the following scenario. I commit a version of my project and I'm happy with the dependencies and their versions that are listed in my go.mod file. I push my code to the central repo and the CI starts to build the project with go get or go install. Because the CI builds for a GOOS/GOARCH

Re: [go-nuts] Some background on reposurgeon and my Go translation problem

2018-08-31 Thread Eric Raymond
On Friday, August 31, 2018 at 4:30:08 AM UTC-4, Jan Mercl wrote: > > In case you haven't heard it before, Google was thinking on the same lines > and released Grumpy last year: > https://opensource.googleblog.com/2017/01/grumpy-go-running-python.html. > I never used the tool and it may possibl

Re: [go-nuts] Some background on reposurgeon and my Go translation problem

2018-08-31 Thread Sebastien Binet
On Fri, Aug 31, 2018 at 10:36 AM Jan Mercl <0xj...@gmail.com> wrote: > On Fri, Aug 31, 2018 at 10:29 AM Jan Mercl <0xj...@gmail.com> wrote: > > > https://opensource.googleblog.com/2017/01/grumpy-go-running-python.html > . > > The linked above blog post links to http://grump.io/ but it seems to be

Re: [go-nuts] Some background on reposurgeon and my Go translation problem

2018-08-31 Thread Jan Mercl
On Fri, Aug 31, 2018 at 10:29 AM Jan Mercl <0xj...@gmail.com> wrote: > https://opensource.googleblog.com/2017/01/grumpy-go-running-python.html. The linked above blog post links to http://grump.io/ but it seems to be a dead link for me ATM. The project repository is here: https://github.com/google

Re: [go-nuts] Some background on reposurgeon and my Go translation problem

2018-08-31 Thread Jan Mercl
On Fri, Aug 31, 2018 at 5:43 AM Eric Raymond wrote: > I translated an auxiliary tool called repocutter (it slices and dices Subversion dump streams) as a warm-up. This leads me to believe I can expect about a 40x speedup. > That's worth playing for, even before I do things like exploiting concurr

[go-nuts] Strange rebuilds of stdlib packages with Go 1.11

2018-08-31 Thread Volker Dobler
Building one of our projects with Go 1.11 works fine but I noticed that some packages from the stdlib get rebuilt during the build: $ go version go version go1.11 darwin/amd64 $ pwd /tmp/modules/ch.redacted.redacted/internal/db $ cat ../../go.mod module git.intern.redacted.net/redacted/ch.redact

Re: [go-nuts] go1.11 no longer supports compressed hostnames in SRV lookup replies

2018-08-31 Thread mikioh . mikioh
On Friday, August 31, 2018 at 2:54:08 PM UTC+9, Jason Newman wrote: > > Is it worth creating an issue around this? We have extracted the DNS > client from `net` and are currently using it with the compressed flag > enabled to allow compressed hostnames - the behavior that existed in go > 1.10 an