Re: [go-nuts] Re: Question re fcns that return multiple values

2019-08-06 Thread Adrian Ho
On 6/8/19 10:07 PM, lgod...@gmail.com wrote: > Here a specific example: > > The following compiles and runs as expected > m1x,m1y := ec.scalarMult(16,28,33)   > m2x,m2y := ec.scalarMult( 1,28,33) > rx,ry := ec.add (m1x,m1y, m2x, m2y) > > > However this stmt :    rx,ry=

Re: [go-nuts] Re: Contracts Draft: why are method pointers allowed

2019-08-06 Thread Steven Blenkinsop
This text seems somewhat contradictory: The function Init cannot be instantiated with the type MyInt, as that type > does not have a method Set; only *MyInt has Set. > ... > If a method is listed in a contract with a plain T rather than *T, then it > may be either a pointer method or a value

Re: [go-nuts] Re: Question re fcns that return multiple values

2019-08-06 Thread Ian Lance Taylor
On Tue, Aug 6, 2019 at 4:14 PM wrote: > > ?? Am I wrong in saying that the statements I've submitted conform to "As a > special case, if the return values..." The special case applies to f(g()) only. It does not apply to f(g1(), g2()). Ian > On Monday, August 5, 2019 at 11:38:24 PM UTC-4, L

[go-nuts] Re: Question re fcns that return multiple values

2019-08-06 Thread lgodio2
?? Am I wrong in saying that the statements I've submitted conform to "As a special case, if the return values..." On Monday, August 5, 2019 at 11:38:24 PM UTC-4, L Godioleskky wrote: > > For f1 defined as func f1(k1, k2, k3 int) (x1, x2 int) {..} > and f2 defined as func f2(x,y int)

Re: [go-nuts] Upgrade to Go1.12.7 problem

2019-08-06 Thread Shane H
> > > This looks like you unpacked a Go distribution into a directory that > already held another Go distribution. Always unpack a Go distribution > into an empty directory. > > Ian > You could well be right, I think (from my perspective) the bigger issue is managing a Go installation on

Re: [go-nuts] pushing too far reflect usage ? another attempts to pipline based processing

2019-08-06 Thread clement auger
remains the ugly code of tangled loop, routines and logic i saw and dealt with in the past... the link is *kind* *of* similar, thanks for sharing it. Le mercredi 7 août 2019 00:16:34 UTC+2, Robert Engels a écrit : > > I was trying to make the point that even in languages where functional is

Re: [go-nuts] pushing too far reflect usage ? another attempts to pipline based processing

2019-08-06 Thread Robert Engels
I was trying to make the point that even in languages where functional is a first class citizen it can be difficult to read/maintain. What was lost there is I should of started with just print the lines that have error - this is trivial to accomplish functionally. Add in what is a trivial

Re: [go-nuts] pushing too far reflect usage ? another attempts to pipline based processing

2019-08-06 Thread clement auger
each tools does not solve all problems with the same qualities. why take such example of sequential processing problem to try to solve it using parallel / unordered processing ? it is same as shooting both your legs then trying to run a marathon the question worth to be asked twice as the

[go-nuts] Re: What did you see at GopherCon 2019 (San Diego)?

2019-08-06 Thread jake6502
On Tuesday, August 6, 2019 at 7:35:08 AM UTC-4, Akram Ahmad wrote: > > For me, attending GopherCon 2019 recently in San Diego was tremendous fun > (The Gopher community is so amazing!) > > This is what I saw, the following being *the coordinates* to my > (incredibly unofficial) writeup: > >

Re: [go-nuts] Replace modules from command line

2019-08-06 Thread Paul Jolly
You won't be able to avoid editing the go.mod - it's the starting point for all module resolution. How about taking a copy of the original go.{mod,sum} and restoring them, or using git checkout . to trash unstaged changes? On Tue, 6 Aug 2019, 07:26 Peter Feichtinger, wrote: > Thanks for that,

Re: [go-nuts] Standard library ETag/Last-Modified conditional request logic and best practices?

2019-08-06 Thread Devon H. O'Dell
Op di 6 aug. 2019 om 09:10 schreef : > > Thanks Devon! You're welcome! > So just to clarify our request flow is: > > Client > CDN > Go Reverse Proxy > Origin > > Our Go Reverse Proxy has historically been responsible for adding caching > headers (e.g. Cache-Control and Surrogate-Control) when

Re: [go-nuts] Standard library ETag/Last-Modified conditional request logic and best practices?

