Re: [go-nuts] Golang application local timezone doesn't change with the system timezone

2022-03-01 Thread Brian Candler
On Tuesday, 1 March 2022 at 22:54:35 UTC carl...@gmail.com wrote: > If I had running services written in Go, they would not be aware of the > timezone change. > I think the current behaviour is reasonable, because it's rare that a running, persistent *service* needs to know of a change of the *

Re: [go-nuts] Golang application local timezone doesn't change with the system timezone

2022-03-01 Thread Carl Menezes
Thanks. Makes sense. Cheers, Carl On Wed, Mar 2, 2022 at 1:09 PM Ian Lance Taylor wrote: > On Tue, Mar 1, 2022 at 4:05 PM Carl wrote: > > > > I'm interested in the reason for the current behaviour. > > I know there are ways to work around it and am aware of the consequences > of a change to th

Re: [go-nuts] Golang application local timezone doesn't change with the system timezone

2022-03-01 Thread Ian Lance Taylor
On Tue, Mar 1, 2022 at 4:05 PM Carl wrote: > > I'm interested in the reason for the current behaviour. > I know there are ways to work around it and am aware of the consequences of a > change to the stdlib now. > I'm also aware of what will happen if the timezone changes on a standard > system.

Re: [go-nuts] Golang application local timezone doesn't change with the system timezone

2022-03-01 Thread Robert Engels
Yea - argument doesn’t hold much water. Log files either use timezonr agnostic times or the users know they will change if the time zone changes. > On Mar 1, 2022, at 6:05 PM, Carl wrote: > > I'm interested in the reason for the current behaviour. > I know there are ways to work around it an

Re: [go-nuts] Golang application local timezone doesn't change with the system timezone

2022-03-01 Thread Carl
I'm interested in the reason for the current behaviour. I know there are ways to work around it and am aware of the consequences of a change to the stdlib now. I'm also aware of what will happen if the timezone changes on a standard system. I assume all platforms that Go supports support the a

Re: [go-nuts] Golang application local timezone doesn't change with the system timezone

2022-03-01 Thread Robert Engels
Have a background routine that polls the os every N secs - but the OP can do that themselves. > On Mar 1, 2022, at 5:32 PM, Kurtis Rader wrote: > >  >> On Tue, Mar 1, 2022 at 2:55 PM Carl wrote: > >> I would like to understand the reasoning for the implementation, if >> possible. >> >>

Re: [go-nuts] Golang application local timezone doesn't change with the system timezone

2022-03-01 Thread Kurtis Rader
On Tue, Mar 1, 2022 at 2:55 PM Carl wrote: > I would like to understand the reasoning for the implementation, if > possible. > > Simple example: > I have a laptop running Ubuntu (or any other popular Linux distro). > I fly from New Zealand to Los Angeles > I open my laptop and change the timezon

Re: [go-nuts] Golang application local timezone doesn't change with the system timezone

2022-03-01 Thread Kurtis Rader
On Tue, Mar 1, 2022 at 2:55 PM Carl wrote: > I would like to understand the reasoning for the implementation, if > possible. > > Simple example: > I have a laptop running Ubuntu (or any other popular Linux distro). > I fly from New Zealand to Los Angeles > I open my laptop and change the timezon

Re: [go-nuts] Golang application local timezone doesn't change with the system timezone

2022-03-01 Thread Carl
I would like to understand the reasoning for the implementation, if possible. Simple example: I have a laptop running Ubuntu (or any other popular Linux distro). I fly from New Zealand to Los Angeles I open my laptop and change the timezone via the system GUI (which under the hood uses timedat

Re: [go-nuts] support stack size on go linker for musl

2022-03-01 Thread Ian Lance Taylor
On Tue, Mar 1, 2022 at 12:30 AM 'Olaf Flebbe' via golang-nuts wrote: > > Thanks for the hint! I was able (for instance) to run > > go test -ldflags "-linkmode=external '-extldflags=-z stack-size=0x80'" > ./... > > I am asking myself if there might be negative impacts of -linkmode=external .

[go-nuts] Re: What are best practices for synchronizing data access in web applications?

2022-03-01 Thread Andreas Götz
> I would ask what is the shared resource that you're synchronizing access to. The resource is really the internal program state. It's a steering mechanism controlled by various parameters (mode, timings etc) that need be synchronized to avoid races. > I recommend you watch and digest "Rethi

[go-nuts] EasyView: an integrated pprof visualizer in vscode

2022-03-01 Thread 'Xu Liu' via golang-nuts
We are researchers at NC State University. We have developed a vscode extension named EasyView, which visualizes PProf output in vscode. Compared to the default web-based visualizer of PProf, EasyView enjoys the following three advantages. 1. EasyView, as a vscode extension, is tig

[go-nuts] heuristics for d/l and seeking into http-served files

2022-03-01 Thread 'Sebastien Binet' via golang-nuts
hi there, I am trying to give access to files over http(s), exposing the resource as an io.ReaderAt (via Accept-Ranges): - https://github.com/go-hep/hep/compare/main...sbinet-hep:groot-httpio-pread-cache?expand=1 despite my "best" attempts (implementing a parallel-reader-at, getting bytes-range

[go-nuts] Re: What are best practices for synchronizing data access in web applications?

2022-03-01 Thread Brian Candler
I would ask what is the shared resource that you're synchronizing access to. If there's a backend database, usually the database API will have some sort of thread-safe connection pool, so presumably it's something else. > Are there any best practices/ talks/ presentations I could refer to? You

[go-nuts] What are best practices for synchronizing data access in web applications?

2022-03-01 Thread cpu...@gmail.com
I've developed a semi-complex server application (https://evcc.io) with web ui. Since web requests are async per nature and I wan't to service them quickly, mutexes are used. I'm now at the point where I realise that sprinkling (un)locks over the code quickly leads to deadlocks and unforeseeabl

Re: [go-nuts] support stack size on go linker for musl

2022-03-01 Thread 'Olaf Flebbe' via golang-nuts
Hi, Thanks for the hint! I was able (for instance) to run go test -ldflags "-linkmode=external '-extldflags=-z stack-size=0x80'" ./... I am asking myself if there might be negative impacts of -linkmode=external . Best Olaf Ian Lance Taylor schrieb am Montag, 28. Februar 2022 um 20: