HNHacker News
TopNewBestAskShowJobs

tidwall

883 karma · joined February 3, 2015

submissionscomments
tidwall··on Solod – A subset of Go that translates to C
Looks to me like having the ability to write Go syntax and interop directly with C is the plus.
tidwall··on Solod – A subset of Go that translates to C
"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.

tidwall··on A single-file C allocator with explicit heaps and tuning knobs
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.
tidwall··on Floppy disks turn out to be the greatest TV remote for kids
This reminds me of a card swiping video game system I made years ago.

https://youtu.be/Z2xq3ns5Hsk

https://github.com/tidwall/RetroSwiper

tidwall··on Approachable Swift Concurrency
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)
    }
tidwall··on Taking money off the table
A bird in the hand.
tidwall··on Show HN: Pogocache – Fast caching software
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.

tidwall··on Show HN: Pogocache – Fast caching software
Thanks!
tidwall··on Show HN: Pogocache – Fast caching software
Like an ACL file?
tidwall··on Show HN: Pogocache – Fast caching software
Thanks you for the blog post about TG when it came out.
tidwall··on Show HN: Pogocache – Fast caching software
Glad to bring another one into this world.
tidwall··on Show HN: Pogocache – Fast caching software
The protocols are autodetected. No need to carry multiple ports around.
tidwall··on Show HN: Pogocache – Fast caching software
Oh wow. That is dope. Thanks for sharing.
tidwall··on Show HN: Pogocache – Fast caching software
Thanks Steve. Your feedback was very helpful.
tidwall··on Show HN: Pogocache – Fast caching software
No
tidwall··on Show HN: Pogocache – Fast caching software
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.
tidwall··on Show HN: Pogocache – Fast caching software
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.
tidwall··on Show HN: Pogocache – Fast caching software
That's the only way right now. The other ways I'm considering is with an environment variable and/or acl.
tidwall··on Cache Benchmarks
I updated the graphs to use linear scaling. Thanks for the feedback
tidwall··on Cache Benchmarks
Memcache binary protocol was deprecated years ago. It’s no longer recommended to be used.
tidwall··on Cache Benchmarks
Thanks for the feedback. The plateauing is due to a taskset misconfiguration. I fixed it and reran the benches. They look much better now.
tidwall··on Cache Benchmarks
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.
tidwall··on Zig's New Async I/O
Context is not required in Go and I personally encourage you to avoid it. There is no shame in blazing a different path.
tidwall··on Parallel ./configure
I've stopped using autotools for new projects. Just a Makefile, and the -j flag for concurrency.
tidwall··on Implementing Generic Types in C
Here's a b-tree library I wrote that uses a similar approach. https://github.com/tidwall/bgen
tidwall··on Atari 2600+ vs. Atari 7800+ – Which Should You Get?
Vanguard, Adventure, Track and Fields (with controller), Pitfall, Berzerk, Kung Fu Master
tidwall··on Portrait of the Hilbert Curve (2010)
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...

tidwall··on Th64: Tiny Hash Function in C
Here you go. https://gist.github.com/tidwall/332fc3791a23b038c6b3e73aba02...
tidwall··on Th64: Tiny Hash Function in C
Hi HN. I’m the author of this hash. It’s just something I whipped up last night. It’s really not much different than the other hashes out there. I wanted to see if I could make a simple quality hash that easy to cut & paste, under 80 chars lines, and self contained.

Otherwise just an experiment.

tidwall··on Multi-Array Queue
PRs cannot be disabled.
Page 1 of 4Next →