Re: [go-nuts] cgo: how to generate crash report/coredump on macOS for SIGSEGV

2020-10-02 Thread Robert Engels
A crash file is not a core dump. It does not contain a memory dump. > On Oct 2, 2020, at 11:36 PM, Kurtis Rader wrote: > >  >> On Fri, Oct 2, 2020 at 9:23 PM aihui zhu wrote: > >> I mean that is there any way to expose SIGSEGV to macOS system just like a >> pure C program, so that the syste

Re: [go-nuts] JMX Call with non-HTTP

2020-09-14 Thread Robert Engels
Search for Java RMI-IIOP. > On Sep 14, 2020, at 2:04 PM, Robert Engels wrote: > >  > You need a bridge. RMI requires Java. if you use a subset you can use > Corba/IIOP clients. > >>> On Sep 14, 2020, at 11:11 AM, Henrik Johansson wrote: >>> >> 

Re: [go-nuts] JMX Call with non-HTTP

2020-09-14 Thread Robert Engels
You need a bridge. RMI requires Java. if you use a subset you can use Corba/IIOP clients. > On Sep 14, 2020, at 11:11 AM, Henrik Johansson wrote: > >  > Newrelic has some tools for this but I think they require agents installed in > the Java side. > > I think you are better off going for th

Re: [go-nuts] alloc vs totalalloc in memory

2020-09-11 Thread Robert Engels
Because memory is reclaimed - the alloc is the “live” heap. TotalAlloc is a cumulative counter of byte allocated - bytes freed do not affect the counter. > On Sep 11, 2020, at 7:14 PM, Alexander Mills > wrote: > >  > Well why does TotalAlloc keep climbing up (increasing) in my program, but

Re: [go-nuts] Running goanalyzer on golang process running inside kubernetes pod

2020-09-11 Thread Robert Engels
ver. > > - go test -trace - Works with only tests > > Any thoughts/ideas of what we can do to get a trace file avoiding above > issues ? > >> On Fri, Sep 11, 2020 at 12:06 PM Robert Engels wrote: >> Please read golang.org/cmd/trace >> >> You need a tra

Re: [go-nuts] Running goanalyzer on golang process running inside kubernetes pod

2020-09-11 Thread Robert Engels
had an issue where user requests were not reaching our http server itself. > > In this case what are my options if pprof server is not reachable when we hit > the same issue again. > Are there any other tools which can be run independently? > >> On Fri, Sep 11, 2020 at 5:20 A

Re: [go-nuts] Running goanalyzer on golang process running inside kubernetes pod

2020-09-11 Thread Robert Engels
thing on the browser. > > Clicking on any of the graphs for a goroutine says the following. > failed to execute go tool pprof: exit status 1 > failed to execute dot. Is Graphviz installed? Error: exec: "dot": executable > file not found in $PATH > >> On Thu, Sep

Re: [go-nuts] Running goanalyzer on golang process running inside kubernetes pod

2020-09-10 Thread robert engels
> - syscall: syscall blocking profile > - sched: scheduler latency profile > > Flags: > -http=addr: HTTP service address (e.g., ':6060') > -pprof=type: print a pprof-like profile instead > -d: print debug info such as parsed events > > > On Thu, S

Re: [go-nuts] Running goanalyzer on golang process running inside kubernetes pod

2020-09-10 Thread Robert Engels
You can map the port but might be easier to capture to a file via code and use goanalyzer on the file. > On Sep 10, 2020, at 4:53 PM, Siddhesh Divekar > wrote: > >  > Hi, > > Has anyone tried running goanalyzer on golang process running inside k8s pod. > > If so can you point me to the ste

Re: [go-nuts] Why does race detector only throw out warning rather than fatal error?

2020-09-08 Thread Robert Engels
The reason is so that you can detect multiple race conditions per run. Race detector is not designed for production runs. > On Sep 8, 2020, at 7:48 AM, Cholerae Hu wrote: > > Code with data races is invalid code, we shouldn't let it run once we find a > data race. Actually, since Go 1.5, whe

Re: [go-nuts] Failing to build goanalyzer

2020-08-30 Thread robert engels
/goanalyzer/user_task_span_1_11_good #gosetup 2020/08/30 18:54:19 Parsing trace... 2020/08/30 18:54:19 Splitting trace... 2020/08/30 18:54:19 Opening browser. Trace viewer is listening on http://127.0.0.1:57135 > On Aug 29, 2020, at 7:43 PM, Robert Engels wrote: > > I have not tried build

Re: [go-nuts] Failing to build goanalyzer

2020-08-29 Thread Robert Engels
I have not tried building it in a while. I assume some internals have changed. I’ll look into it. > On Aug 29, 2020, at 7:08 PM, Siddhesh Divekar > wrote: > > Hi, > > Has anyone tried building goanalyzer recently? > Am I missing something very basic here. > > goanalyzer/cmd/goanalyzer$ ls >

