[plt-scheme] minor glitch in Lazy Scheme?

From: jos koot (jos.koot at telefonica.net)
Date: Sat Jan 13 12:48:11 EST 2007

My humble suggestion:
Comparison of the fridges of two trees (see Section 9.4 of EOPL) You could 
demonstrate that (in this case and with a lazy evaluator) you can do this 
without coroutines. Also this is an example where lazyness helps even with 
finite structures.
Greetings, Jos Koot.

----- Original Message ----- 
From: "Prabhakar Ragde" <plragde at uwaterloo.ca>
To: "Eli Barzilay" <eli at barzilay.org>
Cc: "PLT Scheme" <plt-scheme at list.cs.brown.edu>
Sent: Saturday, January 13, 2007 6:16 PM
Subject: Re: [plt-scheme] minor glitch in Lazy Scheme?

> Eli Barzilay wrote:
>> I'm not sure what the problem is.  I did this:
>> * Started DrScheme, switched to Lazy Scheme
>> * Hit f1
>> * enter "readline"
>> * click on any of the four results
>> No surprises -- all work as expected.  I suspect that you're doing
>> something different though.
> Well, now I can't recreate it. Now I get the four results, but I didn't 
> last night; I just got the suggestion to save "results.ss". I did it 
> twice, with the same results, before I noticed I was in Lazy Scheme. Maybe 
> I had hit something else in between by accident. If it happens again 
> (which is unlikely), I'll try to investigate more.
>> Like Matthias said -- that was exactly the point.  I wanted to teach
>> lazy evaluation, and the choices were (a) switch to Haskell, (b) use
>> lazy streams.  (a) is too strong of a change to make any sense --
>> switching the syntax makes everything too confusing, having it
>> statically typed doesn't help too.  (b) is the traditional solution,
>> but I find it too weak when you want to demonstrate laziness properly.
> I'd appreciate any pedagogical examples of lazy evaluation for which 
> streams are too weak -- I think I am just using standard examples 
> (Fibonacci, sieve of Eratosthenes, Hamming numbers) for which they'd work 
> fine. I was planning to briefly discuss delay and force (this would be in 
> a single optional lecture, not something for credit or testable). --PR
> _________________________________________________
>  For list-related administrative tasks:
>  http://list.cs.brown.edu/mailman/listinfo/plt-scheme

Posted on the users mailing list.