Re: [go-nuts] Remind me, please, about "taking over" a socket

2019-05-30 Thread Bakul Shah
On Thu, 30 May 2019 20:10:30 -0700 Bakul Shah wrote: > > You will have to use low level code like Socket(), Bind() etc. You can't > use e.g. Dial("tcp", "192.168.1.1:smtp") This should've been edited out since we are talking about Listen. -- You received this message because you are subscribed

Re: [go-nuts] Remind me, please, about "taking over" a socket

2019-05-30 Thread Bakul Shah
On Thu, 30 May 2019 17:40:55 -0700 David Collier-Brown wrote: > > My leaky brain has lost an old technique... > > Once upon a time, I would send an old copy of a program a SIGHUP, and it > would shut down a socket listening on, for example, port 25 (SMTP). A newer > release of the program would

[go-nuts] go version go1.12 and cannot find module providing package

2019-05-30 Thread Tong Sun
Hi, For this line, https://github.com/go-jsonfile/jsonfiddle/blob/f44996d66c751dac409d15e5f132a65ece42da59/cmd_x2j.go#L17 I'm getting build github.com/go-jsonfile/jsonfiddle: cannot load github.com/mkideal/cli/clis: cannot find module providing package github.com/mkideal/cli/clis when build

Re: [go-nuts] Remind me, please, about "taking over" a socket

2019-05-30 Thread Skip Tavakkolian
Do you mean like tcp half-close? On Thu, May 30, 2019, 5:40 PM David Collier-Brown wrote: > My leaky brain has lost an old technique... > > Once upon a time, I would send an old copy of a program a SIGHUP, and it > would shut down a socket listening on, for example, port 25 (SMTP). A newer > rel

[go-nuts] Remind me, please, about "taking over" a socket

2019-05-30 Thread David Collier-Brown
My leaky brain has lost an old technique... Once upon a time, I would send an old copy of a program a SIGHUP, and it would shut down a socket listening on, for example, port 25 (SMTP). A newer release of the program would succeeding in binding to port 25, taking over any new connection requests

[go-nuts] Re: Interesting public commentary on Go...

2019-05-30 Thread David Skinner
I only rarely use generics in Go. When I do so, it is implemented using the +generate. The repos with my generics stuff is not public. If they were, they might be incomprehensible. While I rather like Fo, the thought of C++ style generics makes me cringe. Code must compile but it needs to be re

[go-nuts] Go Module Mirror and Checksum Database in Beta!

2019-05-30 Thread Katie Hockman
Hey Gophers! In the blog post Go Modules in 2019 , we announced our intent to provide a module mirror for accelerating Go module downloads, an index for discovering new modules, and a checksum database for authenticating module content. We are excited to s

[go-nuts] About godoc and private doc server

2019-05-30 Thread Ain
Hi It seems that godoc doesn't work with modules, in the sense that it doesn't find / show documentation of the modules outside GOPATH...? And about doc server... say I want to have private godoc server, mainly to serve doc of some private libs (hosted on github, but private repos) but wouldn'

Re: [go-nuts] Go 2 generics counterproposal: giving up restricting types

2019-05-30 Thread Michal Strba
Ian and David, thanks for the response! I personally don't consider MIn and Max to be so important, however, I understand if you do. I've added a new little part to the proposal that describes one possible way for them to be supported: Currently, the type-checker has to distinguish between three k

Re: [go-nuts] Go 2 generics counterproposal: giving up restricting types

2019-05-30 Thread David Riley
On May 30, 2019, at 2:25 PM, Ian Lance Taylor wrote: > > One of my guidelines for an acceptable generics proposal is that > people can write Min and Max. Your proposal admits that it doesn't > permit that. I think that is a problem. I'm fine with the general > idea of "do 80% of the job" but i

Re: [go-nuts] Aggressive Golang Garbage Collection Issues When Using cgo?

2019-05-30 Thread Steven Estes
Thankyou kddavidson772. Although it's not critical for this particular test, I will add that to this test and another very similar to it that operates slightly differently. I have put the same seed code you suggest in other routines but other folks wrote the initial versions of this particular

Re: [go-nuts] Re: Adding a timeout to a script interpreter (without leaking a goroutine)

2019-05-30 Thread 'Thomas Bushnell, BSG' via golang-nuts
plus you'd lose the ability to compute ackerman's function, which i'm doing all the time On Wed, May 29, 2019 at 7:35 AM adonovan via golang-nuts < golang-nuts@googlegroups.com> wrote: > On Tuesday, 21 May 2019 01:18:34 UTC-4, Ben Hoyt wrote: >> >> I'm looking at adding a timeout option to my GoA

Re: [go-nuts] Go 2 generics counterproposal: giving up restricting types

2019-05-30 Thread Ian Lance Taylor
On Thu, May 30, 2019 at 12:28 PM Michal Strba wrote: > > I've been thinking about generics in Go 2 ever since the original contracts > proposal and few days ago, ideas finally clicked. One of the main things > about this proposal is that it deliberately omits the ability to restrict the > set o

Re: [go-nuts] How do you keep your modules up-to-date?

2019-05-30 Thread James Hartig
Marcin, Thanks for the reply! So do you have Jenkins run go get -u, run tests, and then commit the changes? Does it automatically only update private repos or does it update both? Is there any review process each week to validate the updates? I'm leaning towards a combination of what you sugge

Re: [go-nuts] Aggressive Golang Garbage Collection Issues When Using cgo?

2019-05-30 Thread kddavidson722
Sry I ment genName() -- 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. To view this discussion on the web visit https://g

Re: [go-nuts] Re: Go 2 generics counterproposal: giving up restricting types

