Re: [go-nuts] Re: Small number change will affect benchmark results

2021-07-28 Thread 'Axel Wagner' via golang-nuts
It would have taken you less time to look at the generated code and/or a CPU profile than it would have to post this - let alone the rest of the discussion. I also believe it likely would take more time to type out the answer to your question, than it would for you to look at the generated code and

Re: [go-nuts] Re: What are the options to fake SQL database for testing?

2021-07-28 Thread Amit Saha
On Thu, Jul 29, 2021 at 4:39 AM Marcin Romaszewicz wrote: > > I have this exact testing issue at my company, we have many Go services which > use Postgres in production, but are unit tested against SQLite. > > The latest SQLite covers the vast majority of Postgres queries, so most tests > simply

Re: [go-nuts] Re: Pure Go Oracle Driver?

2021-07-28 Thread Luis Fernando Gaido
This was the best thing that happened to me in all these years working with Golang and Oracle. Em terça-feira, 15 de setembro de 2020 às 17:07:11 UTC-3, Samy Sultan escreveu: > you can see my project go-ora it is a pure go oracle client > https://github.com/sijms/go-ora > > > > > في الأربعاء، 2

Re: [go-nuts] Re: Small number change will affect benchmark results

2021-07-28 Thread tapi...@gmail.com
On Wednesday, July 28, 2021 at 10:42:58 PM UTC-4 Kurtis Rader wrote: > On Wed, Jul 28, 2021 at 7:24 PM tapi...@gmail.com > wrote: > >> I will when I confirm that no one could give an answer without much >> effort. If you feel frustrated, you can ignored it. ;D >> > > Like Axel, I too am mildl

Re: [go-nuts] Re: Small number change will affect benchmark results

2021-07-28 Thread Kurtis Rader
On Wed, Jul 28, 2021 at 7:24 PM tapi...@gmail.com wrote: > I will when I confirm that no one could give an answer without much > effort. If you feel frustrated, you can ignored it. ;D > Like Axel, I too am mildly annoyed by your questions. Primarily because you don't seem to understand that the

Re: [go-nuts] Re: Small number change will affect benchmark results

2021-07-28 Thread tapi...@gmail.com
On Wednesday, July 28, 2021 at 4:15:38 PM UTC-4 axel.wa...@googlemail.com wrote: > You might not be able to get a cycle-by-cycle accounting, but with > unlimited effort, you *can* get pretty darn close. Of course, that effort > is usually not worth it. However, what you can always do, which i

Re: [go-nuts] Does the time cost of the mark phase in gc is mainly depending on the amount of the living objects and has very little to do with the amount of unused objects?

2021-07-28 Thread rmfr
Thank you very much, Ian. You gave me a deeper understanding of Golang's internal :-D On Wednesday, July 28, 2021 at 6:23:02 AM UTC+8 Ian Lance Taylor wrote: > On Tue, Jul 27, 2021 at 4:56 AM rmfr wrote: > > > > Hi, I'm reading the GC implementation of Golang, and some questions have > come to

Re: [go-nuts] Re: Small number change will affect benchmark results

2021-07-28 Thread 'Axel Wagner' via golang-nuts
You might not be able to get a cycle-by-cycle accounting, but with unlimited effort, you *can* get pretty darn close. Of course, that effort is usually not worth it. However, what you can always do, which is really the very first step to understand a benchmark result and attempt a micro-optimizatio

[go-nuts] Re: How to set version number of the package imported locally

2021-07-28 Thread Volker Dobler
1. It's a made up dummy 2. You cannot and you need not. V. On Wednesday, 28 July 2021 at 18:02:03 UTC+2 isma...@gmail.com wrote: > My `go.mod` file looks like > ``` > module school > go 1.13 > replace sample.com/math => ../math > ``` > > When I run `go run school.go` the `go.mod` file changes

Re: [go-nuts] Re: What are the options to fake SQL database for testing?

2021-07-28 Thread Marcin Romaszewicz
I have this exact testing issue at my company, we have many Go services which use Postgres in production, but are unit tested against SQLite. The latest SQLite covers the vast majority of Postgres queries, so most tests simply use an SQLite in-memory DB. For the tests which require Postgres- spec

Re: [go-nuts] Re: Small number change will affect benchmark results

2021-07-28 Thread tapi...@gmail.com
On Wednesday, July 28, 2021 at 1:47:44 PM UTC-4 axel.wa...@googlemail.com wrote: > On Wed, Jul 28, 2021 at 7:30 PM tapi...@gmail.com > wrote: > >> I think this one is different from previous. I don't criticize Go, I just >> seek reasons. >> > > Implying that previously you've been criticizin

Re: [go-nuts] Re: Small number change will affect benchmark results

2021-07-28 Thread 'Axel Wagner' via golang-nuts
On Wed, Jul 28, 2021 at 7:30 PM tapi...@gmail.com wrote: > I think this one is different from previous. I don't criticize Go, I just > seek reasons. > Implying that previously you've been criticizing Go? As for your search for reasons: 16384 is a power of two. So I assume that what changes is t

[go-nuts] Re: Small number change will affect benchmark results

2021-07-28 Thread Brian Candler
I didn't see it as criticism of go. However you're looking at micro-behaviour which has little relevance to the real world, and hence not of interest to most go programmers. Compilers and runtimes contain heuristics, such as "if I grow a slice/map/whatever beyond size X, then increase it to si

[go-nuts] Re: Small number change will affect benchmark results

2021-07-28 Thread tapi...@gmail.com
I think this one is different from previous. I don't criticize Go, I just seek reasons. On Wednesday, July 28, 2021 at 11:44:13 AM UTC-4 Brian Candler wrote: > I think you have created rather a lot of threads recently on exactly the > same topic: > https://groups.google.com/g/golang-nuts/search

