[go-nuts] Re: Upgrading to last version of dependency without upgrading toolchain?

2024-05-06 Thread 'TheDiveO' via golang-nuts
As I cannot edit the title anymore: it's about upgrading to the last version that can be used without toolchain change, which is not necessarily the "latest" version of a dependency. On Monday, May 6, 2024 at 10:42:17 AM UTC+2 TheDiveO wrote: > FYI, go-mod-upgrade runs the foll

[go-nuts] Re: Upgrading to last version of dependency without upgrading toolchain?

2024-05-06 Thread 'TheDiveO' via golang-nuts
FYI, go-mod-upgrade runs the following command under its hood: go list -u -mod=readonly -f '{{if (and (not (or .Main .Indirect)) .Update)}}{{.Path}}: {{.Version}} -> {{.Update.Version}}{{end}}' -m all On Monday, May 6, 2024 at 10:36:08 AM UTC+2 TheDiveO wrote: > Up front, I have to

[go-nuts] Upgrading to last version of dependency without upgrading toolchain?

2024-05-06 Thread 'TheDiveO' via golang-nuts
Up front, I have to admit that I'm struggling with the newly introduced download-your-go-toolchain-on-the-fly when it comes to: 1. having reproducible builds in a CI/CD pipeline without getting downloaded a different toolchain as installed at the stage start, 2. being a module

[go-nuts] Re: Is json.Marshal deterministic?

2024-04-11 Thread 'TheDiveO' via golang-nuts
They are distinct indeed. An "if sl == nil ..." will not match an empty slice. It is len(sl) that returns 0 for both nil and empty slices, and range working along the same idea. playground example: https://goplay.tools/snippet/df0bG6YXfJZ https://goplay.tools/snippet/df0bG6YXf

Re: [go-nuts] user process instruction pointer symbol lookup

2024-04-03 Thread 'TheDiveO' via golang-nuts
at 8:01:11 PM UTC+2 Ian Lance Taylor wrote: > On Tue, Apr 2, 2024 at 2:35 AM 'TheDiveO' via golang-nuts > wrote: > > > > On Linux, given an arbitrary binary executable with symbol information > in the executable, how can I lookup an instruction pointer address to get > the

[go-nuts] user process instruction pointer symbol lookup

2024-04-02 Thread 'TheDiveO' via golang-nuts
On Linux, given an arbitrary binary executable with symbol information in the executable, how can I lookup an instruction pointer address to get the corresponding symbol name? The binary (and its process) isn't a Go binary, but any arbitrary executable. The stack unwinding has already been

[go-nuts] Re: go test -coverpkg=$LIST ... failing with exit code

2024-03-14 Thread 'TheDiveO' via golang-nuts
Looking and looking again, at least I spotted a lonely "open /tmp/go-build/covmeta: no such file or directory" error message. This now finally matches https://github.com/golang/go/issues/65653 and using gotip finally succeeds correctly. -- You received this message because you are

[go-nuts] go test -coverpkg=$LIST ... failing with exit code

2024-03-12 Thread 'TheDiveO' via golang-nuts
Dear Gophers, I'm struggling with "go test -coverpkg=XXX ... ./... -args -test.gocoverdir" returning non-zero exit codes, albeit all tests are passing. It might well be that I'm not really yet understanding how "go test -coverpkg=" is supposed to work. As illustrated below, I don't want to

[go-nuts] Re: c-shared library for Aix

2024-03-03 Thread 'TheDiveO' via golang-nuts
llvm/clang? I've ditched gcc because of its many unfixable problems. After loosing quite some time, trying to cross-compile Go using gcc, I've switched to clang IIRC and this works beautifully, especially cross-building for Alpine/musl. However my AIX time with RS6000 was decades ago, and I

[go-nuts] coverage seems to show code as not covered, but code is actually executed

2024-02-23 Thread 'TheDiveO' via golang-nuts
don't see it yet. I see the same behavior with go 1.22.0 as well as 1.21.7. This is the repository where I see the seemingly odd profile: https://github.com/thediveo/notwork (sic!) I run all tests as follows with coverage, see also https://github.com/thediveo/notwork/blob/master/scripts/cov.sh

Re: [go-nuts] Could we trade all the `ctx context.Context` arguments for one pointer in `g`?

2024-02-20 Thread 'TheDiveO' via golang-nuts
Forgive me if I missed that, but what if I have multiple context vars, because I need to pass different (derived) contexts into different functions/receivers? Take unit tests as real-world examples. On Wednesday, February 21, 2024 at 1:37:05 AM UTC+1 Sam Vilain wrote: > Alright, well thanks

[go-nuts] Re: go mod download fails on docker for 1.20 (but not for 1.18)

2024-02-02 Thread 'TheDiveO' via golang-nuts
vereiro de 2024 à(s) 21:07:03 UTC, TheDiveO > escreveu: > >> Are you still using Debian 11 and the outdated Debian docker.io package >> with Docker 18? What happens when you use a recent Docker, either 24.x or >> hot-off-the-press 25.0.1? And then build using a Go-

