[go-nuts] Re: Go Optimizations for IO Intensive programs

2017-02-11 Thread maciej . lisiewski
1. Decompression: - Try https://github.com/klauspost/pgzip - it's a drop-in replacement for compress/gzip and the author claims that is has twice the decompression speed due to better buffering (lower IO wait) - Gzip decompression is single threaded - to use all cores decode multiple files at

[go-nuts] Go Optimizations for IO Intensive programs

2017-02-11 Thread krolaw
Just confirming, you are uploading each file as you're downloading it. Not downloading completely, then decompressing completely, followed by uploading. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop

[go-nuts] Panic in go1.8rc3 using cgo to get binary data from database

2017-02-11 Thread Mark Crook
Hello, I'm seeing a panic in go version go1.8rc3 linux/amd64 while trying to write a database driver using cgo. The go code runs in a docker container, the database in another. Generally it works reliably, but occasionally, during repeated retrieval of binary data (photos approx 100K to 2M),

Re: [go-nuts] Go support in MIPS platform

2017-02-11 Thread Steve Phillips
> > Do you need gccgo, cgo or cross compiling? > Cross-compiling. I'm trying to cross-compile Go programs from an x86_64 Linux machine to run on a MIPS (32-bit) target machine with no software and no hardware FPU. Without FPU however you will get "illegal instruction" when running the >

[go-nuts] Re: Struggling with working directory

2017-02-11 Thread Diego Medina
Hi, you were very close, instead of go install github.com/mortalcatalyst/xml/xml.go do go install github.com/mortalcatalyst/xml In go, you don't install the particular file, you install the program as a whole (which in many cases, it involves more than one file) And as a side note,

Re: [go-nuts] CodeReviewComments: Recommendation of gofmt

2017-02-11 Thread Jan Mercl
On Sat, Feb 11, 2017 at 5:07 PM Axel Wagner wrote: > What about a) vs. c)? c) is fine, but as it's a matter of personal taste, ie. it's IMO more or less bike shedding. IOW, whatever choice as long as it's a single one. Actually, the split goimports bring to the

Re: [go-nuts] CodeReviewComments: Recommendation of gofmt

2017-02-11 Thread 'Axel Wagner' via golang-nuts
Which is a strong opinion against b). What about a) vs. c)? Side-note: I don't think goimports can actually do what you are saying, can it? Because, if you run goimports on a valid program, it won't actually *change* any imports, it might just reformat it. For goimports to change anything

Re: [go-nuts] CodeReviewComments: Recommendation of gofmt

2017-02-11 Thread Jan Mercl
On Sat, Feb 11, 2017 at 4:30 PM 'Axel Wagner' via golang-nuts < golang-nuts@googlegroups.com> wrote: > Am I alone in being bothered by this? ^^ My personal opinion is that a tool that can, even potentially, turn a valid program into an invalid one, or worse, silently into another valid program

[go-nuts] still without a CUDA binding/package for Go?

2017-02-11 Thread Germán Meléndrez Carballo
Hi everyone: I wonder if still are no CUDA bindings or packages for Go? I have seen some post about that, but no more updates. Also, I see mumax3, but it says that supports CUDA 7.5, are there a CUDA 8 package/binding? Thanks in advance. -- You received this message because you are

[go-nuts] CodeReviewComments: Recommendation of gofmt

2017-02-11 Thread 'Axel Wagner' via golang-nuts
Hi, (disclaimer: This is a nit) in the Code Review Comments , we are recommending that people use gofmt, giving goimports as an alternative. That makes me somewhat uncomfortable, as while each itself is idempotent, gofmt clean code

Re: [go-nuts] Re: about the memclr optimization

2017-02-11 Thread 'Axel Wagner' via golang-nuts
That is currently the case for the mainline implementations, AFAIK, but it really shouldn't matter, unless you are hacking on the runtime/compiler. On Sat, Feb 11, 2017 at 3:36 PM, T L wrote: > > > On Saturday, February 11, 2017 at 1:49:58 PM UTC+8, T L wrote: >> >>

[go-nuts] Re: about the memclr optimization

2017-02-11 Thread T L
On Saturday, February 11, 2017 at 1:49:58 PM UTC+8, T L wrote: > > https://github.com/golang/go/issues/5373 > btw, does this optimization imply that the zero value of any type is composed by zero bytes? At least for all current supported ARCHes. > > > I made a test > > package main > >

Re: [go-nuts] Go support in MIPS platform

2017-02-11 Thread ktye78
Do you need gccgo, cgo or cross compiling? I don't know about that, but otherwise the default compiler should work for mipsle (32 bit little endian) "since" go 1.8. Without FPU however you will get "illegal instruction" when running the binary. There are 2 possibilities: Wait for vstefanovic

[go-nuts] Re: Dead link on page https://blog.golang.org/go-fmt-your-code

2017-02-11 Thread alb . donizetti
Thanks for the report. I opened https://github.com/golang/go/issues/19036 A. Il giorno venerdì 10 febbraio 2017 21:51:20 UTC+1, Константин Изюмов ha scritto: > > Please pay your attention on page https://blog.golang.org/go-fmt-your-code > with dead link under word "Vim plugin for Go", because

[go-nuts] Struggling with working directory

2017-02-11 Thread Sayth Renshaw
Hi All I installed go on a new linux mint laptop and followed the standard go guide and it works fine with the hello world example. Today i came back to work on go and cannot seem to do the install step to run my script. sayth@sayth-E6410 ~ $ mkdir -p work/src/github.com/mortalcatalyst/xml

Re: [go-nuts] The feature I want most, weak *

2017-02-11 Thread Wojciech S. Czarnecki
Dnia 2017-02-11, o godz. 17:04:58 Keynan Pratt napisał(a): > On the other hand what is the cost of adding this? > I suspect it is (very) small I suspect it is (very) easy to assess: simply clone the go repo and do implement weak as you sketched it. See e.g.

Re: [go-nuts] about the memclr optimization

2017-02-11 Thread T L
On Saturday, February 11, 2017 at 4:23:07 PM UTC+8, Axel Wagner wrote: > > To expand on Dave's point: Your function has a data race (reads/writes > concurrent with writes in different goroutines) and thus its behavior is > not defined. Run with the benchmark with -race to confirm. The compiler

Re: [go-nuts] about the memclr optimization

2017-02-11 Thread 'Axel Wagner' via golang-nuts
To expand on Dave's point: Your function has a data race (reads/writes concurrent with writes in different goroutines) and thus its behavior is not defined. Run with the benchmark with -race to confirm. The compiler can pretty much do, what it wants in that case. You need to add synchronization