>>3 I don't know if I'll be able to read that much sicp today.
Name:
Anonymous2015-02-23 5:22
#include "void.h" //4bit radix sort void u4sort3and(u4* a,u4 size){ int COUNT[16], i;u4* t; #define radix4a(byte,size,A,TEMP) memset(COUNT,0,16*4);\ for ( i = 0; i < size; ++i)++COUNT[(((A[i]) >> (byte<<2))&0xf)];\ for ( i = 1; i < (16); ++i)COUNT[i] += COUNT[i - 1];\ for ( i = size - 1; i >= 0; --i) {TEMP[COUNT[((A[i] >> (byte<<2)) &0xf)] - 1] = A[i];\ --COUNT[((A[i] >> (byte<<2))&0xf)];} if(size<1024){u4 t1[size];t=(u4*)&t1;}else{ t=malloc(size*4);}; radix4a(0, size, a,t);radix4a(1, size, t,a); radix4a(2, size, a,t);radix4a(3, size, t,a); radix4a(4, size, a,t);radix4a(5, size, t,a); radix4a(6, size, a,t);radix4a(7, size, t,a); free(t);}
Name:
Anonymous2015-02-23 6:39
>>9 I thought I was looking at the output from diff for a second.
Name:
Anonymous2015-02-23 7:40
>>9 But where are your buckets? I'm not seeing any buckets there anon. Its not a radix sort without buckets.
WE REQUIRE MORE BUCKETS
Also, visualisations. You need to visualise the algorithm. What you have provided here is cold, austere and imposing. Make it warmer with a visualizazione
>>11 actually that someone else posted my old radix code, i'll add it to internal\array.h eventually(i convert such functions to macros) i'm thinking also of adding floating point radix sort(it exists) as one of typeselected radixsorts the bucket in the >>9 is t alternating with the array itself.
Name:
Anonymous2015-02-23 14:06
>>1 //A program in C #include "void.h" //gist.github.com/FrozenVoid/87e6ad6212ac9ce496e0#file-void-h" STDSTART #define welcometoC() sm defvars((c1p,species,malloc(256)),(c1,yes));\ p("What is your species?",(scan(species),"\n"),species,"greetings! We are the primitive C-aveman"," from the planet #define.\n","Open your parens and"," surrender ",species," REPLs.\n","Would ",species, " like to know more?[y/n]");\ iftcond(((scan(yes),yes=='y'||yes=='Y'),(p(yes,"..es? ",species,("techno""magical")," expressiveness will be added to our own.\n",species," culture will adapt to service us.")),((p("Resistance is ", (range(70,29)),"% futile."))))); em
welcometoC();;
STDEND
Name:
Anonymous2015-02-23 15:25
#include <stdio.h> int main() { printf("Have you read your K&R today?\n"); return 0; }
Name:
Anonymous2015-02-23 15:33
>>15 U MENA #include <stdio.h> void main() { printf("Have you read your K&R today?\n"); return 0; }
>>21 These are my utility headers where i dump common macros and functions. Click " 01-Void.h headers.txt" and then "Download gist" Unzip to same directory as the C file, use c.bat to compile or copy its switches and manually paste into console.