Re: [go-nuts] Re: How to know if interface{} data is nil w/o reflecting?

2020-08-27 Thread Robert Engels
was being argued against. > On Aug 27, 2020, at 1:36 PM, burak serdar wrote: > > On Thu, Aug 27, 2020 at 12:27 PM Robert Engels wrote: >> >> I think you just made the case... if you have existing code that declares a >> concrete return type and you change that t

Re: [go-nuts] Re: How to know if interface{} data is nil w/o reflecting?

2020-08-27 Thread Robert Engels
I think you just made the case... if you have existing code that declares a concrete return type and you change that to an interface and nothing else you are going to have problems. > On Aug 27, 2020, at 12:11 PM, Jake Montgomery wrote: > >  > > >> On Thursday, August 27, 2020 at 10:45:52

Re: [go-nuts] Re: How to know if interface{} data is nil w/o reflecting?

2020-08-27 Thread Robert Engels
“Tip” of course :) > On Aug 27, 2020, at 6:03 AM, targe...@gmail.com wrote: > >  > > I'm mostly form C++ land > from of course :) > >> On Thursday, August 27, 2020 at 2:01:33 PM UTC+3 targe...@gmail.com wrote: >> I know this. I'm mostly form C++ land, so you may imagine how many warts are >>

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

2020-08-27 Thread Robert Engels
Could be a bug in the http/2 implementation. I would disable http/2 and see if you encounter the problem. > On Aug 27, 2020, at 6:02 AM, Robert Engels wrote: > >  > Ok, so your data collectors never complete. A simple change to make this > easier to diagnose is to not

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

2020-08-27 Thread Robert Engels
Ok, so your data collectors never complete. A simple change to make this easier to diagnose is to not spin up another collector controller at the 2 min mark if the previous has not completed. I would determine if the stuck collector is BQ or Elastic and check the server side logs. > On Aug 2

Re: [go-nuts] Re: How to know if interface{} data is nil w/o reflecting?

2020-08-27 Thread Robert Engels
This will be a Go wart that will never go away. All languages have warts. This one just happens to be on the top of the index finger There is so little utility in a nil interface but it’s there. > On Aug 27, 2020, at 5:14 AM, 'Axel Wagner' via golang-nuts > wrote: > >  > >> On Thu, Aug 27

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

2020-08-26 Thread Robert Engels
If you look at the stack trace the futex is because it is trying to shutdown the entire process - killing all of the M’s - probably because you sent the sigabort > On Aug 26, 2020, at 9:41 PM, Robert Engels wrote: > >  > The big query client may be “single threaded” meaning yo

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

2020-08-26 Thread Robert Engels
rc/runtime/proc.go:1928 +0xc0 > runtime.exitsyscall0(0xc003638000) > /usr/local/go/src/runtime/proc.go:3140 +0x111 > runtime.mcall(0x0) > /usr/local/go/src/runtime/asm_amd64.s:318 +0x5b > > On Wed, Aug 26, 2020 at 5:02 PM robert engels wrote: >> That should allow

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

2020-08-26 Thread robert engels
* time.Second > > On Tue, Aug 25, 2020 at 1:14 PM Siddhesh Divekar <mailto:siddhesh.dive...@gmail.com>> wrote: > 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. >

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 wr

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

2020-08-25 Thread Robert Engels
anyways ? > https://stackoverflow.com/questions/42238695/goroutine-in-io-wait-state-for-long-time > > >> On Mon, Aug 24, 2020 at 5:37 PM Robert Engels wrote: >> I think it is too hard to tell with the limited information. It could be >> exhausted connections or it

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

2020-08-24 Thread Robert Engels
; https://github.com/golang/go/issues/27044 >> >>> On Mon, Aug 24, 2020 at 12:54 PM Robert Engels >>> wrote: >>> Go routines in a waiting state should not be consuming CPU. Are you certain >>> they are not in constant transition from waiting to processing

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

2020-08-24 Thread Robert Engels
Go routines in a waiting state should not be consuming CPU. Are you certain they are not in constant transition from waiting to processing - this could show up as high CPU usage while everything looks blocks. I would use pprof - github.com/robaho/goanalyzer might be of assistance here to see t

Re: [go-nuts] Debug http calls made using go http client

2020-08-21 Thread Robert Engels
I would use wire shark to inspect the traffic in more detail. > On Aug 21, 2020, at 1:59 PM, krishna...@gmail.com > wrote: > >  > Hello Gophers, > > I am making multiple http calls from my go application to an external > vendor's http server using the go standard http client. I've set a 10

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

