Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: Rebol pickling recipes ?

From: g:santilli:tiscalinet:it at: 5-Oct-2002 20:50

Hi Laurent, On Saturday, October 5, 2002, 7:56:50 PM, you wrote:
>> Well, with a lot of effort, you could do it, but you'd probably >> end up MOLDing the whole system.
LG> Is it possible ? You'd have to handle circular references by yourself. Also, preserving non-object contexts is not trivial and probably impossible in the general case. (Ladislav has some examples of how to list the words in a given context, but AFAIK they look for them in SYSTEM/WORDS, so if you have "loaded" the word without using LOAD they wouldn't be able to find it.) Another problem would be how to handle native functions (or actions etc.), that cannot be molded. LG> If I am right this would allow a kind of persistent rebol environment : 'molding LG> system before quitting and 'loading it a few days later and finding the LG> environment exactly in the same state. That could have many applications. That's what you get with FORTH. I don't think it is possible in REBOL in the general case, but you could do it "partially". ->> Just 'loading carefully molded data containing only what's needed for a LG> specific use. Would this be possible ? Well, that's what you do when you write a script --- i.e. you're writing carefully molded data. :-) LG> It would be interesting to know if the current "program counter" is part of the LG> system data as this might allow running scripts to be restored at the exact LG> point where they stopped, this would useful too in some cases. That is not available (as a lot of other internal state). Regards, Gabriele. -- Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer Amigan -- AGI L'Aquila -- REB: