Re: [go-nuts] Re: Go 1.19 Beta 1 is released

2022-06-11 Thread ben...@gmail.com
I'm quite looking forward to the performance improvements we'll get for free (i.e., by just upgrading): sort will be faster, large switch blocks will be faster due to now using jump tables (good for interpreter opcode-dispatch loops), and regexp will be a little faster due to a

Re: [go-nuts] warning: GOPATH set to GOROOT (/usr/local/go) has no effect

2022-06-11 Thread Sadman Sakib
Thanks for the info. On Sunday, December 12, 2021 at 5:02:22 AM UTC+6 benson opisa wrote: > thanks for this information. > > > On Sunday, September 14, 2014 at 10:00:09 PM UTC+3 Péter Szilágyi wrote: > >> Hi, >> >> Leave GOROOT alone. It should either be unset, or set to the >> installation

Re: [go-nuts] Help with sync.Cond failing to signal

2022-06-11 Thread Kevin Burke
That's a very clear explanation, it's obvious what the problem is now. Thank you! On Saturday, June 11, 2022 at 9:36:59 AM UTC-7 se...@liao.dev wrote: > sync.Cond does not affect goroutine scheduling priority, and Signal only > makes the waiting goroutine available to be scheduled, but not

Re: [go-nuts] Elementary Question About Calling Functions in Different Packages

2022-06-11 Thread Bakul Shah
On Jun 10, 2022, at 8:47 PM, jlfo...@berkeley.edu wrote: > > One hack solution I came up with to break cycles when Package A depends on > Package B which depends on Package A is to > create a symbolic link in Package A to the file(s) in Package B that > contain(s) the resources needed by

Re: [go-nuts] Bloom filter

2022-06-11 Thread 丁瑞文
hi, guys. I use https://github.com/willf/bloom in production, I store the data into the bloom filter first, and then store the bloom filter into the cache, but there is a problem, when I want to insert the data into the bloom filter , I need to take the bloom filter out of the cache first,

Re: [go-nuts] Re: Go 1.19 Beta 1 is released

2022-06-11 Thread Ian Lance Taylor
On Sat, Jun 11, 2022 at 12:30 AM Amnon wrote: > > What are the biggest, and most exciting changes coming in 1.19? The draft release notes are at https://tip.golang.org/doc/go1.19 . 1.18 was a big release with a lot of exciting changes. 1.19 is more of a relaxed, catch your breath release.

[go-nuts] Go Code Checklist

2022-06-11 Thread Const V
I'm compiling a list of. Feel free to commend or add. ### Go Code Checklist keywords: go, code, checklist, style, naming, testing, gofmt, conventions, exported, identifiers, capital, letter, unexported, lowercase, snake, case, mixed, Camel, file, names, package, directory, typos, compiler,

Re: [go-nuts] Elementary Question About Calling Functions in Different Packages

2022-06-11 Thread jlfo...@berkeley.edu
On Friday, June 10, 2022 at 8:47:54 PM UTC-7 jlfo...@berkeley.edu wrote: > > One hack solution I came up with to break cycles when Package A depends on > Package B which depends on Package A is to > create a symbolic link in Package A to the file(s) in Package B that > contain(s) the

Re: [go-nuts] Re: Ignore stale read errors from the race detector

2022-06-11 Thread Marvin Renich
* Jeff Learman [220610 13:23]: > Unlike C, Go has no `volatile` keyword. Therefore, the compiler is allowed > to cache a value that is never updated in the scope that it sees, and > there's no way for us to tell it not to do that. Actually, sync/atomic does essentially the same thing that

Re: [go-nuts] Help with sync.Cond failing to signal

2022-06-11 Thread 'Sean Liao' via golang-nuts
sync.Cond does not affect goroutine scheduling priority, and Signal only makes the waiting goroutine available to be scheduled, but not force it to be. After a Signal() (and Unlock()), every other waiting worker and the flusher then contends (fairly) for the lock. What you want appears a better

[go-nuts] Help with sync.Cond failing to signal

2022-06-11 Thread Kevin Burke
Hi, Recently I inherited some code in production that was hitting an error case that I didn't think should be possible to hit. I reduced it down to this test case. To be clear, there are several different ways to improve the code here, but I'd like to understand why it's behaving the way it

[go-nuts] Re: Go 1.19 Beta 1 is released

2022-06-11 Thread Amnon
Cool! What are the biggest, and most exciting changes coming in 1.19? On Friday, 10 June 2022 at 18:51:02 UTC+1 anno...@golang.org wrote: > Hello gophers, > > We have just released go1.19beta1, a beta version of Go 1.19. > It is cut from the master branch at the revision tagged go1.19beta1. > >