Sorry, I have no personal account, so I have to use Bernds:
Richard Fateman wrote:
> Gloeckner, Robert wrote:
>> Is it possible to use maxima-generated lisp-files in gcl (or any other
>> lisp-implementation)?
> yes. it should be possible to write a lisp file from any maxima in any
> lisp and have any other maxima in any lisp read it.
hm. that is not what i tried to do.
> Ordinarily, any lisp, even without maxima loaded up, should be able to
> read a file written by maxima (though it might not make much sense.)
this is what i tried. the idea was/is to produce a lisp-file in order
to produce a c-file (with gcl?) to use this one in an shared-object file
for use in a simulation program-module (maxima->lisp->c->simulation-module).
>> Loading the file "maxima-package.lisp" and afterwards the
>> maxima-generated lisp-file fails.
>>
> what maxima-generated lisp file
> did you try to read or to load, and how did
> it fail? Supplying the first few lines of code in your email might be
> appropriate.
Ok. i try:
1) i put the following into a file (maxima2lisp.txt):
fun(x):=1+x;
quit();
2) in maxima i did
translate_file("./maxima2lisp.txt");
in order to get maxima2lisp.LISP
;;; -*- Mode: Lisp; package:maxima; syntax:common-lisp ;Base: 10 -*- ;;;
(in-package "MAXIMA")
;;** Variable settings were **
;;transcompile:true;
;;tr_semicompile:false;
;;translate_fast_arrays:true;
;;tr_warn_undeclared:compile;
;;tr_warn_meval:compfile;
;;tr_warn_fexpr:compfile;
;;tr_warn_mode:all;
;;tr_warn_undefined_variable:all;
;;tr_function_call_default:general;
;;tr_array_as_ref:true;
;;tr_numer:false;
;;define_variable:false;
(PROGN
(DEFPROP $FUN T TRANSLATED)
(ADD2LNC '$FUN $PROPS)
(DEFMTRFUN ($FUN $ANY MDEFINE NIL NIL) ($X) (DECLARE (SPECIAL $X))
(ADD* 1 $X)))
(SIMPLIFY (MFUNCTION-CALL $QUIT))
3) i started clisp (i tried gcl as well - same error):
[1]> (load "/usr/share/maxima/5.9.1.9rc4/src/maxima-package.lisp")
;; Loading file /usr/share/maxima/5.9.1.9rc4/src/maxima-package.lisp ...
;; Loaded file /usr/share/maxima/5.9.1.9rc4/src/maxima-package.lisp
T
[2]> (load "/home/robert/temp/maxima2lisp.LISP")
;; Loading file /home/robert/temp/maxima2lisp.LISP ...
** - Continuable Error
EVAL: undefined function DEFPROP
If you continue (by typing 'continue'): Retry
The following restarts are also available:
STORE-VALUE :R1 You may input a new value for (FDEFINITION
'DEFPROP).
USE-VALUE :R2 You may input a value to be used instead of
(FDEFINITION 'DEFPROP).
Break 1 MAXIMA[3]>
Do I try an impossible thing? Isn't it possible to produce something I
can access from lisp or better c in order to make a shared object module
for use in a simulation program?
Thanks
Robert (using Bernds account)
--
https://gna.org/projects/mipisti - (microscope) picture stitching
T_a_k_e__c_a_r_e__o_f__y_o_u_r__R_I_G_H_T_S.
P_r_e_v_e_n_t__L_O_G_I_C--P_A_T_E_N_T_S
http://www.ffii.org, http://www.nosoftwarepatents.org