News for hackers. Stuff that matters.

tidwall

Re:Solod – A Subset of Go That Translates to C on Monday April 06, 2026 @10:12PM (#47669939)
Looks to me like having the ability to write Go syntax and interop directly with C is the plus.
Re:Solod – A Subset of Go That Translates to C on Monday April 06, 2026 @10:08PM (#47669910)
"To keep things simple, there are no channels, goroutines, closures, or generics."

I wonder if it could be integrated with https://github.com/tidwall/neco, which has Go-like coroutines, channels, and synchronization methods.

I do this all the time. I’ll spend weeks or months on a project, with thousands of wip commits and various fragmented branches. When ready, I’ll squash it all into a single initial commit for public consumption.
This reminds me of a card swiping video game system I made years ago.

https://youtu.be/Z2xq3ns5Hsk

https://github.com/tidwall/RetroSwiper

Re:Fucking Approachable Swift Concurrency on Tuesday December 30, 2025 @10:16AM (#46434108)
Or this.

    func fetchUser(id int) (user User, err error) {
        resp, err := http.Get(fmt.Sprintf("https://api.example.com/users/%d", id))
        if err != nil {
            return user, err
        }
        defer resp.Body.Close()
        return user, json.NewDecoder(resp.Body).Decode(&user)
    }
Re:Taking money off the table on Thursday October 30, 2025 @03:35PM (#45764336)
A bird in the hand.
Re:Show HN: Pogocache – Fast caching software on Monday July 21, 2025 @08:41PM (#44642074)
Thanks! The Pogocache sharded hashmap design is optimized for extremely low contention and good memory locality. It super rare for any two threads to ever wait on the same key. That's the biggest part and it's all in the src/pogocache.c file. But the network layer is finely tuned too.

Mostly I perfed and profiled ad nauseam, monitoring cpu cycles along the way. I found that keeping a focus on latency and cycles was primo, and the rest fell into place.

Re:Show HN: Pogocache – Fast caching software on Monday July 21, 2025 @07:03PM (#44641367)
Thanks!
Re:Show HN: Pogocache – Fast caching software on Monday July 21, 2025 @07:03PM (#44641365)
Like an ACL file?
Re:Show HN: Pogocache – Fast caching software on Monday July 21, 2025 @07:02PM (#44641356)
Thanks you for the blog post about TG when it came out.
Re:Show HN: Pogocache – Fast caching software on Monday July 21, 2025 @07:00PM (#44641342)
Glad to bring another one into this world.
Re:Show HN: Pogocache – Fast caching software on Monday July 21, 2025 @06:59PM (#44641332)
The protocols are autodetected. No need to carry multiple ports around.
Re:Show HN: Pogocache – Fast caching software on Monday July 21, 2025 @06:55PM (#44641292)
Oh wow. That is dope. Thanks for sharing.
Re:Show HN: Pogocache – Fast caching software on Monday July 21, 2025 @04:39PM (#44640133)
Thanks Steve. Your feedback was very helpful.
Re:Show HN: Pogocache – Fast caching software on Monday July 21, 2025 @03:00PM (#44639034)
No
Re:Show HN: Pogocache – Fast caching software on Monday July 21, 2025 @02:56PM (#44638986)
Yes, it is highly hand optimized. There's a description of some of the methods I used near the bottom of there README. I mainly focused on minimizing contention, with the sharded hashmap and such. But the networking layer is carefully crafted.
Re:Show HN: Pogocache – Fast caching software on Monday July 21, 2025 @02:50PM (#44638927)
Not intending to make pogocache into a sql database. I prefer keeping it a cache. More so exploring ways to work with existing databases such as sqlite, duckdb, postgres. Kinda like providing proxy-ish operations that transparently cache sql reads.
Re:Show HN: Pogocache – Fast caching software on Monday July 21, 2025 @02:18PM (#44638536)
That's the only way right now. The other ways I'm considering is with an environment variable and/or acl.
Re:Cache Benchmarks on Thursday July 17, 2025 @02:45PM (#44596664)
I updated the graphs to use linear scaling. Thanks for the feedback
Re:Cache Benchmarks on Thursday July 17, 2025 @02:43PM (#44596655)
Memcache binary protocol was deprecated years ago. It’s no longer recommended to be used.
Re:Cache Benchmarks on Thursday July 17, 2025 @12:34PM (#44595152)
Thanks for the feedback. The plateauing is due to a taskset misconfiguration. I fixed it and reran the benches. They look much better now.
Re:Cache Benchmarks on Thursday July 17, 2025 @12:33PM (#44595142)
Thanks for the feedback. I updated the graphs to use linear scale by default. Log scale is still available, which is useful for latency viewing. Also only included the summarized graphs on the README. All graphs are moved into a separate file.
Re:Zig's New Async I/O on Saturday July 12, 2025 @09:53PM (#44546839)
Context is not required in Go and I personally encourage you to avoid it. There is no shame in blazing a different path.
Re:Parallel ./configure on Friday April 25, 2025 @09:46PM (#43800182)
I've stopped using autotools for new projects. Just a Makefile, and the -j flag for concurrency.
Re:Implementing Generic Types in C on Wednesday March 19, 2025 @04:35PM (#43417013)
Here's a b-tree library I wrote that uses a similar approach. https://github.com/tidwall/bgen
Re:Atari 2600 vs. Atari 7800 Which Should You Get? on Sunday February 09, 2025 @08:04PM (#42995856)
Vanguard, Adventure, Track and Fields (with controller), Pitfall, Berzerk, Kung Fu Master
Re:Portrait of the Hilbert Curve on Saturday January 18, 2025 @03:12PM (#42751059)
Lately, I’ve found using hilbert curves with a "spatial btree" [1] beats an rtree for most of my geolocation needs.

1. https://github.com/tidwall/bgen/blob/main/docs/SPATIAL_BTREE...

Older »