"A single-file C allocator with explicit heaps and tuning knobs" on the frontpage of HN https://news.ycombinator.com/item?id=47520807

Oh sounds nice and lightweight, good to have more allocator options

Oh wait this is 10k lines long and one commit and this person's first project

Oh look so many parentheses it makes me, a lisper, feel overwhelmed https://github.com/xtellect/spaces/blob/master/spaces.c#L4713

So tired of bumping into slop everywhere

A single-file C allocator with explicit heaps and tuning knobs | Hacker News

spaces/spaces.c at 422dbba85b5a7e9a209aaab2e9ac19c892528d39 · xtellect/spaces

A high-performance C allocator with explicit heap regions, fragmentation control, and runtime tuning. - xtellect/spaces

GitHub
spaces/Makefile at 422dbba85b5a7e9a209aaab2e9ac19c892528d39 · xtellect/spaces

A high-performance C allocator with explicit heap regions, fragmentation control, and runtime tuning. - xtellect/spaces

GitHub
@puppygirlhornypost2 @cwebber dawg what the fuck
spaces/bench.sh at 422dbba85b5a7e9a209aaab2e9ac19c892528d39 · xtellect/spaces

A high-performance C allocator with explicit heap regions, fragmentation control, and runtime tuning. - xtellect/spaces

GitHub
@puppygirlhornypost2 @xan Yeah @vv was looking at it, and pointed out that it downloaded an external benchmark program that wasn't even capable of running against another arbitrary allocator. So basically it isn't doing anything
@cwebber @puppygirlhornypost2 @vv After seeing the copyright dates of 2021-2026, I'm not sure if this is vibe coded or just natural born terrible code

@xan @vv @cwebber can you name a single person who would unironically type the following line:

page->hdr.fs.free = ((char *) ((FSBlock *) (((char *) ((Block *) ((char *) (page) + (((PageSize) ((PageSize) ((PageSize) (sizeof(Page) + (0)) + (PageSize) ((sizeof(double)) - 1u)) & ((PageSize) (~((PageSize) ((sizeof(double)) - 1u)))))))))) - 0))); page->hdr.fs.end = page->hdr.fs.free + (((char *) page + size - page->hdr.fs.free) / (((index) << 3) + ((PageSize) ((PageSize) ((PageSize) (0) + (PageSize) ((sizeof(double)) - 1u)) & ((PageSize) (~((PageSize) ((sizeof(double)) - 1u)))))))) * (((index) << 3) + ((PageSize) ((PageSize) ((PageSize) (0) + (PageSize) ((sizeof(double)) - 1u)) & ((PageSize) (~((PageSize) ((sizeof(double)) - 1u)))))));

@xan @puppygirlhornypost2 @cwebber ​​ i'm not that familiar with c code styles but what what the hecc is this code style. this is so hard to look at
spaces/spaces.c at 422dbba85b5a7e9a209aaab2e9ac19c892528d39 · xtellect/spaces

A high-performance C allocator with explicit heap regions, fragmentation control, and runtime tuning. - xtellect/spaces

GitHub

@puniko @xan @puppygirlhornypost2 @cwebber

{ };
load bearing empty code block?

@Johann150 @xan @puppygirlhornypost2 @cwebber this code certainly does some very bold creative choices ​
@puppygirlhornypost2 @Johann150 @xan @cwebber to be fair, this is a valid way in C to write a while true loop afaik
@Johann150 @xan @puppygirlhornypost2 @cwebber i think its sometimes written that way to prevent some compilers to yield a warning about the condition being always true or something