News for hackers. Stuff that matters.
Re:Arthur Whitney's One-page Interpreter (1992) by icsa on Thursday October 30, 2014 @11:22PM (#8537145)
"noun" in C: noun(c){A z;if(c<'0'||c>'9')R 0;z=ga(0,0,0);z->p=c-'0';R z;}

"noun" in k: noun:{[c]$[(c<"0")|c>"9";0;c-"0"]} / $[boolean; true; false]

The C version is effectively the k version expanded with declarations, memory allocation and initialization. I would not be surprised if the interpreter was written in APL and transliterated to C.

Re:Arthur Whitney's One-page Interpreter (1992) by dragonwriter on Friday October 31, 2014 @02:32AM (#8537565)
I'm not saying the C isn't in functional style.

I'm saying that it being in functional style has nothing to do with the absence of whitespace/newlines. Both the use of the functional style and the absence of whitespace no doubt reflect Whitney's language-independent programming preferences, but they are distinctly different things.

Re:Arthur Whitney's One-page Interpreter (1992) by DonGateley on Friday October 31, 2014 @12:16AM (#8537279)
Given his obvious facility with both languages I think you are right but that both those steps occurred simultaneously in real time.

Arthur had learned how to think a problem in APL and was a wizard at transliteration.