2020-08-20 Thread Robert Engels
I like it. Well done. > On Aug 20, 2020, at 9:22 PM, Jan Mercl <0xj...@gmail.com> wrote: > > On Fri, Aug 21, 2020 at 2:28 AM Ian Lance Taylor wrote: > >> To simplify the common case of a type parameter that has >> no constraints, we will introduce a new predeclared identifier “any” >> as an a

Re: [go-nuts] Memory synchronization by channel operations and mutexes

2020-08-17 Thread robert engels
Sorry Ian, I see you included this - I was typing the message and replied without reading the refresh. > On Aug 17, 2020, at 6:59 PM, robert engels wrote: > > See https://github.com/golang/go/issues/5045 > <https://github.com/golang/go/issues/5045> which has been open for

Re: [go-nuts] Memory synchronization by channel operations and mutexes

2020-08-17 Thread robert engels
See https://github.com/golang/go/issues/5045 which has been open for 7+ years. > On Aug 17, 2020, at 4:15 PM, Ian Lance Taylor wrote: > > On Mon, Aug 17, 2020 at 9:06 AM jake...@gmail.com wrote: >> >> My understanding is that atomic does not 'synchro

Re: [go-nuts] Generics: after type lists

2020-08-11 Thread robert engels
Isn’t the example with big.Float only a problem because of the pointer based design - which is much harder to write code with than a immutable value based one. Then you have D = A.Add(B).Add(C) with (Number n) func Add(a Number) Number Which is straightforward, and the compiler creates the t

Re: [go-nuts] "Interfaces" with type lists are a strange beast

2020-08-09 Thread robert engels
that, based on the current proposal, I go back to the position that Go doesn’t need generics. > On Aug 8, 2020, at 11:43 AM, Robert Engels wrote: > > Understood. Even if you keep operators they could be mapped to certain built > in interface methods. C++ has operator loading, J

Re: [go-nuts] "Interfaces" with type lists are a strange beast

2020-08-08 Thread Robert Engels
see. > On Aug 8, 2020, at 11:16 AM, Ian Lance Taylor wrote: > > On Fri, Aug 7, 2020 at 6:54 PM Robert Engels wrote: >> >> I’d really like to see an example of generic code that takes both string and >> numeric types that uses operators. Sorting/searching is one bu

Re: [go-nuts] "Interfaces" with type lists are a strange beast

2020-08-07 Thread Robert Engels
than 90% of all generic code is collections. Operators are not needed for these. > On Aug 6, 2020, at 2:45 PM, burak serdar wrote: > > On Thu, Aug 6, 2020 at 1:17 PM Ian Lance Taylor wrote: >> >>> On Thu, Aug 6, 2020 at 12:10 PM Robert Engels wrote: >>> >

Re: [go-nuts] "Interfaces" with type lists are a strange beast

2020-08-06 Thread Robert Engels
use different collations are used. I think having a higher bar for Go generic implementations is fine - writing generic code properly is harder than regular Go - there’s much more to resin about. > On Aug 6, 2020, at 1:53 PM, Ian Lance Taylor wrote: > > On Wed, Aug 5, 2020 at 8:

Re: [go-nuts] "Interfaces" with type lists are a strange beast

2020-08-05 Thread Robert Engels
. > On Aug 5, 2020, at 10:05 PM, Ian Lance Taylor wrote: > > On Wed, Aug 5, 2020 at 6:28 PM Robert Engels wrote: >> >> True, but cant Comparable be implemented by all built types? And Number be >> implemented by numeric types? Sure, you can’t use the operators in gene

Re: [go-nuts] "Interfaces" with type lists are a strange beast

2020-08-05 Thread Robert Engels
> On Tue, Aug 4, 2020 at 9:19 PM Robert Engels wrote: >> >> The operator support is what makes things so complicated. Why not define a >> “numeric” type that has methods for all the operators that is used with >> generics, similar to Number in Java. Then

Re: [go-nuts] "Interfaces" with type lists are a strange beast

2020-08-04 Thread Robert Engels
The operator support is what makes things so complicated. Why not define a “numeric” type that has methods for all the operators that is used with generics, similar to Number in Java. Then it is unified. If you are writing specialized math performant code you would probably use concrete types an

Re: [go-nuts] [Generics] Constraints package name

2020-07-26 Thread Robert Engels
I like ‘is’. Very readable and Go-like. > On Jul 26, 2020, at 6:05 AM, frederik.z...@gmail.com wrote: > >  >> On Sunday, July 26, 2020 at 12:46:38 PM UTC+2, Jesper Louis Andersen wrote: >> >> You can always solve that with a rename: >> >> import ( >> is "constraints" >> ) >> >> but you run

Re: [go-nuts] When set time.Location, will be detected Data Race

