[go-nuts] Re: Golang should have a center packages index hosting like npm, rust crates

2016-10-21 Thread Sri G
Pros: + Getting stats on popular packages and code. Keeping anonymity should be like apt on debian/ubuntu by requesting permission for anonymous stats reporting. + Showing Go's popularity and increasing community and adoption Cons: - Having a central point of failure for pulling repos.. Look

Re: [go-nuts] Re: Duplicate File Checker Performance

2016-10-21 Thread Sri G
wrote: > > Oh, I see. Well if you must read and hash every byte of every file then > you really are mostly measuring device speed. > > > > *From: *<golan...@googlegroups.com > on behalf of Sri G < > sriakhil...@gmail.com > > *Date: *Sunday, October 16, 2016

Re: [go-nuts] Re: Duplicate File Checker Performance

2016-10-16 Thread Sri G
ire file must be hashed, so sadly I cant use these optimizations. On Sunday, October 16, 2016 at 1:26:24 PM UTC-4, Michael Jones wrote: > > Sri G, > > > > How does this time compare to my “Dup” program? I can’t test for you…since > it is your filesystem…but I thought I had

[go-nuts] Re: Duplicate File Checker Performance

2016-10-15 Thread Sri G
Thanks. Made the go code similar to python using CopyBuffer with a block size of 65536. buf := make([]byte, 65536) if _, err := io.CopyBuffer(hash, file, buf); err != nil { fmt.Println(err) } Didn't make too much of a difference, was slightly faster. What got it to

[go-nuts] Re: Duplicate File Checker Performance

2016-10-15 Thread Sri G
a single threaded/goroutine version in Go to replicate this level of performance and get a deeper understand of how Go is built and how to use it more effectively. Advice appreciated! On Saturday, October 15, 2016 at 5:15:29 AM UTC-4, Sri G wrote: > > I wrote a multi-threaded duplicate file c

[go-nuts] Re: files, readers, byte arrays (slices?), byte buffers and http.requests

2016-08-03 Thread Sri G
Doh. Thanks. I did the setup but didnt click "execute". Revisiting this because its now a bottleneck since it directly impact user experience (how long a request will take to process) and scalability (requests per second a single instance can handle). It wasn't pre-mature optimization, rather

[go-nuts] Re: files, readers, byte arrays (slices?), byte buffers and http.requests

2016-07-02 Thread Sri G
ecksum.Sum(nil)) fmt.Println("md5=", md5hex) file.Seek(0, 0) io.Copy(f, file) It would be much appreciated if someone understands the idiomatic way to do this with and can explain it. On Saturday, July 2, 2016 at 5:48:45 PM UTC-4, Sri G wrote: > > Thanks for the pointer.

[go-nuts] Re: files, readers, byte arrays (slices?), byte buffers and http.requests

2016-07-02 Thread Sri G
rote: > > > 2016. július 2., szombat 8:15:19 UTC+2 időpontban Sri G a következőt írta: >> >> I'm working on receiving uploads through a form. >> >> The tricky part is validation. >> >> I attempt to read the first 1024 bytes to check the mime of the file a