[go-nuts] Re: what is empty block mean in ssa.Block?

2020-08-25 Thread xie cui
so what's dead value means? in my mind, dead value can be ignore, why we need to append it to b.Values? On Tuesday, August 25, 2020 at 7:39:55 AM UTC+8 keith@gmail.com wrote: > Empty here means has-only-dead-values. All the values still in s0 and s1 > are known to be dead. > > On Monday, Au

Re: [go-nuts] Go routines stuck in runtime_pollwait

2020-08-25 Thread Robert Engels
The tcp protocol allows the connection to wait for hours. Go routines stuck in wait do not burn CPU. Are the clients local or remote (over internet)? > On Aug 24, 2020, at 10:29 PM, Siddhesh Divekar > wrote: > >  > Robert, > > We will do the profiling next time we hit the issue again & see w

Re: [go-nuts] Go routines stuck in runtime_pollwait

2020-08-25 Thread Siddhesh Divekar
Clients are over the internet. On Tue, Aug 25, 2020 at 3:25 AM Robert Engels wrote: > The tcp protocol allows the connection to wait for hours. Go routines > stuck in wait do not burn CPU. Are the clients local or remote (over > internet)? > > On Aug 24, 2020, at 10:29 PM, Siddhesh Divekar > wr

Re: [go-nuts] Re: what is empty block mean in ssa.Block?

2020-08-25 Thread Keith Randall
On Tue, Aug 25, 2020 at 3:10 AM xie cui wrote: > so what's dead value means? in my mind, dead value can be ignore, why we > need to append it to b.Values? > > Dead means no longer used. Their values are ignored. We put them in b.Values so that they get cleaned up properly. See the deadcode pass f

[go-nuts] Re: abbreviation naming convention

2020-08-25 Thread Jamel Toms
Is there a rationale for this? At face-value it seems purely arbitrary and personal preference. It would be nice if it just stated that in the comments as opposed positioning itself as if there's something inherently better about this naming convention. On Wednesday, July 8, 2015 at 4:32:36 P

Re: [go-nuts] Re: abbreviation naming convention

2020-08-25 Thread Kurtis Rader
The rationale for uppercase abbreviations in Go symbol name derives from the english convention for writing acronyms using all uppercase letters. For example: NASA, ASCII, LOL, etc. That provides a visual clue the "word" is an acronym. On Tue, Aug 25, 2020 at 10:07 AM Jamel Toms wrote: > Is ther

Re: [go-nuts] Go routines stuck in runtime_pollwait

2020-08-25 Thread Robert Engels
Are you transferring a lot of data? Are the servers non-cloud hosted? You could be encountering “tcp stalls”. > On Aug 25, 2020, at 9:24 AM, Siddhesh Divekar > wrote: > >  > Clients are over the internet. > >> On Tue, Aug 25, 2020 at 3:25 AM Robert Engels wrote: >> The tcp protocol allows

Re: [go-nuts] Go routines stuck in runtime_pollwait

2020-08-25 Thread Siddhesh Divekar
Both servers and data sources are in the cloud. I would not say a lot of data, it's precomputed data which shouldn't take that long. On Tue, Aug 25, 2020 at 11:25 AM Robert Engels wrote: > Are you transferring a lot of data? Are the servers non-cloud hosted? > > You could be encountering “tcp s

[go-nuts] Re: Generics and parentheses

2020-08-25 Thread Kaveh Shahbazian
After playing in generics playground with a dozen of cases that came to my mind, IMHO brackets seem to be more clear than parentheses for declaring type parameters. Also using the type keyword before the type parameter reduces the cognitive load drastically. type StateFn[type T] func(T) StateFn

Re: [go-nuts] Re: Generics and parentheses

2020-08-25 Thread Ian Lance Taylor
Thanks for the note. Please see the discussion at https://groups.google.com/d/msg/golang-nuts/iAD0NBz3DYw/VcXSK55XAwAJ . Ian On Tue, Aug 25, 2020 at 1:21 PM Kaveh Shahbazian wrote: > > After playing in generics playground with a dozen of cases that came to my > mind, IMHO brackets seem to be m

Re: [go-nuts] Re: abbreviation naming convention

2020-08-25 Thread Jamel Toms
That makes sense, I never considered following that rule in code very important. I still think it's a personal preference, but at least I understand the rationale. It follows the spirit of Go lang with minimizing ambiguity. On Tue, Aug 25, 2020 at 1:27 PM Kurtis Rader wrote: > The rationale for

Re: [go-nuts] [ generics] Moving forward with the generics design draft

2020-08-25 Thread Kaveh Shahbazian
I am excited about sum-types as much as generics themselves. Also, it's nice that any is a keyword restricted to be used inside the type parameter declaration as a type constraint. Very nice! --- P.S. Of-course now the proposal seems to go with brackets. Nevertheless, I wrote this comment <

[go-nuts] Wasm test code, how to use syscall/js to create a document when invoked in node.js

2020-08-25 Thread John
I am using the following to run wasm tests: GOOS=js GOARCH=wasm go test -exec "node $(go env GOROOT)/misc/wasm/wasm_exec Because I'm in a node environment, the Global().Get("document") is empty. I need to be able to populate that with the correct document object so I can test DOM manipulation.

[go-nuts] instruction gen in amd64, it iseems not the best choice?

2020-08-25 Thread xie cui
function: func test3(a int) int { return a * 3 + 4 } go version go1.13.5 darwin/amd64 generate instructions: LEAQ(AX)(AX*2), AX LEAQ4(AX), AX As far as i known,there a better choice LEAQ4(AX*3), AX Can it be optimized? -- You received this message because you are subscribed

[go-nuts] Re: instruction gen in amd64, it iseems not the best choice?

2020-08-25 Thread peterGo
Go has optimizing compilers and linkers which are constantly being improved. The following example of your program reduces the call to test3 to MOVQ $0x82, 0(SP) where 0x82 = 130 = 42 * 3 + 4 $ cat xiecui.go package main func test3(a int) int { return a*3 + 4 } func main() { a := 42

Re: [go-nuts] [ generics] Moving forward with the generics design draft

2020-08-25 Thread Frederik Zipp
Ian Lance Taylor schrieb am Dienstag, 25. August 2020 um 00:35:33 UTC+2: > I've seen objections that a language change for generics should not > implicitly pull in a change to non-generic code. That seems fair. It > may be the right thing to do, but it should be justified separately. > So we're