2020-07-24 Thread Robert Engels
Yea, it is strange the the Json encoder api doesn’t allow the caller to provide a mashaller for any type. It would be trivial to change the code to do so. That being said I’m sure you can find custom json libs on the web that will do this. Or fork it yourself - it is not a lot of code. > On J

Re: [go-nuts] Using GTSM with GRPC

2020-07-23 Thread Robert Engels
at 11:51 AM, Matthew Walster wrote: > >  >> On Wed, 22 Jul 2020 at 23:30, Robert Engels wrote: >> Your network is setup wrong... if you are relying on a router to enforce ttl >> decrement for security. You can more easily prevent IP spoofing on the local >> net

Re: [go-nuts] Using GTSM with GRPC

2020-07-22 Thread Robert Engels
Your network is setup wrong... if you are relying on a router to enforce ttl decrement for security. You can more easily prevent IP spoofing on the local net (or at the router) and then just verify the IP network portion is correct. Easier with a simple IP table rather than doing it in user spac

Re: [go-nuts] Re: Allocating lots (e.g. a million) objects on the heap

2020-07-21 Thread Robert Engels
sync.Pool is not useful for long lived objects - which the op implies to me > On Jul 21, 2020, at 9:11 PM, tokers wrote: > > And maybe the reuse mechanism (e.g. sync.Pool) is good for you. >> On Tuesday, July 21, 2020 at 1:35:14 AM UTC+8 netconn...@gmail.com wrote: >> I have an application wher

Re: [go-nuts] [Generics] Simplified syntax to sidestep the bracket arguments

2020-07-21 Thread robert engels
I think this has merit. “Feels” Go-Like to me and is very easy to read. > On Jul 21, 2020, at 10:56 AM, Kh Af wrote: > > Forgive me for making a new thread, I felt the older ones had run their > course, and I had trouble deciding who to reply to. > > I would like to propose a simpler syntax wh

Re: [go-nuts] [generics] Type embedding in generic types

2020-07-21 Thread Robert Engels
The Context problem is more easily solved using package namespaces for keys with conventions rather than type embedding. Otherwise you end up with a brittle multiple inheritance problem. Or you need language support for typed TLS and remove Context entirely. > On Jul 21, 2020, at 6:24 AM, 'A

Re: [go-nuts] Allocating lots (e.g. a million) objects on the heap

2020-07-20 Thread Robert Engels
All you are doing is replicating manual memory management. If you are going to do that just use CGo with malloc & free so you will have decent debugging. If not, don’t do this at all and let the GC do its work (but Go lack of a generational GC might be an issue here). > On Jul 20, 2020, at 12

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

2020-07-16 Thread Robert Engels
Best proposal yet! I see increased Go adoption in the hipster /craft beer community. > On Jul 16, 2020, at 6:49 PM, Denis Cheremisov > wrote: > > func 🍺X🍺GenericFunction(x X) … > > пятница, 17 июля 2020 г. в 01:25:29 UTC+3, kortschak: >> On Thu, 2020-07-16 at 13:44 -0700, jpap wrote: >> >

Re: [go-nuts] Generics and parentheses

2020-07-15 Thread Robert Engels
t; are all top 10, and the C family is clearly the syntactic heritage of Go. > > And the use of [ ] in map is more semantically associated with its > conventional use as an element accessor in arrays / slices, not with some > more general kind of type parameter. > > - Randy > >&g

Re: [go-nuts] Generics and parentheses

2020-07-15 Thread Robert Engels
But Scala doesn’t use [] for anything else - Go does. > On Jul 15, 2020, at 9:58 AM, 'Nic Long' via golang-nuts > wrote: > > Square brackets work great. Scala uses them for generics to great effect. > They also make me think of Clojure, which introduced them to Lisp for similar > reasons to

Re: [go-nuts] Generics and parentheses

2020-07-14 Thread robert engels
My opinion is that every major language (no flames please… lots of developers write lots of programs and make money doing it) that supports generics uses < > for generic types, so Go should too - since there is no reason to deviate from this other than to avoid changes to the parser. Seems bette

Re: [go-nuts] filepath.Abs ignores '~'

2020-07-07 Thread Robert Engels
The ~ is a feature of the OS shell. > On Jul 7, 2020, at 6:44 PM, 'Jacob Kopczynski' via golang-nuts > wrote: > > I tried to state a path relative to the home directory, since in the context > I am writing for the path from ~ to the Git repository will be consistent, > though the meaning of

Re: [go-nuts] Clean shutdown when blocked on I/O

2020-07-06 Thread Robert Engels
I only meant that the “socket closed” error is a good (perfect?) signal that the Go routine should exit rather than using an additional state var. > On Jul 6, 2020, at 6:43 PM, Ian Lance Taylor wrote: > > On Mon, Jul 6, 2020 at 4:23 PM robert engels wrote: >> >> If yo

