Re: [go-nuts] Allow methods on primitives

2019-06-08 Thread Michael Jones
To emphasize the wisdom: With an implicit conversion like you mentioned, the F(x) invocation at the bottom expects B.SomeFunc() will be called but in fact, A.SomeFunc() will be called. That's why this is an error. You can still do F(A(x)), which explicitly makes a copy of x as an A. This is not

Re: [go-nuts] Allow methods on primitives

2019-06-08 Thread Burak Serdar
On Sat, Jun 8, 2019 at 3:22 PM Michael Ellis wrote: > > > On Friday, June 7, 2019 at 3:01:04 PM UTC-4, Burak Serdar wrote: >> >> >> If one library defines string.Render() for html, and another defines >> another string.Render() for, say, a graphics library, which Render >> will be called when I ca

[go-nuts] Re: Go will shine on huge web projects, but how about simple ones?

2019-06-08 Thread Justin Israel
I'm wondering about a couple factors in this comparison that seem to make a difference in my local test: 1. I think perl sockets are write buffered. So would the equivalent be to wrap the net.Conn in bufio.NewWriter(c) and flush before the Close? 2. Since this is a straigh-line test whe

Re: [go-nuts] Re: Go will shine on huge web projects, but how about simple ones?

2019-06-08 Thread Tong Sun
On Sat, Jun 8, 2019 at 3:01 PM Wojciech S. Czarnecki wrote: > > On Sat, 8 Jun 2019 09:56:05 -0400 > Tong Sun wrote: > > > Agree that it was not an apples to apples comparison. So please check > > out my 2nd blog: > > > > https://dev.to/suntong/simple-web-server-in-perl-and-go-revisit-5d82 > > > >

Re: [go-nuts] How to confirm a function is NOT compiled into a go binary

2019-06-08 Thread Wagner Riffel
This is totally possible, you can either use 'go tool nm' as suggest, or 'go tool objdump', both tools can answer this question. go tool objdump -s 'pkgname/internal' a.out go tool nm a.out | grep 'pkgname/internal' Be aware that testing against the shown examples, neither A() will be present, by d

Re: [go-nuts] Allow methods on primitives

2019-06-08 Thread Wojciech S. Czarnecki
On Sat, 8 Jun 2019 17:25:11 -0400 Michael Ellis wrote: > Oops, got that the wrong way round. Should read "allow passing a Bar for > argument of type Foo". type Foo int type Bar = Foo func main() { var fo Foo = 1 var ba Bar = 77 upbar(fo, "Foo") upbar(ba, "Bar") }

Re: [go-nuts] Allow methods on primitives

2019-06-08 Thread Michael Ellis
Oops, got that the wrong way round. Should read "allow passing a Bar for argument of type Foo". Cheers, Mike *“I want you to act as if the house was on fire. Because it is.” — Greta Thunberg* On Sat, Jun 8, 2019 at 5:22 PM Michael Ellis wrote: > > On Friday, June 7, 2019 at 3:01:04 PM UTC-4, B

Re: [go-nuts] Allow methods on primitives

2019-06-08 Thread Michael Ellis
On Friday, June 7, 2019 at 3:01:04 PM UTC-4, Burak Serdar wrote: > > > If one library defines string.Render() for html, and another defines > another string.Render() for, say, a graphics library, which Render > will be called when I call "str".Render()? > > Thanks for the explanation. That make

Re: [go-nuts] How to confirm a function is NOT compiled into a go binary

2019-06-08 Thread Robert Engels
Since Go effectively requires source code for compilation, I think what you’re asking for is impossible as the dev can just copy the source under a different function name, including most stdlib code. > On Jun 8, 2019, at 1:48 PM, Andrew Klager wrote: > > Take a look at https://golang.org/cm

Re: [go-nuts] Re: Go will shine on huge web projects, but how about simple ones?

2019-06-08 Thread Wojciech S. Czarnecki
On Sat, 8 Jun 2019 09:56:05 -0400 Tong Sun wrote: > Agree that it was not an apples to apples comparison. So please check > out my 2nd blog: > > https://dev.to/suntong/simple-web-server-in-perl-and-go-revisit-5d82 > Trying to make sense of your measures... ...Still apples to oranges due to te

Re: [go-nuts] How to confirm a function is NOT compiled into a go binary

2019-06-08 Thread Andrew Klager
Take a look at https://golang.org/cmd/nm/ On Sat, Jun 8, 2019 at 1:38 PM wrote: > I'm looking for some type of tool or method to examine a compiled go > binary and confirm that a list of functions is NOT included in the compiled > binary. > > example: > package internal > > func A() string {

[go-nuts] How to confirm a function is NOT compiled into a go binary

2019-06-08 Thread worthspending
I'm looking for some type of tool or method to examine a compiled go binary and confirm that a list of functions is NOT included in the compiled binary. example: package internal func A() string { return "func A" } func B() string { return "func B" } func C() string { return "func C" }

[go-nuts] golang workerpool

2019-06-08 Thread mayur . das4
Hey! I have redesigned the golang worker setup based on the use cases I have found after using it for syncing purpose for the last one year. Please do let me know if I am missing anything. https://mayur-tolexo.github.io/sworker/ -- You received this message because you are subscribed to the Goo

[go-nuts] Re: Best ORM for Golang and their framework like Revel and Martini

2019-06-08 Thread mkm
Are you kidding? without ORMs you can't model relationships. People choose languages like religion, but seriously look at the power of Rails' ActiveRecord. It's amazing. On Saturday, March 8, 2014 at 2:37:13 PM UTC-6, Nate Finch wrote: > > I find sqlx (https://github.com/jmoiron/sqlx) to be a

Re: [go-nuts] There are post-quantum public key cryptograph in Go ? or binds to Go? Thanks.

2019-06-08 Thread Daniel Norte Moraes
Hi! the aes256-ctr is secure iff the exchange of keys is secure. the exchange keys need use a post-quantum algorithm for this, that in turn return to need for a post-quantum crypto. The nist list is a good list to find someone bind or pure go version. :-) Thanks! :-) Em sábado, 8 de junho de

Re: [go-nuts] There are post-quantum public key cryptograph in Go ? or binds to Go? Thanks.

2019-06-08 Thread Daniel Norte Moraes
Nist have a second round for list post-quantum resistent cryptos, if someone dont't have a new one, a bind in go for this list is Wellcome. :-) Em sexta-feira, 7 de junho de 2019 21:23:19 UTC-3, Michael Jones escreveu: > > Your question is maybe a decade premature. Post-quantum cryptography, as

Re: [go-nuts] Re: Go will shine on huge web projects, but how about simple ones?

2019-06-08 Thread Steven Hartland
Couple of things that you might want to investigate: 1. Is SetReadDeadline the same as SO_RCVTIMEO (vm vs socket)? 2. Is c.Close()  the same as shutdown (flushes vs doesn't)? 3. Is print is the same as fmt.Fprintf / c.Write (buffered vs unbuffered)? With the go I'd be tempted to put everything fr

Re: [go-nuts] Re: Go will shine on huge web projects, but how about simple ones?

2019-06-08 Thread Tong Sun
Agree that it was not an apples to apples comparison. So please check out my 2nd blog: https://dev.to/suntong/simple-web-server-in-perl-and-go-revisit-5d82 > thanks to Axel Wagner, who replaced the net/http.Server layer with direct > translation of Perl code, the code is now reading and writing