[RPL/2] self compiling ?

DEMAINE Benoit-Pierre benoit at demaine.info
Dim 18 Nov 21:14:57 CET 2007


BERTRAND Joël wrote:
> Adrian Blake wrote:
>> Would you gibe me a simple example of eval()
> 
> 	An example of EVAL ?
> 
> TEST
> <<
> 	<< 1 10 for I I disp next >> eval
>  >>
> 
> 	But today, you cannot modify evaluated expression. Maybe you look for 
> OBGET, EXSUB, EXGET to modify an expression ? These intrinsic functions 
> have to be written...

If you did not implement yet the obj/list functions, then, I expect at
least string to object functions should exist in RPL/2. In critical
cases, on HP48, I used to use ->srt and str->, that allow to alter
program objects in the "string" way ...

Of course, an equivalent to obj->list (proposed in the Metakernel for
HP48GX) would be much more convenient :) (and it's complement in our
cas: list->prog, or some generic wraper: list->type that would take as
argument and the number of the object type the list should be converted
to. ). These were trivial to implement on HP48, since the only
difference between a program and a list was the prolog :) (from memory,
the 1st bunch of 5 quartets).

Bertrand, did you keep in RPL/2 this kind of memory oganisation where
the first word of the object is the adress of the routine that
implements it's content ?

Once you get a wrapper to alter the prolog, and convert a program into a
list, you just manipulate the list like any other one :)

-- 
 >o_/ DEMAINE Benoit-Pierre (aka DoubleHP) http://benoit.demaine.info/
If computing were an exact science, IT engineers would not have work \_o<

"So all that's left, Is the proof that love's not only blind but deaf."
(FAKE TALES OF SAN FRANCISCO, Arctic Monkeys)


Plus d'informations sur la liste de diffusion RPL2