[Rotwang-l] Lush; a look at the future of Lisp? (and other bits)
Lupo
lupo at sfgoth.com
Fri Feb 13 18:31:09 PST 2004
I've been futzing with Lush lately.
http://lush.sourceforge.net
This is the best Lisp I have yet used. It comes with a useful library, it
uses an Arc-like syntax (Arc being Paul Graham's "gonna take over the
world" project http://www.paulgraham.com/arc.html ) and usability features
and overall just works and makes me happy, unlike any of the Lisps I have
used thus far.
Some of those "Arc-like features"
1) It is dirt simple to talk to the OS; just like in Python. It is dirt
simple to embed new code into it; just like in Python. If any of you have
tried to do such things in CLISP or CMU-CL, you'll notice that they expect
the whole world to be Lisp. In 2004, that is a ridiculous expectation, and
is doubtless partially responsible for the stellar popularity of Common
Lisp.
2) There are 'intuitive' or at least familliar string manipulating features
built in; regex. ACL doesn't have anything out of the box, though it is
easy to write such things. The problem with writing your own is that
nobody else will be able to read your code on even routine things without
first reading your string manipulator routines. Plus, well, you have to
write the things. And on a related topic, Lush doesn't use the odd "Format"
language as Common Lisp does: you can write your formatting statements in a
C-like fastion.
3) It is brief. Instead of (apropos functionname) you can just do a
^Afunctionname -instead of (defun functionname .....) you can (de
functionanme .....). {defmacro = dm, etc} This is neat. Graham is
absolutely right; you can crank shit out faster that way.
4) The libraries are, so far, as advertised, and freakin' huge (especially
for my kind of thing, but also for other kinds of thing). Ogre, for
example, is worth the price of admission for cranking out simple GUIs in
seconds. I wish it had a drag and drop GUI builder, but this is simple
enough to be almost as good for the 90% of shit I will ever need it for.
5) The help system is pretty good. Sometimes there is stuff missing, but it
at least points you to the source code, and it has been trivial so far to
read the source and know what is what.
6) It does libraries and builds right. I have been trying for a
ridiculously long time to build and examine CLIM on CMU-CL to at least see
if it is useful, and have failed utterly. So far, no such problems on Lush.
Most things are automagic, if you put the libs in the search path.
7) It appears to contain some logo-isms.
This is also the UGLIEST Lisp I have yet used in some ways. There is no
Lisp compiler. There is a compiler for C modules you can embed into your
code. There is also a compiler for a strongly typed lexically scoped
language which looks to me like Fortran with prefix notation (called
CLush). And, the lush/lisp language is dynamically scoped, which seems all
kinds of bad. So, you can have dynamic scoping, lexical scoping, weak
typing, strong typing and C itself all embedded in the same piece of code,
and it will somehow work. This is bizarre. But, it hasn't gotten in the
way for little codes yet. The C part at least has actually been handy. I
don't know what the CLush language is for. Maybee an early attempt at
writing a compiler for Lush itself.
It also doesn't have a makefile for the Mac, which pisses me off, as I want
to buy a goddamned Mac, so I can have a useful OS I don't have to fight
with all the time.
I've also got an eval copy of Franz's IDE I am going to look at soon.
Maybee it will have some of the strengths of Lush. I know it has CLIM built
in at least.
Anyway, if any of you have actually been playing with Lisp and frustrated
by its thorniness, you might have a look at this one. It fills me with the
warm and fuzzies; a first in my Lisp experience. It's got some serious
limitations (no compiler is the biggie for me), but in practical
applications, this might not ever matter. My present hardware is about a
factor of 25 slower than the state of the art and there isn't much bog
yet, though it takes a few seconds longer than is pleasant to fire up.
I have yet to see if it is useful for Matlab type things, though if it is,
I may never use anything else again.
In other reports:
I've been trying to build CLOCC. CLOCC is a great idea. It is a sort of
libc for Lisp. In practise, it is no good. There isn't enough meat in there
(though I am happy I finally successfully built f2cl -the tantalizing bits
of it that came with my maxima distro were apparently incomplete). It also
doesn't build (or most of it didn't) and it didn't put itself in a useful
place like I expect most things to do (and like Lush does).
http://clocc.sourceforge.net
An amusing thing:
http://algorithms.us/downlispf4.shtml
A lisp written in VERY old fashioned Fortran; filled with line numbers and
GOTOs. According to the advertising, it is bulletproof, though antiquated
and lacking in Macros (no big deal; you can build 'em). Looking at the
source gives me the heebie jeebies. It also doesn't build for me, but,
well, neato-keen.
I'll probably try to write something real in Lush this weekend, hangover
allowing.
-Lupo
"I hope god is real, so I can punch him in the throat when I die." -Fishninja
More information about the Rotwang-l
mailing list