Hello,
I was wondering if some of you lisp experts could send me their
favourite bit of ugly looking lisp code. I am doing a seminar and want to talk
about how hard lisp is to read. I have some prettyhorrible examples but I need
some real shockers. So if you send me something with lots of parentheses
(should be pretty easy) I would be much obliged.
-Ben
In article <··········@wumpus.its.uow.edu.au> ·····@wumpus.its.uow.edu.au (Ben
Mackenzie Edmondson) writes:
> Hello,
> I was wondering if some of you lisp experts could send me their
> favourite bit of ugly looking lisp code. I am doing a seminar and want to
talk
> about how hard lisp is to read. I have some prettyhorrible examples but I
need
> some real shockers. So if you send me something with lots of parentheses
> (should be pretty easy) I would be much obliged.
> -Ben
If you want to get some ugly code then make it a contest among your students.
You could have, ugliest in language category and an all around UDA (uglier than
the devils asshole) award. You could score the code by the number of people who
guessed the meaning incorrectly.
richard
Why restrict yourself to LISP parentheses. Why not try
C++, then you can have [ ] { } < > ! % ^ & * ~ : ; �
and cryptic combinations thereof?
----------
Peter Ward
In article <··········@wumpus.its.uow.edu.au>
·····@wumpus.its.uow.edu.au (Ben Mackenzie Edmondson) writes:
> I was wondering if some of you lisp experts could send me their
>favourite bit of ugly looking lisp code. I am doing a seminar and want to talk
>about how hard lisp is to read. I have some prettyhorrible examples but I need
>some real shockers. So if you send me something with lots of parentheses
>(should be pretty easy) I would be much obliged.
You can make up arbitrarily nested examples yourself just using the
"*" and "+" operators.
Note, however, that Lisp programmers don't look at the parens at all
when they read Lisp code. They look at the indentation (which
indicates nesting level) and ignore the parens altogether. When they
write Lisp code, they use vi or emacs or any editor that automatically
balances the parens; they never, never count parens. Both of those
editors and almost all other editors a Lisp programmer would use also
can automatically indent for you.
For instance, a Lisp programmer can read
Foo
Bar A B
Baz C
Fubar D
Boo E F
just as easily as
(Foo
(Bar A B)
(Baz C
(Fubar D))
(Boo E F))
The point is the nesting level (indicated by the indentation), not the
parens. There are many serious pros and cons in using Lisp. But nobody
who has gotten even a tiny knowledgeable introduction to Lisp
considers the parens to be one of those issues. I've been teaching
students AI and AI Programming for 8 years or so, and I get people who
love Lisp and who hate Lisp. But for none of them is the parens the
issue. (Hmm, I hope I am not naively responding to deliberate
trolling).
- Marty
(proclaim '(inline skates))
http://www.apl.jhu.edu/~hall/lisp.html
In article <··········@wumpus.its.uow.edu.au> ·····@wumpus.its.uow.edu.au (Ben Mackenzie Edmondson) writes:
From: ·····@wumpus.its.uow.edu.au (Ben Mackenzie Edmondson)
Summary: Need to be sent ugly looking lisp code
Keywords: lisp, ugly
Newsgroups: comp.lang.lisp
Date: 19 Mar 1996 10:11:34 +1100
Organization: University of Wollongong, NSW, Australia.
Path: agate!howland.reston.ans.net!swrinde!ihnp4.ucsd.edu!munnari.OZ.AU!metro!metro!wabbit.its.uow.edu.au!wabbit.its.uow.edu.au!not-for-mail
Lines: 7
X-Newsreader: NN version 6.5.0 #5
Hello,
I was wondering if some of you lisp experts could send me their
favourite bit of ugly looking lisp code. I am doing a seminar and want to talk
about how hard lisp is to read. I have some prettyhorrible examples but I need
some real shockers. So if you send me something with lots of parentheses
(should be pretty easy) I would be much obliged.
-Ben
I think the best source of these sort of things is the "Obfuscated C
Contest". :)
....Yes! I read the post. :)
--
Marco Antoniotti - Resistente Umano
===============================================================================
International Computer Science Institute | ·······@icsi.berkeley.edu
1947 Center STR, Suite 600 | tel. +1 (510) 643 9153
Berkeley, CA, 94704-1198, USA | +1 (510) 642 4274 x149
===============================================================================
...it is simplicity that is difficult to make.
...e` la semplicita` che e` difficile a farsi.
Bertholdt Brecht