[Coco] XLISP!!!!!

Willard Goosey goosey at virgo.sdc.org
Wed Jun 1 15:33:37 EDT 2011


On Wed, Jun 01, 2011 at 08:03:16PM +0100, Manny wrote:
> I believe (setq) is more global, whereas (let) is local.

Yeah, I read about that last night.  Scoping rules.  Dynamic scoping can
be convient, but it can cause the weirdest bugs ever to pop up!

> Yeah, I agree here.  I was testing a quick rewrite to yesterday's code
> submission a minute ago and had to type the damned thing out 4 times
>due to me forgetting something and being unfamiliar with xlisp...

Oh man, if ever there was an interpeter crying to have a way to fork off
an editor from within the interpeter, xlisp is it!  I may look into that.
> 
> Speaking of which, were you trying to get all the numbers in to a list with 
> your code?  :)
> 
> (defun second-w (num)
>   (cond
>     ((== num 0) (cons num (quote ())))
>     (t (cons num (second-w (- num 1))))))
> 
> This should output a list of digits from 100 to 0.  I really love the 
> recursion here.

Yeah, I've always admired LISP's unabashedly recursive nature.

> If anyone is the least bit interested in this, a good read is 'The
>Little Schemer, Fourth Edition' by Daniel P. Friedman and Matthias
>Felleisen.  It's a brilliant book to learn some of this stuff for
>lisp or Scheme.

I've got it, but never read all the way through it.  When I tried, I
didn't have a scheme at hand to try stuff with.  

> Is this by Bruce J. Maclennan?  Bloody hell, it ain't cheap.  Someone over 
> here is trying to sell it for 115 quid new... (~ $188!!)

I've spent a fortune on textbooks, and can't sell them for a fraction of
what I paid. :-(  Maclennan's book is a good one.  He explains things
pretty well.  

> It's probably worth learning anyway.  It's nice to play with a few languages 
> (especially in OS-9) that make you think outside of the C-world box that we 
> seem to have cornered ourselves in.

Heh, yeah.  It's pretty different!  

Willard
-- 
Willard Goosey  goosey at sdc.org
Socorro, New Mexico, USA
I search my heart and find Cimmeria, land of Darkness and the Night.
  -- R.E. Howard



More information about the Coco mailing list