Re: [go-nuts] Missing the review meeting notes

2023-10-02 Thread p...@morth.org
Thanks, great to know these will continue. Regards, Per Johansson On Tuesday, October 3, 2023 at 3:07:13 AM UTC+2 Russ Cox wrote: > Apologies, and thanks for the ping. > > There was no 2023-09-14 meeting due to the Go quiet week. > It looks like I forgot to post the minutes after the 2023-09-20

Re: [go-nuts] Re: Is it expected that signal.NotifyContext() changes the execution thread?

2023-10-02 Thread 'Luke Crook' via golang-nuts
It's a thing. In https://www.libsdl.org/ all rendering calls have to be performed in the main thread. And I believe in Windows, the event loop has to run in the same thread that created the window. /Luke On Mon, Oct 2, 2023 at 10:08 PM Kurtis Rader wrote: > Thank you to Ian and TheDiveO. I don'

Re: [go-nuts] Loop label style question

2023-10-02 Thread Kurtis Rader
I am writing a program that uses branch labels. It uses your example pattern to break out of a loop when a particular `select` situation occurs. Branch labels are not indented because they represent unusual locations for modifying the flow of control. This seems perfectly cromulent to me. A branch

[go-nuts] Loop label style question

2023-10-02 Thread 王富民awaw
I wonder does anyone know the reason and history of why loop labels are styled as such: * Labels are *unindented*. All Go constructs, such as fields in structs indent to the right. Why does loop labels unindented to the left? * Labels start with capital letters. Since all other Go identifie

Re: [go-nuts] Re: Is it expected that signal.NotifyContext() changes the execution thread?

2023-10-02 Thread Kurtis Rader
Thank you to Ian and TheDiveO. I don't understand why functions like gocv.io/x/gocv.NewWindow() have to run on the initial OS thread (at least on macOS). But adding this to my main package stopped the gocv package from panicking: func init() { runtime.LockOSThread() } Is there some reason tha

Re: [go-nuts] Generic "nillable" constraint

2023-10-02 Thread 'Axel Wagner' via golang-nuts
It doesn't solve the problem. That function signature you wrote could not be instantiated by `int`, for example. You can't write `comparable | nil`, as `comparable` is not allowed in a union. And if we allowed it, there would be no way to write the body of the function. It doesn't help with types l

Re: [go-nuts] Generic "nillable" constraint

2023-10-02 Thread Jon Watte
What's the concern with "a constant interface that is inhabited exactly by the types that can compare to nil?" This is clearly something the language has as a concept -- it knows whether "foo == nil" is an error or not. "nil" could be the ergonomic name for this constraint: func Compact[T nil](s

Re: [go-nuts] Missing the review meeting notes

2023-10-02 Thread Russ Cox
Apologies, and thanks for the ping. There was no 2023-09-14 meeting due to the Go quiet week. It looks like I forgot to post the minutes after the 2023-09-20 meeting, which I've just done. There was no 2023-09-27 meeting due to GopherCon. Best, Russ On Mon, Oct 2, 2023 at 7:14 AM p...@morth.org

Re: [go-nuts] Re: Is it expected that signal.NotifyContext() changes the execution thread?

2023-10-02 Thread Ian Lance Taylor
On Sat, Sep 30, 2023 at 11:56 PM Kurtis Rader wrote: > > And having said that I just tested using runtime.LockOSThread() and it does > allow me to use the more obvious, natural, way to write the main() function. > Which still begs the question of why calling signal.NotifyContext() causes > subs

Re: [go-nuts] Generic "nillable" constraint

2023-10-02 Thread Ian Lance Taylor
There is a lot more on this topic at https://go.dev/issue/61372. We're not sure how best to handle it. Ian -- 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

[go-nuts] Missing the review meeting notes

2023-10-02 Thread p...@morth.org
Hi, I might just be out of the loop, but it seems the review meeting notes are no longer posted since a few weeks back, https://github.com/golang/go/issues/33502 I really enjoyed reading these, it was a highlight of the week. Can I expect these to be continued or has the process changed someho