[go-nuts] morbyd: a thin layer to easily build and run throw-away test containers, etc. in tests

2024-02-02 Thread 'TheDiveO' via golang-nuts
https://github.com/thediveo/morbyd is a thin layer on top of the standard Docker Go client to easily build and run throw-away test Docker images and containers, and running commands inside them. It features a function option API to keep the slightly excessive Docker API option parameters at bay

[go-nuts] Re: go mod download fails on docker for 1.20 (but not for 1.18)

2024-02-01 Thread 'TheDiveO' via golang-nuts
Are you still using Debian 11 and the outdated Debian docker.io package with Docker 18? What happens when you use a recent Docker, either 24.x or hot-off-the-press 25.0.1? And then build using a Go-Alpine base image? Do you still use Debian's broken Docker seccomp profile...? I'm on an IPv6

[go-nuts] Re: Blog Article: Go Generics (and also mocking)

2024-01-09 Thread 'TheDiveO' via golang-nuts
On Tuesday, January 9, 2024 at 2:28:08 AM UTC+1 Corin Lawson wrote: On Tuesday 9 January 2024 at 1:12:00 am UTC+11 TheDiveO wrote: One thing I notice is that your design assumes to specify the expected call sequence upon creation, or do I get this wrong? My expectation would be to specify

[go-nuts] Re: Blog Article: Go Generics (and also mocking)

2024-01-08 Thread 'TheDiveO' via golang-nuts
a quick first lock looks promising to me: I like the blog post, as it does IMHO a gentle introduction to your angle of attack. Having used mocking (or one of its twins/cousins/... for those who insist on this not being mocking, alas) on Python I've up to now found the Go mock packages to be

[go-nuts] Re: How to develop with Go source code change?

2024-01-03 Thread 'TheDiveO' via golang-nuts
Maybe your output is interfering with the way the go code base does some of it's checks; based on the fail in cmd/vet maybe this could be involved: https://github.com/golang/go/blob/b25f5558c69140deb652337afaab5c1186cd0ff1/src/cmd/vet/vet_test.go#L197? On Tuesday, January 2, 2024 at 5:45:12 PM

Re: [go-nuts] unix.Select with fd gotten from named pipe on macos behaves differently compared to linux

2023-12-21 Thread 'TheDiveO' via golang-nuts
s-o>. To a large extend, this now excludes potential Go and/or Ginkgo/Gomega-related effects, yet is consistent with my original observation and question here. On Sunday, December 17, 2023 at 6:02:17 AM UTC+1 Kurtis Rader wrote: On Sat, Dec 16, 2023 at 7:54 AM 'TheDiveO' via golang-nuts &

Re: [go-nuts] unix.Select with fd gotten from named pipe on macos behaves differently compared to linux

2023-12-18 Thread 'TheDiveO' via golang-nuts
, Dec 15, 2023 at 7:13 AM 'TheDiveO' via golang-nuts < golan...@googlegroups.com> wrote: I'm opening both named pipe ends as follows (in different processes): os.OpenFile(fifoname, os.O_WRONLY, os.ModeNamedPipe) os.OpenFile(fifoname, os.O_RDONLY, os.ModeNamedPipe) Passing os.ModeNam

Re: [go-nuts] unix.Select with fd gotten from named pipe on macos behaves differently compared to linux

2023-12-18 Thread 'TheDiveO' via golang-nuts
raid, but you are not reproducing the situation I was asking for and provided a unit test for. On Sunday, December 17, 2023 at 6:16:45 AM UTC+1 Kurtis Rader wrote: I should probably clarify that my copy of TheDiveO code simply added the following function and replaced the use of github.com/si

Re: [go-nuts] unix.Select with fd gotten from named pipe on macos behaves differently compared to linux

2023-12-16 Thread 'TheDiveO' via golang-nuts
hat illustrates a problem of this nature. > > On Fri, Dec 15, 2023 at 7:13 AM 'TheDiveO' via golang-nuts < > golan...@googlegroups.com> wrote: > >> Hi, I need to detect on the producer side (writing end) of a named pipe >> when the consumer (reading end) has disconnect/

[go-nuts] unix.Select with fd gotten from named pipe on macos behaves differently compared to linux

2023-12-15 Thread 'TheDiveO' via golang-nuts
Hi, I need to detect on the producer side (writing end) of a named pipe when the consumer (reading end) has disconnect/closed. This detection needs to work "quickly" even if the producer doesn't produce anything; thus, SIGPIPE wouldn't help. On Linux, when using unix.Select() on the fd of the

[go-nuts] Re: go build at most 37x slower in 1.21.5 vs 1.19.3

