Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!orion.oac.uci.edu!cedman From: cedman@golem.ps.uci.edu (Carl Edman) Newsgroups: comp.sys.amiga.programmer Subject: Re: How are some programs SO DAMN SMALL! Message-ID: Date: 14 Feb 91 20:42:55 GMT References: <1991Jan20.210328.18087@hoss.unl.edu> <28077.279c3c3f@kuhub.cc.ukans.edu> <91042.125712UH2@psuvm.psu.edu> <91042.134209J56QC@CUNYVM.BITNET> mwm@pa.dec.com (Mike (My Watch Has Windows) Meyer) writes: In article <91045.150604GUTEST8@cc1.kuleuven.ac.be> Ives Aerts writes: >Example: I just spent 30 seconds turning out a "hello world" program >in a language chosen to 1) be portable, and 2) generate small >executables. The executable is 20 bytes long. How small is your best But this is VERY hard to believe.. 'hello world' is 11 bytes, how on earth are you gonna make an executable that's only 9 bytes longer ?????? Actually, it's 13 bytes after you add punctuation and the trailing newline. I could probably trim one byte from the executable, leaving it at an extra 6 bytes. And you do it by choosing the right language. This results in a 20 byte file that prints the string "Hello world!" and a newline after I invoke it. I'm afraid he means that he used BASIC to write it. In BASIC such a save-file length is perfectly possible (if keywords like 'print' are tokenized). I'm also afraid that he disqualifies himself as what he produced is not an executable. Its execution requires a long interpreter which will make it grow beyond the size needed by any other language. I wont even go into all the other horrible ills of BASIC. Carl Edman "We hold that what one man cannot morally do, a million men cannot morally do, and government, representing many millions of men, cannot do." -- Auberon Herbert Send mail to Carl Edman