Andr� Thieme <address.good.until.2009.may.11@justmail.de> wrote:
+---------------
| Marco Antoniotti schrieb:
| >> In Clojure I would probably do:
| >> (defn factorial [n] (apply * (range 1 (inc n))))
| >
| > As in
| > (defun factorial (n) (apply '* (iota 1 n)))
| > It isn't very compelling...
...
| The iota function has, no idea, 92 users in the world.
| Probably 7 who use it regularily.
| (I don�t mean these numbers literally, but I have not seen that anyone
| used those, neither in open source, nor in my professional work).
+---------------
Then you must not have been reading "comp.lang.lisp" very long. ;-}
A quick search shows some 170 articles mentioning it, including
several by me: ;-} ;-}
Newsgroups: comp.lang.lisp
Date: Sat, 18 Oct 2008 04:50:42 -0500
Subject: Re: Lisp 50 event at OOPSLA - worth going?
From: rpw3@rpw3.org (Rob Warnock)
Message-ID: <96ydnYMohZjvLGTVnZ2dnUVZ_i2dnZ2d@speakeasy.net>
... I even baked a cake!! ;-} ;-}
> (format t "~%+~62,,,'-@a~%|~18@t*~36r ~36r, ~36r!!*~19@t|~%~
| ~{~<|~%| ~1,70:;Candle #~d~>~^, ~
~:*~[ ~; ~; ~; ~; ~; ~; ~; ~; ~; ~]~} |~%+~62,,,'-@a~%~%"
#\+ 29053366 902869993114 1004137 (iota 50 1) #\+)
Newsgroups: comp.lang.lisp
Date: Mon, 26 May 2008 04:23:15 -0500
Subject: Re: Separate the lisp environment from the shell (and other things)
From: rpw3@rpw3.org (Rob Warnock)
Message-ID: <PImdnZ2fg50eHKfVnZ2dnUVZ_jWdnZ2d@speakeasy.net>
Rares Marian <rares.marian@gmail.com> wrote:
+---------------
| We should be at a point where we can start lisp programs
| from the shell or desktop just like any other binary.
+---------------
Been there, done that, years & years ago. Works just fine:
$ iota 10
0 1 2 3 4 5 6 7 8 9
$ iota 10 20
20 21 22 23 24 25 26 27 28 29
$ iota 10 20 5
20 25 30 35 40 45 50 55 60 65
$ cat `which iota`
#!/usr/local/bin/cmucl -script
(defun iota (count &optional (start 0) (step 1))
(loop repeat count for i from start by step collect i))
(format t "~{~a~^ ~}~%"
(apply 'iota (mapcar #'read-from-string *script-args*)))
$
...
p.s. See <http://rpw3.org/hacks/lisp/site-switch-script.lisp>
if you use CMUCL and haven't hacked your own "-script" or equiv.
Then there was a whole thread in late 2007 on ARRAY-IOTA.
And we haven't even started in on the Scheme users, yet... ;-}
[They like it over there, too!]
Anyway, to the larger point...
For me, the issue isn't so much whether Implementation X provides a
given CL extension or not, it's whether the meme is sufficiently stable
and widespread that one can use it with some confidence that you will
be understood by others without lengthy explanations. IOTA has *long*
ago passed that threshold [though there is still some variations in
the wild, e.g., the order of the optional START & STEP arguments].
And DEFLEX (or DEFLEXICAL) is getting there too, I think...
-Rob
-----
Rob Warnock <rpw3@rpw3.org>
627 26th Avenue <URL:http://rpw3.org/>
San Mateo, CA 94403 (650)572-2607