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

[REBOL] Re: Obscure? You be the judge!

From: nitsch-lists:netcologne at: 18-May-2002 20:02

Am Samstag, 18. Mai 2002 11:41 schrieb Gabriele Santilli:
> Hi Volker, > > On Friday, May 17, 2002, 9:49:04 PM, you wrote: > > VN> Well, make knows the numbers of words to allocate. > > But then, why binding before actually adding the new words?
semantics? lets say:
>> ctx: context[print-me: does[print ["iam" mold self]]] >> ctx2: make ctx[mold: "oops"] >> ctx2/print-me
iam make object! [ print-me: func [][print ["iam" mold self]] mold: "oops" ] this way one can create an object with basic functions, like 'print-me. Its obvious not to redefine them. but it is obvious too not to redefine 'mold?
> VN> i think one problem with general ability is, one can not move context > in VN> memory without confusing all references currently? > > That can be easily solvable, by having the words and values > referenced by the context! and the words referencing the context! > itself (maybe with an index to the position in words/values). I > think it is very likely to work this way already... (Remember that > before 2.2 you could modify the block of words or the block of > values independently...) >
Well, IIRC i started around 2.2 .. AFAIK they blocked that because adding words crashed the interpreter? can imagine insert sees a block, thinks "ok, i resize", bang? Or was it asymetric resizing (adding a word, bot not a value)? Hmm, one could try to optimize by storing like 3 word word word value value value where 3 is the offset words/1 -> values/1 . that would save some pointer-lookups. Carl has some tricks in this area. Remember exec-list-headers :) but its trying to look behind the curtain.. ;)
> Regards, > Gabriele.
greetings Volker