Re: [go-nuts] Clean shutdown when blocked on I/O

2020-07-06 Thread robert engels
PM, Ian Lance Taylor wrote: > > On Mon, Jul 6, 2020 at 10:57 AM Robert Engels <mailto:reng...@ix.netcom.com>> wrote: >> >> You need to close the socket from another Go routine. Otherwise the Reader >> api would need to be changed to always take a Context. >

Re: [go-nuts] Clean shutdown when blocked on I/O

2020-07-06 Thread Robert Engels
You need to close the socket from another Go routine. Otherwise the Reader api would need to be changed to always take a Context. > On Jul 6, 2020, at 12:36 PM, Brian Candler wrote: > >  >> On Monday, 6 July 2020 14:53:55 UTC+1, Ian Davis wrote: >> Can you write your own ContextReader that ch

Re: [go-nuts] Go in programming language trends

2020-07-04 Thread Robert Engels
The fact that JS is top and above TyoeScript says a lot. > On Jul 4, 2020, at 11:49 AM, Everton Marques > wrote: > >  > https://tjpalmer.github.io/languish/ > > -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To unsubscribe from this

Re: [go-nuts] Re: Speed up png.Decode

2020-06-27 Thread Robert Engels
Just because the bulk of the time is in the decode doesn’t mean the decode is inefficient or can be improved upon. It might be the most expensive stage in the process regardless of the implementation. > On Jun 27, 2020, at 12:15 AM, Lee Armstrong wrote: > >  > Thanks Rob, > > Yes you are ri

Re: [go-nuts] Re: [generics] default type parameter

2020-06-26 Thread Robert Engels
Yes I did. Sorry all. > On Jun 26, 2020, at 7:42 PM, Sebastien Rosset wrote: > >  > Did you reply to the wrong thread? > >> On Friday, June 26, 2020 at 3:09:42 PM UTC-7, Robert Engels wrote: >> What about an option to disable the signal on the thread as it crosses

Re: [go-nuts] Re: [generics] default type parameter

2020-06-26 Thread Robert Engels
What about an option to disable the signal on the thread as it crosses the CGo boundary? This seems better than disabling the async preemption entirely? > On Jun 26, 2020, at 4:45 PM, Sebastien Rosset wrote: > >  > > Below are the publicly exposed asn1.ObjectIdentifier fields in the golang/go

Re: [go-nuts] How to do "frame" based profiling in GO?

2020-06-26 Thread Robert Engels
You want to use pprof “labels” and mark the frames. > On Jun 26, 2020, at 1:35 PM, michael.nis...@gmail.com wrote: > >  > Hello, > > I'm trying to figure out how to do "frame" based profiling in GO and was > redirect to this mailing--list from the `r/golang` sub (topic). Would be > amazing i

Re: [go-nuts] Slices and inconsistency

2020-06-26 Thread Robert Engels
I don’t think “how it works” is the confusion, more of “how to use it properly” My opinion is that if RTFM is required more than once for a core concept there may be a design problem. It clearly bites a lot of people. Slices are a higher level struct, as the underlying array is the same as Java,

Re: [go-nuts] Slices and inconsistency

2020-06-26 Thread Robert Engels
That is not quite true. Once is it extended beyond the current capacity you will have a new backing array and the slices will diverge. > On Jun 26, 2020, at 8:23 AM, David Riley wrote: > > On Jun 25, 2020, at 8:49 PM, chandrak13...@gmail.com wrote: >> >> Essentially based on the existing cap

Re: [go-nuts] Re: Speed up png.Decode

2020-06-26 Thread Robert Engels
Just parallelize in the cloud. At a minimum parallelize locally with multiple Go routines. > On Jun 26, 2020, at 7:51 AM, howardcs...@gmail.com wrote: > >  > I don't know if the CGo transitions for 16 million images will completely > swamp the speed gains, or how much post-processing you need

Re: [go-nuts] [runtime] Scheduling overhead incurred by the runtime

2020-06-24 Thread Robert Engels
will prevent the scheduler from getting involved. > On Jun 25, 2020, at 12:10 AM, Robert Engels wrote: > >  > See https://medium.com/@cpuguy83/non-blocking-i-o-in-go-bc4651e3ac8d > >>> On Jun 24, 2020, at 11:34 PM, Deepak Sirone >>> wrote: >>> >

Re: [go-nuts] [runtime] Scheduling overhead incurred by the runtime

2020-06-24 Thread Robert Engels
t > statements? > >> On Tuesday, June 23, 2020 at 2:20:12 PM UTC-5, Robert Engels wrote: >> You need to keep the routines “hot” - use polling design... >> >>>> On Jun 23, 2020, at 11:33 AM, Deepak Sirone wrote: >>>> >>>  >>> I

