[go-nuts] [ANN] CBOR Library - Small, safe, and easy CBOR encoding and decoding (for WebAuthn, etc.) in Go

2019-09-08 Thread Faye Amacker
Hello, fxamacker/cbor is my first open source project, after working exclusively on closed source. It is MIT licensed and designed to be: - Easy -- idiomatic Go API (like encoding/json). - Safe and reliable -- no

[go-nuts] How Gmail API refreshes token?

2019-09-08 Thread Grigorii Tkachuk
I'm looking into this example https://github.com/gsuitedevs/go-samples/blob/master/gmail/quickstart/quickstart.go and I do not understand why it refreshes "token.json". On line 45 we are passing token itself but not a path to token file. I went thru a documentation and source code but I do

Re: [go-nuts] What is the memory order when select on multiple channels that one is closing and the other is receiving?

2019-09-08 Thread 'Axel Wagner' via golang-nuts
On Sun, Sep 8, 2019, 17:14 changkun wrote: > Intuitively, the close statement should happens-before select statement > that starts choosing which case > should be executing, and select a closed channel with the highest priority > to prevent another receive case being executed once more. > I

Re: [go-nuts] What is the memory order when select on multiple channels that one is closing and the other is receiving?

2019-09-08 Thread Robert Engels
Heh, didn’t know that and independently came up with it in 30 secs - that has to be worth something ? (Although mine uses sampling of all event sources) > On Sep 8, 2019, at 4:19 PM, burak serdar wrote: > >> On Sun, Sep 8, 2019 at 3:16 PM Robert Engels wrote: >> >> It’s hard to respond. I

Re: [go-nuts] What is the memory order when select on multiple channels that one is closing and the other is receiving?

2019-09-08 Thread burak serdar
On Sun, Sep 8, 2019 at 3:16 PM Robert Engels wrote: > > It’s hard to respond. I have done a lot of concurrent programming and haven’t > heard the term “vector clock” so I am not sure what you Lamport's timestamps, vector clocks,etc: https://en.wikipedia.org/wiki/Vector_clock are referring to.

Re: [go-nuts] What is the memory order when select on multiple channels that one is closing and the other is receiving?

2019-09-08 Thread Robert Engels
It’s hard to respond. I have done a lot of concurrent programming and haven’t heard the term “vector clock” so I am not sure what you are referring to. You can write a logical “clock cycle” by sampling both and choosing the higher priority event - but overall performance is going to suffer

Re: [go-nuts] What is the memory order when select on multiple channels that one is closing and the other is receiving?

2019-09-08 Thread changkun
Hi Kurtis, I am aware that you are talking about the happen-before algorithm which is basically the vector clock. However, this discussion aims for the discussion regarding this proposal: "the close statement should happens-before select statement that starts choosing which case should be

Re: [go-nuts] What is the memory order when select on multiple channels that one is closing and the other is receiving?

2019-09-08 Thread Kurtis Rader
On Sun, Sep 8, 2019 at 8:40 AM changkun wrote: > The provided code snipped on my machine can result in different outputs, > which basically shows that it could occur in any order. > Yes > The randomization mechanism in select statement made the verification > hard. Logically, my argument is

Re: [go-nuts] What is the memory order when select on multiple channels that one is closing and the other is receiving?

2019-09-08 Thread changkun
Hi Robert, The provided code snipped on my machine can result in different outputs, which basically shows that it could occur in any order. The randomization mechanism in select statement made the verification hard. Logically, my argument is rigorous On Sunday, September 8, 2019 at 5:31:49

Re: [go-nuts] What is the memory order when select on multiple channels that one is closing and the other is receiving?

2019-09-08 Thread robert engels
You need to code it knowing that either can occur in any order. > On Sep 8, 2019, at 10:14 AM, changkun wrote: > > Hi, golang nuts, > > Let's think about this snippet: https://play.golang.org/p/3cNGho3gWTG > > In the code snippet, a ticker is activating and another that that is closing, > it

[go-nuts] What is the memory order when select on multiple channels that one is closing and the other is receiving?

2019-09-08 Thread changkun
Hi, golang nuts, Let's think about this snippet: https://play.golang.org/p/3cNGho3gWTG In the code snippet, a ticker is activating and another that that is closing, it seems that they can happen concurrently and result in two different outcomes: either ticker case being executed first or the

[go-nuts] Re: Go 1.13 is released

2019-09-08 Thread stefan via golang-nuts
Please release 1.13.1 to fix the "xerrors" breakage: https://github.com/golang/go/issues/32246 On Tuesday, September 3, 2019 at 9:16:53 PM UTC+2, Dmitri Shuralyov wrote: > > Hello gophers, > > We just released Go 1.13. > > You can read the announcement blog post here: >