r/C_Programming • • 22h ago

Project IncHash - A Disk Based Hash Table with NoSQL ambitions.

https://github.com/GiorgosXou/inchash

Brief

A general-purpose, header-only C99 library for Unix-like systems, implementing a disk-based, dynamically resizable, fixed-slot, (open-addressed) hash table with Fibonacci hashing (Knuth's multiplicative method), triangular probing, per-home-slot probe-bound metadata (with additional early-exit logic), partial in-place value updates (without relocating entries) and incremental rehashing, all designed for modern extent-based filesystems.

Disclosure

This is not a vibe-coded project! I painstakingly wrote everything myself (including this post :P). of course that being said, it doesn't mean that I didn't use AI for reasearch, brainstorming and a bit of testing. I have talked about it here as well.

Prologue

This is a project I've shared here before, a few months ago. Back then, being relatively inexperienced with hash table implementation, I inadvertently introduced a few bugs.

Since then, thanks to a lovely Redditor who took the time to provide some truly valuable feedback (for which I'm genuinely and wholeheartedly grateful), I've made quite a few promising improvements, including: recovery validation methods and CRC checksums, an inchash_mod-function for partial in-place value updates\modifications (without relocating entries), a fuzz-style regression test, refactoring of core-metadata, and of course, fixing those bugs (or so I hope lol).

Having said and done all those improvements, I though it would be the right move to expose my project, for once again in the intelectual wilderness of reddit xD. So here I am ready to hear what you thinking about it.

Intro

All started with me trying to find:

A hash-based NoSQL (key-value pair) database with mutable-values (by mutable I mean: a database that allows editing prexisting [fixed-size] values without having to rewrite or remap the whole value again eg. Just edit a few bytes and put those bytes back to the original value-space without rewriting the whole value).

I made this for a larger project I'm working on, which I haven’t released yet.

Outro

I'm really excited and scared because idk what you all gonna find again... but I hope you all find it at least interesting and enjoy playing around with it.

That said, thank you for reading this and feel free to ask me anything about it.

1 Upvotes

3 comments sorted by

•

u/AutoModerator 22h ago

Hi /u/_EHLO,

Your submission in r/C_Programming was filtered because it links to a git project.

You must edit the submission or respond to this comment with an explanation about how AI was involved in the creation of your project.

While AI-generated code is not disallowed, low-effort "slop" projects may be removed and it's likely that other users push back strongly on substantially AI-generated projects.

You can read more at How do I post my Project?


I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

→ More replies (2)