[plt-scheme] Is there such a thing as "persistent memoization"?

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Mon Jul 9 21:26:08 EDT 2007

Not too my knowledge.

But I laud you for being lazy. Because if you truly are, and you  
figure out how to use Dave's library to make persistent memoized  
code, then you will put it into a Planet library so that you can be  
lazy forever after when it comes to define/memoized/persistent.

(I wrote this kind of code myself some 10 years back, hand-rolled,  
and it still works. I sure wish I had been lazy enough.)

-- Matthias

On Jul 9, 2007, at 9:12 PM, Eric Hanchrow wrote:

> I have some code which does a lot of network operations, and for each,
> retrieves a bit of data.  As it runs, it accumulates this data in
> memory.  If a network operation fails, the program dies, and all the
> data is lost because I haven't bothered writing it to disk.  (If all
> the network operations succeed, the program computes a result from the
> data, and no longer needs it.)  After a failure I naturally restart
> the program, which painstakingly retrieves, a second time, all the
> same data that it retrieved the first time.
> Network operations fail distressingly often.  So I'd like to somehow
> write each piece of data to persistent storage, as soon as I've gotten
> it; and naturally I'd like the program to load up any such persistent
> data when it starts.  What's more, I am inveterately lazy and don't
> want to have to write much code for this; my fantasy would be that I
> could find a form called, say, "define/memoized/peristent" that is
> similar to the "define/memo*" in dherman's "memoize" package
> ... except of course the memoizations are persisted.  Does anything
> like this exist?
> -- 
> Always code as if the guy who ends up maintaining your code will
> be a violent psychopath who knows where you live.
>         -- John F. Woods
> _________________________________________________
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme

Posted on the users mailing list.