[tt] [FoRK] Superhuman feats of programming expression
Eugen Leitl
<eugen at leitl.org> on
Sun Feb 3 20:10:55 UTC 2008
----- Forwarded message from Jeff Bone <jbone at place.org> -----
From: Jeff Bone <jbone at place.org>
Date: Sun, 3 Feb 2008 12:13:55 -0600
To: Friends of Rohit Khare <fork at xent.com>
Cc: Rob Mayoff <mayoff at dqd.com>
Subject: [FoRK] Superhuman feats of programming expression
X-Mailer: Apple Mail (2.752.2)
Reply-To: Friends of Rohit Khare <fork at xent.com>
..was Re: The Arc Challenge: Tastes great! Less filling!
--
You know, I hate to keep beating up Paul Graham's attempts to enable
us all to write less code. I'm HUGELY in favor of that! But when I
look around at real, massive feats of terse programming machismo...
I hate to say it, but the hands-down winner seems to be Haskell! For
example, LoCs in:
xmonad: 3683 # an X-windows window manager
darcs: 8381 # a distributed revision control system
frag: 11223 # an OpenGL first-person shooter
pugs: 38972 # beat the official Perl 6 by... *years*
zipper: 1001 # a toy OS / file system
...and the list goes on.* For just about every major category of
software you can imagine, some lone Haskell hacker (or group of
hackers) has put together a Haskell version that, relative to a
similarly-full-featured implementation in any other language, *is
smaller.* I won't even add insult to injury by mentioning that a
popular late-night or long-weekend hack for Haskell dabblers is
throwing together a toy Lisp or Scheme. (Oh well, there I went and
did exactly that. Point being, you sure as hell don't see the
opposite happening!) Cf.
http://halogen.note.amherst.edu/~jdtang/scheme_in_48/tutorial/
parser.html
or
http://www.defmacro.org/ramblings/lisp-in-haskell.html
Note that I'm completely omitting from this list the usual crop of
web servers, template systems, wikis, blog engines, etc. There are
many of those available in Haskell, but hardly worth mentioning as
they tend to clock in at such a small amount of code. (Note too that
the fact that all of the above are clocking in at order 10k LoC in
the case of the largest may in fact reflect an upper limit beyond
which no human being can even *think* about a Haskell program! ;-)
(Actually I have an existence proof to the contrary: House, an
rather serious bootable bare-metal OS written in Haskell, clocks in
at about 370k LoC. Not sure how much of that's the kernel.
Lightweight serious kernels have historically started at around 100k
on the very low side, early Plan 9 being the LoC leader AFAIK.)
Now, don't get me wrong; I'm EXTREMELY vexed about this state of
affairs, as Haskell is a programming language that, no matter how
many runs I've made at that fence, I can never seem to get anything
useful *done* in. I'm fine in theory, but when it comes to actually
stitching together IO and exceptions and all that, I find that my
head explodes. And I'm tired of cleaning gray matter and blood
splatter off the walls of my home office!
I'd MUCH rather see people doing this sort of thing in Lisp! Why
aren't they?
That's a serious question!
jb
* Note that my incorrect recollection was that all of these came in
at around 4k LoC. Thus my previous humorous conjecture --- that
*any* program could be written in less than 4k LoC (or 5k, or
whatever) was clearly wrong. My bad. Made for a good joke, though.
_______________________________________________
FoRK mailing list
http://xent.com/mailman/listinfo/fork
----- End forwarded message -----
--
Eugen* Leitl <a href="http://leitl.org">leitl</a> http://leitl.org
______________________________________________________________
ICBM: 48.07100, 11.36820 http://www.ativel.com http://postbiota.org
8B29F6BE: 099D 78BA 2FD3 B014 B08A 7779 75B0 2443 8B29 F6BE
More information about the tt
mailing list