[RPL/2] self compiling ?

Adrian Blake adrian.blake at ieee.org
Ven 16 Nov 23:22:20 CET 2007


What I would like is an example of how it is done.

It is easy to create a text file of source code and then issue some system commands to compile and execute. If this is to be done 
many times most of the time and resources is spent with system commands and compiling. This is especially true if the programs are 
small and there are many to be recompiled many times.

Can RPL/2 do this in a simple manner?

There is a programming language called Erlang which allows the programmer to modify and add to the executing code. The allows 
continuous upgrades without stopping the program.

Adrian

DEMAINE Benoit-Pierre wrote:
> Adrian Blake wrote:
>> I am not sure if I have asked this in the past.
>>
>> I wish to have a list, a long list, within a program, then compile it, then execute it. Self generation of code.
>>
>> Can this be done,  some suggestions.
> 
> Yes. I did this in Prolog and RPL. Works fine.
> 
> In fact, doable in almost all script langages.
> 
> The "tcc" compiler allows to do this for C.
> 
> Generating RPL from RPL is something I used to do on HP48.
> 
> Generating machine/system programs (compile RPL into a system executable
> file) may be more tricky. I usually use Makefils for this.
> 

-- 
Adrian Blake
Molonglo Radio Observatory
University of Sydney
1152 Hoskinstown Rd
Bungendore 2621
ph. 02 62382262  mobile 0407 232 978

http://150.101.125.30/images


Plus d'informations sur la liste de diffusion RPL2