Re: [go-nuts] syscall/js documentation missing

2021-06-21 Thread Tor Langballe
ion that actually has > API defined now: > https://golang.org/pkg/syscall/js/?GOOS=js=wasm > > On Fri, Jun 18, 2021 at 11:28 PM Tor Langballe > wrote: > >> Is anyone else seeing this? >> >> https://golang.org/pkg/syscall/js/ >> >> shows just a header pa

[go-nuts] syscall/js documentation missing

2021-06-18 Thread Tor Langballe
Is anyone else seeing this? https://golang.org/pkg/syscall/js/ shows just a header paragraph about it being experimental. All the api documentation seems to be gone. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this

Re: [go-nuts] [generics] generic function definition all in one parameter list

2020-07-21 Thread Tor Langballe
For constraints they also could be after type name: func IndexOf(slice []type T comparable, find T) int or maybe this is clearer: func IndexOf(slice []type comparable T, find T) int This generic type information could be added on leftmost first use of the type in the parameter list or return,

[go-nuts] [generics] generic function definition all in one parameter list

2020-07-21 Thread Tor Langballe
This might have been discussed, but can't find anything about so easy, joined late... Could generic function definitions be done all in one paramter list using the type keyword? func IndexOf(slice []type T, find type T) int or func IndexOf(slice []type T, find T) int instead of func

[go-nuts] Re: Generics and parentheses

2020-07-18 Thread Tor Langballe
The square bracket has a bit of history in go already, as a key-type specifier for the somwhat generics-like map declaration; since we already do var map[int]string it feels a bit natural to specify types in square brackets to me. -- You received this message because you are subscribed to

[go-nuts] Re: ticker not firing often enough in minimal mac app with run loop

2019-09-05 Thread Tor Langballe
Thanks for all the replies everybody! id activity = [[NSProcessInfo processInfo] beginActivityWithOptions:NSActivityBackground reason:@"Good Reason"]; *Seems to do the trick*, and cpu usage stays at 0.01% I tried using sudo nice -1 and even -20, the cpu usage went up from 0.01 to 0.1, but I

[go-nuts] ticker not firing often enough in minimal mac app with run loop

2019-09-04 Thread Tor Langballe
I'm running a mac cocoa event loop, and calling a go ticker: void StartApp() { [NSAutoreleasePool new]; [NSApplication sharedApplication]; [NSApp setActivationPolicy:NSApplicationActivationPolicyRegular]; [NSApp run]; } func test() { last := time.Now() ticker :=