[go-nuts] Help/Suggestions needed for architecture/design of an utility

2018-08-10 Thread akapoor87
Since quite some time I have been working on an IaaS Resource Monitoring Utility for different clouds (AWS, GCP, Azure, Openstack). Such a utility is particularly useful to my team because we develop a PaaS product (that gets deployed on all these IaaS platforms) and as a result of

Re: [go-nuts] Re: Go 1.11 Beta 3 is released

2018-08-10 Thread Ken MacDonald
Thanks guys. Inherited this system, and basic "go" worked fine, but had some GOPATH/PATH issues. Now seems good! - Ken On Thu, Aug 9, 2018 at 10:29 PM 'Bryan Mills' via golang-nuts < golang-nuts@googlegroups.com> wrote: > Did you happen to install it using another go1.11 beta build in module >

Re: [go-nuts] How to signal(sigint) blocking goroutine

2018-08-10 Thread nateandjenn
Thanks for all the comments. I did finally figure it out. https://play.golang.org/p/ghCT6DCDLJz On lines 69-70 changed that code from and exec.Command to exec.Start allowing me to sleep for the desired amount of time and then signal(sigint) the command via cmd.Process.Signal(syscall.SIGINT)

Re: [go-nuts] How to signal(sigint) blocking goroutine

2018-08-10 Thread Dave Cheney
The context value you pass into record isn't used and running record in its own goroutine doesn't really add anything because the main goroutine just waits for the other goroutine to exit. The exit the second goroutine will be at least 1 second, but could be much longer. On Saturday, 11 August

[go-nuts] Local shared libraries and forks without vendor and GOPATH

2018-08-10 Thread 'meta keule' via golang-nuts
Hi, if I understand correctly, the plan with versioned packages and modules is to deprecate the vendor folder and GOPATH some time after Go 1.11. Now it is possible to have own shared packages that aren't hosted anywhere, just sitting on the harddrive inside GOPATH or the vendor directory.

[go-nuts] Re: golang + wasm three times slower than javascript?

2018-08-10 Thread Space A.
Hi Kim, check this out: https://medium.com/gopherjs/surprises-in-gopherjs-performance-4a0a49b04ecd You will find some comparison of native Go vs C vs GopherJS (and JS itself, in general), with surprisingly "fast" JS* and "slow" Go. However the reason is not that obvious... Regards пятница,

Re: [go-nuts] How to signal(sigint) blocking goroutine

2018-08-10 Thread Space A.
> > The first step is to get the idea of signals out of your head. As I > said, you can not send a signal to a goroutine. It's the wrong > approach. > > Instead, create a context.Context value (e.g., context.Background)... > Hmm... *Do not communicate by sharing memory; instead, share

[go-nuts] Re: golang + wasm three times slower than javascript?

2018-08-10 Thread Agniva De Sarker
> however I expected at least equal to or better performance than JS. Hi, Unfortunately, this expectation is incorrect. Wasm is NOT guaranteed to give you better or at least equal performance to javascript. This is even in the general case when you run wasm using emcc. The performance is very

[go-nuts] Re: My trouble about GO interface

2018-08-10 Thread Henry
When designing a Go program, remember that there is no type hierarchy in Go. You create the actual Elephant, Tiger, etc., but not Animal since Animal is just a classification. In my fictional world, I may have Alice, Bob, and Charlie. If I need a banker, I just put up an ads with the job

[go-nuts] filepath.WalkFunc documentation question

2018-08-10 Thread djadala
Hi, documentation of filepath.WalkFunc state: The path argument contains the argument to Walk as a prefix; that is, if > Walk is called with "dir", which is a directory containing the file "a", > the walk function will be called with argument "dir/a". > but if the root parameter of Walk is

Re: [go-nuts] filepath.WalkFunc documentation question

2018-08-10 Thread Jan Mercl
On Fri, Aug 10, 2018 at 10:24 AM wrote: > Is this intentional or incorrect documentation ? The reason is that the resulting filename is produced by Join which Cleans the result. This should be perhaps added to the documentation. -- -j -- You received this message because you are subscribed

[go-nuts] Why we chose Go to develop our cloud-based project. I hope you enjoy it!

2018-08-10 Thread Мария
Hi! Our developer Pavel Petrukhin discusses why we chose Go to develop our cloud-based project. I hope you enjoy it! https://medium.com/containerum/why-we-use-go-to-develop-containerum-platform-for-kubernetes-3a33d5bdc5ec -- You received this message because you are subscribed to the Google

Re: [go-nuts] Code completion w/o GOPATH