2023-12-13 Thread 'TheDiveO' via golang-nuts
IIRC the stdlib isn't delivered precompiled anymore since 1.20. You should make sure to have layer caching in place in case you want to tune your pipelines. You can do a "go build std" IIRC. On Wednesday, December 13, 2023 at 4:40:21 PM UTC+1 Lib Martinito wrote: > > [image: Screenshot

[go-nuts] Re: detecting deleted file that is still open and appending without error in Go?

2023-12-10 Thread 'TheDiveO' via golang-nuts
You basically already showed how to do it on Linux: inside your Go prog, you know the file descriptor number (f.Fd()). Then do an os.Readlink(fmt.Sprintf("/proc/self/fd/%d", f.Fd()) and check the result (if no error) with strings.HasSuffix(link, "(deleted)"). On Sunday, December 10, 2023 at

Re: [go-nuts] Re: Clace: Secure web application development platform using Starlark

2023-10-31 Thread TheDiveO
Unfortunatelly, "okay" hasn't been tested in court yet and especially with HashiCorp breaking bad you surely have the deep pockets to see this through? On Tuesday, October 31, 2023 at 4:12:13 AM UTC+1 Dan Kortschak wrote: > On Mon, 2023-10-30 at 18:43 -0700, Jason E. Aten wrote: > > I'm

[go-nuts] Re: Clace: Secure web application development platform using Starlark

2023-10-30 Thread TheDiveO
sadly, OpenDoufu(*) is the epitaph of HashiCorp breaking bad. So that go-plugin package is a no-go now (pun intended). (*) I can't get myself using the British Empire misspelling of Standard Chinese (putonghua). And don't call that Ma... either. On Monday, October 30, 2023 at 7:54:50 PM UTC+1

[go-nuts] Re: URL variables with net/http

2023-10-19 Thread TheDiveO
stdlib only with upcoming 1.22 which isn't yet released, see https://eli.thegreenplace.net/2023/better-http-server-routing-in-go-122/ gorilla mux is another 3rd party muxer with variable support https://github.com/gorilla/mux the "best" way using only stdlib mux is to parse the path and

[go-nuts] Re: go list fails, how do I clear "-mod=readonly"

2023-10-16 Thread TheDiveO
looks like https://stackoverflow.com/questions/76495283/go-list-command-prints-hint-i-dont-understand On Monday, October 16, 2023 at 7:25:46 PM UTC+2 Pat Farrell wrote: > On Monday, October 16, 2023 at 1:22:42 PM UTC-4 TheDiveO wrote: > > go mod tidy > > > I've done that,

[go-nuts] Re: go list fails, how do I clear "-mod=readonly"

2023-10-16 Thread TheDiveO
go mod tidy On Monday, October 16, 2023 at 7:20:13 PM UTC+2 Pat Farrell wrote: > i'm running > go version go1.20.5 linux/amd64 > > when I attempt to run 'go list' to find any updated to dependant > modules, it fails. > > go list -m -u all > go: updates to go.sum needed, disabled by

Re: [go-nuts] the environment variable GOROOT doesn't load for work with go

2023-10-07 Thread TheDiveO
please simply follow the official installation instructions here, https://go.dev/doc/install, and select the Windows tab. This will set up everything correctly, avoiding the trouble you might have gotten into by installing individual bits and pieces into directories there they do not belong to

Re: [go-nuts] Re: Is it expected that signal.NotifyContext() changes the execution thread?

2023-10-01 Thread TheDiveO
ad. It works until it doesn't. On Sunday, October 1, 2023 at 8:37:08 AM UTC+2 Kurtis Rader wrote: > On Sat, Sep 30, 2023 at 12:23 AM TheDiveO wrote: > >> Did you explicitly lock the initial OS thread, aka M0, to the >> main/initial go routine by calling runtime.L

Re: [go-nuts] About variables have per-iteration scope instead of per-loop scope

2023-10-01 Thread TheDiveO
ould be the variable and the rules for implicit or tacit subject > would be the scope. People may wonder. Again... I guess time will answer us > all. > > Greetings > > El sábado, 30 de septiembre de 2023 a las 16:55:24 UTC-3, TheDiveO > escribió: > >> Switching between huma

Re: [go-nuts] About variables have per-iteration scope instead of per-loop scope

2023-09-30 Thread TheDiveO
Switching between human languages, such as for me, German and English, required me to learn English at a level that I think in it. Even with their shared ancestry, I don't expect these languages to use the same structure and concepts, like loop variable scoping. Admittedly, Go doesn't allow me

[go-nuts] Re: Is it expected that signal.NotifyContext() changes the execution thread?

2023-09-30 Thread TheDiveO
Did you explicitly lock the initial OS thread, aka M0, to the main/initial go routine by calling runtime.LockOSThread() from main or an init func? I suspect you were lucky in the past, but I might be wrong. On Saturday, September 30, 2023 at 5:20:47 AM UTC+2 Kurtis Rader wrote: > I was

Re: [go-nuts] Re: Help with WASM performance

2023-09-23 Thread TheDiveO
The cynic in me notes the use of "aims". IIRC is single-threaded, do you know if your code is single- threaded too, or does it use several core for decoding? On Saturday, September 23, 2023 at 7:37:13 AM UTC+2 Stephen Illingworth wrote: > Comparison to native speeds is the key attraction of

Re: [go-nuts] x/mobile: avoid to catch sigabort signal

2023-09-11 Thread TheDiveO
CMAC_resume might be something from here, IIRC Darwin's OpenBSD anchestry: https://man.openbsd.org/CMAC_Init.3 On Monday, September 11, 2023 at 8:17:44 AM UTC+2 Kurtis Rader wrote: > On Sun, Sep 10, 2023 at 10:41 PM Danilo bestbug > wrote: > >> Hey Robert, >> The problem is not reproducible

Re: [go-nuts] x/mobile: avoid to catch sigabort signal

2023-09-10 Thread TheDiveO
Maybe this SO Q with A might also help with further details: https://stackoverflow.com/questions/47869988/how-does-cgo-handle-signals On Friday, September 8, 2023 at 11:38:38 PM UTC+2 Danilo bestbug wrote: > Ehy Ian, thanks for the response. Apology if I was not clear, I try to > explain in a

Re: [go-nuts] x/mobile: avoid to catch sigabort signal

2023-09-09 Thread TheDiveO
You seem to be barking up the wrong tree, at least for the moment. Maybe your team may want to learn more about cgo and by sheer coincidence there's a blog post https://shane.ai/posts/cgo-performance-in-go1.21/ that might serve as a starting point, with one or two pointers to go further. I

[go-nuts] Re: Would it be possible to make this work in the future?

2023-08-25 Thread TheDiveO
==? On Friday, August 25, 2023 at 4:44:02 PM UTC+2 محمد بومنذر wrote: > Greetings everyone, > > I'm writing a parser based on Go's `encoding/xml`, I tried to use the > following pattern but it was deemed invalid: > > ``` > switch tok := p.tok.(type) { > case xml.StartElement, xml.EndElement: >

Re: [go-nuts] How to be a good slog module?

2023-08-24 Thread TheDiveO
erence for a different frontend. > > - sean > > > On Wed, Aug 23, 2023 at 7:09 PM TheDiveO wrote: > >> Up front, I admit my sin of arrogance in giving structured logging the >> slip these past years and misusing logrus just as a text logger with >> multiple log l

[go-nuts] How to be a good slog module?

2023-08-23 Thread TheDiveO
Up front, I admit my sin of arrogance in giving structured logging the slip these past years and misusing logrus just as a text logger with multiple log levels. This question is kind of my atoning... For preparation, I've read through (today's?) Go slog blog post, as well as some comparably

Re: [go-nuts] Best IDE for GO ?

2023-08-23 Thread TheDiveO
ce” is pretty funny. But you’re spot on. > > On Aug 20, 2023, at 2:51 AM, TheDiveO wrote: > > That education place has never talked to any employer, that's what their > list suggests. It's not about the items on this list. It won't ever > correct. But it is basically say

Re: [go-nuts] Best IDE for GO ?

2023-08-20 Thread TheDiveO
well, our "(major) engineering orgs" leave the choice of IDE to our devs. Devs have different styles, so as long as they meed the demand, who cares. On Saturday, August 19, 2023 at 11:17:35 PM UTC+2 Robert Engels wrote: > Reread what I wrote. Vim with autocomplete, etc is not a simple text >

Re: [go-nuts] Best IDE for GO ?

2023-08-20 Thread TheDiveO
That education place has never talked to any employer, that's what their list suggests. It's not about the items on this list. It won't ever correct. But it is basically saying that with one or a few more classes you're ready for your job. That's marketing selling. Depending on the job there's

[go-nuts] Re: Best IDE for GO ?

2023-08-19 Thread TheDiveO
Well, the title about something "best" is probably making most skip it. Best is highly subjective. Also your list seems to include IDEs that to my knowledge don't have Go support at all, but I might be mislead here. I don't understand what seems to be yourreal question at the end, do you

Re: [go-nuts] Best IDE for GO ?

2023-08-19 Thread TheDiveO
Nothing better than an IBM card puncher as my IDE! On Saturday, August 19, 2023 at 11:38:33 AM UTC+2 Jan Mercl wrote: > On Sat, Aug 19, 2023 at 11:27 AM alex-coder wrote: > > > Gophers, may be there is another place where I should look for IDE for > GO ? > > Unix is my IDE and vim is its

Re: [go-nuts] Why is foo in my go.sum file?

2023-08-18 Thread TheDiveO
test case? On Friday, August 18, 2023 at 9:18:05 AM UTC+2 Dan Kortschak wrote: > On Fri, 2023-08-18 at 16:49 +1000, Nigel Tao wrote: > > The go.sum file in the golang.org/x/image repo has a line that is not > > another golang.org.x/* module: > > > > github.com/yuin/goldmark v1.4.13/go.mod > >

[go-nuts] Re: Test coverage: joint unit test and integration test coverage

2023-08-18 Thread TheDiveO
because everyone has also unit tests). And >> a suggestion of maybe a mention / an example in the >> integration-test-coverage >> blog <https://go.dev/blog/integration-test-coverage> ? >> >> On Wednesday, August 16, 2023 at 10:03:55 PM UTC+2 TheDiveO wrote: >

[go-nuts] Re: Test coverage: joint unit test and integration test coverage

2023-08-16 Thread TheDiveO
g a temporary > directory (or extract it from the go tool) , where for unit tests only it's > not needed ... I wonder if this is done deliberately, or just a bug ? > > cheers > > On Wednesday, August 16, 2023 at 8:33:23 PM UTC+2 TheDiveO wrote:

[go-nuts] Re: Test coverage: joint unit test and integration test coverage

2023-08-16 Thread TheDiveO
Maybe similar to this? https://github.com/thediveo/lxkns/blob/cef5a31d7517cb126378f81628f51672cb793527/scripts/cov.sh#L28 On Wednesday, August 16, 2023 at 1:54:48 PM UTC+2 Jan wrote: > hi all, > > After reading the documentation > <https://go.dev/blog/integration-test-cover

Re: [go-nuts] What does "shallow clone" mean?

2023-08-11 Thread TheDiveO
Personally, I find the source https://cs.opensource.google/go/x/exp/+/352e893a:maps/maps.go;l=65 to be helpful in quickly answering such questions. On Friday, August 11, 2023 at 4:36:50 PM UTC+2 Ian Lance Taylor wrote: > On Fri, Aug 11, 2023, 7:28 AM shinya sakae wrote: > >> maps package was

Re: [go-nuts] binary.ByteOrder

2023-08-10 Thread TheDiveO
https://github.com/google/nftables/blob/main/binaryutil/binaryutil.go ... could give you some bad ideas; we need it for Linux nftables that encodes stuff in host endianess. On Thursday, August 10, 2023 at 3:27:49 PM UTC+2 Stephen Illingworth wrote: > Thanks. Although I'm not worried about the

Re: [go-nuts] Bets approach for test helper packages within same project

2023-08-07 Thread TheDiveO
https://stackoverflow.com/a/54734212 On Monday, August 7, 2023 at 8:48:24 AM UTC+2 josvazg wrote: > Interesting! Thanks! > > I was assuming wrongly the module was the unit of compilation. > > If any package not imported by production code is not included, then that > also means that build tags

Re: [go-nuts] Realpath?

2023-08-04 Thread TheDiveO
lements in particular. In case someone wants to know more, here we are: https://github.com/thediveo/procfsroot ... I'm using this to access the VFS view of containers without needing to spawn new processes, switching them into container mount namespaces, and then all the hassles of shuttling command

Re: [go-nuts] Realpath?

2023-08-04 Thread TheDiveO
As I couldn't figure this out from the repo's documentation: what's the difference and what's the benefit compared to stdlib https://pkg.go.dev/path/filepath#EvalSymlinks? On Thursday, August 3, 2023 at 8:57:08 PM UTC+2 Carlos Henrique Guardão Gandarez wrote: > Hey there! > > I created a new

Re: [go-nuts] Error handling

2023-08-02 Thread TheDiveO
and productive to those types of devs and/or types of Go modules, that is, applications. On Wednesday, August 2, 2023 at 9:27:23 PM UTC+2 TheDiveO wrote: > > Ben Hoyt's blog post Scripting with Go: a 400-line Git client that... > <https://benhoyt.com/writings/gogit/> mentions erro

Re: [go-nuts] Error handling

2023-08-02 Thread TheDiveO
Ben Hoyt's blog post Scripting with Go: a 400-line Git client that... mentions error handling from a perspective that made me clear for the first time why I'm always in two minds when it comes to Go's error handling: 1. the perspective of a prod-code

[go-nuts] Re: Any option to substitute plug-in package ?

2023-08-02 Thread TheDiveO
. Personally, I find the shared libs to be finicky and haven't yet done a real project that needed this variant (but I wrote a go-plugger <https://github.com/thediveo/go-plugger> module as an example). 3. statically binary-builtin plugins: this actually is what I tend to

[go-nuts] Re: I made a CLI tool, and I'm curious about your ideas

2023-08-02 Thread TheDiveO
Fresh from the Go project itself. *Experimenting with project templates:* https://go.dev/blog/gonew On Friday, July 14, 2023 at 10:05:34 AM UTC+2 Marcello H wrote: > No matter what other people say, as a first project, I think it is great > because it gives you the opportunity to practise

Re: [go-nuts] go package dating back to 2009

2023-07-24 Thread TheDiveO
just a wild guess: search for prior art? On Tuesday, July 25, 2023 at 1:21:22 AM UTC+2 Ian Lance Taylor wrote: > On Mon, Jul 24, 2023 at 3:08 PM Bravo Moua wrote: > > > > How can one search for packages dating back to Jan 2009 > > Well, Go was only publicly released in November, 2009, so there

[go-nuts] Re: RPI

2023-07-20 Thread TheDiveO
The download page offers ARM 64bit and v6(l) architecture tar balls. v6l is probably the 32bit architecture. You don't mention your OS and architecture (lsb_release -a), but armv7l sounds like an old rpi 2 with only 32bit support. So you might give the v6l version a try. Otherwise, you'll need

[go-nuts] Re: Package structure & testing

2023-06-18 Thread TheDiveO
Maybe not the best way either, but the POD part might benefit from slight refactoring and you already in part hinted at it. - gopher/api -- some PODs here - gopher/model -- don't repeat gopher as in gophermodel; some PODs here It won't ever perfect, so YMMV. But at the same time it allows

Re: [go-nuts] No DNS TTL information in net.LookupSRV()

2023-05-28 Thread TheDiveO
would https://pkg.go.dev/github.com/miekg/dns be an option instead of the std lib? On Friday, May 26, 2023 at 9:45:37 PM UTC+2 Varun Ahluwalia wrote: > Is there a TTL support in GoLang DNS, or if it was implemented in a later > release, please suggest. > Thanks, > > On Saturday, October 8,

Re: [go-nuts] Re: go mod download fails on docker for 1.20 (but not for 1.18)

2023-05-22 Thread TheDiveO
golang:1.20-buster sh -c "ip -4 addr show dev eth0; ip -4 > route show" > 52: eth0@if53: mtu 1500 qdisc noqueue > state UP group default link-netnsid 0 > inet 172.17.0.2/16 brd 172.17.255.255 scope global eth0 >valid_lft forever preferred_lft forever > defau

[go-nuts] Re: go mod download fails on docker for 1.20 (but not for 1.18)

2023-05-22 Thread TheDiveO
? base system distribution? ? do you have IPv6 connectivity at all? ? which docker version? On Monday, May 22, 2023 at 2:29:08 AM UTC+2 Joao Miguel Ferreira wrote: > Hello all, > > My docker build is ok with FROM golang:1.18-alpine, FROM > golang:1.18-buster and FROM golang:1.18-bullseye

[go-nuts] Re: Adding extra files to an already compiled binary using embed.FS

2023-05-11 Thread TheDiveO
What about merging two io.FS instance? A quick search positively surprises me, as there's https://pkg.go.dev/github.com/yalue/merged_fs for this already existing. So you could benefit from the build cache and yet add something later by merging/fusing multiple io.FS instances at runtime, from

[go-nuts] How To: use your local workspace in staged container image build...

2023-05-06 Thread TheDiveO
it is doable, albeit with some limitations due to the Dockerfile syntax. So, here we are and I would like to ask kindly for kind feedback ... also available as a gist <https://gist.github.com/thediveo/0d8b6ae7f88918c2571890e508468b23>. The illustrative example assumes a filesystem setup a

Re: [go-nuts] FATAL: ThreadSanitizer: unsupported VMA range FATAL: Found 39 - Supported 48 / go: added github.com/docker/docker v23.0.4+incompatible

2023-04-26 Thread TheDiveO
by/moby/archive/refs/tags/v23.0.4.tar.gz >> >> from the moby repository : https://github.com/moby/moby >> >> but I don't know what to do next. I don't see the instructions there. Can >> you point me to the right tutorial ? thanks. >> >> On Tue, Apr 25, 20

Re: [go-nuts] FATAL: ThreadSanitizer: unsupported VMA range FATAL: Found 39 - Supported 48 / go: added github.com/docker/docker v23.0.4+incompatible

2023-04-25 Thread TheDiveO
Please do not install Docker as a snap, as this fundamentally breaks several parts of Docker. This is a well known limitation of snap. Simply install from the Docker repository, instructions are on the Docker website. Building Docker is complicated, as it predates Go modules and still has no

[go-nuts] Re: Reduce memory usage via reduced padding?

2023-04-18 Thread TheDiveO
...would immediately *negatively affect* workhorses... On Tuesday, April 18, 2023 at 8:26:27 PM UTC+2 TheDiveO wrote: > The standard libraries in several parts define and also use structs where > the field ordering and padding is crucial as they are shared with operating > system

[go-nuts] Re: Reduce memory usage via reduced padding?

2023-04-18 Thread TheDiveO
The standard libraries in several parts define and also use structs where the field ordering and padding is crucial as they are shared with operating system functions. Trying to rearrange fields in 3rd party apllications would immediately workhorses like Docker container engine, with associated

[go-nuts] httptest.ResponseRecorder and superfluous WriteHeader calls

2023-03-22 Thread TheDiveO
While maintaining my Go spaserve <https://github.com/thediveo/spaserve> module for serving single-page applications with client-side DOM routing and on different routes simultaneously I noticed different logging behavior between http.timeoutWriter.WriteHeader <https://cs.opensource.

[go-nuts] Re: How to constraint type parameter not pointer

2023-03-18 Thread TheDiveO
How could I forget https://github.com/samber/mo...? On Saturday, March 18, 2023 at 7:00:03 PM UTC+1 TheDiveO wrote: > Maybe (no pun intended) implementations like > https://github.com/OlegStotsky/go-monads and > https://github.com/TeaEntityLab/fpGo can shed some more light on your &

[go-nuts] Re: How to constraint type parameter not pointer

2023-03-18 Thread TheDiveO
Maybe (no pun intended) implementations like https://github.com/OlegStotsky/go-monads and https://github.com/TeaEntityLab/fpGo can shed some more light on your question and implementation designs? On Saturday, March 18, 2023 at 11:37:59 AM UTC+1 李晓辉 wrote: > When I want to implement a Maybe[T

[go-nuts] Re: alignment of stack-allocated variables?

2023-03-06 Thread TheDiveO
0 B/op 0 allocs/op BenchmarkEnc-8 10 6.327 ns/op 0 B/op 0 allocs/op This now gets within 6% of the unsafe method. On Saturday, March 4, 2023 at 3:53:42 PM UTC+1 TheDiveO wrote: > Keith, thank you very much for your feedback, it is highl

[go-nuts] Re: alignment of stack-allocated variables?

2023-03-04 Thread TheDiveO
> calls can be resolved and inlined. > > b := make([]byte, 4) > buf.Read(b) > if little { // some global variable (or constant) you set >return binary.LittleEndian.Uint32(b) > } > return binary.BigEndian.Uint32(b) > On Friday, March 3, 2023 at 12:30:37 PM UTC-8

[go-nuts] alignment of stack-allocated variables?

2023-03-03 Thread TheDiveO
In dealing with Linux netlink messages I need to decode and encode uint16, uint32, and uint64 numbers that are in an arbitrary aligned byte buffer in an arbitrary position. In any case, these numbers are in native endianess, so I would like to avoid having to go through encoding/binary. buff

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

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

2023-02-16 Thread TheDiveO
consumption. For instance, a small module https://github.com/thediveo/caps/actions/runs/4197604787 takes around 36s for Go 1.19 versus Go 1.20 with 63s (times for "go test" phase only). Now I'm curious: is there some way to "preheat" Go 1.20 in order to cache the loc

Re: [go-nuts] Creating and Linking to Shared Library Version of Go Runtime? (with possible solution)

2023-02-02 Thread TheDiveO
If I read the 1.20 release notes correctly, there has been a change with how the compiled std lib not only is delivered (not anymore) and cached, so that it now ends up in the module cache. Maybe you can retry your experiments with 1.20 if this now works without the slightly ugly workarounds?

Re: [go-nuts] Creating and Linking to Shared Library Version of Go Runtime? (with possible solution)

2023-01-31 Thread TheDiveO
> So, the solution to problem #1 is to make sure a normal user can create /usr/local/go/pkg/linux_amd64_dynlink and files in and underneath it. While this is fine as a proof of concept and to diagnose the situation, I don't think that it can be called good advice to make /usr/local writeable to

Re: [go-nuts] Creating and Linking to Shared Library Version of Go Runtime?

2023-01-29 Thread TheDiveO
Are the std/runtime .so's even versioned? How do you manage that? Every time I'm feeling like finally being in $PARADISE out of the .so dependency $VERYVERYHOTPLACE there comes along the demand to go back. Sigh. ;) On Sunday, January 29, 2023 at 9:26:51 PM UTC+1 bobj...@gmail.com wrote: >

Re: [go-nuts] Go routine as realtime thread without preemption?

2023-01-22 Thread TheDiveO
outine scheduling. Cheers, TheDiveO -- 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

Re: [go-nuts] Go routine as realtime thread without preemption?

2023-01-22 Thread TheDiveO
GOMAXPROCS that LockOSThread does not exclude locked go routine. Yet I'm intrigued to learn more, so can you please elaborate more? Thank you very much! TheDiveO -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from

[go-nuts] Go routine as realtime thread without preemption?

2023-01-21 Thread TheDiveO
When a go routine gets locked to an OS thread, does the Go runtime scheduler then stops interrupting this Go routine, so when this Go routine (or rather the thread) gets pinned to an exclusive CPU core can make use of real time priorities? -- You received this message because you are

Re: [go-nuts] How can I use go with Modules

2022-12-02 Thread TheDiveO
My 2cents here. One of the most terrible examples of pre-mod repos I've encountered are Docker's engine repos, subsuming also the repos moved into the moby realm: they mostly lack module information and they break upon checking them out on master or go getting them and trying to build, even on

[go-nuts] Re: [ANN] new linter for "mixed pointer and value receivers"

2022-12-02 Thread TheDiveO
IMHO it might be of broader use to lint the cases where a value receiver is used and there are assignments to it or its fields ... or is this already caught by ineffassign? The recommendation leads to slightly "ugly" situations on a regular basis to enforce a pointer receiver on the Stringer

[go-nuts] Re: Problems with array slicing reliability?

2022-11-24 Thread TheDiveO
On Wednesday, November 23, 2022 at 10:57:03 PM UTC+1 loji...@gmail.com wrote: > [...] I am using an AMG64 computer with Windows 10, and *Go version > 0.36.0.* [*emphasis mine*] > Go version 0.36.0? Really? -- You received this message because you are subscribed to the Google Groups

Re: [go-nuts] Re: clarifying Go FAQ: Is Go an object-oriented language?

2022-11-24 Thread TheDiveO
Reading the "yes and no" part as a newcomer to Go actually made me snigger and I though that this kind of answer shows a thorough and differentiated thinking not shy of dealing with complexity as it is without trying to flee into simple and useless label simplification. IMHO the problem is not

Re: [go-nuts] Re: Unicode variable name error

2022-11-08 Thread TheDiveO
I've always wondered how to deal with exported versus unexported identifiers in scripts like Chinese? On Sunday, November 6, 2022 at 3:08:59 PM UTC+1 ba...@iitbombay.org wrote: > In Indic scripts in certain contexts you have to use a vowel sign for the > typography to make sense; you can’t use

[go-nuts] Re: Why not sync.Mutex is designed as an interface

2022-11-08 Thread TheDiveO
>From my limited experience, I notice two things: 1. I've rarely ever seen the need arise in my limited own experience to copy objects that would like to share their mutex. I would rather consider this to be most of the time a design issue, but I will be happy to stand corrected.

[go-nuts] Re: about upstream?

2022-11-03 Thread TheDiveO
I've seen both usages depending on the writers' perspectives. For that reason I avoid the terms upstream and downstream in this context (services) like the plague and always ask people for clarification without using these two words. It's always fun to see this then sparking totally surprised

Re: [go-nuts] Go generics: type constraint for function or (non-type constraint) interface?

2022-10-09 Thread TheDiveO
Thank you! I was already expecting a twin no, but wanted to ensure that I didn't had overlooked something. On Wednesday, September 28, 2022 at 9:12:16 PM UTC+2 axel.wa...@googlemail.com wrote: > No and no. > > On Wed, Sep 28, 2022 at 9:05 PM TheDiveO wrote: > >> Is there cur

[go-nuts] Go generics: type constraint for function or (non-type constraint) interface?

2022-09-28 Thread TheDiveO
Is there currently a way in Go generics to express a type constraint to allow only - any function - any interface that isn't a type constraint, such as ~int ? -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and

Re: [go-nuts] importing Go is static linking or dynamic linking?

2022-09-26 Thread TheDiveO
Actually, it depends on which std libs are used. https://www.arp242.net/static-go.html is a concise introduction. net and os/user normally prevent a static binary, unless build tags netgo and osusergo are used. On Monday, September 26, 2022 at 4:37:00 PM UTC+2 Ian Lance Taylor wrote: > On

[go-nuts] Re: Gothon Library to simulate useful Python methods

2022-09-05 Thread TheDiveO
small note here about the package naming -- to be taken with a larger grain of salt, as usual: you repeat and thus "stutter" on "Gothon/gothonSlice". I've looked into some existing slice generics examples that now pop up like mushrooms after a warm shower. They tend to simply stick with "slice"

[go-nuts] Re: Detachable context.Context?

2022-09-04 Thread TheDiveO
nd cancelations by using the background context for each request. To be able to later upgrade to v4 I'm using a context mix in using github.com/thediveo/wye. So what would be the sometimes use cases, are tunesischen due to arcane upstream API design or is there a good reason to pass value th

Re: [go-nuts] Is Go a security malware risk?

2022-08-23 Thread TheDiveO
On Tuesday, August 23, 2022 at 8:47:11 PM UTC+2 Ian Lance Taylor wrote: > On Tue, Aug 23, 2022 at 9:29 AM Robert Engels > wrote: > > > > I did not read the analysis - just the thread here and earlier threads > on this subject. My understanding that even though Go is statically linked >

[go-nuts] Re: Go multiplexers

2022-08-21 Thread TheDiveO
Looks like a TCP proxy or forwarder to me. For full duplex communicating you need two go routines per connection/session. And yes, needs something like a wait group for synchronization in order to handle half- closed connections properly, for client and server variants. On Sunday, August 21,

[go-nuts] Re: Go multiplexers

2022-08-21 Thread TheDiveO
do you even need a multiplexer? The common patten is to run Accept in a loop that simply starts a new Go routine for every new accepted connection. You only need a multiplexer of your application protocol needs multiplexing inside an established TCP connection, either because there are multiple

  1   2   >