Re: [go-nuts] Re: Understanding go routine heap

2016-08-22 Thread Joubin Houshyar
On Monday, August 22, 2016 at 10:27:06 AM UTC-4, Marvin Renich wrote: > > * Joubin Houshyar > [160822 09:47]: > > > > > > On Saturday, August 20, 2016 at 2:29:41 AM UTC-4, Yulrizka wrote: > > > func process() *foo { > > > var result

[go-nuts] Re: Deleting the /r/golang subreddit

2016-11-25 Thread Joubin Houshyar
On Thursday, November 24, 2016 at 11:39:38 PM UTC-5, Nate Finch wrote: > > Yes, the CEO did a really shitty thing. If we burned down the website of > every company where someone in power did something shitty, we'd have no > websites left. > > If we do burn down the website of every company t

Re: [go-nuts] Shuffle Items in a Slice

2016-06-24 Thread Joubin Houshyar
On Friday, June 24, 2016 at 7:39:23 AM UTC-4, Konstantin Khomoutov wrote: > > On Fri, 24 Jun 2016 04:05:49 -0700 (PDT) > dc0d > wrote: > > > To shuffle items in a slice I'm doing this: > > > > var res []Item > > > > //fill res logic > > > > shuffle := make(map[int]*Item) > > for k, v := r

Re: [go-nuts] Shuffle Items in a Slice

2016-06-24 Thread Joubin Houshyar
On Friday, June 24, 2016 at 1:16:12 PM UTC-4, Joubin Houshyar wrote: > > > On Friday, June 24, 2016 at 7:39:23 AM UTC-4, Konstantin Khomoutov wrote: >> >> On Fri, 24 Jun 2016 04:05:49 -0700 (PDT) >> dc0d wrote: >> >> > To shuffle items in a slice

[go-nuts] Re: Understanding go routine heap

2016-08-22 Thread Joubin Houshyar
On Saturday, August 20, 2016 at 2:29:41 AM UTC-4, Yulrizka wrote: > > Dear gophers > > I have discussion with my colleague about this code > > > func process() *foo { > var result *foo > > var wg sync.WaitGroup > wg.Add(1) > go func() { > defer wg.Done() > result =

[go-nuts] Re: I'm stuck with function onEvict("key", t) used as value

2017-04-03 Thread Joubin Houshyar
Here you go: https://play.golang.org/p/zumvg2Bcyt For every type specific (k, v) tuple you'll need to create a evict func type converter. On Monday, April 3, 2017 at 10:44:16 AM UTC-4, Yaroslav Molochko wrote: > > In short, I'm trying to cast type of > function(string, sometype) -> function(i

Re: [go-nuts] Is it harmful to always return invalid values on a non-nil-error?

2017-04-03 Thread Joubin Houshyar
On Saturday, April 1, 2017 at 7:26:20 AM UTC-4, Axel Wagner wrote: > > Ian: > Re your question: See my example given above (or the one below, which is > probably more authentic). For example, you might be allocating the returned > struct, and piece by piece filling in the fields. If there can be

Re: [go-nuts] Is it harmful to always return invalid values on a non-nil-error?

2017-04-04 Thread Joubin Houshyar
On Tuesday, April 4, 2017 at 2:34:29 AM UTC-4, Axel Wagner wrote: > > On Tue, Apr 4, 2017 at 12:38 AM, Joubin Houshyar > wrote: >> >> Well, you've got bigger fish to fry here in your example above than >> worrying about call site snafus: you should be closing t