Re: [go-nuts] Looked at using Go ... nil/SEGV really bothered me .. Go2 Proposal?

2022-03-27 Thread 'Axel Wagner' via golang-nuts
On Mon, Mar 28, 2022 at 12:39 AM Sam Hughes wrote: > @Axel, I really did mean what I said. > So did I. FTR, if OP would have asked for changes to the type-system to be able to represent non-nilable types, my response would have been different. I didn't read their original message as asking for

Re: [go-nuts] Is there any way to produce etcd watch chan be closed

2022-03-27 Thread 袁成若
Ok, thanks. Ian Lance Taylor 于2022年3月26日周六 02:45写道: > On Fri, Mar 25, 2022 at 11:41 AM 袁成若 wrote: > > > > I met a problem about etcd watch channel. seems that be closed, but i > can not reproduce it. > > > > like this: > > > > ``` > > for { > > ach := etcdClientV3.Watch(context.Background

Re: [go-nuts] Looked at using Go ... nil/SEGV really bothered me .. Go2 Proposal?

2022-03-27 Thread Sam Hughes
@Michael%20Toy, I disagree! You're entirely correct to like what TypeScript does! It's a really cool example of a "modern language" strutting its stuff -- it's called "Narrowing": https://microsoft.github.io/TypeScript-New-Handbook/chapters/narrowing/ As a transpiler targeting Javascript, I thi

[go-nuts] HTTP/2 client creating multiple TCP Connections

2022-03-27 Thread envee
I have a telecom client application which connects to an HTTP/2 server (5G telecom application server, to be exact). At startup, I create an HTTP/2 client using the net/http2 Transport. It starts multiple goroutines each of which share/use the same HTTP/2 client connection to send HTTP POST requ

Re: [go-nuts] Investigating suspected memory leak based on StackInUse or HeapSys stats

2022-03-27 Thread robert engels
Because they are tracked separately. See allocSpan() in mheap.go. > On Mar 27, 2022, at 11:50 AM, Shlomi Amit wrote: > > Thank Robert. > My C code does call back Go code, but no recursion there. > If stack allocations are part of the heap, why it is not reflected in > heapAlloc and pprof? > >

Re: [go-nuts] Investigating suspected memory leak based on StackInUse or HeapSys stats

2022-03-27 Thread Shlomi Amit
Thank Robert. My C code does call back Go code, but no recursion there. If stack allocations are part of the heap, why it is not reflected in heapAlloc and pprof? On Sun, Mar 27, 2022, 18:52 robert engels wrote: > Neither of those track C allocations - unless the C is calling back into > Go. > >

Re: [go-nuts] Investigating suspected memory leak based on StackInUse or HeapSys stats

2022-03-27 Thread robert engels
Neither of those track C allocations - unless the C is calling back into Go. You can review the low level usage in stack.go Note that Go stack allocations are for the most part done in the heap, and are dynamically managed across Go routines. Are you possibly doing some very deep recursions are

[go-nuts] Java to Go converter - 2

2022-03-27 Thread alex-coder
After several months of switching from Java to Golang, it seemed to me that it would be interesting to make the translation of Java code into Golang automatically. The text below shows what has been done so far. The work is not a prototype, but rather indicates the possibility of achieving a res