Re: [go-nuts] Help with tcpserver

2021-03-30 Thread Matt Harden
Why are you using channels for this? I see some issues in the code, but without knowing what you're actually trying to accomplish, it's hard to give advice. To do exactly what you described, I would simply change handleDeviceConnection() to look similar to this: func handleDeviceConnection(c net.

Re: [go-nuts] gollvm hasn't a good support to reflect and pthread?

2021-03-30 Thread 'Than McIntosh' via golang-nuts
Thank you @Ugorji Nwoke , I appreciate your going the extra mile to include gollvm in your testing. Cheers, Than On Tue, Mar 30, 2021 at 11:17 AM Ugorji Nwoke wrote: > Ugorji here - author of the github.com/ugorji/go/codec > package. > > The no

[go-nuts] Help with tcpserver

2021-03-30 Thread Perry Couprie
Hi, I create a tcp server with goroutines. When the tcp client closes the connection it workes. After recieving 5 message from a telnet client it tries to close the connection. Some times it works, and sometimes not. I create a smal demo : https://pastebin.com/raw/BjZWzLFq This is my first tr

[go-nuts] Re: what is asm6 and span6 for?

2021-03-30 Thread Fannie Zhang
On Monday, March 29, 2021 at 10:45:01 PM UTC+8 cuiw...@gmail.com wrote: > https://github.com/golang/go/blob/master/src/cmd/internal/obj/x86/asm6.go > this file named asm6, and there is a func named span6, what is 6 for here? > It is the assembler for amd64 and 386 architecture. Please see the cod

Re: [go-nuts] explain functionality similar to "go mod why for" to help with message "build constraints exclude all Go files in ..." ?

2021-03-30 Thread fgergo
Thank you both, for sharing your thoughts on this! On 3/30/21, 'Axel Wagner' via golang-nuts wrote: > Again: I understand what you are asking for and I'm not saying there is no > benefit. > > Personally, I don't feel the benefit is very large and I don't think it's > worth it. You might very well

Re: [go-nuts] explain functionality similar to "go mod why for" to help with message "build constraints exclude all Go files in ..." ?

2021-03-30 Thread 'Axel Wagner' via golang-nuts
Again: I understand what you are asking for and I'm not saying there is no benefit. Personally, I don't feel the benefit is very large and I don't think it's worth it. You might very well think it is and that's fine. As i said in my first message, if anyone feels this is important to have, my sugg

Re: [go-nuts] explain functionality similar to "go mod why for" to help with message "build constraints exclude all Go files in ..." ?

2021-03-30 Thread Wojciech S. Czarnecki
Dnia 2021-03-30, o godz. 14:20:29 "'Axel Wagner' via golang-nuts" napisał(a): > FWIW I believe printing every build constraint for every file skipped is > far too verbose, even for -n or -v mode. Both -n and -v modes already are very verbose, for purpose. If I am giving either I expect to see

Re: [go-nuts] gollvm hasn't a good support to reflect and pthread?

2021-03-30 Thread Ugorji Nwoke
Ugorji here - author of the github.com/ugorji/go/codec package. The notes below are for folks that are interested in why we use unsafe, and how we mitigate concerns around it. As Peter mentioned above, you can pass the build tag "codec.safe" to by

[go-nuts] Re: Is the Go png encoder performing gamma correction ?

2021-03-30 Thread ma...@eliasnaur.com
On Tuesday, 30 March 2021 at 14:19:57 UTC+2 christoph...@gmail.com wrote: > > It is unspecified in the documentation if the png encoder is performing > gamma correction. I thus assume that it is not performing gamma correction. > Is this assumption correct ? > > According to wikipedia, jpg image

Re: [go-nuts] explain functionality similar to "go mod why for" to help with message "build constraints exclude all Go files in ..." ?

2021-03-30 Thread 'Axel Wagner' via golang-nuts
Hi, FWIW I believe printing every build constraint for every file skipped is far too verbose, even for -n or -v mode. It is not uncommon to use build constraints and when you do, you often do it for many or even all files in a package. I don't even think it would be helpful, because it would be ve

[go-nuts] Is the Go png encoder performing gamma correction ?

2021-03-30 Thread christoph...@gmail.com
It is unspecified in the documentation if the png encoder is performing gamma correction. I thus assume that it is not performing gamma correction. Is this assumption correct ? According to wikipedia, jpg images are gamma encoded. What is the status of png images ? It seam relevant for antiali

Re: [go-nuts] explain functionality similar to "go mod why for" to help with message "build constraints exclude all Go files in ..." ?

2021-03-30 Thread Wojciech S. Czarnecki
Dnia 2021-03-29, o godz. 20:41:02 fge...@gmail.com napisał(a): > Since the build constraint language is equivalent to a first order logic > language, no guaranteed useful information can be provided in the general > case in a limited time. The build tool decides about exclusion anyway. In the v

Re: [go-nuts] How to wait for HTTP server to start?

2021-03-30 Thread Brian Candler
On Tuesday, 30 March 2021 at 11:50:07 UTC+1 cpu...@gmail.com wrote: > On Monday, March 29, 2021 at 9:05:50 PM UTC+2 rog wrote: > >> I often call net.Listen directly before calling Serve in a goroutine. >> That way you can connect to the server's socket immediately even though the >> server might

Re: [go-nuts] How to wait for HTTP server to start?

2021-03-30 Thread cpu...@gmail.com
On Monday, March 29, 2021 at 9:05:50 PM UTC+2 rog wrote: > I often call net.Listen directly before calling Serve in a goroutine. That > way you can connect to the server's socket immediately even though the > server might take a while to get around to serving the request. > It seems this would