Earlier quoted context omitted.
if(foo) I avoid doing this because it looks like a function call.
In an appropriately powerful language, it could be a function call.
#define if(X) LET(_it,X) if (_it)
it would be a macro call41–50 of 88 posts
Someone should check that thing for back doors! http://cm.bell-labs.com/who/ken/trust.html
Earlier quoted context omitted.
if(foo) I avoid doing this because it looks like a function call.
In an appropriately powerful language, it could be a function call.
It felt weird being able to read it and understand (on a high level) what was happening.
Is this written in C? If so, what compiled this? Sorry for the noob question, I'm just a little lost.
Looks like a very early dialect. C assumes everything is an int unless specified otherwise. You can declare parameter types after the function name. So: init(s, t) char s[]; { would be equivalent to: int init(char s[], int t) { This still works with modern compilers. I'd be interested if anyone has any more info about this: waste() /* waste space */ { waste(waste(waste),waste(waste),waste(waste)); waste(waste(waste),…
It looks beautiful, almost like a scripting language. No monster type signatures like
const std::foo_bar>&"Dennis MacAlistair Ritchie (born September 9, 1941; found dead October 12, 2011) was an American computer scientist who "helped shape the digital era." He created the C programming language and, with long-time colleague Ken Thompson, the Unix operating system"
Earlier quoted context omitted.
In an appropriately powerful language, it could be a function call.
This is all very well if you have a friendly, high level scripting language like Ruby, but I'm definitely glad I don't have to write a C compiler where functions can take arbitrary blocks of code.
He already used the right brace style (hanging braces, cuddled else) and the right indentation (tabs, not spaces).
Everyone must support the space character, it cannot be banned. But a simple commit hook to ban tabs can make indentation and alignment not get messed up over time with many collaborators with default-configured editors (that mess up and use tabs for alignment).
Reading Dennis Ritchie's code is as close to reading a religious text as I'll ever come. The straightforward elegance of it is so inspiring!
Coincidences... I thought "How come Warren Toomey (one of the guys of the Unix Heritage Society [1]), has never posted this?" Turns out, this Github-repo is just a mirror/copy of his work, but with attribution [2]. Still worth reading through there, tuhs also stores some extremely old UNIX versions. [1] www.tuhs.org [2] http://cm.bell-labs.com/cm/cs/who/dmr/primevalC.html Edit: Warren has written a paper on restoring…
If one releases code under an open license and people use/copy/fork it, why should you or the original author be unhappy. (As long as the license terms are not being broken.)
If we had to worry about this each time we forked/cloned someone's work, it would make code reuse very hard.
[Edit]
I am working on some Python charting. I found Pychart, which I found interesting: http://home.gna.org/pychart/ . Because it is in bzr which I don't work with, I put it on github. Should I be worried that someone will feel offended with it?