|
|
|
last edited 14 years ago by page |
| 1 2 3 4 5 6 7 | ||
|
Editor: Bill Page
Time: 2011/03/07 16:38:43 GMT-8 |
||
| Note: output as string | ||
added:
After we have actually compiled something once it now works.
Waldek Hebisch helped me with writing the following Lisp code to call the SPAD compiler from the FriCAS?/AXIOM interpreter.
)set output algebra on
)set output tex off
Unfortunately it fails with an obscure error message
)lisp (defun string2spad (the-string-list) (let* ( ($LISPLIB t) (|$QuickLet| t) (|$QuickCode| t) (|$InteractiveMode| nil) (*standard-input* (make-string-input-stream (format nil "~{~A~^~%~}" the-string-list))) (*standard-output* (make-string-output-stream)) ) (declare (special $LISPLIB |$InteractiveMode|)) (|spadCompile| nil) (get-output-stream-string *standard-output* ) ))
Value = STRING2SPAD
S:=[")abbrev domain XXX xxx","xxx():BasicType == Integer"]
(1) [")abbrev domain XXX xxx","xxx():BasicType == Integer"]
STRING2SPAD("")$Lisp
>> System error:
The value "" is not of type LIST.
unless if we first compile something else using a )comiple file.spad command
)abbrev domain YYY yyy yyy():BasicType==Integer
Compiling FriCAS source code from file
/var/zope2/var/LatexWiki/174773479446238758-25px004.spad using
old system compiler.
YYY abbreviates domain yyy
------------------------------------------------------------------------
initializing NRLIB YYY for yyy
compiling into NRLIB YYY
(time taken in buildFunctor: 0)
;;; *** |yyy| REDEFINED
;;; *** |yyy| REDEFINED
Time: 0.06 SEC.
Cumulative Statistics for Constructor yyy
Time: 0.06 seconds
--------------non extending category----------------------
.. yyy of cat
(|BasicType|) has no
(|IntegerNumberSystem|) finalizing NRLIB YYY
Processing yyy for Browser database:
--->-->yyy(): Missing Description
; compiling file "/var/zope2/var/LatexWiki/YYY.NRLIB/YYY.lsp" (written 07 MAR 2011 04:38:41 PM):
; compiling (/VERSIONCHECK 2)
; compiling (DEFUN |yyy| ...)
; compiling (DEFUN |yyy;| ...)
; compiling (MAKEPROP (QUOTE |yyy|) ...)
; compiling (MAKEPROP (QUOTE |yyy|) ...)
; /var/zope2/var/LatexWiki/YYY.NRLIB/YYY.fasl written
; compilation finished in 0:00:00.060
------------------------------------------------------------------------
yyy is now explicitly exposed in frame initial
yyy will be automatically loaded when needed from
/var/zope2/var/LatexWiki/YYY.NRLIB/YYYAfter we have actually compiled something once it now works.
result:=string STRING2SPAD(S)$Lisp
(2) ";)abbrev domain XXX xxx XXX abbreviates domain xxx ;xxx():BasicType == I nteger ---------------------------------------------------------------------- -- initializing NRLIB XXX for xxx compiling into NRLIB XXX (time take n in buildFunctor: 0)
;;; *** |xxx| REDEFINED
;;; *** |xxx| REDEFINED Time: 0.03 SEC.
Cumulative Statistics for Constructor xx x Time: 0.03 seconds
--------------non extending category------------ ---------- .. xxx of cat (|BasicType|) has no (|IntegerNumberSystem|) finalizing NRLIB XXX Processing xxx for Browser database: --->-->xxx(): M issing Description ; compiling file "/var/zope2/var/LatexWiki/XXX.NRLIB/XXX.l sp" (written 07 MAR 2011 04:38:42 PM): ; compiling (DEFUN |xxx| ...) ; compil ing (DEFUN |xxx;| ...) ; compiling (MAKEPROP (QUOTE |xxx|) ...) ; compiling ( MAKEPROP (QUOTE |xxx|) ...)
; /var/zope2/var/LatexWiki/XXX.NRLIB/XXX.fasl wr itten ; compilation finished in 0:00:00.041 --------------------------------- --------------------------------------- xxx is now explicitly exposed in f rame initial xxx will be automatically loaded when needed from /va r/zope2/var/LatexWiki/XXX.NRLIB/XXX
"
So presumablly something is being loaded dynamically.