libcodr7
Languages and libraries
c data structure library
SHOW HN2019
How HN took it
4 positive, 11 neutral or asking, 0 mixed, 5 critical, out of 20 comments about the project. Thread score -0.17.
Idea: 1 for, 3 againstDesign: 2 for, 1 againstDocs: 1 for, 1 against
The thread, comment by comment
Each row is a top-level comment and its replies, in HN's order. Select a cell to open that comment on HN.
positive neutral or mixed critical about another commenter or something else the maker
What HN said
What people liked
Intrusive container design and container_of usage explained well
From 2 comments
These structures are intended to be used like the Linux Kernel's data structures, via `container_of` (Though in the library the macro is called `c7_baseof`. But it does the exact…
DSMan195276 on HNUsing `container_of` lets you avoid having to use void pointers. And the macros like foreach are surprisingly readable once you give them a shot, and they're simple enough they…
DSMan195276 on HN
Objections
Lacks documentation and code comments
From 2 comments
"in the spirit of C" is pretty ambiguous. What does this do better or differently from other libraries? There's no working examples shown. There's a "real-world examples" link,…
slabity on HNI can't figure out how the linked list is used. Where is the per-element data? I thought there would be a usage example in the tests, but there wasn't.
thestoicattack on HN
Unclear advantage over existing libraries
From 2 comments
So what's the advantage of this over existing libraries?
jlarocco on HN"in the spirit of C" is pretty ambiguous. What does this do better or differently from other libraries? There's no working examples shown. There's a "real-world examples" link,…
slabity on HN
Red-black tree lacks delete implementation
From 2 comments
I didn't realize you could implement a red-black tree with this little code. The code shown here seems to indicate that insert has at least four cases, and delete has six:…
haberman on HNYou'll find delete on top of the todo list, it's more complex but not horribly so. I skimmed the link, but from what I can see there are no issues there that outweigh the…
codr7 on HN
Requests
Add documentation and usage examples
From 2 comments
"in the spirit of C" is pretty ambiguous. What does this do better or differently from other libraries? There's no working examples shown. There's a "real-world examples" link,…
slabity on HNI can't figure out how the linked list is used. Where is the per-element data? I thought there would be a usage example in the tests, but there wasn't.
thestoicattack on HN
Implement delete for the red-black tree
From 2 comments
I didn't realize you could implement a red-black tree with this little code. The code shown here seems to indicate that insert has at least four cases, and delete has six:…
haberman on HNYou'll find delete on top of the todo list, it's more complex but not horribly so. I skimmed the link, but from what I can see there are no issues there that outweigh the…
codr7 on HN
Questions
What does 'in the spirit of C' mean here
From 2 comments
"In the spirit of C". What exactly is meant by that?
Twirrim on HN"in the spirit of C" is pretty ambiguous. What does this do better or differently from other libraries? There's no working examples shown. There's a "real-world examples" link,…
slabity on HN
How does it differ from BSD queue macros
From 2 comments
I've only glanced at these; can someone more familiar explain how these are different from the BSD "queue" macros (and their offspring, like the tree headers)?
tptacek on HNSo, like http://troydhanson.github.io/uthash/ but without the documentation? (NetBSD has had an all-macro red/black tree implementation forever, plus the ancient and…
95014_refugee on HN
Alternatives named
jemalloc rb tree
From 1 comment
Anyone who does too much C would know that manually implementing associative array (dictionary) is not fun. I started to use two implementations for my work, both worked pretty…
liuliu on HN
khash
From 1 comment
Anyone who does too much C would know that manually implementing associative array (dictionary) is not fun. I started to use two implementations for my work, both worked pretty…
liuliu on HN
uthash
From 1 comment
So, like http://troydhanson.github.io/uthash/ but without the documentation? (NetBSD has had an all-macro red/black tree implementation forever, plus the ancient and…
95014_refugee on HN
Apple CoreFoundation
From 1 comment
If I were starting a new project in C, I would definitely rely on a solid foundation library like APR[0] or CoreFoundation[1] without reimplementing a bunch of fundamental data…
rwbt on HN
APR
From 1 comment
If I were starting a new project in C, I would definitely rely on a solid foundation library like APR[0] or CoreFoundation[1] without reimplementing a bunch of fundamental data…
rwbt on HN
Glib
From 1 comment
If I were starting a new project in C, I would definitely rely on a solid foundation library like APR[0] or CoreFoundation[1] without reimplementing a bunch of fundamental data…
rwbt on HN
BSD queue.h
From 1 comment
So, like http://troydhanson.github.io/uthash/ but without the documentation? (NetBSD has had an all-macro red/black tree implementation forever, plus the ancient and…
95014_refugee on HN