2019-05-30 Thread Raffaele Sena
Completely agree about "Generics are useful except when their syntax becomes cryptic". But reading this proposal (quickly, while doing a bunch of other stuff :), the syntax is very clean and the proposal is very well thought. On Thu, May 30, 2019 at 10:44 AM Michal Strba wrote: > I agree with t

Re: [go-nuts] Interesting public commentary on Go...

2019-05-30 Thread Paul Jolly
Just to expand on Russ' point about golang-tools: > In fact there is now a roughly biweekly “Go tools” meeting which is > typically attended by more tool and editor integration authors from outside > Google than from inside Google and organized by a contributor outside > Google. (If you want

Re: [go-nuts] Re: Go 2 generics counterproposal: giving up restricting types

2019-05-30 Thread Michal Strba
I agree with that. What exactly do you consider cryptic, though, about my proposal? I thought the syntax was very clean. Furthermore, regarding relating this to C++, I quote: > Just to make it clear, you aren't allowed to use operators like +, -, <, call > methods, or access struct fields of a ge

[go-nuts] Re: Go 2 generics counterproposal: giving up restricting types

2019-05-30 Thread lgodio2
Sorry again for the power failure...let me try one last time one of the annoying things you have to deal with as a team member is being assigned an "update" of code written by someone who no longer works for the team. What makes this annoying is possibility of running into code sections that co

[go-nuts] Re: Go 2 generics counterproposal: giving up restricting types

2019-05-30 Thread Michal Strba
> Generics are useful except when their syntax becomes cryptic I agree, are you referring to anything specific? Dňa štvrtok, 30. mája 2019 19:29:09 UTC+2 L Godioleskky napísal(-a): > > > > On Thursday, May 30, 2019 at 1:24:55 PM UTC-4, L Godioleskky wrote: >> >> one of the annoying things you ha

[go-nuts] Re: Go 2 generics counterproposal: giving up restricting types

2019-05-30 Thread lgodio2
llow On Thursday, May 30, 2019 at 12:29:03 PM UTC-4, Michal Strba wrote: > > Hi Gophers! :) > > I've been thinking about generics in Go 2 ever since the original > contracts proposal and few days ago, ideas finally clicked. One of the main > things about this proposal is that it deliberately omi

[go-nuts] Re: Go 2 generics counterproposal: giving up restricting types

2019-05-30 Thread lgodio2
On Thursday, May 30, 2019 at 1:24:55 PM UTC-4, L Godioleskky wrote: > > one of the annoying things you have to deal with as a team member is being > assigned an "update" of code written by someone who no longer works for the > team. What makes this annoying is possibility of running into code s

[go-nuts] Re: Go 2 generics counterproposal: giving up restricting types

2019-05-30 Thread lgodio2
one of the annoying things you have to deal with as a team member is being assigned an "update" of code written by someone who no longer works for the team. What makes this annoying is possibility of running into code sections that contains "crytic" statements that require lots of effort to und

[go-nuts] Go 2 generics counterproposal: giving up restricting types

2019-05-30 Thread Michal Strba
Hi Gophers! :) I've been thinking about generics in Go 2 ever since the original contracts proposal and few days ago, ideas finally clicked. One of the main things about this proposal is that it deliberately omits the ability to restrict the set of types a function can work with. This is a limi

[go-nuts] Announcing NSWrap -- a comprehensive Objective-C binding generator for MacOS

2019-05-30 Thread Greg Pomerantz
I have been working on a binding generator that can read MacOS header files and provide bindings for Objective-C interfaces and library functions. NSWrap can also automatically generate classes implementing one or more named protocols or subclassing a specified class. The automatically generate

Re: [go-nuts] How do you keep your modules up-to-date?

2019-05-30 Thread Marcin Romaszewicz
I have the same kind of setup at my company, and we use go modules in the same way that we would use public modules. We periodically do a "go get -u" to update them. Jenkins does that once a week, so at worst, we're a week behind. If someone needs to manually pull in changes more urgently, they can

Re: [go-nuts] math.Atan implementation

2019-05-30 Thread andrey mirtchovski
Atan is implemented in assembly. for amd64 it's just a call to atan (lowercase a): https://golang.org/src/math/atan_amd64.s for 386 it is not: https://golang.org/src/math/atan_386.s On Thu, May 30, 2019 at 9:15 AM rhiro wrote: > > I'd like to see the implementation for math.Atan, but I see that

[go-nuts] math.Atan implementation

2019-05-30 Thread rhiro
I'd like to see the implementation for math.Atan, but I see that https://golang.org/src/math/atan.go seems to be a missing body for that function "func Atan(x float64) float64". Is this code being hidden, or is there some other mechanism preventing it from showing up? Thanks. -- You received

[go-nuts] How do you keep your modules up-to-date?

2019-05-30 Thread James Hartig
What's the best way to automatically always pull the latest release/commit for certain repos? We use gerrit internally so all of our import paths for internal packages start with something like gerrit.corp. We have over 50 different repos and it would be painstaking to have to update (pull lates

[go-nuts] Re: Test a Golang API on the web

2019-05-30 Thread Leonel Quinteros
Amazon Web Services will give you the smallest instance of a virtual machine for free (at least for a year): https://aws.amazon.com/en/free On Google Cloud Platform you can also have several services for free (forever) including a VM instance and an AppEngine deploy: https://cloud.google.com/fre

[go-nuts] godoc(.org) query packages without cgo

2019-05-30 Thread fgergo
While browsing godoc.org for some functionality, I was wondering if packages using cgo could be excluded from search results, like this: "Hmm, I was wondering if godoc.org could show me packages with "examplesearchterm" without cgo." Did somebody look into implementing something like this earlier?