Path: utzoo!attcan!uunet!husc6!bloom-beacon!mit-eddie!uw-beaver!cornell!batcomputer!itsgw!nysernic!cmx!billo From: billo@cmx.npac.syr.edu (Bill O) Newsgroups: comp.arch Subject: Re: negative addresses (really unsi Message-ID: <493@cmx.npac.syr.edu> Date: 16 May 88 01:18:53 GMT References: <11571@ut-sally.UUCP> <28200145@urbsdc> <11618@ut-sally.UUCP> Reply-To: billo@cmx.npac.syr.edu (Bill O'Farrell) Organization: Northeast Parallel Architectures Center, Syracuse NY Lines: 35 In article <11618@ut-sally.UUCP> nather@ut-sally.UUCP (Ed Nather) writes: >In article <28200145@urbsdc>, aglew@urbsdc.Urbana.Gould.COM writes: >> >> >[Ed Nather]: >> When I gather data from stars, I >> >count the precious photons one at a time, and use unsigned arithmetic to >> >massage them, since there are no negative photons (unlike negative addresses). >> What do you care if you are counting in a signed integer, and just >> use half the range? > >Unfortunatly I have found no simple way to get the star to cooperate with >respect to counting rates. Sometimes 16 bits are enough, sometimes 32 >aren't, depending on the the star's brightness and the rapidity with which >it varies. > This is a perfect example of why we need higher-level languages like lisp. In lisp, you don't need to know the ranges of integers ahead of time. If your calculations overflow the hardware representation of an interger, lisp just converts the representation to Bignum, and works with it instead -- you may never even be aware that the conversion has occurred. Yes, we need languages that are close to hardware (I don't think I'd be able to write an operating system for, say, an IBM 370, in lisp.) But much of programming could be made easier if we used (and designed) languages more suited to the framing of algorithms rather than to the writing of programs which run fast on particular pieces of hardware. In fact, using such languages has the beneficial effect of encouraging the design of hardware better suited to higher-level language implementation -- example: lisp machines. (NOTE: in lisp you actually get the best of both worlds. You can fully specify types if you choose, to get faster-running code.)