Re: [go-nuts] Re: Relaxing rules on slice comparison: would it make sense?

2016-07-02 Thread as . utf8
Go does not have reference types. As far as I know, the word was purposefully removed from the spec to remove the ambiguity surrounding the word. https://groups.google.com/forum/m/#!topic/golang-dev/926npffb6lA -- You received this message because you are subscribed to the Google Groups "golan

[go-nuts] Re: Help with the the Get url: EOF error (http client)

2016-07-02 Thread Constantin Konstantinidis
I would suggest to first upgrade to 1.6.2 as investigating and support will be complicated by all the changes which occured since then. On Saturday, July 2, 2016 at 11:07:22 AM UTC+2, Pontus Lundin wrote: > > Hi, > > So i have a client running for months doing re-occuring work against a > SOAP w

Re: [go-nuts] Re: Relaxing rules on slice comparison: would it make sense?

2016-07-02 Thread Chad
You can do that, but for correctness, I am arguing that it's not what you should expect for slices by default. On Sunday, July 3, 2016 at 3:37:15 AM UTC+2, Florin Pățan wrote: > > I would also expect to compare values not memory locations, generally > that's what I'm interested in comparing. > >

Re: [go-nuts] Re: Relaxing rules on slice comparison: would it make sense?

2016-07-02 Thread Florin Pățan
I would also expect to compare values not memory locations, generally that's what I'm interested in comparing. I never had the need to compare equality for memory locations of anything in Go (especially not for slices / maps oe their elements). -- You received this message because you are subs

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

2016-07-02 Thread Dave Cheney
The hash is always the same because you ask for the hash value before writing any data through it with io.Copy. -- 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] http/2 with go version 1.6.2 not working under iOS 9 mobile Safari

2016-07-02 Thread Constantine Vassilev
I am using go version 1.6.2 to set up a web page to work with http/2. It is working on desktop but in iOS 9 mobile Safari the site does not loads. Here is my setup: OS El Capitan Version 10.11.5 === s := http.Server{Addr: addr + ":443"} http2.ConfigureServer(&s, nil) err := s.ListenAndS

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

2016-07-02 Thread Sri G
Update: Adding file.Seek(0,0) does fix the issue in Version 2. The uploaded file is the correct size on disk with the correct md5. Without it, the uploaded file which is saved is missing the first 1024 bytes. This makes sense. There is something wrong with the way the md5 is calculated, it keep

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

2016-07-02 Thread Sri G
Thanks for the pointer. I also found this helpful Asynchronously Split an io.Reader in Go (golang) « Rodaine but I'm still missing something. Version 1: the uploaded file is 1024 bytes extra at the end (too big): mimebuf := make([]b

[go-nuts] Re: can't install gomobile

2016-07-02 Thread JM
Sorry, im not sure what you mean by "Fix it by copying the entire "bin" directory from the llvm toolchain instead of picking out certain named binaries." Can you give me more info on how i do what you are saying? The only thing i have done is these 2 commands so far: C:\WINDOWS\system32>go get

Re: [go-nuts] Prevent RTS from creating an OS thread

2016-07-02 Thread Ian Lance Taylor
On Jul 2, 2016 2:32 AM, "Alex Bligh" wrote: > > > On 2 Jul 2016, at 05:23, Matt Harden wrote: > > > Forking is not safe in Go either. > > Why? Let's assume one knows what one is doing and doesn't try to use channels etc. In general you can't use fork in a multi-threaded program, because a differ

[go-nuts] Re: Go-worker or goworker?

2016-07-02 Thread pjmuller
Hi Charl, I need to make the same decision now. What path did you take? On Wednesday, October 30, 2013 at 10:02:28 AM UTC+1, Charl Matthee wrote: > > Hi, > > I am in the process of selecting a resque/sidekiq replacement for a > project and go-workers and

[go-nuts] Re: A proposal for generic in go

2016-07-02 Thread Chad
What's generic programming? An implementation of overloading for datastructures and function/methods. The compiler is left in charge of going through the code and specifying which types should actually be used. Go restricts the overloading of function/methods. So we are left with the specificat

Re: [go-nuts] Re: A proposal for generic in go

2016-07-02 Thread Mandolyte
IMHO, regarding the trilemma, I want slow compilers. This option means no penalty unless you actually use the generic feature. Want fast compiles, then don't use generics. I've never been convinced about the code bloat issue that gets tagged with slow compiles. I think the code bloat issue shoul

