Re: [go-nuts] Performance for concurrent requests

2022-12-03 Thread Brian Candler
Have you tried a tcpdump of the packets between the Go program and nginx? Is it using HTTP/1.1 or HTTP/2? If it's HTTP/1.1, does tcpdump show that it actually starts all 50 HTTP client requests simultaneously? You are making all these concurrent requests to the same host. The default of

Re: [go-nuts] Performance for concurrent requests

2022-12-03 Thread Diogo Baeder
Hi all! Thanks for the inputs, I'll do some profiling here and update about my findings. I don't want to change anything on Nginx because the comparison I'm doing between different stacks is on the same basis. If I try to tune Nginx or anything like that I'll be comparing apples to oranges,

Re: [go-nuts] go install of forked repo

2022-12-03 Thread Steven Hartland
Check out go work I achieve it’s exactly what you are looking for, allowing for projects to use temporary local versions of packages On Sat, 3 Dec 2022 at 11:55, Duncan Harris wrote: > This seems a noddy question but can't easily find an answer with Google > apparently. I may have lost the plot

Re: [go-nuts] What's go's convention for specifying the equivolent of configure --prefix?

2022-12-03 Thread Nick White
On Thu, Dec 01, 2022 at 08:42:46PM -0800, hey...@gmail.com wrote: > Using a Makefile makes sense. > > And thanks for bringing embed to my attention. I never knew it exists. Sounds > like it can solve my problem. Yeah, embed is brilliant, I'm glad it can help you. One thing I forgot to mention

[go-nuts] go install of forked repo

2022-12-03 Thread Duncan Harris
This seems a noddy question but can't easily find an answer with Google apparently. I may have lost the plot :-) There is a repo which contains source for a go executable that I want to use. Normally I install this with: go install original.domain/path@latest I want to fork that repo and make

[go-nuts] cgo C.uint64_t compatiblity on multiple platforms?

2022-12-03 Thread David Stainton
Greetings, I think my question is something like: "how to make my usage of C.uint64_t work on all platforms?" or "Is there something obviously wrong with my cgo bindings that is causing this not to build on all platforms?" I wrote this cgo binding for the reference implementation of Sphincs+

[go-nuts] How to Install Goyacc

2022-12-03 Thread Peter Bočan
Hello Gophers! Quick question: what is the best way to install goyacc at this time? Is it even recommended to use it these days? Kindly, Peter. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving

Re: [go-nuts] cgo C.uint64_t compatiblity on multiple platforms?

2022-12-03 Thread 'Dan Kortschak' via golang-nuts
On Sat, 2022-12-03 at 10:51 -0800, David Stainton wrote: > Greetings, > > I think my question is something like: "how to make my usage of > C.uint64_t work on all platforms?" or "Is there something obviously > wrong with my cgo bindings that is causing this not to build on all > platforms?" > > I

[go-nuts] HTTPS proxy issue using CONNECT method

2022-12-03 Thread Mauro Monteiro
Hello all, I have been facing an issue when I try to create a HTTP client which needs to connect through a HTTPS proxy using the HTTP CONNEC method. I know that it can be achieved setting my own http.Transport object. However the issue seems to be in the current implementation of

Re: [go-nuts] Go Memory Model question

2022-12-03 Thread Quân Anh Mai
A. From the theoretical point of view given this program: Initial: x = 0 Thread 1: x = 1 Thread 2: x1 = x x2 = x If x1 = 1, we have the following happen-before relationship: - x = 0 happens before x = 1 - x = 0 happens before x1 = x - x1 = x happens before x2 = x Note that there is no x = 1

Re: [go-nuts] go install of forked repo

2022-12-03 Thread 'Sean Liao' via golang-nuts
`go install pkg@version` doesn't support installing from a fork. The argument is best understood as a module identity rather than source code location. - sean On Sat, Dec 3, 2022, 11:55 Duncan Harris wrote: > This seems a noddy question but can't easily find an answer with Google >

Re: [go-nuts] HTTPS proxy issue using CONNECT method

2022-12-03 Thread 'Sean Liao' via golang-nuts
How are you setting the proxy? - sean On Sat, Dec 3, 2022, 16:46 Mauro Monteiro wrote: > Hello all, > > I have been facing an issue when I try to create a HTTP client which needs > to connect through a HTTPS proxy using the HTTP CONNEC method. I know that > it can be achieved setting my own

Re: [go-nuts] Go Memory Model question

2022-12-03 Thread robert engels
happens-before in this case would only guarantee 0, not 1. e.g. change the initializer to x = 3, then 3 must be guaranteed to be seen rather than the default value of 0 > On Dec 2, 2022, at 8:12 AM, burak serdar wrote: > > The way I read the memory model, this program can print 01, 00, and

Re: [go-nuts] Performance for concurrent requests

2022-12-03 Thread Diogo Baeder
Hey guys! Turns out that one of the biggest bottlenecks was the type guessing when parsing the JSON content to a "map[string]any"; As soon as I implemented more appropriate structs to unmarshall the bytes I immediately got faster responses. Another big improvement was when changing from the

Re: [go-nuts] vendors and modules

2022-12-03 Thread Andrew Athan
Thanks Ian ... so a couple of comments & clarifications (1) I see various other questions popping up in the list regarding go mod, go work, vendoring etc, and yes I certainly did review https://go.dev/blog/using-go-modules before posting my original question here. Point being, I think the

Re: [go-nuts] cgo C.uint64_t compatiblity on multiple platforms?

2022-12-03 Thread David Stainton
Thanks, yes switching those type casts to C.size_t worked. On Saturday, December 3, 2022 at 2:39:24 PM UTC-5 kortschak wrote: > On Sat, 2022-12-03 at 10:51 -0800, David Stainton wrote: > > Greetings, > > > > I think my question is something like: "how to make my usage of > > C.uint64_t work on

Re: [go-nuts] Re: Why not tuples?

2022-12-03 Thread Diogo Baeder
Hi there, sorry for weighting in so late in the game, but I just started again to learn Go and was thinking why the language still doesn't have a tuple type. Now, imagine this scenario: I have a web application which has to access a webservice that responds with JSON payloads; These payloads

Re: [go-nuts] Re: Why not tuples?

2022-12-03 Thread burak serdar
On Sat, Dec 3, 2022 at 8:47 PM Diogo Baeder wrote: > Hi there, sorry for weighting in so late in the game, but I just started > again to learn Go and was thinking why the language still doesn't have a > tuple type. > > Now, imagine this scenario: I have a web application which has to access a >