POV-Ray : Newsgroups : povray.off-topic : Haskell humour : Re: Haskell humour Server Time
6 Sep 2024 23:19:25 EDT (-0400)
  Re: Haskell humour  
From: Invisible
Date: 1 Oct 2008 04:12:19
Message: <48e330e3$1@news.povray.org>
nemesis wrote:

> Common Lisp is the "industrial-strength" Lisp idiom.  It's basically a mix of
> several old Lisps with a bit of Scheme.  Scheme is a minimalist Lisp idiom
> designed mainly for research and education.  The many implementations make sure
> it's able to do a lot more.
> 
> Old Lispers are indeed pretty imperative but Scheme is a strict, eager
> evaluation, mostly functional language which solves problems mostly by function
> application and applicative programming.  Mutators (set!) and direct
> side-effecting IO are still present, but using sparingly.  It's very much like
> ML, except with sweet regular syntax, no builtin pattern matching and no static
> typing.  Of course, you may probably don't know what ML is, but Google is your
> friend.

ML I have at least heard of. The vague impression I have is that it's 
kind of similar to Haskell, but insane.

> You may eventually learn about Haskell's ancestry...

AFAIK, Haskell is basically Miranda(tm) with a few minor modifications. 
(Oh, and type classes.)

> Here's an example of Scheme code:
> (let ((%? (lambda (a b) (zero? (modulo a b)))))
>   (let sum ((i 5) (r 0))
>     (if (= i 100000) r
>         (sum (+ 1 i) (if (or (%? i 5) (%? i 7))
>                          (+ r i)
>                          r)))))
> 
> Forget the parentheses.  Besides all, they are a great aid for structured
> editing of source code in appropriate editors, like replacing a whole large
> parenthetical expression in a breeze.

I think you'd need to colour code expressions by depth or something to 
really make sense of that. Really deeply nested expressions are 
difficult to parse visually. (I also imagine that without assistence it 
would be very hard to make all the parentheses match up correctly...)

> BTW, you seem to enjoy math and programming and since there are so many things
> you don't know, perhaps this is a good opportunity for showing you this?
> 
> http://projecteuler.net/

I did a few of them, but the later ones are too hard. (And, frankly, not 
very interesting.)


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.