[go-nuts] Question on os.Cmd() and go routines

2017-08-05 Thread Dave Cheney
Don't discount the power of xargs and gnu parallel for solving problems like this. -- 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] Re: How to optimize as with -O2 from Gcc? (50x speedup)

2017-08-05 Thread Michael Jones
Great. Hope it helps. I had a typo in power 0 (which is never called. Change the return to 1.0. On Sat, Aug 5, 2017 at 6:50 PM wrote: > Thanks, Michael. > > I've created a tiny project with those files here: > https://github.com/cpmech/go-fast-math-experiments > > The output

Re: [go-nuts] [Go2] Reflect

2017-08-05 Thread Dan Kortschak
On Sat, 2017-08-05 at 09:58 -0700, Gert wrote: > Reflect should be a generic way of Go2, but everytime i need to > reflect  > around a Go1 interface i want to go on a vacation... Then the API is working! -- You received this message because you are subscribed to the Google Groups "golang-nuts"

Re: [go-nuts] Question on os.Cmd() and go routines

2017-08-05 Thread Christopher Nielsen
I recently wrote a concurrent tool using channels and goroutines and saw a 10x improvement over the sequential tool, and that is without any tuning. So I'd say that yes it is possible. On Sat, Aug 5, 2017 at 9:13 AM, Mandolyte wrote: > I have a command line program (Java

[go-nuts] [Go2] Reflect

2017-08-05 Thread Gert
package main import ( "fmt" "reflect" ) func main() { x := 4 v1 := reflect.ValueOf(x) fmt.Println("type:", v1.Type()) v2 := reflect.TypeOf(x) fmt.Println("type:", v2) } Kan we have something like this instead please package main import ( "fmt" "reflect" ) func main() { x := 4 r := reflect(x)

[go-nuts] Question on os.Cmd() and go routines

2017-08-05 Thread Mandolyte
I have a command line program (Java with mostly network i/o) that I must run several 100K times each with its own input. Wondered whether external commands are amenable to concurrency? Or whether best to run multiples copies dividing up the inputs so each copy has its own, say 100K values? Any

[go-nuts] Re: Generics are overrated.

2017-08-05 Thread David Collier-Brown
Ah well, one can always go back to COPY PAYLIB REPLACING A BY PAYROLL B BY PAY-CODE C BY GROSS-PAY D BY HOURS. (Courtesy of

[go-nuts] Concurrency Testimonial

2017-08-05 Thread Mandolyte
This past week I wrote an "audit" program for management to see how a long running data migration effort was going (it will take several months to complete). I was little discouraged when I found that the audit was on pace to complete in 10 days. That got me to thinking of making a concurrent

Re: [go-nuts] Re: Generics are overrated.

2017-08-05 Thread judsonwilson via golang-nuts
I program using Go every day at Google, and I enjoy the language, but I feel that the lack of generics is a downer. I also find the language to be like Unix in that it is so simple it takes a genius to understand it. On Saturday, July 29, 2017 at 3:59:55 PM UTC-7, Shawn Milochik wrote: > > As

[go-nuts] How to transfer large file over http protocol?

2017-08-05 Thread rishiloyola98245
Hi All, Here is my basic function which uses io.pipe() to transfer the large(1-2GB) file over http. I want to read file chunk wise and want to transfer it. Is there any better approach? Can some body review my code? Code -

[go-nuts] Re: Tool to move identifier into new package?

2017-08-05 Thread punya . biswal
Has there been progress on such a tool? It looks like: * Alan's original sockdrawer CL (https://codereview.appspot.com/186270043/) is still open * Michael's subsequent CL (https://go-review.googlesource.com/c/3269) has been abandoned * I couldn't find anything out there that does what mvdecl

Re: [go-nuts] "fallthrough statement out of place" in `if` block inside `swicth` block

2017-08-05 Thread judsonwilson via golang-nuts
> > > Maybe `fallthrough` statement cannot be used in `if` block even if it's > put inside `swicth` block) > > True: It may be used only as the final non-empty statement in such a > clause . > > why to make this restriction? One reason is

[go-nuts] Proxy requests to another proxy

2017-08-05 Thread TG
Hi everyone, May I ask you for a little help? I have a problem proxying requests. I want to use chrome with --proxy-server flag with username and password, but it only accepts host:port, I would like to recreate something like this