[go-nuts] Re: Most efficient way to implement PubSub pattern using channels

2016-12-26 Thread Tamás Gulácsi
You can use reflect to select from dynamically changing slice of channels, to lessen the number of goroutines. You can use a fixed number of channels, and multiplex on them (one incoming and one outgoing channel, encapsulate the messages with header for destination), to lessen the number of chan

[go-nuts] Re: install go compiler without sudo right

2016-12-26 Thread peterGo
You tell us that you tried some stuff and it didn't work. The first step in debugging is to provide a simple, reproducible example. For example, here's a statement of a problem, a recipe for the Go boostrap compiler step, and a log of the output and the results. It's reproducible. Sudo is only r

[go-nuts] ANN: zebrapack serialization, like gobs version 2

2016-12-26 Thread Jason E. Aten
Announcing: next generation serialization in Go: https://github.com/glycerine/zebrapack -- 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 golang-nuts+unsubscr...@g

Re: [go-nuts] Re: Gomobile: Getting errors when trying to build reverse example

2016-12-26 Thread andrey mirtchovski
I am attaching a simple reproduction of the package name crash (using reverse.go). There is no need to modify the android manifest file for this to trigger. The error I see is given below. I'm also attaching a proposed fix for the renaming clash which works for my case. I can submit it as a CL or

[go-nuts] [ANN] New parchive-like parity generator

2016-12-26 Thread Tamás Gulácsi
Thanks to https://github.com/klauspost/reedsolomon (and Backblaze), we can generate Reed-Solomon parity blocks 200x faster than with par2: https://github.com/tgulacsi/par The PAR2 format has beated me: I can generate a PAR2-format archive, and can read it back, but par2 can't find the main packe

Re: [go-nuts] Converting escaped unicode to utf8

2016-12-26 Thread C Banning
If you're processing anonymous messages and don't know where unicode will occur you might want something like this: https://play.golang.org/p/M-21sy_en5 On Monday, December 26, 2016 at 9:41:15 AM UTC-7, JohnGB wrote: > > Thanks Roger. That is a really elegant solution. > > On 26 December 2016 a

[go-nuts] Re: How has your company adopted Go ?

2016-12-26 Thread Алексей Шаров
We got some long-running export, it was slow and affected business, and few rewrites on current technologies didn't help. And made it fast by using Go. After this business-value everything was not fast but much easier. понедельник, 19 декабря 2016 г., 19:03:43 UTC+6 пользователь Tieson Molly

Re: [go-nuts] Converting escaped unicode to utf8

2016-12-26 Thread John Beckett
Thanks Roger. That is a really elegant solution. On 26 December 2016 at 17:32, roger peppe wrote: > On 26 December 2016 at 07:23, JohnGB wrote: > > It *should* have a JSON body, but in this particular case I can't be sure > > that it will, as I'm trying to log requests when there are errors, w

Re: [go-nuts] Converting escaped unicode to utf8

2016-12-26 Thread roger peppe
On 26 December 2016 at 07:23, JohnGB wrote: > It *should* have a JSON body, but in this particular case I can't be sure > that it will, as I'm trying to log requests when there are errors, which are > quite often errors in the request. So although in some cases it is decoded > later in the handle

[go-nuts] Re: omitempty custom json Marshaller

2016-12-26 Thread C Banning
https://play.golang.org/p/WoCO7VGvDE On Sunday, December 25, 2016 at 6:36:47 AM UTC-7, Forud A wrote: > > Hi, > I have a struct with custom json.MarshallJSON function. I need to ignore > field of this type when the value is null. something like this > > package main > > import ( > "encoding/jso

Re: [go-nuts] Re: Json-ifying map[bson.ObjectId] is not as expected

2016-12-26 Thread Vincent Jouglard
Hi Matt, Thanks, this is exactly what I was wondering about. Modifying the underlying type of bson.ObjectId doesn't seem like being a casual operation, so let's not count on that on the incoming days ! Merry Christmas and happy end of 2016 :D Le vendredi 23 décembre 2016 19:54:15 UTC+1, Matt H

RE: [go-nuts] Most efficient way to implement PubSub pattern using channels

2016-12-26 Thread John Souvestre
What is a partitioned channel? John John Souvestre - New Orleans LA -Original Message- From: golang-nuts@googlegroups.com [mailto:golang-nuts@googlegroups.com] On Behalf Of Zeeshan Arif Sent: 2016 December 25, Sun 19:05 To: golang-nuts Subject: [go-nuts] Most efficient way to imple