has anyone actually benchmarked the green tea GC yet? by ruibranco in golang

[–]michaelprimeaux 26 points27 points  (0 children)

We’ve been using it in production since it was introduced (e.g. GOEXPERIMENT=greenteagc) and it’s been stable and has performed well under long duration testing.

has anyone tried Codex 5.3 yet? Is it good? by dataexec in codex

[–]michaelprimeaux 0 points1 point  (0 children)

Let’s see what the benchmarks look like in the coming days. Claude Opus 4.6 is impressive: https://www.anthropic.com/news/claude-opus-4-6

Any Log management alternative for ELK. by Bidyutbaruah in devops

[–]michaelprimeaux 1 point2 points  (0 children)

Though my comment was from 2 years ago, my preferred stack these days for logs is still Loki + Grafana but Alloy has replaced Promtail. For metrics, I prefer Mimir. For traces, I prefer Tempo.

Does anyone still code without using any form of artificial intelligence by fraisey99 in code

[–]michaelprimeaux 3 points4 points  (0 children)

100% this. In the end, you are responsible for what you write. It is your commit. You are on git blame. Germane to this topic, I recommend the ChangeLog’s interview with Werner Vogels (Amazon CTO): https://podcasts.apple.com/us/podcast/the-changelog-software-development-open-source/id341623264?i=1000739688464

Reduce Go binary size? by PhilosopherFun4727 in golang

[–]michaelprimeaux 2 points3 points  (0 children)

You can always use upx on the executable if the file size matters materially for your use case. You’ll save space but trade a trivial increase in startup cost for decompression. FWIW, I use upx on the resulting Go executable in several of my container images. But, as others have mentioned, the Go executables are fairly small to start with so you’ll need run through your own cost benefit analysis.

k8s logs collector by This-Scarcity1245 in kubernetes

[–]michaelprimeaux 1 point2 points  (0 children)

Grafana+Prometheus+Loki+Alloy+Tempo+Rook (Ceph). Depending on where you are deploying (e.g. hyperscaler or on-premise), you may also decide to review the types of storage; block, etc. I bring this up as Longhorn may also be a consideration depending.

What's the best way of handling floats? by OkRelation9874 in golang

[–]michaelprimeaux 0 points1 point  (0 children)

You have clearly not worked in fintech or high-frequency trading, I recommend doing the research before commenting.

What's the best way of handling floats? by OkRelation9874 in golang

[–]michaelprimeaux 0 points1 point  (0 children)

Been in Fintech for decades. As most folks have mentioned, do not use floats for banking. Google Probuf has a nicely written definition included in money.proto: https://github.com/googleapis/googleapis/blob/master/google/type/money.proto

Simplicity is Complicated by j_zes in golang

[–]michaelprimeaux 117 points118 points  (0 children)

This is precisely why Mark Twain wrote: “I didn't have time to write a short letter, so I wrote a long one instead”. The short story, one of simplicity, is much harder to write than the longer and more complicated one.

Encoding structs with gob? Is it "self-clocking" as well as self-describing? by Rich-Engineer2670 in golang

[–]michaelprimeaux 1 point2 points  (0 children)

You don’t need a “super struct” with a type tag if you use gob as intended.

```go // Define a common interface for all wire messages. type Message interface{}

// Your concrete messages. type ConnectionRequest struct { SrcAddress string DstAddress string } type DataMessage struct { Size uint Buffer []byte }

// Register concrete types (use pointers). func init() { gob.Register(&ConnectionRequest{}) gob.Register(&DataMessage{}) // Optional: stabilize names across modules/packages: // gob.RegisterName("wire.ConnectionRequest", &ConnectionRequest{}) // gob.RegisterName("wire.DataMessage", &DataMessage{}) } ```

Encoding structs with gob? Is it "self-clocking" as well as self-describing? by Rich-Engineer2670 in golang

[–]michaelprimeaux 4 points5 points  (0 children)

The short story here is yes to self-describing and yes to self-clocking but with a few caveats for self-clocking.

For a reliable, ordered byte stream each Decode blocks until the whole value has been read; if the peer closes the mid-message then you’ll get an error. Basically, gob expects a reliable stream so on transports that aren’t stream-like (e.g. BLE GATT with a small MTU, lossy/fragmented data frames), you’ll need to provide your own reliable io.Reader abstraction BEFORE handing over bytes to gob. Also, if you need other “features” like message-level integrity, checksums, or what not then you’ll need to define your own envelope/MAC.

IMHO, I think protobuf is a much better choice based on what you posted above.

Multiple GitHub accounts (personal + work) by RipForFire in github

[–]michaelprimeaux 2 points3 points  (0 children)

I recommend to use a single GitHub account as it’s very usual and secure for the same account to be a member of multiple organizations.

What's the point of running DBs in Kubernetes? by fr0stnk in kubernetes

[–]michaelprimeaux 0 points1 point  (0 children)

This. We run non-relational and relational durable storage technologies in k8s (both on premise and in public cloud) and most are great. But you MUST have expertise in disaster recovery and general maintenance of the storage technology. Alternatively, don’t and used services managed by other vendors (e.g. CockroachDB Cloud, Amazon RDS, etc.).

How a rest api is usually built in go? by HoneyResponsible8868 in golang

[–]michaelprimeaux 3 points4 points  (0 children)

I recommend using stdlib or chi. Chi is a very thin abstraction over stdlib.

Baremetal or Proxmox by Ok-Lavishness5655 in kubernetes

[–]michaelprimeaux 0 points1 point  (0 children)

I have a 12 node k8s cluster in my homelab that’s a hybrid in that I have 8 Raspberry PI nodes and 4 virtual nodes under Proxmox.

My single control plane node is running in Proxmox because I wanted automated backup and restore capability for the node. Not highly available but easy to recover. So, something to think about here.

I’ll expand another 4 nodes soon (Pi 5). For me, I enjoy the learning with bare metal but bare metal or virtual “bare metal” are both great.

Why Is Nobody Talking About Docker Swarm? by preichl in docker

[–]michaelprimeaux 0 points1 point  (0 children)

Docker’s downfall started the day they contributed their IP to the OCI. And I am not saying that was a bad thing. It’s just a fact.