Re: [go-nuts] Re: Go 1.8.1 is released

2017-05-07 Thread ahochauwaaaaa
Hello, This issue might help you understand why: https://github.com/golang/go/issues/12380 I hope one day Golang would be available without any restrictions :-( Yoshiyuki 2017/05/08 0:36、abbasnagh...@gmail.com: Why the Iranians have blocked? Is free and open source language golang? -- You

Re: [go-nuts] why received can be defined with/without pointer?

2017-05-07 Thread Rader Lei
if a method only defined for a pointer receiver, the compiler will add "*" before the caller silently. Why pointer receiver? Try to change the value of a member. You will know the difference. On Sunday, May 7, 2017 at 6:37:59 PM UTC+8, mhh...@gmail.com wrote: > > yes, sorry you scratched your

[go-nuts] Are Go test methods run serially?

2017-05-07 Thread Dave Cheney
The post over on stack overflow is confused. The behaviour of go test is to test multiple packages concurrently, inside a single package tests are executed serially by default. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe

[go-nuts] Are Go test methods run serially?

2017-05-07 Thread Henry
My understanding is that they are run serially. You need to call t.Parallel() in the beginning of each test to make it run in parallel with other tests. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop

[go-nuts] adding context.Context to new code

2017-05-07 Thread meirfischer
I'm adding tracing to an existing code base with many packages and it seems the best way to have context's passed around is to just have every method take a context.Context. Is there any tooling for converting a code base/package to have: (a) context.Context as the first parameter in each

[go-nuts] Are Go test methods run serially?

2017-05-07 Thread st ov
Go test methods run in separate goroutines but those routines are run serially right? So variable assignments shouldn't get stomped by other tests? I saw a comment saying they're *concurrent*, but not *parallel* by default.

[go-nuts] Re: Fully-qualified import paths and Pull Requests

2017-05-07 Thread st ov
Thanks for correcting my concerns! On Thursday, May 4, 2017 at 8:52:02 PM UTC-7, Dave Cheney wrote: > > > > On Friday, 5 May 2017 13:37:26 UTC+10, st ov wrote: >> >> By "fork" I mean in the GItHub sense, the forking of original project >> *github.com/original/foo >>

Re: [go-nuts] understanding utf-8 for a newbie

2017-05-07 Thread Jan Mercl
On Sun, May 7, 2017 at 8:39 PM peterGo wrote: > "[Rob Pike and Ken Thompson] they made sure it was backwards compatible with ASCII." > ASCII is 7-bits. So is any UTF-8 encoded ASCII. -- -j -- You received this message because you are subscribed to the Google Groups

Re: [go-nuts] understanding utf-8 for a newbie

2017-05-07 Thread peterGo
Sam, "[Rob Pike and Ken Thompson] they made sure it was backwards compatible with ASCII." ASCII is 7-bits. Peter On Sunday, May 7, 2017 at 11:29:53 AM UTC-4, Sam Whited wrote: > > On Sun, May 7, 2017 at 9:44 AM, rob solomon > wrote: > > I now understand that the bytes

Re: [go-nuts] understanding utf-8 for a newbie

2017-05-07 Thread peterGo
Sam, "I'd be suprised if Windows didn't understand UTF-8 these days," Be surprised! For Unicode, Microsoft Windows uses UTF-16. Peter On Sunday, May 7, 2017 at 11:29:53 AM UTC-4, Sam Whited wrote: > > On Sun, May 7, 2017 at 9:44 AM, rob solomon > wrote: > > I now

[go-nuts] Re: Go 1.8.1 is released

2017-05-07 Thread abbasnaghdix
Why the Iranians have blocked? Is free and open source language golang? -- 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...@googlegroups.com.

Re: [go-nuts] understanding utf-8 for a newbie

2017-05-07 Thread Sam Whited
On Sun, May 7, 2017 at 9:44 AM, rob solomon wrote: > I now understand that the bytes may be different. It's also worth noting that when Ken Thompson and Rob Pike (yes, the same Rob Pike and Ken Thompson that created Go) created UTF-8, they made sure it was backwards

[go-nuts] Unexpected need to use runtime.KeepAlive().

2017-05-07 Thread Bruno Albuquerque
I have this struct that has an associated method that simply call a C function that might take a long time to use. It is defined more or less like this: import "C" type Indexer struct { cIndexer *C.Indexer } func NewIndexer() *Indexer { i := {getCIndexerPointer()} runtime.SetFinalizer(i,

Re: [go-nuts] Re: understanding utf-8 for a newbie

2017-05-07 Thread Tom Limoncelli
I highly recommend "The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!)"

[go-nuts] understanding utf-8 for a newbie

2017-05-07 Thread rob solomon
Thanks to those who answered. I grew up in the EBCDIC vs ASCII era, and I've always expected that the bytes in the file were the same as those that represented a character. I now understand that the bytes may be different. Thanks guys. -- rob solomon -- You received this message because

[go-nuts] Re: Proposal: Tags on Interface types

2017-05-07 Thread Egon
This doesn't sound like a real world problem, which means it's really difficult to comment on the problem. Currently the marshaling would work, but not unmarshaling. Also, you can achieve the similar effect with: https://play.golang.org/p/dmFCRT-D1h On Sunday, 7 May 2017 02:56:35 UTC+3, Glen

Re: [go-nuts] why received can be defined with/without pointer?

2017-05-07 Thread mhhcbon
yes, sorry you scratched your head https://play.golang.org/p/Gg6Euyvsw6 this example shows that it is possible to do all the things. hth. I m curious to know more about other questions. Maybe they are not good idea, or not technically achievable. Just curious. On Sunday, May 7, 2017 at

Re: [go-nuts] Proper Way of Defining a Custom Context

2017-05-07 Thread Peter Mogensen
On 2017-05-07 11:58, dc0d wrote: What's the proper way of defining a custom context? Is it enough to wrap the methods of parent `context.Context`? I did some experiments trying to extend the context.Context interface. One quickly runs into endless troubles due to the reliance on global

[go-nuts] Proper Way of Defining a Custom Context

2017-05-07 Thread dc0d
What's the proper way of defining a custom context? Is it enough to wrap the methods of parent `context.Context`? Is it fine to add fields and methods (we can type-assert later on, down the chain)? Or one should just use the `WithValue` and stores everything inside the context and handle them

Re: [go-nuts] would it be good a go runtime support both GC (garbage collection) and ARC (automatic reference counting)?

2017-05-07 Thread Sokolov Yura
Where will you store reference counter for interior pointer? type st struct { j int } type at { i int; s st } var a at var s st dealWithSt() dealWithSt() So, you have two choices: - either you have to find base address for pointer on every rc increment/decrement - and it