Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!rutgers!mit-eddie!cybvax0!frog!john From: john@frog.UUCP (John Woods, Software) Newsgroups: comp.misc Subject: Re: Another 1.3 wish. Message-ID: <1546@frog.UUCP> Date: Fri, 7-Aug-87 21:44:00 EDT Article-I.D.: frog.1546 Posted: Fri Aug 7 21:44:00 1987 Date-Received: Sun, 9-Aug-87 11:07:38 EDT References: <8707190424.AA10158@cogsci.berkeley.edu> <434@sugar.UUCP> <3664@well.UUCP> Organization: Superfrog Heaven [ CRDS, Framingham MA ] Lines: 41 Summary: Knuth and assembly code In article <3664@well.UUCP>, ewhac@well.UUCP (Leo 'Bols Ewhac' Schwab) writes: > In article <434@sugar.UUCP> peter@sugar.UUCP (Peter da Silva) writes: > >[Flame-throwers on "stun", captain] > >And why explain in 68000 code? [ ... ] > >Right. da Silva's rule #0x7FFE: if conversion of some example from assembly > >to some high level language is easy, then it should have been expressed > >in high level language in the first place. > I am of the opinion that assembly code is *not used enough* these > days. The assumption that high-level languages are "good enough" simply > does not jibe with me. [pining for the days of 4K 8080 code deleted] > > >Fear not, you're in good company. Donald E. Knuth (yes, that Knuth) is one > >of the worst offenders. His "Art of computer programming" is almost useless > >for day-to-day use because of "MIX". [ ... ] > > Anyone can transliterate code, but can you use the *algorithm*? > AHEM yourself. My complaint with Knuth's MIX nonsense was that his algorithms were expressed in English just as turgid and knotted as his assembly code. Concrete example: I wanted to remind myself how to do a heapsort. I found Knuth's expression of it just as unreadable in English as in MIX ("goto" my FOOT!). I went to another of my algorithm books (title forgotten, I think it was by Aho (of the Dragon Book) and someone else), and found the heapsort algorithm expressed in high level pseudocode, using recursion (the assembly programmer's bane! or so it seems...) -- a true marvel of clarity, the English was SUPERFLUOUS to the high level code description, and it translated into C (including doing the part which had been left as the traditional Exercise for the Reader) in minutes. For your archetypical program that does something wonderful in 4K of absolutely tight 8080 assembly code -- how long did someone sweat over every last byte? How many *more* wonderful things could that program have done if that time had been spent extending it? That is what most high-level fanatics are interested in. -- John Woods, Charles River Data Systems, Framingham MA, (617) 626-1101 ...!decvax!frog!john, ...!mit-eddie!jfw, jfw%mit-ccc@MIT-XX.ARPA "The Unicorn is a pony that has been tragically disfigured by radiation burns." -- Dr. Science