Re: [go-nuts] help with bazil.org/fuse

2016-09-04 Thread Dan Kortschak
I have found some errors (not properly communicating size changes in the Setattr response), but these do not fix the problem. The Setattr method is now // Setattr satisfies the bazil.org/fuse/fs.NodeSetattrer interface. func (f *RW) Setattr(ctx context.Context, req *fuse.SetattrRequest, resp *fu

[go-nuts] help with bazil.org/fuse

2016-09-04 Thread Dan Kortschak
Can someone tell me what it is that I'm failing to understand with file truncation/write and FUSE? The issue is demonstrated here with this code (exerted from [1] in sisyphus_test.go): f, err := os.OpenFile(fusemountedfilename, os.O_RDWR|os.O_CREATE, 0666) if err != nil { log.Fatalf("unex

Re: [go-nuts] Re: Why can't convert []T to []T2 if T2 is a copy definition of T?

2016-09-04 Thread Dan Kortschak
On Fri, 2016-09-02 at 13:47 -0700, nicolas riesch wrote: > In your original example, if you don't cast, it works. > > https://play.golang.org/p/g-GScYkA5S That is not doing what the OP wanted though; they wanted a []int. https://play.golang.org/p/YpyYXIu9D2 > The explanation is here: > > http

Re: [go-nuts] Re: Broadcasting via channel

2016-09-04 Thread Ilya Kostarev
On 09/05/2016 12:14 AM, Jason E. Aten wrote: Or perhaps it is because sync.WaitGroup and sync.Cond (condition variables) exist. They aren't select{}-friendly, but they usually do the job. Yes they aren't select{}-friendly. sync.Cond for example looks like right choice but just blocks. --

Re: [go-nuts] os.File re-definition

2016-09-04 Thread Sridhar
Ok I'll file an issue to start with. On Sunday, 4 September 2016 18:19:10 UTC+1, bradfitz wrote: > > Yeah, that'd be a fine cleanup. Want to send a change? > > I believe a similar cleanup happened to the net.Conn type a number of > releases ago. > > > > On Sat, Sep 3, 2016 at 3:49 PM, Sridhar >

[go-nuts] Re: Broadcasting via channel

2016-09-04 Thread Jason E. Aten
I've often had similar thoughts. Getting started with Go, a barrier synchronizer that played nice with channels seems like a natural idea. But there's not one as far as I know. Perhaps that's because it's not difficult to build one. Or because it puts the cleanup onus on the garbage collector.

[go-nuts] Re: Broadcasting via channel

2016-09-04 Thread Jason E. Aten
I've often had similar thoughts. Getting started with Go, a barrier synchronizer that played nice with channels seems like natural a natural. But there's not one as far as I know. Perhaps that's because it's not difficult to build one. Or because it puts the cleanup onus on the garbage collect

Re: [go-nuts] Re: Surprising benchmark allocations

2016-09-04 Thread Francis
Does anyone have any thoughts on whether it would be feasible/desirable to be able to report allocs/op as a decimal in benchmarks? There must be many small functions out there which allocate at uneven, sub b.N, rates. Currently they are hidden/hard to reason about. On Sunday, 4 September 2016 2

Re: [go-nuts] Re: Surprising benchmark allocations

2016-09-04 Thread Francis
Thanks Peter, Your observation cracked the mystery for me. There were two things that were causing me confusion. 1: That we were not observing any allocations at all, even though the map/s must be allocating. 2: That one of these tests would allocate anything at all, while the other allocates

[go-nuts] Re: time.After faster than goroutine?

2016-09-04 Thread Miki Tebeka
On Sunday, September 4, 2016 at 8:09:09 AM UTC+3, Dave Cheney wrote: > > Your not seeding the random generator so the results should be identical > each time. Thanks, added rand.Seed(time.Now().Unix()) and now I see a better distribution. -- You received this message because you are subscribe

Re: [go-nuts] os.File re-definition

2016-09-04 Thread Brad Fitzpatrick
Yeah, that'd be a fine cleanup. Want to send a change? I believe a similar cleanup happened to the net.Conn type a number of releases ago. On Sat, Sep 3, 2016 at 3:49 PM, Sridhar wrote: > The os.File type is re-defined across multiple files under src/os for os > specific builds. > > Can this

Re: [go-nuts] Re: Who wants to use Go to process your camera's raw files?

2016-09-04 Thread 'Will Norris' via golang-nuts
If you start in a separate repo, make sure you are checking CLAs all along the way (I can help you set that up if needed). Otherwise, any move into /x/image just becomes that much more difficult. And yes, I would definitely start with the standard Go license. On Thu, Sep 1, 2016 at 12:28 AM, Nig

[go-nuts] [ANN] A package for offline speech recognition and analysis with CMU PocketSphinx

2016-09-04 Thread Maxim Kupriianov
http://github.com/xlab/pocketsphinx-go Hello. A reddit user has asked if there are any options for offline speech recognition for Golang, so I did a quick research and was surprised that thing like CMU Sphinx[1] has no Go bindings yet. That's a legendary framework and it continues to improve ev

[go-nuts] Re: Querying ElasticSearch from Go

2016-09-04 Thread David Sofo
Thank you for your replies. David Le dimanche 4 septembre 2016 00:21:18 UTC+2, David Sofo a écrit : > > Hi, > > I have a set of ElasticSearch queries in string format already. I don't > have to rewrite the queries. How to query ElasticSearch using these strings. > A string query can have this fo

Re: [go-nuts] Re: time.After faster than goroutine?

2016-09-04 Thread Micky
On Sun, Sep 4, 2016 at 1:23 PM, wrote: > This is consistent: https://play.golang.org/p/G-vXEBc1Ab Correct. Getting time in Playground returns constant output usually: Its RPC also does some sort of caching so it won't work for running time dependent tests like these: https://play.golang.org/p/u

Re: [go-nuts] Re: Introducing Planet Golang

2016-09-04 Thread Nicolas Martyanoff
(re-sending because I replied privately by mistake) > oju...@gmail.com writes: > > I know I am not so polite as my mother wished I was, but please > > tell me why would one feel obligated to ask permission for adding > > a URL to a site? As long as you only reproduce a lead text you > > wouldn't h

[go-nuts] Re: time.After faster than goroutine?

2016-09-04 Thread aroman
On Saturday, September 3, 2016 at 10:09:09 PM UTC-7, Dave Cheney wrote: > > Your not seeding the random generator so the results should be identical > each time. Except that the random numbers are being assigned in goroutines that are racing each other. On my system, at least one of the two go