Re: [go-nuts] [generics] type constraint for structs

2020-06-24 Thread Robert Engels
UTC+10, Ian Lance Taylor wrote: >> On Wed, Jun 24, 2020 at 12:22 PM David Finkel wrote: >> > >> > On Wed, Jun 24, 2020 at 9:34 AM Robert Engels >> > wrote: >> >> >> >> Generics will not solve this fully anyway - you’ll still ne

Re: [go-nuts] [generics] type constraint for structs

2020-06-24 Thread Robert Engels
Generics will not solve this fully anyway - you’ll still need reflection. Why not just return empty if the user doesn’t pass a struct? > On Jun 24, 2020, at 8:29 AM, Pee Jai wrote: > >  > Here is my use case: > https://godoc.org/github.com/rocketlaunchr/react#UnmarshalState > > That function

Re: [go-nuts] [runtime] Scheduling overhead incurred by the runtime

2020-06-23 Thread Robert Engels
You need to keep the routines “hot” - use polling design... > On Jun 23, 2020, at 11:33 AM, Deepak Sirone wrote: > >  > I have a benchmark (process A) which launches another process (process B) and > the two send messages back and forth through a couple of sockets, one for > sending and the o

Re: [go-nuts] Re: [generics] is generics with constrain needed ?

2020-06-22 Thread Robert Engels
t 4:04 PM Robert Engels wrote: >> >> The list of types supporting LessThan is not finite, is unbounded. The list >> of types supporting < is finite. But < could of been viewed as syntactic >> sugar if the Go designers so chose. > > Actually, the list of types

Re: [go-nuts] Re: [generics] is generics with constrain needed ?

2020-06-22 Thread Robert Engels
The list of types supporting LessThan is not finite, is unbounded. The list of types supporting < is finite. But < could of been viewed as syntactic sugar if the Go designers so chose. > On Jun 22, 2020, at 4:01 PM, burak serdar wrote: > > On Mon, Jun 22, 2020 at 2:53 PM Ian Lance Taylor wro

Re: [go-nuts] Block-based data structures and the Type Parameters - Draft Design

2020-06-22 Thread Robert Engels
The compiler could conceivably generate code that did that - and with aggressive inlining you would end up the same as native type code. I would argue that using raw slices in data structures leads to maintainability issues anyway. The key is higher level constructs that give you similar if not

Re: [go-nuts] Can you have multiple go routines waiting on a socket?

2020-06-21 Thread Robert Engels
Most webservers use multiple threads per socket - this is commonly observed with async IO. IO in Go is async behind the scenes so you don’t need to worry about this. You probably will use a Go routine to read the socket; and probably another to do the writing - so you can treat the IO as synchro

Re: [go-nuts] Re: political fundraising on golang.org!

2020-06-18 Thread Robert Engels
Know your audience, and read the room. The message and how the message is delivered are distinct. Not executing on the latter obscures the former. Clearly this is a common problem for many on this subject. > On Jun 18, 2020, at 11:04 PM, Sam Whited wrote: > > On Thu, Jun 18, 2020, at 22:00

Re: [go-nuts] Re: go scheduler tracing

2020-06-17 Thread Robert Engels
What is the question? > On Jun 17, 2020, at 4:06 PM, envee wrote: > > Hi, Is anyone able to help me here ? > Here is a (simplified) snippet of the code, in case it helps answering my > query. I basically create a goroutine for every input file (assume max 8) and > then wait for processing of a

Re: [go-nuts] [generics] Awkwardness interfacing between primitives and structs

2020-06-17 Thread Robert Engels
This is not how it is typically done in Java. You create an immutable List that is backed by the array. No copy required. You will also implement RandonAccess to distinguish from linked lists. Lastly, it doesn’t need to be immutable, and lots of structures like ArrayList are mutable and backe

Re: [go-nuts] Memory synchronization by channel operations and mutexes

2020-06-15 Thread Robert Engels
Depends on the processor but usually it entails a “fence” instruction. > On Jun 15, 2020, at 11:31 AM, Leo Baltus wrote: > > from gopl chapter 9.4 'Memory synchronisation’ > > Synchronization primitives like channel communications and mutex operations > cause the processor to flush out and c

Re: [go-nuts] political fundraising on golang.org!

2020-06-15 Thread Robert Engels
I support the EJI 100%. That was not the white person or Ivory tower I was referring to. As a person living with burned out and destroyed buildings on all sides in one of the most violent cities in the US, I am too close to this issue and will no longer comment. I only ask for compassion. > On

Re: [go-nuts] political fundraising on golang.org!

2020-06-15 Thread Robert Engels
Maybe I am confusing the lower case black lives matter with the BLM org and platform - the former I agree with wholeheartedly. I can assure you that elements of the BLM platform are very fringe with little support in the minority community- specifically the defund the police - so having a white

