In 1974, Gustav Larsson, a young programmer from Helsinki, Finland, stumbled upon an amazing discovery. While working with a PDP-8 mainframe computer, Gustav suddenly because bored. He decided to attempt to compile a single byte program. For what reasons we cannot know.
Nevertheless, Gustav was already familiar with RTPS FORTRAN and thus picked a single character to represent the contents of the program: "@". Once compiled, he expected nothing to happen.
He was wrong. To his absolute amazement, it compiled successfully!
Using an ARS-33 Teletype, Gustav printed out the 1 byte program followed by its output. It appeared to contain a message from God. A devout Catholic, Gustav showed it to his immediate supervisor, who ordered both the print out and the program itself destroyed. Although Gustav complied with his wishes, it is rumored that he kept a copy of the printout in a small shoe box in his apartment in Helsinki.
He also kept a brown diary which included various small passages from the "Helsinki Code" (as he described it years later). According to Gustav, the Helsinki Code came directly from the 'Mind of God.'
The Helsinki Code read (in part):
"...[M]y presence in your world is unalterable for I am the sanctuary of both the cosmos and the one soul inside you. I could awaken each of you in this very moment to [my] unity, but there is a larger design - a more comprehensive vision - that places you in the boundaries of time and the spatial dimensions of separateness...[T]he design requires a progression into my wholeness that reacquaints you with [my] unity through the experience of separation. Your awakening, while slow and sometimes painful, is assured, and this you must trust above all else..."
(Page 26 of Gustav's Journal - Dated February 10th, 1975)
Gustav passed away in 1996. Although his diary has since turned up missing, the above fragment from the 'Helsinki Code' remains. Perhaps, just perhaps, we can learn to be better people simply by reading it.
dun...@yahoo.com wrote: > In 1974, Gustav Larsson, a young programmer from Helsinki, > Finland, stumbled upon an amazing discovery. While working > with a PDP-8 mainframe computer, Gustav suddenly because > bored. He decided to attempt to compile a single byte > program. For what reasons we cannot know.
> Nevertheless, Gustav was already familiar with RTPS FORTRAN > and thus picked a single character to represent the > contents of the program: "@". Once compiled, he expected > nothing to happen.
> He was wrong. To his absolute amazement, it compiled > successfully!
> Using an ARS-33 Teletype, Gustav printed out the 1 byte program > followed by its output. It appeared to contain a message from > God.
Almost certainly not from God. It most probably, very likely, almost certainly, definitely came from the compiler writer. If Gustav decides to call him god then be it. But the compiler writer is certainly human.
By the way, historically that is not the shortest piece of source code ever written. Some time ago someone submitted a zero byte C source code (an empty file) to the obfuscated C contest. Amazingly gcc recognised it as a valid and legal C source code and compiled it into an executable. The program, when run, outputs nothing. Thus it also claims to be the shortest quine (self reproducing code) in history by printing out itself (nothing). It actually won the competition. After that, the obfuscated C contest banned all zero byte source code.
>>In 1974, Gustav Larsson, a young programmer from Helsinki, >>Finland, stumbled upon an amazing discovery. While working >>with a PDP-8 mainframe computer, Gustav suddenly because >>bored. He decided to attempt to compile a single byte >>program. For what reasons we cannot know.
>>Nevertheless, Gustav was already familiar with RTPS FORTRAN >>and thus picked a single character to represent the >>contents of the program: "@". Once compiled, he expected >>nothing to happen.
>>He was wrong. To his absolute amazement, it compiled >>successfully!
>>Using an ARS-33 Teletype, Gustav printed out the 1 byte program >>followed by its output. It appeared to contain a message from >>God.
dun...@yahoo.com wrote: > In 1974, Gustav Larsson, a young programmer from Helsinki, > Finland, stumbled upon an amazing discovery. While working > with a PDP-8 mainframe computer, Gustav suddenly because > bored. He decided to attempt to compile a single byte > program. For what reasons we cannot know.
The PDP-8 is a twelve bit machine. Do you mean a 1.5 byte program?
The PDP-11 has a one instruction program which can be used to test all of memory.
>>In 1974, Gustav Larsson, a young programmer from Helsinki, >>Finland, stumbled upon an amazing discovery. While working >>with a PDP-8 mainframe computer, Gustav suddenly because >>bored. He decided to attempt to compile a single byte >>program. For what reasons we cannot know.
>>Nevertheless, Gustav was already familiar with RTPS FORTRAN >>and thus picked a single character to represent the >>contents of the program: "@". Once compiled, he expected >>nothing to happen.
>>He was wrong. To his absolute amazement, it compiled >>successfully!
>>Using an ARS-33 Teletype, Gustav printed out the 1 byte program >>followed by its output. It appeared to contain a message from >>God.
> Almost certainly not from God. It most probably, very likely, almost > certainly, definitely came from the compiler writer. If Gustav decides > to call him god then be it. But the compiler writer is certainly human.
> By the way, historically that is not the shortest piece of source code > ever written. Some time ago someone submitted a zero byte C source code > (an empty file) to the obfuscated C contest. Amazingly gcc recognised > it as a valid and legal C source code and compiled it into an > executable. The program, when run, outputs nothing. Thus it also claims > to be the shortest quine (self reproducing code) in history by printing > out itself (nothing). It actually won the competition. After that, the > obfuscated C contest banned all zero byte source code.
> By the way, historically that is not the shortest piece of source code > ever written. Some time ago someone submitted a zero byte C source code > (an empty file) to the obfuscated C contest. Amazingly gcc recognised > it as a valid and legal C source code and compiled it into an > executable. The program, when run, outputs nothing. Thus it also claims > to be the shortest quine (self reproducing code) in history by printing > out itself (nothing). It actually won the competition. After that, the > obfuscated C contest banned all zero byte source code.
The best entries are the ones that result in a rule change. :-)
Incidentally, null files are nothing particularly new - they've been used as flags many a time.
-- Richard Heathfield "Usenet is a strange place" - dmr 29/7/1999 http://www.cpax.org.uk email: rjh at above domain (but drop the www, obviously)
> Incidentally, null files are nothing particularly new - they've been used as > flags many a time.
I remember having a comment after the END statement of a Fortran program, which results in various error messages, such as missing END statement, and maybe some about no executable statements. It might also generate an extra MAIN, confusing things somewhat.
> >>In 1974, Gustav Larsson, a young programmer from Helsinki, > >>Finland, stumbled upon an amazing discovery. While working > >>with a PDP-8 mainframe computer, Gustav suddenly because > >>bored. He decided to attempt to compile a single byte > >>program. For what reasons we cannot know.
> >>Nevertheless, Gustav was already familiar with RTPS FORTRAN > >>and thus picked a single character to represent the > >>contents of the program: "@". Once compiled, he expected > >>nothing to happen.
> >>He was wrong. To his absolute amazement, it compiled > >>successfully!
> >>Using an ARS-33 Teletype, Gustav printed out the 1 byte program > >>followed by its output. It appeared to contain a message from > >>God.
> > Almost certainly not from God. It most probably, very likely, almost > > certainly, definitely came from the compiler writer. If Gustav decides > > to call him god then be it. But the compiler writer is certainly human.
> > By the way, historically that is not the shortest piece of source code > > ever written. Some time ago someone submitted a zero byte C source code > > (an empty file) to the obfuscated C contest. Amazingly gcc recognised > > it as a valid and legal C source code and compiled it into an > > executable. The program, when run, outputs nothing. Thus it also claims > > to be the shortest quine (self reproducing code) in history by printing > > out itself (nothing). It actually won the competition. After that, the > > obfuscated C contest banned all zero byte source code.
> All? How many can there be;)
How about...
...zero byte ASCII programs
...zero byte EBCDIC programs
...zero byte Unicode programs
...zero byte K&R programs
...zero byte C89 programs
...zero byte C99 programs -- wouldn't work anyway, lack of fully C99 conforming compilers.
In alt.folklore.computers slebet...@yahoo.com <slebet...@gmail.com> wrot
> By the way, historically that is not the shortest piece of source code > ever written. Some time ago someone submitted a zero byte C source code > (an empty file) to the obfuscated C contest. Amazingly gcc recognised > it as a valid and legal C source code and compiled it into an > executable. The program, when run, outputs nothing. Thus it also claims > to be the shortest quine (self reproducing code) in history by printing > out itself (nothing). It actually won the competition. After that, the > obfuscated C contest banned all zero byte source code.
Too bad you can't do that anymore just for giggles. Do you remember the hardware, OS, and compiler used? It still works with Perl.
zaphod:/tmp$ touch foo.c zaphod:/tmp$ gcc --version gcc (GCC) 3.3.3 (NetBSD nb3 20040520) Copyright (C) 2003 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
zaphod:/tmp$ gcc -o foo foo.c /usr/lib/crt0.o(.text+0x86): In function `___start': : undefined reference to `main' zaphod:/tmp$
-- David Griffith dgri...@cs.csbuak.edu <-- Switch the 'b' and 'u'
>>He decided to attempt to compile a single byte >>program. For what reasons we cannot know.
...becuase his smart-ass friend bet him he couldn't; not because he wanted to challenge Gustav's programming skills, but because he replaced the FORTRAN compiler, with a seemingly innocent, but very special, FORTRAN compiler that he had wrote. Of course, he had just added code to the current FORTRAN compiler so that it would compile single byte's each which when compiled and run would produce special output. Coincidently, Gustav first attempted to compile an "@", which produced his output from "God." However, if he hadn't gotten so excited about this, he would have realized that compiling certain other single-byte characters would have produced additional prophetic output as well. Some of these are described below:
Char - "Description" @ - A message from "God" (exact message not repeated here) $ - A message from "Satan" (exact message not repeated here) ! - "u r teh suck!!!1!!1" & - "All your base are belong to us" < - "nerf the PDP-8" ? - "42"
Dave Griffith wrote: > In alt.folklore.computers slebet...@yahoo.com <slebet...@gmail.com> wrot > > By the way, historically that is not the shortest piece of source code > > ever written. Some time ago someone submitted a zero byte C source code > > (an empty file) to the obfuscated C contest. Amazingly gcc recognised > > it as a valid and legal C source code and compiled it into an > > executable. The program, when run, outputs nothing. Thus it also claims > > to be the shortest quine (self reproducing code) in history by printing > > out itself (nothing). It actually won the competition. After that, the > > obfuscated C contest banned all zero byte source code.
> Too bad you can't do that anymore just for giggles. Do you remember the > hardware, OS, and compiler used? It still works with Perl.
> zaphod:/tmp$ touch foo.c > zaphod:/tmp$ gcc --version > gcc (GCC) 3.3.3 (NetBSD nb3 20040520) > Copyright (C) 2003 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> zaphod:/tmp$ gcc -o foo foo.c > /usr/lib/crt0.o(.text+0x86): In function `___start': > : undefined reference to `main' > zaphod:/tmp$
Visit the International Obfuscated C Code Contest web page:
check out the "smr" entry from 1994. The make file cheats a bit by simply doing:
cp smr.c smr chmod +x smr
which generates an executable (itself zero bytes in length) that the OS (at least on Linux) doesn't complain about when you try to run. The hint file notes:
While strictly speaking, smr.c is not a valid C program, it is not an invalid C program either! Some C compilers will compile an empty file into a program that does nothing.
Richard Heathfield writes: > The best entries are the ones that result in a rule change. :-)
That happened in high school physics class. We had a competition of building bridges out of nothing more than balsa wood and Elmer's glue. They were graded on two factors: (a) design (by a local architecture firm) and (b) how much weight they would hold in the school's annual bridge crushing. One person decided to coat each piece of balsa wood in Elmer's glue, rather than simply using it to join pieces together. His bridge held several times more weight than anybody else's, resulting in the rule change.
dun...@yahoo.com wrote: > In 1974, Gustav Larsson, a young programmer from Helsinki, > Finland, stumbled upon an amazing discovery. While working > with a PDP-8 mainframe computer, Gustav suddenly because > bored. He decided to attempt to compile a single byte > program. For what reasons we cannot know.
> Nevertheless, Gustav was already familiar with RTPS FORTRAN > and thus picked a single character to represent the > contents of the program: "@". Once compiled, he expected > nothing to happen.
> He was wrong. To his absolute amazement, it compiled > successfully!
> Using an ARS-33 Teletype, Gustav printed out the 1 byte program > followed by its output. It appeared to contain a message from > God. A devout Catholic, Gustav showed it to his immediate > supervisor, who ordered both the print out and the program > itself destroyed. Although Gustav complied with his wishes, > it is rumored that he kept a copy of the printout in a small > shoe box in his apartment in Helsinki.
> He also kept a brown diary which included various small > passages from the "Helsinki Code" (as he described it years > later). According to Gustav, the Helsinki Code came directly > from the 'Mind of God.'
> The Helsinki Code read (in part):
> "...[M]y presence in your world is unalterable for I am the > sanctuary of both the cosmos and the one soul inside you. I > could awaken each of you in this very moment to [my] unity, > but there is a larger design - a more comprehensive vision - > that places you in the boundaries of time and the spatial > dimensions of separateness...[T]he design requires a > progression into my wholeness that reacquaints you with > [my] unity through the experience of separation. Your > awakening, while slow and sometimes painful, is assured, > and this you must trust above all else..."
> (Page 26 of Gustav's Journal - Dated February 10th, 1975)
> Gustav passed away in 1996. Although his diary has since > turned up missing, the above fragment from the 'Helsinki > Code' remains. Perhaps, just perhaps, we can learn to > be better people simply by reading it.
> Paul
Reminds me of a story I heard many years ago...
A certain university computing facility (I think this was in the days when you submitted a deck of punched cards, and received your output the following day) decided to write a compiler that would attempt to guess what the students meant to write, and correct the code as it thought fit. So someone decided to submit the first chapter of Genesis - and it compiled.
In article <1134362645.916762.143...@g43g2000cwa.googlegroups.com>,
slebet...@yahoo.com <slebet...@gmail.com> wrote: >dun...@yahoo.com wrote: >Almost certainly not from God. It most probably, very likely, almost >certainly, definitely came from the compiler writer. If Gustav decides >to call him god then be it. But the compiler writer is certainly human.
Then that programmer must have been a Bit God. Or very possibly a Byte God. The program was, after all, a whole byte.
Richard Heathfield <inva...@invalid.invalid> wrote: > The best entries are the ones that result in a rule change. :-)
> Incidentally, null files are nothing particularly new - they've been used as > flags many a time.
Indeed /bin/true on UNIX systems is often an empty file or sometimes a file full of comments.
-- C:>WIN | Directable Mirror Arrays The computer obeys and wins. | A better way to focus the sun You lose and Bill collects. | licences available see | http://www.sohara.org/
Steve O'Hara-Smith <ste...@eircom.net> writes: >On Mon, 12 Dec 2005 05:29:42 +0000 (UTC) >Richard Heathfield <inva...@invalid.invalid> wrote: >> The best entries are the ones that result in a rule change. :-)
>> Incidentally, null files are nothing particularly new - they've been used as >> flags many a time. >Indeed /bin/true on UNIX systems is often an empty file or >sometimes a file full of comments.
The ferpect program! :-)
But it cheats because it relies on a shell interpreter.
Previously, the shortest that I encountered was simply "I"; being equivalent to SVCA-11 (supervisor call A number 11) on AMOS. The program simply exited.
That is a directly-executing, stand-alone program so it doesn't cheat. -- /"\ Bernd Felsche - Innovative Reckoning, Perth, Western Australia \ / ASCII ribbon campaign | Economist \E*con"o*mist\, n. X against HTML mail | One with a ready explanation as to why / \ and postings | his last prediction was so wrong
> In 1974, Gustav Larsson, a young programmer from Helsinki, > Finland, stumbled upon an amazing discovery. While working > with a PDP-8 mainframe computer, Gustav suddenly because > bored. He decided to attempt to compile a single byte > program. For what reasons we cannot know.
It does stretch the truth more than just a little to call a PDP-8 a mainframe computer. In point of fact, it was the very first minicomputer. Jim
In article <egev63-084....@main.anatron.com.au>, Russell Shaw <rjshawN_o@s_pam.netspace.net.au> writes:
>> By the way, historically that is not the shortest piece of source code >> ever written. Some time ago someone submitted a zero byte C source code >> (an empty file) to the obfuscated C contest. Amazingly gcc recognised >> it as a valid and legal C source code and compiled it into an >> executable. The program, when run, outputs nothing. Thus it also claims >> to be the shortest quine (self reproducing code) in history by printing >> out itself (nothing). It actually won the competition. After that, the >> obfuscated C contest banned all zero byte source code.
> All? How many can there be;)
He should have patented it, then he could charge outrageous licensing fees to anyone found to have a zero-length file on their system.
In article <1134362645.916762.143...@g43g2000cwa.googlegroups.com>, slebet...@gmail.com says...
> By the way, historically that is not the shortest piece of source code > ever written. Some time ago someone submitted a zero byte C source code > (an empty file) to the obfuscated C contest. Amazingly gcc recognised > it as a valid and legal C source code and compiled it into an > executable. The program, when run, outputs nothing. Thus it also claims > to be the shortest quine (self reproducing code) in history by printing > out itself (nothing). It actually won the competition. After that, the > obfuscated C contest banned all zero byte source code.
Surely a zero-byte program is ineligible anyway, as it is not obfuscated in any way?
In article <MPG.1e07b46b131d0f9598a...@news1.eircom.net>, Gerry Quinn <ger...@DELETETHISindigo.ie> writes:
> In article <1134362645.916762.143...@g43g2000cwa.googlegroups.com>, > slebet...@gmail.com says...
>> By the way, historically that is not the shortest piece of source code >> ever written. Some time ago someone submitted a zero byte C source code >> (an empty file) to the obfuscated C contest. Amazingly gcc recognised >> it as a valid and legal C source code and compiled it into an >> executable. The program, when run, outputs nothing. Thus it also claims >> to be the shortest quine (self reproducing code) in history by printing >> out itself (nothing). It actually won the competition. After that, the >> obfuscated C contest banned all zero byte source code.
> Surely a zero-byte program is ineligible anyway, as it is not > obfuscated in any way?
I don't know about that. The purpose of obfuscation is so you can't easily tell by reading it what it does, I would assume if handed to most people they would say the program does nothing when in fact, it duplicates itself. Sounds obfuscated to me. :-)
bill (I'm just waiting for the obuscated COBOL contest. It's much more fun. Most C ends out being obfuscated wether you want it to be or not.)
-- Bill Gunshannon | de-moc-ra-cy (di mok' ra see) n. Three wolves b...@cs.scranton.edu | and a sheep voting on what's for dinner. University of Scranton | Scranton, Pennsylvania | #include <std.disclaimer.h>
Steve O'Hara-Smith <ste...@eircom.net> wrote: > On Mon, 12 Dec 2005 05:29:42 +0000 (UTC) > Richard Heathfield <inva...@invalid.invalid> wrote:
> > Incidentally, null files are nothing particularly new - they've been used as > > flags many a time.
> Indeed /bin/true on UNIX systems is often an empty file or > sometimes a file full of comments.
Sometimes amusing comments. I've seen a version which was nothing but a copyright message.
-- Richard Maine | Good judgment comes from experience; email: my first.last at org.domain| experience comes from bad judgment. org: nasa, domain: gov | -- Mark Twain
> >> The best entries are the ones that result in a rule change. :-)
> >> Incidentally, null files are nothing particularly new - they've been used as > >> flags many a time.
> >Indeed /bin/true on UNIX systems is often an empty file or > >sometimes a file full of comments.
> The ferpect program! :-)
And yet the last time I looked at it on a Sun box it was version 1.5 - I just hope the commit messages don't say "Bug fix".
> But it cheats because it relies on a shell interpreter.
Well yes.
> Previously, the shortest that I encountered was simply "I"; being > equivalent to SVCA-11 (supervisor call A number 11) on AMOS. The > program simply exited.
> That is a directly-executing, stand-alone program so it doesn't > cheat.
On CP/M the one byte program RST 0 (0xC7) would do exactly that.
-- C:>WIN | Directable Mirror Arrays The computer obeys and wins. | A better way to focus the sun You lose and Bill collects. | licences available see | http://www.sohara.org/
>>In 1974, Gustav Larsson, a young programmer from Helsinki, >>Finland, stumbled upon an amazing discovery. While working >>with a PDP-8 mainframe computer, Gustav suddenly because >>bored. He decided to attempt to compile a single byte >>program. For what reasons we cannot know.
> It does stretch the truth more than just a little to call a PDP-8 a > mainframe computer. In point of fact, it was the very first minicomputer.
^^^^^^^^^^
There were others in the PDP series before it.
> Jim
-- The e-mail address in our reply-to line is reversed in an attempt to minimize spam. Our true address is of the form che...@prodigy.net.
>>>By the way, historically that is not the shortest piece of source code >>>ever written. Some time ago someone submitted a zero byte C source code >>>(an empty file) to the obfuscated C contest. Amazingly gcc recognised >>>it as a valid and legal C source code and compiled it into an >>>executable. The program, when run, outputs nothing. Thus it also claims >>>to be the shortest quine (self reproducing code) in history by printing >>>out itself (nothing). It actually won the competition. After that, the >>>obfuscated C contest banned all zero byte source code.
>>Surely a zero-byte program is ineligible anyway, as it is not >>obfuscated in any way?
> I don't know about that. The purpose of obfuscation is so you can't > easily tell by reading it what it does, I would assume if handed to > most people they would say the program does nothing when in fact, it > duplicates itself. Sounds obfuscated to me. :-)
> bill > (I'm just waiting for the obuscated COBOL contest. It's much more fun. > Most C ends out being obfuscated wether you want it to be or not.)
Indeed. Where is the UN-obfuscated C contest?
-- The e-mail address in our reply-to line is reversed in an attempt to minimize spam. Our true address is of the form che...@prodigy.net.