Subject: Re: Could CDR-coding be on the way back? Date: 16 Dec 2000 10:00:27 GMT Organization: Silicon Graphics Inc., Mountain View, CA Lines: 33 Message-ID: <91fefr$bi70a$1@fido.engr.sgi.com> References: <3185869959483668@naggum.net> <91d9vg$39016@eccws12.dearborn.ford.com> <91eafr$3u7@web.nmti.com> NNTP-Posting-Host: rigden.engr.sgi.com X-Trace: fido.engr.sgi.com 976960827 12131338 163.154.34.115 (16 Dec 2000 10:00:27 GMT) X-Complaints-To: news@fido.engr.sgi.com NNTP-Posting-Date: 16 Dec 2000 10:00:27 GMT Xref: bad-news.newsread.com comp.lang.lisp:70359 comp.arch:123347 Peter da Silva wrote: +--------------- | Provide a "lispscript" tool that lets you write, oh: | awk 'BEGIN {FS=":"}; $6=="/sbin/nologin" {print $1}' /etc/passwd | in no more than a couple of lines of code, and you'll get people using | Lisp for casual scripting. +--------------- I already frequently use it for casual scripting (well, Scheme, mostly). With only a couple of new utility macros & functions, your example could be expressed in Common Lisp as: (with-lines-from-file (line "/etc/passwd") (let ((fields (string-split line :fs #\:))) (when (string= (aref fields 5) "/sbin/nologin") (format t "~A~%" (aref fields 0)))))) But seriously, how many "one-liners" do you *actually* write anyway? Not many. And by the time you've done coded up something that's complex enough to be *useful*, Perl's tricky little code-compression notation usually expands to be about the same length as any other language, and six weeks or six months later I'd *much* rather be reading Lisp than decoding a Perl puzzle. -Rob ----- Rob Warnock, 31-2-510 rpw3@sgi.com Network Engineering http://reality.sgi.com/rpw3/ Silicon Graphics, Inc. Phone: 650-933-1673 1600 Amphitheatre Pkwy. PP-ASEL-IA Mountain View, CA 94043