[REBOL] Re: Rebol pickling recipes ?
From: laurent:giroud:libertysurf at: 5-Oct-2002 22:13
> 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
Each answer seem to bring up new questions again ;)
What exactly do you mean by "loading" words without using 'load ?
Do you mean that (for example) something like "test: 5" defines a word named
test of type integer? and with value the number five and that this word is not
stored in the system/ words but in an internal non accessible list of words ?
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".
I guess that by "partially" you mean "only for the context that your script(s)
have knowledge of" ?
Would that mean that, for example, one would have to store all code and data
within a single object to make sure everything he needs is correctly restored
(puting aside the need to handle circular references properly) ?
->>> 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. :-)
How could I not see it ???
I lack vitamins for sure ;)