Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on 15-line hash table in C.
// corrected overflow hget
for (int k2=k,o=0; t[k&(SIZE-1)] && **t[k&(SIZE-1)] != k2 && o<SIZE; ++k,++o); return t+(k&(SIZE-1));
for (int (**a)[2] = hget(t, k); a && (*a || (*a=malloc(sizeof(**t)))); (**a)[0]=k,(**a)[1]=v,a=0);
There are no comments on this comment yet.
// corrected overflow hget
// hset now allows overwrite