2019-08-06 Thread mark . mcdx
Thanks Devon! So just to clarify our request flow is: Client > CDN > Go Reverse Proxy > Origin Our Go Reverse Proxy has historically been responsible for adding caching headers (e.g. Cache-Control and Surrogate-Control) when the origins have failed to do so (as a way to ensure things are

Re: [go-nuts] Replace modules from command line

2019-08-06 Thread anderson . queiroz
go mod edit does the trick. Try go mod edit -replace=github.com/foo/barr=github.com/bar/foo go mod edit -replace=github.com/foo/barr=github.com/bar/foo@12345567789 Best Anderson On Tuesday, 6 August 2019 07:26:45 UTC+2, Peter Feichtinger wrote: > > Thanks for that, this will come in

[go-nuts] Re: Replace modules from command line

2019-08-06 Thread anderson . queiroz
Ops, now really understood what you want... Well, a not really elegant way could be to have it pointing to a local folder and change the content on the local folder. But I believe the go.sum would spot the difference and break the build. But if you need to change the version, why cannot you

Re: [go-nuts] Standard library ETag/Last-Modified conditional request logic and best practices?

2019-08-06 Thread Devon H. O'Dell
Hi Mark, Whether or not your proxy is caching, you may find RFC7234[1] relevant in addressing some of your questions (as well as many you may later encounter). I think you may find section 5.2 to be of particular interest, though any proxy author should be familiar with the full text. Op di 6

Re: [go-nuts] Go Library lists

2019-08-06 Thread Agniva De Sarker
Also - https://github.com/avelino/awesome-go On Tuesday, 6 August 2019 19:35:48 UTC+5:30, Jan Mercl wrote: > > On Tue, Aug 6, 2019 at 3:51 PM > wrote: > > > If anyone knows of a currently maintained equivalent , please respond > > Check https://github.com/golang/go/wiki/Projects > -- You

Re: [go-nuts] Re: Question re fcns that return multiple values

2019-08-06 Thread Jan Mercl
On Tue, Aug 6, 2019 at 4:07 PM wrote: > > Here a specific example: > > The following compiles and runs as expected > m1x,m1y := ec.scalarMult(16,28,33) > m2x,m2y := ec.scalarMult( 1,28,33) > rx,ry := ec.add (m1x,m1y, m2x, m2y) > > > However this stmt :rx,ry= ec.add(ec.scalarMult(16,28,33),

[go-nuts] Re: Question re fcns that return multiple values

2019-08-06 Thread lgodio2
Here a specific example: The following compiles and runs as expected m1x,m1y := ec.scalarMult(16,28,33) m2x,m2y := ec.scalarMult( 1,28,33) rx,ry := ec.add (m1x,m1y, m2x, m2y) However this stmt :rx,ry= ec.add(ec.scalarMult(16,28,33), ec.scalarMult( 1,28,33)) gives the following compiler

Re: [go-nuts] Go Library lists

2019-08-06 Thread Jan Mercl
On Tue, Aug 6, 2019 at 3:51 PM wrote: > If anyone knows of a currently maintained equivalent , please respond Check https://github.com/golang/go/wiki/Projects -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and

[go-nuts] Go Library lists

2019-08-06 Thread lgodio2
The web page at http://go-lang.cat-v.org/pure-go-libs provides Go a valuable list of various Go packages organized by subject category. Unfortunately it stopped updating Oct'2012. If anyone knows of a currently maintained equivalent , please respond -- You received this message because you

Re: [go-nuts] pushing too far reflect usage ? another attempts to pipline based processing

2019-08-06 Thread Robert Engels
It’s the verbosity of the syntax. I’ll admit I’m not a fan of functional programming but the cases where it seems appropriate is where the syntax and chaining is so simple and straightforward as to be easier to read than an OO or imperative style. Try using your library to write a purely

[go-nuts] Standard library ETag/Last-Modified conditional request logic and best practices?

2019-08-06 Thread mark . mcdx
Hello, I'm using Go's standard library reverse proxy and I'm trying to figure out if the standard library HTTP web server (e.g. http.ListenAndServe) implements the relevant conditional request handling logic for ETag/Last-Modified headers. I did some Googling and noticed the HTTP file system

[go-nuts] What did you see at GopherCon 2019 (San Diego)?

2019-08-06 Thread Akram Ahmad
For me, attending GopherCon 2019 recently in San Diego was tremendous fun (The Gopher community is so amazing!) This is what I saw, the following being *the coordinates* to my (incredibly unofficial) writeup: *What I Saw at GopherCon 2019*

Re: [go-nuts] how to pass c array to golang efficiently

2019-08-06 Thread Jan Mercl
On Tue, Aug 6, 2019 at 11:11 AM hui zhang wrote: Please always send code to the ML as plain, black on white text. And/or use play.golang.org. Thanks. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop

[go-nuts] how to pass c array to golang efficiently

2019-08-06 Thread hui zhang
I build go as a so called by c program how implement this Send function to make c short array to be used in go as []int16 *efficiently * of course , I can assign it one by one , but it is not an efficient way package main import "C" import "fmt" //export Summ func Summ(x, y int) int {

Re: [go-nuts] pushing too far reflect usage ? another attempts to pipline based processing

2019-08-06 Thread clement auger
Hi Robert, can you kindly elaborate please ? Are you criticizing the resulting api or its internal writing ? If you were meaning the lack of comments, tests etc. yes i agree (who would not?), but then, I think I can only answer that this is only a matter of additional work hours. If this