Re: [go-nuts] political fundraising on golang.org!

2020-06-15 Thread Robert Engels
ote: > > If the argument were what specific charity to put in the banner this > might be a discussion worth having, however I get the impression that > many of these people are arguing against including a banner at all. > >> On Mon, Jun 15, 2020, at 10:04, Robert Engels wrote: &g

Re: [go-nuts] political fundraising on golang.org!

2020-06-15 Thread Robert Engels
I think a more specific point to be made is that it is a few select people speaking for the community. In fact, the associating of BLM with the EJI is suspect. Neither org associates with the other and their platforms are in many ways Incompatible. As a 30+ year major inner city dweller I can

Re: [go-nuts] political fundraising on golang.org!

2020-06-14 Thread robert engels
14, 2020, at 5:19 PM, Axel Wagner > wrote: > > On Mon, Jun 15, 2020 at 12:08 AM Robert Engels <mailto:reng...@ix.netcom.com>> wrote: > Equating not supporting this and supporting marginalized groups is not > correct. You can support marginalized groups all day and disag

Re: [go-nuts] political fundraising on golang.org!

2020-06-14 Thread Robert Engels
Equating not supporting this and supporting marginalized groups is not correct. You can support marginalized groups all day and disagree on how best to do so. It doesn’t have to be political at all. > On Jun 14, 2020, at 4:43 PM, 'Axel Wagner' via golang-nuts > wrote: > >  > Hi, > > the Go

Re: [go-nuts] political fundraising on golang.org!

2020-06-14 Thread Robert Engels
ertain kinds of political speech including endorsing individual > parties or candidates. The banner does not point to any particular > political party. > > —Sam > >> On Sun, Jun 14, 2020, at 10:10, Robert Engels wrote: >> I agree it is an important social issue, but in this

Re: [go-nuts] political fundraising on golang.org!

2020-06-14 Thread Robert Engels
Major correction, this is not the .org I was thinking of. I have no knowledge that what I said is the case with the EJI. > On Jun 14, 2020, at 9:10 AM, Robert Engels wrote: > > I agree it is an important social issue, but in this particular case I > believe the funds are directed

Re: [go-nuts] political fundraising on golang.org!

2020-06-14 Thread Robert Engels
I agree it is an important social issue, but in this particular case I believe the funds are directed to specific political parties so the boundary between supporting social issues and political contributions is murky. I am not saying it shouldn’t be done but it should be more transparent. > O

Re: [go-nuts] The next layer of abstraction for Go development?

2020-06-13 Thread Robert Engels
That is why a senior engineer creates a facade for the specific problem domain. > On Jun 13, 2020, at 3:29 PM, 'Axel Wagner' via golang-nuts > wrote: > >  > Maybe a dumb question but: Why would we *need* a standard framework? > > We're currently re-working this at my workplace and in the pro

Re: [go-nuts] what is the complexity of regexp.MustCompile()?