Re: [go-nuts] Golang Crypto Algo Compliance

2021-07-28 Thread 'Axel Wagner' via golang-nuts
My understanding is that the default Go release is not certified FIPS compliant, but that if you need FIPS compliance, you can use the boringcrypto branch: https://go.googlesource.com/go/+/dev.boringcrypto/misc/boring On Wed, Jul 28, 2021 at 6:02 PM Nikhilesh Susarla wrote: > Hello, > > Is ther

[go-nuts] golang-announce rss feed

2021-07-28 Thread Ferdy
Up until this morning I had the golang-announce group as an RSS feed in my teams channel, to keep us updated on new releases, using this url https://groups.google.com/forum/feed/golang-announce/msgs/rss_v2_0.xml?num=5 But it seems this feature has just stopped working. Any other ways of getting

[go-nuts] Golang Crypto Algo Compliance

2021-07-28 Thread Nikhilesh Susarla
Hello, Is there any documentation or a site where the crypto algos which are implemented in the crypto package has their relative compliance page? Example: crypto/rsa rsa.GenerateKey() Is there a page where the generation of the key is following FIPS compliant standards? If so please do let

[go-nuts] How to set version number of the package imported locally

2021-07-28 Thread Ahmad Ismail
My `go.mod` file looks like ``` module school go 1.13 replace sample.com/math => ../math ``` When I run `go run school.go` the `go.mod` file changes to: ``` module school go 1.13 replace sample.com/math => ../math require sample.com/math v0.0.0-0001010100- // indirect My

[go-nuts] Re: Small number change will affect benchmark results

2021-07-28 Thread Brian Candler
I think you have created rather a lot of threads recently on exactly the same topic: https://groups.google.com/g/golang-nuts/search?q=tapi%20benchmark I'm not convinced that another one is needed. There have been good answers in the previous threads. Go has a fairly complex runtime (as you'll

[go-nuts] Why do I get multiple times the same data?

2021-07-28 Thread hyogy hyogy
I have recently added a ROT13 logic to a tool of mine. This tool connects to a server, from which I run commands on the client. Here is the code PRE-ROT13: https://play.golang.org/p/DAE4cLq3RSx Everything works like a charm. Here is the code POST-ROR13. The difference between them is underlined h

[go-nuts] Small number change will affect benchmark results

2021-07-28 Thread tapi...@gmail.com
The benchmark code: https://play.golang.org/p/IqVnVa5x9qp When N == 16384, the benchmark result: Benchmark_Insert-4 134622 8032 ns/op 32768 B/op 1 allocs/op Benchmark_Insert2-4 132049 8201 ns/op 32768 B/op 1 allocs/op When N =

Re: [go-nuts] use delve to debug golang with 'next' will skip some step

2021-07-28 Thread 'drc...@google.com' via golang-nuts
That debugging is (now) in the runtime package, which is (always) compiled with optimizations on. That will tend to interfere with debugging. The 1.17 change to use registers for passing parameters has also caused some regressions in debugging quality (and it would be nice to fix those, but it

Re: [go-nuts] Re: A peculiar sort problem

2021-07-28 Thread peterGo
Tobias, The C# code is likely using the string sort method: SORT_STRINGSORT. winnls.h: //STRING Sort: hyphen and apostrophe will sort with all other symbols // //co-op <--- hyphen (punctuation) //co_op <--- underscore (symbo

Re: [go-nuts] Re: What are the options to fake SQL database for testing?

2021-07-28 Thread Henry
On Wednesday, July 28, 2021 at 3:05:43 PM UTC+7 amits...@gmail.com wrote: > That sounds interesting - is the tool generating or is able to > generate SQL for different databases? That must have been a pretty big > effort to create such an abstraction. > > It produces different SQL for different

Re: [go-nuts] Re: What are the options to fake SQL database for testing?

2021-07-28 Thread Amit Saha
On Wed, Jul 28, 2021 at 12:43 AM Henry wrote: > > Are we talking about testing the domain logic or the data persistence? . > > If it is about testing data persistence, rephrasing my earlier response, we > do not test data persistence, not very thoroughly anyway, because it is > auto-generated by

Re: [go-nuts] Re: What are the options to fake SQL database for testing?

2021-07-28 Thread Amit Saha
On Tue, Jul 27, 2021 at 7:19 PM Markus Zimmermann wrote: > > We switched from SQLite to PostgreSQL as our "in memory" database. We use an > SQL database so we do not have to mock DB calls and maintain an interface. If > that is something that is interesting i could trigger a blog post about what

Re: [go-nuts] Re: What are the options to fake SQL database for testing?

2021-07-28 Thread Amit Saha
On Tue, Jul 27, 2021 at 6:20 PM Levieux Michel wrote: > > Hi, > > IMO, specific mocks like DATA-DOG's tend to be complicated to use and have > behaviors that should not appear in a mock, which would ideally tend to have > no logic at all. > There are several mock packages that you can find here

Re: [go-nuts] Re: A peculiar sort problem

2021-07-28 Thread Tobias Klausmann
Hi! On Tue, 27 Jul 2021, Tamás Gulácsi wrote: > First, sort all the bytes (0-255) with Go and .Net, and compare them. > For Unicode-unaware sorting, that'd be enough: create a mapping between the > two tables, > replace all the bytes in the Go's input before sort (or use a Less that > does the

Re: [go-nuts] Re: A peculiar sort problem

2021-07-28 Thread Tobias Klausmann
Hi! On Wed, 28 Jul 2021, James wrote: > It could be that .NET is using some locale based collation. Seems like a > lot of machinery, but might do the trick > https://pkg.go.dev/golang.org/x/text@v0.3.6/collate I have managed to get the .NET code used for sorting: Files.Sort((x, y) => string.Com