|
Try the J source code, like https://github.com/jsoftware/jsource/blob/master/jsrc/v.c F1(jttable){A z,zz;I r,wr;
F1PREFIP;ARGCHK1(w);
// We accept the pristine calculations from ravel
wr=AR(w); r=(RANKT)jt->ranks; r=wr<r?wr:r; // r=rank to use
// obsolete RZ(IRSIP1(w,0L,r-1<0?0:r-1,jtravel,z)); // perform ravel on items
RZ(IRSIP1(w,0L,r-((UI)r>0),jtravel,z)); // perform ravel on items
R r?z:IRSIP1(z,0L,0L,jtravel,zz); // If we are raveling atoms, do it one more time on atoms
} // ,."r y
Quoting https://corecursive.com/065-competitive-coding-with-conor-ho... :> Yeah. I started a project a couple months ago. I’m slowly porting that code base, the J source code to C++ 20. And yeah, I think there should be a name for these types of code bases, because it’s not C, it’s like a macro variant of C, where it’s a CDSL, where 80% of your “library” is macros. I did a search, there’s 10,000 macros in the source code, and those macros are used like functions. |