Path: utzoo!mnetor!tmsoft!torsqnt!news-server.csri.toronto.edu!bonnie.concordia.ca!clyde.concordia.ca!nstn.ns.ca!news.cs.indiana.edu!samsung!sdd.hp.com!elroy.jpl.nasa.gov!ncar!noao!arizona!dave From: dave@cs.arizona.edu (Dave P. Schaumann) Newsgroups: comp.sys.amiga.programmer Subject: Re: How are some programs SO DAMN SMALL! Message-ID: <868@caslon.cs.arizona.edu> Date: 14 Feb 91 22:56:38 GMT References: <91045.150604GUTEST8@cc1.kuleuven.ac.be> <1991Feb14.214417.13133@Neon.Stanford.EDU> Organization: U of Arizona CS Dept, Tucson Lines: 42 In article <1991Feb14.214417.13133@Neon.Stanford.EDU> espie@flamingo.Stanford.EDU (Marc Espie) writes: >echo "hello world" > >is a program in AmigaShell which is roughly 20 bytes long. Plus the size of the code to run scripts, plus the size of c:echo >On the other hand, >/**/ >say hello world > >is the ``hello world'' program in Arexx. It's roughly 20 bytes long, Plus the size of Arexx. >BASIC ? Yes, it is possible to write short programs in Basic too. >Boy, that would be slow, and the interpreter is *huge*. Yes!!! This is the point! If you don't include the size of the interpreter with the size of your program, you are not saying the whole truth. Otherwise, I could say "I've got a 1-byte ". Just write an interpreter to read your 1-byte file, and then (if your byte is the right value, of course) call your applicaton. Agreed, this is an extreme example, but I made it to point out the fact that if you measure the size of an interpreted program only by the size of the input to the interpreter, you can have a meaningless result. >Why reinvent the wheel ? There is a powerful shell at your disposal, there's >Arexx, you don't HAVE to use C for everything !! This isn't about language choice. It's about what it takes to do the job. Your example of 'echo "hello world"' is useless to someone without the necessary support code. > Marc Espie (espie@flamingo.stanford.edu) -- Dave Schaumann | DANGER: Access holes may tear easily. Use of the access | holes for lifting or carrying may result in damage to the dave@cs.arizona.edu | carton and subsequent injury to the user.