2018-08-10 Thread Michael Banzon
> I wonder how in a world of go modules without a GOPATH, > code completion within editors is supposed to be implemented? Wouldn't it work like it does now - looking in your imported packages? There might be a "problem" with auto-importing and/or browsing packages available for import. For me

[go-nuts] Re: How should I avoid - literal copies lock value from

2018-08-10 Thread Kasun Vithanage
I want an slice of sets On Tuesday, August 7, 2018 at 6:32:25 PM UTC+5:30, Dave Cheney wrote: > > Pass a pointer, *Set into your Diff method. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving

Re: [go-nuts] Code completion w/o GOPATH

2018-08-10 Thread Paul Jolly
> I wonder how in a world of go modules without a GOPATH, > code completion within editors is supposed to be implemented? This is covered by https://github.com/golang/go/issues/24661. In short, tools like gocode (which is the most commonly used code-completion engine to my knowledge) would

[go-nuts] Re: golang + wasm three times slower than javascript?

2018-08-10 Thread peterGo
Kim, These are not useful results. Exponential recursive algorithms are known to be very expensive. Use an iterative algorithm. See Fibonacci Numbers and Binomial Coefficients: http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.137.752=rep1=pdf For example, $ go version go version

[go-nuts] Re: golang + wasm three times slower than javascript?

2018-08-10 Thread jucie . andrade
As far as I know, Go is the very first garbage collected language to support WebAssembly. That is very important. Remember the old motto: "first make it work, then make it right, and, finally, make it fast." It is just natural that things will be improved in future releases, as always has been

Re: [go-nuts] How to signal(sigint) blocking goroutine

2018-08-10 Thread Tamás Gulácsi
Juct use the same context to your ExecContexts and cancel it on success to make the other stop. -- 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

[go-nuts] [ANN]: go_generics code template engine for Go that Google was hiding from you :)

2018-08-10 Thread michal
TL;DR you can go-get go_generics - no Bazel needed go_generics [1] is a tool that was first observed few months back with the release of gVisor. It allows for generating code from template while still working with standard Go code. It's a great improvement over working with Go templates but

[go-nuts] [ANN]: go_generics code template engine for Go that Google was hiding from you :)

2018-08-10 Thread michal
TL;DR you can go-get go_generics - no Bazel needed go_generics [1] is a tool that was first observed few months back with the release of gVisor. It allows for generating code from template while still working with standard Go code. It's a great improvement over working with Go templates but

[go-nuts] Re: [ANN] go-set type-safe sets for Go

2018-08-10 Thread michal
Update: We have made generating sets for your own types really easy now: * go_generate tool was forked and you can just go-get it, see https://github.com/mmatczuk/go_generics * all the generation procedure was wrapped in a bash script In addition to that the original set implementation from

[go-nuts] no reply after writing data on TLS connection

2018-08-10 Thread Alan Lu
Hi there, I encountered a tls problem in my code , I can't get reply with this domain. But it works on google.com:443. What's wrong? -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from

Re: [go-nuts] no reply after writing data on TLS connection

2018-08-10 Thread Jan Mercl
On Fri, Aug 10, 2018 at 12:21 PM Alan Lu wrote: What's wrong? IDK, but possibly related: https://downforeveryoneorjustme.com/gp-cq9.tgpaccess.com -- -j -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop

[go-nuts] golang + wasm three times slower than javascript?

2018-08-10 Thread netbrain
So been playing around with go and wasm support on go version devel +479da24aac Fri Aug 10 00:47:31 2018 + linux/amd64 Curious on performance i tried implementing a Fibonacci algorithm function in JS and compared it to it's equivalent in GO. Calculating fib(44) takes 11 seconds on my

Re: [go-nuts] no reply after writing data on TLS connection

2018-08-10 Thread Alan Lu
No, but curl and python works. On Friday, August 10, 2018 at 6:24:34 PM UTC+8, Jan Mercl wrote: > > On Fri, Aug 10, 2018 at 12:21 PM Alan Lu > > wrote: > > What's wrong? > > IDK, but possibly related: > https://downforeveryoneorjustme.com/gp-cq9.tgpaccess.com > > -- > > -j > -- You

[go-nuts] Re: How to disable fmt-Error messages

2018-08-10 Thread 'Björn Karge' via golang-nuts
This is a Q workaround. A maintenance nightmare, but it works. Sprintf("Hello"+"%[2]s", "World", "") On Monday, January 31, 2011 at 7:46:59 PM UTC+8, Ondekoza wrote: > > The fmt-package has a convinent error report method. > > According to > > http://golang.org/pkg/fmt/ > > a string