Re: [go-nuts] [generic] Readibility of Multiple Parenthsis

2020-07-05 Thread Steven Blenkinsop
On Sun, Jul 5, 2020 at 12:22 PM, Jake Montgomery wrote: > I understand Ian's position of wait and see. But for completeness, I will > point out that this new 'ambiguity' is different from the current cases > where there would be a "collision > between a variable name and a type name." As far as I

Re: [go-nuts] What can cause a process launched via os.exec to sporadically die from SIGPIPE

2020-07-05 Thread Marcin Romaszewicz
On Sun, Jul 5, 2020 at 1:05 PM Ian Lance Taylor wrote: > On Sun, Jul 5, 2020 at 10:54 AM Marcin Romaszewicz > wrote: > > > > I'm hitting a problem using os.exec Cmd.Start to run a process. > > > > I'm setting Cmd.Stdio and Cmd.Stderr to the same instance of an io.Pipe, > and spawn a Goroutine to

Re: [go-nuts] Go in programming language trends

2020-07-05 Thread Everton Marques
On the brighter side, no other language enjoys a long-term steady growth like Go... Kevin Chadwick: > > > >The fact that JS is top and above TyoeScript says a lot. > > > > Really, that is your analysis? > > Assuming valid data and considering js has enjoyed monopoly status for so > long, des

Re: [go-nuts] Why does html.UnescapeString not look for the trailing semicolon when finding HTML entities?

2020-07-05 Thread David Finkel
On Thu, Jul 2, 2020 at 1:18 PM Akash wrote: > html.UnescapeString("Should this word, ¤cy, be unescaped?") > > https://play.golang.org/p/vN5bvfooq8H > > Aren't HTML entities supposed to end with a semicolon? See > https://developer.mozilla.org/en-US/docs/Glossary/Entity > I think the answer is "ye

Re: [go-nuts] [generics] Trying to use generics as enums

2020-07-05 Thread Steven Blenkinsop
On Sun, Jul 5, 2020 at 3:43 PM, Martin Tournoij wrote: > > So looks like that's not supported, fait enough, but the error message > is a bit confusing. Second try: > > func showAll(type enum Fruit)(fruits []enum) { > for _, f := range fruits { > sho

Re: [go-nuts] [generics] Trying to use generics as enums

2020-07-05 Thread Ian Lance Taylor
On Sun, Jul 5, 2020 at 12:43 PM Martin Tournoij wrote: > > I played around a bit with the go2go playground today; I was wondering > how useful it would be to implement enums. > > Whether using generics like this is a good idea or not is a different > discussion, it's just an interesting thing to

Re: [go-nuts] What can cause a process launched via os.exec to sporadically die from SIGPIPE

2020-07-05 Thread Ian Lance Taylor
On Sun, Jul 5, 2020 at 10:54 AM Marcin Romaszewicz wrote: > > I'm hitting a problem using os.exec Cmd.Start to run a process. > > I'm setting Cmd.Stdio and Cmd.Stderr to the same instance of an io.Pipe, and > spawn a Goroutine to consume the pipe reader until I reach EOF. I then call > cmd.Start

[go-nuts] [generics] Trying to use generics as enums

2020-07-05 Thread Martin Tournoij
Hi there, I played around a bit with the go2go playground today; I was wondering how useful it would be to implement enums. Whether using generics like this is a good idea or not is a different discussion, it's just an interesting thing to experiment with and see how far I could get. I thought i

Re: [go-nuts] Go in programming language trends

2020-07-05 Thread Kevin Chadwick
>The fact that JS is top and above TyoeScript says a lot. > Really, that is your analysis? Assuming valid data and considering js has enjoyed monopoly status for so long, despite an IMO terrible syntax; It says a lot that javascript is falling and typescript and Dart are rising. Or maybe th

[go-nuts] What can cause a process launched via os.exec to sporadically die from SIGPIPE

2020-07-05 Thread Marcin Romaszewicz
Hi All, I'm hitting a problem using os.exec Cmd.Start to run a process. I'm setting Cmd.Stdio and Cmd.Stderr to the same instance of an io.Pipe, and spawn a Goroutine to consume the pipe reader until I reach EOF. I then call cmd.Start(), do some additional work, and call cmd.Wait(). The runtime o

Re: [go-nuts] [generic] Readibility of Multiple Parenthsis

2020-07-05 Thread Jake Montgomery
I understand Ian's position of wait and see. But for completeness, I will point out that this new 'ambiguity' is different from the current cases where there would be a "collision between a variable name and a type name." As far as I can tell, any such collision in Go 1 would fail to compile. H

Re: [go-nuts] Getting experience with type parameter parens

2020-07-05 Thread Henry
I looked at the updated design draft for generics. As much as I crave the extra static type verification and generics in general, it makes me wonder now whether they are worth the extra complexity. Th

Re: [go-nuts] My small app executes within 400μs but the exit happens in about 0.16s

2020-07-05 Thread Denis Cheremisov
Thank you, this helped a lot, strace showed there was a background activity looking for *gopackgesdriver *file. The problem was I had packages.Load(nil, "std") in one of my modules run in an init(). Changed this piece into on-demand logic and now real0m0,010s user0m0,001s sys 0m0,00

Re: [go-nuts] [generics] Interface as a contract criticism

2020-07-05 Thread lx . gulak
It all sounds now reasonable. Thanks for the attention. Good job! -- 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 vie