From ... Path: supernews.google.com!sn-xit-02!supernews.com!isdnet!newsgate.cistron.nl!amsnews01.chello.com!news01.chello.no!Norway.EU.net!127.0.0.1!nobody From: Erik Naggum Newsgroups: comp.lang.lisp Subject: Re: benefits of LISP? Date: 27 Nov 2000 03:49:37 +0000 Organization: Naggum Software; vox: +47 800 35477; gsm: +47 93 256 360; fax: +47 93 270 868; http://naggum.no; http://naggum.net Lines: 51 Message-ID: <3184285777205165@naggum.net> References: <973F06EF4B73E7B6.F6FF4E985E459F2C.1B94A8C9E0F426BC@lp.airnews.net> <3183972350982104@naggum.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: oslo-nntp.eunet.no 975298622 21208 195.0.192.66 (27 Nov 2000 04:17:02 GMT) X-Complaints-To: newsmaster@eunet.no NNTP-Posting-Date: 27 Nov 2000 04:17:02 GMT mail-copies-to: never User-Agent: Gnus/5.0803 (Gnus v5.8.3) Emacs/20.7 Xref: supernews.google.com comp.lang.lisp:4257 * David Bakhash | I caught this comment here, and couldn't really decipher exactly what | you meant. Are you saying that somehow Lisp programmers should be | able to write things that they currently cannot, such as special | operators? Or that they should be able to malloc/free memory | directly, such as in C? What kind of behavior, exactly, are you | referring to? New functions that utilize low-level features of the processor and/or the internal representation of objects. E.g., you could write bignum arithmetic that basically store values directly into an unnormalized bignum and process them as integers in machine registers. You could write your own functions that produce inlined instructions to support particular optimizations. Intel has a BSWAP instruction that can be used to convert between network byte order and native byte order, and it really ought to be inlined and available at a very low level when you basically stuff a bignum into a fixed-encoding field in a protocol. Suppose you want a byte rotate function. You can write a fully portable version that no compiler would be smart enough to optimize into a rotate instruction if the processor has one and the byte was supported by the hardware, but it would be nice if you could define the general case portably and optimize into a single instruction when that is possible. This is not particularly hard to do, but it does require intimate knowledge of the compiler in most languages and environments. Allegro CL lets me define and use new "instructions" and new low-level forms to invoke them. Amazingly powerful stuff. I do not think there should be a lower limit to what you can program in a Common Lisp environment. Recall that several operators in Common Lisp were originally instructions in processors of old. Common Lisp has such an unfair reputation for being high-level when it can easily be more low-level than C, with far greater access to the hardware since Lisp does _not_ pretend that certain types are abstract when they aren't and vice versa, like C does. I do not consider allocating and freeing object low-level in this sense, however. Both tasks are very complex and actually high-level due to the many tasks involved. It is a high-level policy decision whether either should be done manually or automatically and whether you need an ownership protocol for all objects. However, once you have an object, regardless of means, how you choose to use it may be low-level, such as playing with the individual bit fields of a boxed floating point number in order to, say, be able to compute logarithms of arbitrarily large integers. #:Erik -- Solution to U.S. Presidential Election Crisis 2000: Let Texas secede from the Union and elect George W. Bush their very first President. All parties, states would rejoice.