News for hackers. Stuff that matters.
Re:Show HN: Playing with Generics and atomics in Go 1.19 by lakomen on Tuesday September 06, 2022 @05:11PM (#32743255)
Why put this under pkg, why this weird structure?

The Readme doesn't say what it is, reading it on the phone.

Re:Show HN: Playing with Generics and atomics in Go 1.19 by bmcgee84 on Tuesday September 06, 2022 @05:28PM (#32743434)
I'm new to Go, still finding my way with the idioms. Since there's nothing internal and this is just a small library I can see how it's simpler to flatten the directory structure, which also seems to be how other libraries do it.
Re:Show HN: Playing with Generics and atomics in Go 1.19 by tomaszsobota on Tuesday September 06, 2022 @02:50PM (#32741473)
This is awesome! It took me a moment to figure out the loop in addConsumer but it's neat.
Re:Show HN: Playing with Generics and atomics in Go 1.19 by bmcgee84 on Tuesday September 06, 2022 @05:30PM (#32743455)
Thanks. It's a pattern I saw in https://github.com/LMAX-Exchange/disruptor.