[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: one-line programs
On Feb 1, 9:25 am, "Michael J. Mahon" <mjma...@aol.com> wrote:
> IIRC, Nibble published these by the hundreds, though most of them were
> not really "games", but demonstrations. There were even books of
> one-liners published!
>
> A line is limited to the length of the input buffer--I don't recall
> the exact limit, but it's just under 256 characters, so one-liners
> are very constrained. There are several tricks for getting conditional
> execution within a single line, since "IF" applies to the entire
> remainder of the line.
>
> Think of one-liners as a kind of puzzle, rather than as a useful
> skill, and you've got the picture. ;-)
I remember typing in one example that rendered the Mandelbrot set in
hires, then waiting the 5-6 hours for it to render, just because of
found it ingenious :-)
These days we have http://en.wikipedia.org/wiki/The_International_Obfuscated_C_Code_Contest
which carries on 'spirit' of the exercise. I however always thought it
would be far more fun to have an International self-documenting code
contest ;-)
Matt