Lazy evaluation alternative

2003-01-24 Thread Chris Clearwater
I wonder if I could run an idea I've had by this list. It seems to me you could get some of the desired effects of lazy evaluation by using continuation passing style in code. For example, take this psuedo-code using CPS to represent an infinite data type. Using non-CPS this would be something

Re: Lazy evaluation alternative

2003-01-24 Thread Jerzy Karczmarczuk
Chris Clearwater wrote: It seems to me you could get some of the desired effects of lazy evaluation by using continuation passing style in code. For example, take this psuedo-code using CPS to represent an infinite data type. Using non-CPS this would be something like: ones = 1 : ones using stri

Lazy evaluation alternative

2003-01-24 Thread Chris Clearwater
I wonder if I could run an idea I've had by this list. It seems to me you could get some of the desired effects of lazy evaluation by using continuation passing style in code. For example, take this psuedo-code using CPS to represent an infinite data type. Using non-CPS this would be something

Re: Lazy evaluation alternative

2003-01-24 Thread Martin Norbäck
fre 2003-01-24 klockan 13.21 skrev Chris Clearwater: > I wonder if I could run an idea I've had by this list. It seems to > me you could get some of the desired effects of lazy evaluation by using > continuation passing style in code. For example, take this psuedo-code > using CPS to represent

Re: Lazy evaluation alternative

2003-01-24 Thread Chris Clearwater
On Fri, Jan 24, 2003 at 01:51:57PM +0100, Jerzy Karczmarczuk wrote: > Chris Clearwater wrote: > >It seems to > >me you could get some of the desired effects of lazy evaluation by using > >continuation passing style in code. For example, take this psuedo-code > >using CPS to represent an infinite da

Re: Lazy evaluation alternative

2003-01-24 Thread Chris Clearwater
On Fri, Jan 24, 2003 at 03:07:48PM +0100, Thomas Johnsson wrote: > > > > > Yes I am. But the + should be in CPS form anyways to be perfectly > > correct, so: natural n c = (+) n 1 (\m -> c n : (natural m)) > > > > I think Jerzy (in his usual polite manner :-) refers to the every group has

Re: Lazy evaluation alternative

2003-01-24 Thread Kevin S. Millikin
> "Chris" == Chris Clearwater <[EMAIL PROTECTED]> writes: Chris> But also, this brings me to another idea! Data structures Chris> should be built from lambdas and CPS! For example, a list Chris> of integers: 1 : 2 : 3 Chris> list = \c -> c 1 (\c -> c 2 nil) How about just:

Re: Lazy evaluation alternative

2003-01-24 Thread Kevin S. Millikin
> "Chris" == Chris Clearwater <[EMAIL PROTECTED]> writes: Chris> LIAR. You want to steal my idea for yourself! It's MINE! :) I hate to be the one to break it to you, but we used to routinely show this trick to Intro to CS students. Chris> But anyways, it was to show that when a list

Re: Lazy evaluation alternative

2003-01-24 Thread Jerzy Karczmarczuk
Chris Clearwater wrote: On Fri, Jan 24, 2003 at 01:51:57PM +0100, Jerzy Karczmarczuk wrote: > Hey, Maestro, why don't you check before posting, hm? What is the type > of ones? I am afraid you will get a nasty surprise... Check what, the type? Or are you refering to the double posting?... It s

Re: Lazy evaluation alternative

2003-01-24 Thread Nick Name
On Fri, 24 Jan 2003 09:18:47 -0600 "Kevin S. Millikin" <[EMAIL PROTECTED]> wrote: > > So your trick *is* used to implement lazy evaluation in other > languages. It's not very pleasant if you write a lot of lazy code, > because you have to explicitly suspend evaluation of values using > delay

Re: Lazy evaluation alternative

2003-01-24 Thread Chris Clearwater
On Fri, Jan 24, 2003 at 09:18:47AM -0600, Kevin S. Millikin wrote: > > "Chris" == Chris Clearwater <[EMAIL PROTECTED]> writes: > > Chris> LIAR. You want to steal my idea for yourself! It's MINE! :) > > I hate to be the one to break it to you, but we used to routinely show > this trick to

hot queue implementation

2003-01-24 Thread Hal Daume III
Does anyone have an implementation of hot (heap on top) priority queues in Haskell (or perhaps ML)? Thanks! - Hal -- Hal Daume III "Computer science is no more about computers| [EMAIL PROTECTED] than astronomy is about telescopes." -Dijkstra | www.isi.edu/~hdaume __

seeking ideas for short lecture on type classes

2003-01-24 Thread Norman Ramsey
In a fit of madness, I have agreed to deliver a 50-minute lecture on type classes to an audience of undergraduate students. These students will have seen some simple typing rules for F2 and will have some exposure to Hindley-Milner type inference in the context of ML. I am soliciting advice about

Re: seeking ideas for short lecture on type classes

2003-01-24 Thread Christopher Milton
--- Norman Ramsey <[EMAIL PROTECTED]> wrote: > In a fit of madness, I have agreed to deliver a 50-minute lecture > on type classes to an audience of undergraduate students. These > students will have seen some simple typing rules for F2 and will > have some exposure to Hindley-Milner type inferenc

Re: seeking ideas for short lecture on type classes

2003-01-24 Thread Andrew J Bromage
G'day all. On Fri, Jan 24, 2003 at 06:13:29PM -0500, Norman Ramsey wrote: > In a fit of madness, I have agreed to deliver a 50-minute lecture > on type classes to an audience of undergraduate students. These > students will have seen some simple typing rules for F2 and will > have some exposure

Last Call for Papers: Deadline February 7

2003-01-24 Thread SAS 2003
-- Call for Papers SAS '03 10th Annual International Static Analysis Symposium June 11-13, 2003 : San Diego, California