Don't read: foo.c solution.
Sat, 24 Oct 1998 22:14:53 -0700
I'm not sure I understand what you mean by "pregeneration". I could have
just as easily posted the foo.c output of the program I posted, which
meets the original specifications in every way and could have just as
easily been written by hand, but instead I think I one-upped on that by
posting a slightly more readable version that generates almost the exact
same source as before, only specific to the character set of the host
machine and slightly less readable. It's possible to write the original
program I posted such that it's ouput is also it's exact source, and
also character neutral, but this is also less readable. I posted the
easiest to read and understand solution that I could.
I don't understand how your foo.c program doesn't require pregeneration.
The output it generates looks almost nothing like the source, and
produces the exact same byte-for-byte output of the program I posted,
very interestingly, down to my strict ANSI/ISO conforming programming
style and usage of tabs where most others use spaces and everything
else, though in your email to me with the attached foo.zip you indicated
that you came up with it totally on your own without outside help.
Also interestingly, there is this C source code tool you can get for
pretty much any machine called 'cobfusc', which with various flags can
compress source a good bit and make it quite unreadable, but still
compilable. Using it with various flags I can compress the source of the
original program I posted down to about the size of yours, and there are
some similarities, but nothing amazing or anything. Not implying
anything, just a lot of coincidences. But stranger things have happened
David Manifold wrote:
> On Sat, 24 Oct 1998, Christopher Barry wrote:
> > Now this isn't the actual foo.c, but after compiling it will generate as
> > it's output the true foo.c. So if you named the above source bar.c then:
> > $ cc bar.c -o bar
> > $ bar > foo.c
> The way I read the challenge, a solution of this type would not be
> allowed. I came up with a solution that does not require pregeneration.
> I've done stuff like your solution before, and I thought you were asking
> for something more. (I have put my solution at
> http://www2.tunes.org/~dem/foo.zip - I jokingly call this "The closest to
> lambda you can get in C")
> > Anyways, I hope this helps to demonstrate a lot of the points I raised
> > in "Replies to replies", and maybe quietly humbled a few of you.
> Yes, quite tough. Don't do it again, or you'll slow down the development
> of TUNES :)
> David Manifold <email@example.com>