Re: [go-nuts] Deadlocking on channels

2017-01-20 Thread Val
Did you try with the race detector enabled? What was the output? If not, you really should, and it's super easy to do. Any complain from the race detector is a bug that must be fixed, not a mere warning. Cheers Val On Friday, January 20, 2017 at 8:10:42 PM UTC+1, l...@pinkfroot.com wrote: >

Re: [go-nuts] Is there any import path limitation when using go:linkname localname importpath.name?

2017-01-20 Thread Ian Lance Taylor
On Fri, Jan 20, 2017 at 12:16 AM, Cholerae Hu wrote: > I removed the alias "pri", and it works, thanks! > By the way, when go:linkname with runtime, why don't I need to import > "runtime" package explicitly? The runtime package is always imported implicitly by every Go

[go-nuts] Re: Type declarations and the underlying type's methods

2017-01-20 Thread jmontgomery
should mention that what you want can be achieved with composition using anonymous fields: https://play.golang.org/p/vEKS70A-29 I know its not your original question, and this only works with `strcut` and `interface`, not build in types, like `int`. But it does give you the kind of behavior

Re: [go-nuts] Re: invitation to gophers.slack.com

2017-01-20 Thread Edward Muller
Great! On Fri, Jan 20, 2017 at 11:16 AM Jan Mercl <0xj...@gmail.com> wrote: > > On Fri, Jan 20, 2017 at 7:06 PM Edward Muller > wrote: > > > https://invite.slack.golangbridge.org/ instead, which is where people > should go to signup for the slack channel. > > Thanks

[go-nuts] ast/typechecker: revert a Decl to its delcaring file path ?

2017-01-20 Thread mhhcbon
Hi, How would i revert an ast.Decl (import, var, ect) to the file path declaring it ? Looks like ast.File does not remember its path, https://golang.org/pkg/go/ast/#File Also, If i could revert a package path to its location on the file system, i could glob all the files in the package, and go

[go-nuts] ast/typechecker: get the package path of a selector expr

2017-01-20 Thread mhhcbon
Hi, First thing first, really sorry for the missing code coloration, but the ML UI is buggy here, i can t post when i use the code highlight function :x I m facing a difficulty with the type checker when i try to identify the package path of a selector expression. The code i parse look likes

Re: [go-nuts] JSON decode streaming : Go forward when format is not json

2017-01-20 Thread Thomas Solignac
The Json Golang doc indicates that "Package json implements encoding and decoding of JSON as defined in RFC 4627 ". It's a deprecated RFC, and, contrary to the most recent you spoke about, It says nothing about

Re: [go-nuts] JSON decode streaming : Go forward when format is not json

2017-01-20 Thread Jordan Krage
> > Robustness brings complexity here. > Relevant: RFC7464 - JavaScript Object Notation (JSON) Text Sequences Given that format, it should be possible to parse record boundaries reliably, and then use the std lib to unmarshal them individually. On Friday,

Re: [go-nuts] Re: invitation to gophers.slack.com

2017-01-20 Thread Jan Mercl
On Tue, Dec 13, 2016 at 12:10 PM Damian Gryski wrote: > You must be a member of the Gophers Slack to see the message achive. This reminds me... In a long-ish time span, I more than once tried applying for membership using the link provided by Dave in this thread. Never got

Re: [go-nuts] JSON decode streaming : Go forward when format is not json

2017-01-20 Thread Thomas Solignac
Thank you both for your answers. It's true that there is a convention for JSON streaming in which one each json message is followed by a '\n'. There is + and - for this convention. *+ :* -> I can detect bad JSON *- :* -> The most important : It's a little more painful for final user. It's

Re: [go-nuts] Can somebody explain the importance of 'select'?

2017-01-20 Thread Jesper Louis Andersen
One subtlety of having a built in concurrency model is that you avoid stripey programs[0] If there is only one concurrency model, programs are built to match that concurrency model. If the model is in a library, you often have several competing concurrency models. This means that programs and

Re: [go-nuts] Is there any import path limitation when using go:linkname localname importpath.name?

2017-01-20 Thread Cholerae Hu
I removed the alias "pri", and it works, thanks! By the way, when go:linkname with runtime, why don't I need to import "runtime" package explicitly? 在 2017年1月20日星期五 UTC+8下午1:34:43,Ian Lance Taylor写道: > > On Wed, Jan 18, 2017 at 6:55 PM, Cholerae Hu > wrote: > > I'm trying