[go-nuts] Question on 'src/internal/singleflight': The return result of the ForgetUnshared method seems to be inaccurate

2022-09-20 Thread atomic
hello I find that the `src/internal/singleflight/singleflight.go ForgetUnshared()` method returns results that are not always expected For this I wrote a test code, I copied the code in the src/internal/singleflight/singleflight.go file to the main package, and wrote a main function to test it

[go-nuts] Re: regex extract with group

2022-09-20 Thread Brian Candler
Can you show your Go code, including the failing test data? Using https://go.dev/play/ is best. If you're using the built-in re2 library, its regular expressions are documented here: https://github.com/google/re2/wiki/Syntax Not all regular expression libraries are the same, and this table als

[go-nuts] regex extract with group

2022-09-20 Thread Khalid Ansari
I have this code working in nodejs but I am unable to make it work in golang. const regex = /Street name: (?[^\r\n]+)\s+House number: (?[^\r\n]+)\s+City: (?[^\r\n]+)\s+State: (?[^\r\n]+)\s+Postal code: (?[^\r\n]+)\s+Country: (?[^\r\n]+)/ var funstring = "Street name: Main St\r\nHouse number:

Re: [go-nuts] Re: Question on 'cmd/compile: handle partially overlapping assignments' behavior on ARM64.

2022-09-20 Thread Josh Peterson
Hi Peter, Please note that versions devel *go1.20-bcd44b61d3*, *1.19.1*, and *1.18.6* show times in the *4xxx ns/op* range for *BenchmarkSliceOfArray* while all the versions of *1.19* and *1.18* show times in the *2xxx ns/op* range. As noted earlier in this thread, the regression is seen on *A

Re: [go-nuts] Re: Question on 'cmd/compile: handle partially overlapping assignments' behavior on ARM64.

2022-09-20 Thread peterGo
Jan, An obvious typo. Read my original message: "I am unable to reproduce your results on AMD64" peter On Tuesday, September 20, 2022 at 12:14:32 PM UTC-4 Jan Mercl wrote: > On Tue, Sep 20, 2022 at 6:02 PM peterGo wrote: > > > Yes, I read that too. A fundamental tenet of science is reproduci

Re: [go-nuts] Re: Question on 'cmd/compile: handle partially overlapping assignments' behavior on ARM64.

2022-09-20 Thread Jan Mercl
On Tue, Sep 20, 2022 at 6:02 PM peterGo wrote: > Yes, I read that too. A fundamental tenet of science is reproducibility. I > was able to reproduce the AMD64 results and documented it. A step forward. 5:24 PM (45 minutes ago) > I am unable to reproduce your results on AMD64. 6:02 PM (7 minutes

[go-nuts] Re: Question on 'cmd/compile: handle partially overlapping assignments' behavior on ARM64.

2022-09-20 Thread peterGo
Brian, Yes, I read that too. A fundamental tenet of science is reproducibility. I was able to reproduce the AMD64 results and documented it. A step forward. peter On Tuesday, September 20, 2022 at 11:35:58 AM UTC-4 Brian Candler wrote: > On Tuesday, 20 September 2022 at 16:24:41 UTC+1 peterGo

[go-nuts] Re: Question on 'cmd/compile: handle partially overlapping assignments' behavior on ARM64.

2022-09-20 Thread Brian Candler
On Tuesday, 20 September 2022 at 16:24:41 UTC+1 peterGo wrote: > I am unable to reproduce your results on AMD64. I don't see any regression. That's expected: the original post also said "I don't see the [...] the perfromance degradation on AMD64". The report is specific to ARM64. -- You recei

[go-nuts] Re: Question on 'cmd/compile: handle partially overlapping assignments' behavior on ARM64.

2022-09-20 Thread peterGo
I am unable to reproduce your results on AMD64. I don't see any regression. Run your benchmarks with option -benchmem. Version: devel go1.20-1eeb257b88 Tue Sep 20 02:58:09 2022 + Sizeof(Array{}): 16 Sizeof(int(0)): 8 goarch: amd64 BenchmarkSliceOfInt-4391646 2583 ns/op 8192 B/op 1 all

[go-nuts] Labeled property graphs and embedded openCypher library

2022-09-20 Thread burak serdar
I would like to announce two open-source Go libraries we have been working on: Labeled Property Graphs: https://github.com/cloudprivacylabs/lpg This library supports openCypher (Neo4j) style of labeled property graphs in memory. That is: * Nodes have a set of labels, and a set of key-values,

[go-nuts] Re: Get array response back in golang

2022-09-20 Thread Wissem belg
This is not an array.. this is a map that contains arrays.. You can get this JSON by marshelling an object of type map[string][]string Le mardi 20 septembre 2022 à 04:01:33 UTC+2, Vick Vicky a écrit : > hey there! > how i can get array in response e.g > { > "make":["Toyota","Honda"] > "model

Re: [go-nuts] Using golang variable in bash script Command

2022-09-20 Thread Robert Solomon
I've done this for Linux and windows, as I regularly use both. But I used a different strategy. I used the os functions to retrieve a slice of strings that I can then filter and sort as I desire. And I use the command line to get the target string. github.com/drrob1/src/dsrt also in that rep

Re: [go-nuts] Re: Single Job to Multi Job

2022-09-20 Thread Robert Engels
I think you might find it easier to reason about if you think pull rather than push. That is, the client asks the server “do you have a job for me” and the server returns the job. If instead as in your design the server pushes the job to the client it can get real complex (e.g what if the client

[go-nuts] Re: Single Job to Multi Job

2022-09-20 Thread Peter Galbavy
A good starting point is to look for a multiplxer / multiplexor On Saturday, 17 September 2022 at 11:59:11 UTC+1 ramki...@hotmail.com wrote: > I have a tcp server that collects jobs (lets say 10), and tcp clients get > the jobs. This is done in a FIFO method, where the first job the server > ge