[go-nuts] Re: Seeing high RES memory but very little inuse_space

2023-02-16 Thread Mohit Goyal
Note: the json library is https://github.com/goccy/go-json On Thursday, February 16, 2023 at 9:03:13 PM UTC-8 Mohit Goyal wrote: > We have a job executor that runs periodic jobs. We have being seeing a > constant growth in the RES memory (to the tune of 10 GB). However, our heap > usage is cons

Re: [go-nuts] CGO Struct used as type parameter causes issue in Go 1.20

2023-02-16 Thread Ian Lance Taylor
On Thu, Feb 16, 2023 at 8:33 PM Jan Pfeifer wrote: > > Indeed. > > But it feels like that an incomplete type as type parameter should be ok if > we are never instantiating it, and only using pointers to it. From what I see > this was not considered in https://go.dev/issue/54765. > > Should this

[go-nuts] Seeing high RES memory but very little inuse_space

2023-02-16 Thread Mohit Goyal
We have a job executor that runs periodic jobs. We have being seeing a constant growth in the RES memory (to the tune of 10 GB). However, our heap usage is constant at around 75-85MB. Here are the stats for the same - - process_resident_memory_bytes 1.0107805696e+10 = 10GB - go_memstats_h

Re: [go-nuts] CGO Struct used as type parameter causes issue in Go 1.20

2023-02-16 Thread Jan Pfeifer
Indeed. But it feels like that an incomplete type as type parameter should be ok if we are never instantiating it, and only using pointers to it. From what I see this was not considered in https://go.dev/issue/54765. Should this be raised as an issue for 1.21 or a 1.20.1 ? Any thoughts ? On Fr

Re: [go-nuts] CGO Struct used as type parameter causes issue in Go 1.20

2023-02-16 Thread Ian Lance Taylor
On Thu, Feb 16, 2023 at 2:38 AM Jan wrote: > > Apologies, actually it was trickier than I thought, the issue happens in not > fully defined C types only. So here is an example that runs in go 1.19.5, but > fails in go 1.20 > > ``` > package main > > /* > // Forward reference of C++ types. > stru

Re: [go-nuts] Re: Why can't a regexp.Regexp be const

2023-02-16 Thread Pat Farrell
Yes of course. At least your version is easier for humans to read. In the application, I expect the whole regexp thing is trivially small part of the execution process. But I'm trying to write proper idiomatic go, and yours is nicer -- You received this message because you are subscribed to th

Re: [go-nuts] Go 1.20 "cold start" slows down CI pipeline stages due to first building stdlib

2023-02-16 Thread TheDiveO
Many thanks! -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.go

Re: [go-nuts] Go 1.20 "cold start" slows down CI pipeline stages due to first building stdlib

2023-02-16 Thread 'Sean Liao' via golang-nuts
- restore cache (go version as cache key) - go build std - save cache (GOCACHE) - original build steps follow here - sean On Thu, Feb 16, 2023, 19:54 TheDiveO wrote: > As Go 1.20 doesn't ship anymore with prebuild stlib packages, the first > build after installation will take longer. Obviously,

Re: [go-nuts] Learning Go on internal server

2023-02-16 Thread Chris Burkert
Go can be run on a regular Mac or PC. Maybe you don’t need a tools server for this at all. However, in a corporate environment caching dependencies may be a good thing. With modules this is done by running your own Go proxy. Take a look at https://github.com/gomods/athens or https://github.com/go

[go-nuts] Go 1.20 "cold start" slows down CI pipeline stages due to first building stdlib

2023-02-16 Thread TheDiveO
As Go 1.20 doesn't ship anymore with prebuild stlib packages, the first build after installation will take longer. Obviously, in a full Kubernetes build this is negligible (if not outward laughable). But for many small CI Go build stages this probably eats considerably into CPU time and energy

[go-nuts] Learning Go on internal server

2023-02-16 Thread Rich
So, I've been writing go code for my company, and many have expressed an interest in learning Go. So what I want to do is create a learning environment for them on one of our 'tools' servers. The problem is that the tools server doesn't have good connectivity to the internet. So using go mod to

Re: [go-nuts] liteide x38.2 released

2023-02-16 Thread Rich
Glad to see ya'll are still working on Liteide. I've used it in the past and for a while was my main Go IDE. I'll have to give it another try. On Monday, February 13, 2023 at 7:12:44 PM UTC-5 vfc wrote: > Hi all, liteide x38.2 released! > > * update gotools&gocode to fix generic code lookup and

Re: [go-nuts] Why is runtime.Gosched needed in this single-threaded, no-goroutines cgo program?

2023-02-16 Thread David Finkel
On Wed, Feb 15, 2023 at 4:05 PM Ian Lance Taylor wrote: > On Wed, Feb 15, 2023 at 8:42 AM 'Marko Bencun' via golang-nuts > wrote: > > > > I am running into a a weird error in C code that only materializes > > when calling it from Go using cgo. I hope you could help me understand > > this behavio

Re: [go-nuts] CGO Struct used as type parameter causes issue in Go 1.20

2023-02-16 Thread Jan
Apologies, actually it was trickier than I thought, the issue happens in not fully defined C types only. So here is an example that runs in go 1.19.5, but fails in go 1.20 ``` package main /* // Forward reference of C++ types. struct SomeType; typedef struct SomeType SomeType; // Fully defined

Re: [go-nuts] CGO Struct used as type parameter causes issue in Go 1.20

2023-02-16 Thread Jan Mercl
On Thu, Feb 16, 2023 at 8:22 AM Jan wrote: > Any thoughts ? A minimal, self-contained and runnable reproducer would be rather useful in this case. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receivin