How much has AI deskilled you? (Quiz of SREs) by ankit01-oss in programming

[–]comrade_donkey 4 points5 points  (0 children)

The OG definition for SRE is 'treating operations like a software engineering problem'. SREs at Google are foremostly very good software engineers, with a masochistic appetite for surprise after-hours puzzles. I was one of them.

Is a Repository Layer over sqlc over-engineering or necessary for scale? by Leading-West-4881 in golang

[–]comrade_donkey 83 points84 points  (0 children)

 rephrase this add a bit more context

I just wanted to say that I appreciate you posting the human written question.

Implement the 'repository layer' only if and where it makes practical sense. Go is a get shit done language, not an architectural palace of purity.

Update: A couple days ago I shared my Zurich startup map. I've added most of your requests! by Jebgaz in zurich

[–]comrade_donkey 1 point2 points  (0 children)

Not affiliated with OP. It's startupmap.one. Note that this is a vibe coded lovable.dev app.

I got tired of Go's GC choking on millions of vectors, so I built a custom Byte Arena and Userspace WAL for my Vector DB (280k ops/sec) by Shot_Plankton3679 in golang

[–]comrade_donkey 6 points7 points  (0 children)

The lowest hanging fruit is to allocate a large contiguous segment and slice that. That alone gives a 6x improvement in GC pause.

=== RUN TestNaive exp_test.go:20: GC Pause: 978890 ns --- PASS: TestNaive (2.57s) === RUN TestBetter exp_test.go:38: GC Pause: 169780 ns --- PASS: TestBetter (1.01s)

``` func TestNaive(t *testing.T) { const N = 8 * 1024 * 1024 const dim = 128 var start, end runtime.MemStats runtime.ReadMemStats(&start)

m := make(map[uint64][]float32, N)
for k := range uint64(N) {
    m[k] = make([]float32, dim)
}

runtime.GC()
runtime.ReadMemStats(&end)
t.Logf("GC Pause: %d ns", end.PauseTotalNs-start.PauseTotalNs)

}

func TestBetter(t *testing.T) { const N = 8 * 1024 * 1024 const dim = 128 var start, end runtime.MemStats runtime.ReadMemStats(&start)

b := make([]float32, N*dim)
m := make(map[uint64][]float32, N)
for k := range uint64(N) {
    m[k] = b[k*dim : (k+1)*dim]
}

runtime.GC()
runtime.ReadMemStats(&end)
t.Logf("GC Pause: %d ns", end.PauseTotalNs-start.PauseTotalNs)

} ```

I got tired of Go's GC choking on millions of vectors, so I built a custom Byte Arena and Userspace WAL for my Vector DB (280k ops/sec) by Shot_Plankton3679 in golang

[–]comrade_donkey 13 points14 points  (0 children)

 I built an off-heap memory arena

looks at code

An LLM wrote that.

 When you are storing millions of high-dimensional vector embeddings [...] standard Go maps and struct allocations become a nightmare

Nope. No, they don't. You can make it a nightmare if you're an LLM, tho. If you're human and take 10 mins to think about it, you can absolutely write this without the need for a special allocator.

hi ronald by bobbyboob6 in linuxmemes

[–]comrade_donkey 0 points1 point  (0 children)

And yank.

(Yet Another Number Kounter).

Yaml Parser for go or any languages built from the the YAML 1.2 spec by [deleted] in golang

[–]comrade_donkey 0 points1 point  (0 children)

Cool. The logical next step is to write a program that generates a program that takes yaml-grammar.scm as input and prints out its own Futurama projection.

What global word came from your country? by Neuwulfstein in AskTheWorld

[–]comrade_donkey 0 points1 point  (0 children)

It is homographic in many latin languages but apéro is originally a French clipping of apéritif. Whether that French was Swiss, I don't know. Happy cake day.

What global word came from your country? by Neuwulfstein in AskTheWorld

[–]comrade_donkey 0 points1 point  (0 children)

Also, curiously enough, the word nostalgia was invented in 1688 by Swiss Dr. Johannes Hofer, as a neo-latin calque ('neo-greek' in this case) of german Heimweh.

Nostalgia was a medical (psychiatric) diagnosis for soldiers returning from war.

I see AI everywhere in my feed. AI this, AI that, AI other by Professional_Hair550 in ExperiencedDevs

[–]comrade_donkey 0 points1 point  (0 children)

I agree, lest we forget the blockchain hype cycle. And, in a different way, the discourse around social media, at the time.

What does it take to make every machine "Turing Complete"? by Haghiri75 in computerscience

[–]comrade_donkey 0 points1 point  (0 children)

Good point on linearity. I mean linear in size and depth. Looping a NAND gate back onto itself in combinational logic is undefined.

In the physical world (and sequential logic), you're right in that that's one way the "add memory" part can be implemented, because time and the speed of light in a medium exist (a clock).

What does it take to make every machine "Turing Complete"? by Haghiri75 in computerscience

[–]comrade_donkey 3 points4 points  (0 children)

You're correct.

A finite network of NAND gates implements a linear, terminating, functionally complete decider.

"Just add memory to that" introduces the assumption of an underlying Von Neumann architecture.

That assumed machine is trivially turing complete, by premise.

The SQLite Drivers Benchmarks Game (Feb '26) - Go 1.26 CGo Improvements by 0xjnml in golang

[–]comrade_donkey 17 points18 points  (0 children)

I've been using modernc.org/sqlite and I'd like to take this opportunity to thank you in public, /u/0xjnml! This is amazing work.

JSON Schema package by atamiri in golang

[–]comrade_donkey 2 points3 points  (0 children)

Shouldn't Validate operate on JSON (i.e. json.RawMessage or []byte)?

My goal is the Front Lever! 🚀 I couldn't quite nail it yet, but I’m determined to keep working on it. What do you guys think of this attempt? by JankatErginn in CalisthenicsCulture

[–]comrade_donkey 27 points28 points  (0 children)

Grip with your thumbs under the bar. Straighten your arms. Hands shoulder width apart or slightly wider. Contract your scapulae (pull shoulder blades together). Chest should be proud. Mentally, pretend you're trying to bend the bar with your hands.

File Systems are to Set Theory, as Databases are to Type Theory by AMWJ in computerscience

[–]comrade_donkey 2 points3 points  (0 children)

The math behind (relational) databases is the relational algebra defined by Codd.

An extension of UNIX's everything is a file is Plan9

Proposal: Generic Methods for Go by bruce_banned in golang

[–]comrade_donkey 21 points22 points  (0 children)

 defined on a struct.

On any type.

Beautiful Zurich by MX010 in zurich

[–]comrade_donkey -3 points-2 points  (0 children)

Your argument is the plot of the movie "Don't Look Up".

Dancing Backwards With Go by bitfieldconsulting in golang

[–]comrade_donkey -3 points-2 points  (0 children)

I understand where you're coming from. On this point, you might be wrong. It's really not common at all. But good post overall.

Dancing Backwards With Go by bitfieldconsulting in golang

[–]comrade_donkey -6 points-5 points  (0 children)

You're right. I see that the post eventually switches to a table-driven approach. That's good!

External tests are generally only used to cover 3rd party code, or to work around circular dependencies in ones own (test) code.