2020-06-11 Thread Robert Engels
Why would you ever allow that regex? > On Jun 11, 2020, at 11:01 AM, Andy Balholm wrote: > > It’s apparently quadratic in some cases. Yesterday fuzzing on > github.com/andybalholm/cascadia found an input that triggered a timeout. The > time was being spent compiling a 180-KB regex (which I’m

Re: [go-nuts] It is said that future Macs will use ARM, is golang ready for this move ?

2020-06-11 Thread Robert Engels
The wiki page has some neat details on this https://en.m.wikipedia.org/wiki/Mac_68k_emulator > On Jun 10, 2020, at 9:49 PM, Robert Engels wrote: > > Yep. My timeline/memory was wrong. It was the 68k to PowerPC. Intel required > dual binaries. Thanks for the correction. > >

Re: [go-nuts] It is said that future Macs will use ARM, is golang ready for this move ?

2020-06-10 Thread Robert Engels
Anyway, given that the PowerPC translation on Intel only lasted through 10.6, > and Apple just dropped 32-bit Intel support in 10.15, I would expect > backwards compatibility support for Intel apps (if they're even planning it) > to drop within 2-3 revisions of macOS after the transi

Re: [go-nuts] It is said that future Macs will use ARM, is golang ready for this move ?

2020-06-10 Thread Robert Engels
When Macs first switched to Intel the OS included a Motorola 68k emulator so that existing Mac binaries would run. > On Jun 10, 2020, at 6:17 PM, Scott Pakin wrote: > >  >> On Wednesday, June 10, 2020 at 1:24:24 PM UTC-6, David Riley wrote: >> This is certainly pedantry, but it's worth noting

Re: [go-nuts] It is said that future Macs will use ARM, is golang ready for this move ?

2020-06-10 Thread Robert Engels
The App Store does not store LLVM IR code for Mac software - at least not by default. It stores compiled binaries and optional debug symbols. > On Jun 10, 2020, at 4:51 AM, Jesper Louis Andersen > wrote: > >  > I'd say Go is as ready as you can be for that move. darwin/arm64 is currently >

Re: [go-nuts] Re: what is the complexity of regexp.MustCompile()?

2020-06-08 Thread Robert Engels
enuinely don't understand the instinct to tell someone "why would >> you care?" instead of telling them the answer, FWIW. Especially in a case >> like this, where the answer is pretty simple) >> >>> I'm pretty sure Robert is not arguing that the sc

Re: [go-nuts] Re: what is the complexity of regexp.MustCompile()?

2020-06-08 Thread Robert Engels
ot; is *exactly* the conclusion > that a small complexity class gives you. > >> On Mon, Jun 8, 2020 at 7:17 PM Robert Engels wrote: >> If the input regex string is bounded by a typical user input box - the >> compilation time will be negligible when compared to t

Re: [go-nuts] Re: what is the complexity of regexp.MustCompile()?

2020-06-08 Thread Robert Engels
If the input regex string is bounded by a typical user input box - the compilation time will be negligible when compared to the runtimes. > On Jun 8, 2020, at 11:07 AM, Axel Wagner > wrote: > >  > Oh, true, I overlooked that detail. But FTR, they clarify their question > subsequently and

Re: [go-nuts] Re: what is the complexity of regexp.MustCompile()?

2020-06-08 Thread Robert Engels
point. So regardless of the complexity you need other constraints anyway. Build those in at the request handling level to avoid DOS and UX issues. > On Jun 8, 2020, at 8:27 AM, 'Axel Wagner' via golang-nuts > wrote: > >  > > >> On Mon, Jun 8, 2020 at 3:19 P

Re: [go-nuts] Re: what is the complexity of regexp.MustCompile()?

2020-06-08 Thread Robert Engels
cancel out stage is all that is required. > On Jun 8, 2020, at 8:04 AM, 'Axel Wagner' via golang-nuts > wrote: > >  >> On Mon, Jun 8, 2020 at 2:53 PM Robert Engels wrote: > >> Attempting to prevent DOS attacks through algorithm efficiency never work

Re: [go-nuts] Re: what is the complexity of regexp.MustCompile()?

2020-06-08 Thread Robert Engels
Attempting to prevent DOS attacks through algorithm efficiency never works - you have to have resource throttling. I’m guessing the IO cost of pulling the text in this case has a better chance of creating a DOS than the regex compile. > On Jun 8, 2020, at 7:40 AM, 'Axel Wagner' via golang-nut

Re: [go-nuts] What Go devs think about issues described by Daniel Lemire in article "The Go compiler needs to be smarter"?

2020-06-04 Thread Robert Engels
The author either doesn’t know Java or had significant editing errors - Java determines uses the runtime processor type to optimize - it is not done at compiler time. It has different implementations based on processor - like Go - and it does JIT optimizations based on processor as well. More

Re: [go-nuts] Assignment of pointer values in a struct...

2020-06-04 Thread Robert Engels
You need pointers to strings if you need a nil value to be represented which is often the case in databases. > On Jun 4, 2020, at 9:30 AM, Saksham Saxena wrote: > > Yep perfectly fine. MongoDB Driver for Go also uses such a wrapper at many > places where it takes a string as an argument and

Re: [go-nuts] return generic slice from a function

2020-05-30 Thread Robert Engels
You are dealing in double digit nano differences on an IO call - it makes no difference. Use whichever code is easier to work with and understand. > On May 30, 2020, at 4:45 AM, amarjeetanandsi...@gmail.com wrote: > >  > Hi > > I have a db package, which needs to return a slice of struct(of u

Re: [go-nuts] Is there a way to create a global variable inside go routine stack? so that i can access any time, without passing around between methods/functions. Crazy thought !!!..

2020-05-29 Thread robert engels
Your use of the word “Global” in this sense is very non-standard. What the issue refers to is TLS/GLS which is scoped by the Go routine - regular exported variables are “global”. > On May 29, 2020, at 10:07 PM, adithyasasha...@gmail.com wrote: > > Thanx. This i thought but i want context as "Gl

Re: [go-nuts] Is there a way to create a global variable inside go routine stack? so that i can access any time, without passing around between methods/functions. Crazy thought !!!..

2020-05-29 Thread robert engels
As the issue concludes - it was decided against. So, nothing to see here folks. > On May 29, 2020, at 10:04 PM, adithyasasha...@gmail.com wrote: > > https://github.com/golang/go/issues/21355 > , this is the issue i am reffering > to. > > On Monday, Ma

<    2   3   4   5   6   7   8   9   10   11   >