Re: [go-nuts] Re: A question !

2020-01-07 Thread Motaz Hejaze
Thank you guys for your help, But do to lake of learning resources for golang , i decided flto go for node.js in my startup project , thank you all On Tue, 7 Jan 2020, 5:25 pm Amnon Baron Cohen, wrote: > > > On Tuesday, 7 January 2020 09:44:28 UTC, Motaz Hejaze wrote: >> >> >> May i ask what is

Re: [go-nuts] Re: A question !

2020-01-07 Thread Amnon Baron Cohen
On Tuesday, 7 January 2020 09:44:28 UTC, Motaz Hejaze wrote: > > > May i ask what is the best deployment for more performance ?? > >> >> Do whatever is easiest. If you have come from the Python/Django world then you will be blown away by Go's speed, whatever deployment you use. I would also use

Re: [go-nuts] Re: A question !

2020-01-07 Thread David Riley
On Jan 7, 2020, at 04:44, Motaz Hejaze wrote: > >  > Thank you all guys for your help.. > > May i ask what is the best deployment for more performance ?? I’m not quite sure what you mean. Do you mean what environment results in the highest-performing Go programs? I’d imagine the s390x archite

Re: [go-nuts] Re: A question !

2020-01-07 Thread Motaz Hejaze
Thank you all guys for your help.. May i ask what is the best deployment for more performance ?? On Mon, 6 Jan 2020, 10:56 am , wrote: > 2 - What is the fastest resource to learn Golang ( efficiently ) >> > > For me the best thing was Effective Go > https://golang.org/doc/effective_go.html > He

Re: [go-nuts] Re: A question !

2020-01-04 Thread Prabhu Chawandi
Once you have little hands-on, https://medium.com/golangspec is a great place to read. On Sun, Jan 5, 2020 at 9:29 AM Michael Ellis wrote: > I came to Go from 10+ years of Python (and 20 years of C before that). Go > By Example was the online resource I found > most

Re: [go-nuts] Re: A question about A sync.Once implementation.

2019-05-08 Thread White Pure
Hi, You are right, I did some modification to your code and make it able to reproduce everytime: https://play.golang.org/p/y6vxC_DNjp9 Thanks! 在 2019年5月8日星期三 UTC+8下午7:15:26,rog写道: > > It seems clear to me that C ("can run but has not implemented the > singleton pattern, function f may r

Re: [go-nuts] Re: A question about A sync.Once implementation.

2019-05-08 Thread roger peppe
It seems clear to me that C ("can run but has not implemented the singleton pattern, function f may run multi times") is not the correct answer, because I'm pretty sure that f cannot run more than once. However, it's still not a correct Once implementation, because as has already been pointed out,

Re: [go-nuts] Re: A question about A sync.Once implementation.

2019-05-07 Thread Kurtis Rader
On Tue, May 7, 2019 at 9:42 PM White Pure wrote: > Hi, > Thanks for your reply. > The second bug is a known issue, so let’s ignore that. In that case, I > think function f still can only be executed once. > But why does the load and store of o.done need to be done using atomic > opera

Re: [go-nuts] Re: A question about the atomic operations in golang

2017-01-09 Thread 'Axel Wagner' via golang-nuts
The only guarantees made in regards to alignment are the ones outlined here: https://golang.org/ref/spec#Size_and_alignment_guarantees >From what I can tell, there is no such guarantee. But why do you care, specifically? Using the sync/atomic package will handle this correctly in every case. This r

Re: [go-nuts] Re: A question about the atomic operations in golang

2017-01-09 Thread 'Axel Wagner' via golang-nuts
The answer (like with virtually all questions like this on golang-nuts) is: Possibly, but you can not rely on it. Assuming that it is might break your program now or at a non-specific future date or on a non-specific current or future processor. If you need atomic operations, please use the sync/a

Re: [go-nuts] Re: A question, simple for go team

2016-10-22 Thread Ian Lance Taylor
On Sat, Oct 22, 2016 at 6:40 PM, T L wrote: > > On Saturday, October 22, 2016 at 11:59:55 PM UTC+8, Ian Lance Taylor wrote: >> >> On Sat, Oct 22, 2016 at 2:01 AM, T L wrote: >> > >> > On Saturday, October 22, 2016 at 4:57:52 PM UTC+8, T L wrote: >> >> >> >> >> >> The string struct used internally

Re: [go-nuts] Re: A question, simple for go team

2016-10-22 Thread T L
On Saturday, October 22, 2016 at 11:59:55 PM UTC+8, Ian Lance Taylor wrote: > > On Sat, Oct 22, 2016 at 2:01 AM, T L > > wrote: > > > > On Saturday, October 22, 2016 at 4:57:52 PM UTC+8, T L wrote: > >> > >> > >> The string struct used internally is > >> > >> type stringStruct struct { >

Re: [go-nuts] Re: A question, simple for go team

2016-10-22 Thread Pietro Gagliardi
DIscounting even garbage collector: is there any memory allocator anywhere that provides a facility to only return bytes at the start of an allocation to the manager? realloc() only lets you return bytes at the end, and most other allocators I've seen are based on that one's API... > On Oct 22,

Re: [go-nuts] Re: A question, simple for go team

2016-10-22 Thread Ian Lance Taylor
On Sat, Oct 22, 2016 at 2:01 AM, T L wrote: > > On Saturday, October 22, 2016 at 4:57:52 PM UTC+8, T L wrote: >> >> >> The string struct used internally is >> >> type stringStruct struct { >> str unsafe.Pointer >> len int >> } >> >> When following f function is called and s is cleared, >>

Re: [go-nuts] Re: A question, simple for go team

2016-10-22 Thread Jan Mercl
On Sat, Oct 22, 2016 at 11:02 AM T L wrote: > I mean how do go runtime knows "abcdefg" instead of "cde" should be released. It's a simple case of some programming ;-) (More here: https://en.wikipedia.org/wiki/Garbage_collection_(computer_science)) -- -j -- You received this message because