[FoRK] Superhuman feats of programming expression

Stephen D. Williams <sdw at lig.net> on Sun Feb 3 10:25:29 PST 2008

Can these Haskell hackers really write that code quickly?  I doubt it.  
Unless debugging has greatly improved.  Perhaps once you truly learn the 
constraints of the language that it isn't that bad.  I've written 
parsers in Haskell and it was no fun.  The code looked clean and simple 
when done, but the process was anything but.

Have you considered Forth?  (Or it's less bare metal cousin, Postscript?)
Of course, the problem with Forth is that it wasn't lazy evaluated or 
without side effects, so you had a nice program structure but without 
real optimization, so large programs tended to be slower than they 
should have.  Epson had a whole office application suite, and possibly 
the OS also, written in Forth, running on floppies.  We sold them in 
1983.  My attorney had one.  Amber screen.  Fairly nice, but not fast.

sdw

Jeff Bone wrote:
>
> ..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

-- 
swilliams at hpti.com http://www.hpti.com Per: sdw at lig.net http://sdw.st
Stephen D. Williams 703-371-9362C 703-995-0407Fax 94043 AIM: sdw


More information about the FoRK mailing list