[go-nuts] Re: can't install gomobile

2016-07-02 Thread Elias Naur
This is my fault, sorry. Please try https://go-review.googlesource.com/#/c/24720/ then reinstall the gomobile tool and see if that fixes the problem. - elias On Saturday, July 2, 2016 at 4:56:58 AM UTC+2, JM wrote: > > windows pro on 64x. Anyone know what's going on here? Im using the > foll

Re: [go-nuts] Prevent RTS from creating an OS thread

2016-07-02 Thread Alex Bligh
On 2 Jul 2016, at 05:23, Matt Harden wrote: > Forking is not safe in Go either. Why? Let's assume one knows what one is doing and doesn't try to use channels etc. -- Alex Bligh -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscr

Re: [go-nuts] Unused var written in closure

2016-07-02 Thread gordon . klaus
More generally, this is https://github.com/golang/go/issues/10989. Such ineffectual assignments can be detected using https://github.com/gordonklaus/ineffassign. An analysis showed that only a small fraction of such were bugs, making the backwards-incompatible language change not worthwhile. @

[go-nuts] Re: can't install gomobile

2016-07-02 Thread Constantin Konstantinidis
It seems tha the Android SDK cannot be found. If installed, it should be in your PATH variable. On Saturday, July 2, 2016 at 4:56:58 AM UTC+2, JM wrote: > > windows pro on 64x. Anyone know what's going on here? Im using the > following reference. https://github.com/golang/go/wiki/Mobile > >

[go-nuts] Help with the the Get url: EOF error (http client)

2016-07-02 Thread Pontus Lundin
Hi, So i have a client running for months doing re-occuring work against a SOAP web service, suddenly i got the Get url: EOF error and now i am unable to get anything useful back from the server (headers) other than the :EOF There are various threads on this topic http://stackoverflow.com/ques

Re: [go-nuts] Re: Relaxing rules on slice comparison: would it make sense?

2016-07-02 Thread Chad
On Saturday, July 2, 2016 at 6:19:56 AM UTC+2, Matt Harden wrote: > > Conceptually, the value of a string is the sequence of bytes it contains, > just like an array of bytes. It doesn't matter that the implementation of > strings looks more like a slice internally. On the other hand the value o

Re: [go-nuts] Re: Relaxing rules on slice comparison: would it make sense?

2016-07-02 Thread Chad
On Saturday, July 2, 2016 at 10:23:04 AM UTC+2, Martin Geisler wrote: > > On Fri, Jul 1, 2016 at 4:01 PM, Chad > > wrote: > > > > > > On Friday, July 1, 2016 at 3:44:10 PM UTC+2, Martin Geisler wrote: > >> > >> On Fri, Jul 1, 2016 at 12:52 PM, Chad wrote: > >> > However, that it's a valid

Re: [go-nuts] Re: Relaxing rules on slice comparison: would it make sense?

2016-07-02 Thread Martin Geisler
On Sat, Jul 2, 2016 at 6:19 AM, Matt Harden wrote: > Conceptually, the value of a string is the sequence of bytes it contains, > just like an array of bytes. It doesn't matter that the implementation of > strings looks more like a slice internally. On the other hand the value of a > slice is a ref

[go-nuts] Re: How to decrypt data with AES in golang

2016-07-02 Thread as . utf8
An IV is not a key, it just changes the state of the block chain and must the same size as the block. The key can be a different size than the block, the IV can not in this case. Your program complains because you are reusing the key as an IV, and this key-IV happens to be a different size than

Re: [go-nuts] Re: Relaxing rules on slice comparison: would it make sense?

2016-07-02 Thread Martin Geisler
On Fri, Jul 1, 2016 at 4:01 PM, Chad wrote: > > > On Friday, July 1, 2016 at 3:44:10 PM UTC+2, Martin Geisler wrote: >> >> On Fri, Jul 1, 2016 at 12:52 PM, Chad wrote: >> > However, that it's a valid point you raise (re strings) >> > But that's exactly the reason for which, someone would probably

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

2016-07-02 Thread Tamás Gulácsi
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 and > then if valid read the rest and hash it and also save i

Re: [go-nuts] Prevent RTS from creating an OS thread

2016-07-02 Thread Tamás Gulácsi
What about os/exec with a C shim to setup what needs to be done and start the Go program, passing on given FDs for IPC? -- 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 ema