Re: [go-nuts] New Go API for protobuf

2020-04-17 Thread Tharaneedharan Vilwanathan
Thank you all for the response. I changed the version to 1.4.0 for protobuf in grpc. I think it works fine but it also looked like if I attempt to regenerate .pb.go file for the "helloworld" example of grpc, it didn't quite seem to work. I will try it again a bit later. Regards dharani On Mon, Ap

[go-nuts] Re: How to scan input with termui?

2020-04-17 Thread 洪嘉鴻
I think that you misunderstand my meaning. The input I wondered is from the keyboards, like this . I have no idea how to implement it with termui. Besides, I edit the code to print something after closing the UI. Howev

[go-nuts] Re: DeepCloning a datastructure

2020-04-17 Thread Carsten Orthbandt
The easiest way is to marshal everything into some sort of byte slice, then unmarshal back. JSON doesn't work for this if there are private fields. But gotiny (https://github.com/niubaoshu/gotiny) does. If you use interfaces in your data, you have to register their types, everthing else is autom

Re: [go-nuts] New Go API for protobuf

2020-04-17 Thread Tharaneedharan Vilwanathan
Hi, In GRPC examples, I deleted helloworld.pb.go and recreated it (after installing protoc-gen-go from "google.golang.org/protobuf" cmd): xx:~/gopath/src/google.golang.org/grpc/examples/helloworld$ cd helloworld/ xx:~/gopath/src/google.golang.org/grpc/examples/helloworld/helloworld$ *protoc --go_

[go-nuts] "Timers rely on the network poller", why is that?

2020-04-17 Thread Vincent Blanchon
Hi everyone, >From what I understand, timers are ran by: - the P holding them - other P if timer-stealing happen (thanks to the async preemption that should not happen often) - sysmon thread that, periodically, check if some timers have to run But, in the comments of the code, I have seen this s

[go-nuts] Re: How to scan input with termui?

2020-04-17 Thread Brian Candler
Well, it's always good to fix the errors :-) In short, you'll need to get a string from termui, and then use fmt.Sscanf instead of fmt.Scanf. A quick google for "go termui text input" turns up these as the first two hits: https://github.com/gizak/termui/issues/34 https://github.com/gizak/termui

[go-nuts] Re: "Timers rely on the network poller", why is that?

2020-04-17 Thread Amnon Baron Cohen
The go runtime does its waiting (both for timers and network events) in netpoll. On Friday, 17 April 2020 11:10:58 UTC+1, Vincent Blanchon wrote: > > Hi everyone, > > From what I understand, timers are ran by: > - the P holding them > - other P if timer-stealing happen (thanks to the async preemp

[go-nuts] SWIG-generated Go wrapper mishandling(?) pointers to pointers to structs

2020-04-17 Thread mark mellar
(Cross posting with SO https://stackoverflow.com/questions/61258160/swig-generated-go-wrapper-mishandling-pointers-to-pointers-to-structs ) Hi folks, We're integrating a Go program with a 3rd party C api, but are getting some odd results when working with pointers to pointers to structs. A mode

[go-nuts] Order of eval in struct keys

2020-04-17 Thread roidelapluie
Hi, Reading https://golang.org/ref/spec#Order_of_evaluation does not explain if the order of evaluation in struct is defined. see https://play.golang.org/p/tjCrTI77UwZ Is that behavior guaranteed? Thanks -- You received this message because you are subscribed to the Google Groups "golang-nu

[go-nuts] Monkey patching question

2020-04-17 Thread dick . r . chiang
An upstream package object is lowercase and thus unexported and thwarts my attempt at using bouk/monkey (github.com/bouk/monkey). How should I insert a fmt.Println in one of its methods? Thank you. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group

Re: [go-nuts] x/text: Interest in Unicode text segmentation?

2020-04-17 Thread Matt Sherman
Nice. Well, happy to discuss how I might be helpful — implementation, API design, etc. For the work I’m doing on UAX 29, the key API is unicode.Is. I am satisfied with the perf so far. unicode.Is dominates the profiling, but that’s to be expected, as my scanner is basically a tight loop evaluating

Re: [go-nuts] Order of eval in struct keys

2020-04-17 Thread Ian Lance Taylor
On Fri, Apr 17, 2020 at 8:55 AM wrote: > > Reading https://golang.org/ref/spec#Order_of_evaluation does not explain if > the order of evaluation in struct is defined. > > see https://play.golang.org/p/tjCrTI77UwZ > > Is that behavior guaranteed? There is no guarantee about the order of evaluatio

Re: [go-nuts] SWIG-generated Go wrapper mishandling(?) pointers to pointers to structs

2020-04-17 Thread Ian Lance Taylor
On Fri, Apr 17, 2020 at 7:34 AM mark mellar wrote: > > (Cross posting with SO > https://stackoverflow.com/questions/61258160/swig-generated-go-wrapper-mishandling-pointers-to-pointers-to-structs) > > Hi folks, > > We're integrating a Go program with a 3rd party C api, but are getting some > odd

[go-nuts] Monkey patching question

2020-04-17 Thread Tamás Gulácsi
If you really needy declare another struct with matching layout (field types, order, etc) and unsafe-convert it. -- 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

Re: [go-nuts] My solution to Web Crawler excercise

2020-04-17 Thread Vaibhav
Hi, I didn't want to create a new thread with same topic so though of making a reply here. I made a solution for the same problem https://play.golang.org/p/GP8qVB9FPfx without the use of lock and somehow it is working, but ends up going in the deadlock! What is going wrong here? func Crawl(roo

Re: [go-nuts] My solution to Web Crawler excercise

2020-04-17 Thread Will S
Your deadlock comes from the channel never being closed so the for loop in your main go routine never ends. You need to add some logic to figure out when to close the channel, or break out of the loop (and then close the channel). - Will On Fri, Apr 17, 2020 at 2:47 PM Vaibhav wrote: > Hi, > I

[go-nuts] Re: [ANN] Gio: portable immediate mode GUI programs in Go for iOS/tvOS, Android, macOS, Linux, Windows

2020-04-17 Thread nuskenterprise
Thank you for your Contribution to ease the gioui. Following link you mentioned for installation in your read file https://man.sr.ht/~eliasnaur/gio/install.md does not working now. Please explain me how to install goui. Thank you again. On Tuesday, 17 March 2020 07:55:33 UTC+5, Jason E. Aten wr