Following the INSTALL file all went perfect (I choose CMU). I did the build as "root" in /usr/local/src/matlisp with the idea of using a central location for any user to access matlisp.
How do I set up to use matlisp at this point? (Sorry about the simple question, but I'm new to CL and I've never used CMUCL before yesterday. My experiance is limited to a few months using CLISP.)
tnx in advance
mike
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I think your question is not so simple. Infact, its something I had thought
of putting in the distribution. I'm not a lisp expert either but I think
that people don't like packages defining specials, playing around with
packages, dumping cores etc... For the moment being I'll post the following function which you should use like this:
1. copy the function to the start.lisp file (somewhere in it)
2. fire-up CMU
3. (load "start")
4. (save-matlisp)
This will dump a core image matlisp.core and a shell script called matlisp.
5. chmod +x matlisp
6. cd /usr/local/.../bin
7. ln -s .... (create a soft link in an accessible bin directory to the
matlisp shell script)
Please post the result of this transaction. Also note that this function
is not part of the matlisp distribution, it is a function I use for my personal
installation of matlisp.
Purpose
=======
Dumps a Lisp core image to the file \"matlisp.core\" in
the (EXT::DEFAULT-DIRECTORY), ie. the directory where
you loaded Matlisp, and also dumps the script file
\"matlisp\" which loads Matlisp with that core.
Notes
=====
The script file \"matlisp\" will use the lisp executable
that was used to dump the \"matlisp.core\" core image.
"
`(progn
(in-package "USER")
(let ((core-name (namestring
(merge-pathnames "matlisp.core"
(ext::default-directory))))
(shift-name (namestring
(merge-pathnames "matlisp"
(ext::default-directory)))))
(format t "~&~% ** To start Matlisp after core dump \
execute the shell script (chmod +x may be needed)")
(format t "~% ~a" shift-name)
(format t "~%~%")
(force-output)
tnx....the instructions and script worked perfect. I added it to the end of start.lisp (as called by the make file) then just re-ran "make cmu". I moved the resulting matlisp.core to /usr/lib/cmucl and moved the matlisp-script to /usr/local/bin/. This is now simple enough I can even handle it :-)
mike
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Following the INSTALL file all went perfect (I choose CMU). I did the build as "root" in /usr/local/src/matlisp with the idea of using a central location for any user to access matlisp.
How do I set up to use matlisp at this point? (Sorry about the simple question, but I'm new to CL and I've never used CMUCL before yesterday. My experiance is limited to a few months using CLISP.)
tnx in advance
mike
I think your question is not so simple. Infact, its something I had thought
of putting in the distribution. I'm not a lisp expert either but I think
that people don't like packages defining specials, playing around with
packages, dumping cores etc... For the moment being I'll post the following function which you should use like this:
1. copy the function to the start.lisp file (somewhere in it)
2. fire-up CMU
3. (load "start")
4. (save-matlisp)
This will dump a core image matlisp.core and a shell script called matlisp.
5. chmod +x matlisp
6. cd /usr/local/.../bin
7. ln -s .... (create a soft link in an accessible bin directory to the
matlisp shell script)
Please post the result of this transaction. Also note that this function
is not part of the matlisp distribution, it is a function I use for my personal
installation of matlisp.
Regards,
Tunc
--cut here ---
#+:cmu
(defmacro save-matlisp ()
"
Syntax
======
(SAVE-MATLSIP)
Purpose
=======
Dumps a Lisp core image to the file \"matlisp.core\" in
the (EXT::DEFAULT-DIRECTORY), ie. the directory where
you loaded Matlisp, and also dumps the script file
\"matlisp\" which loads Matlisp with that core.
Notes
=====
The script file \"matlisp\" will use the lisp executable
that was used to dump the \"matlisp.core\" core image.
"
`(progn
(in-package "USER")
(let ((core-name (namestring
(merge-pathnames "matlisp.core"
(ext::default-directory))))
(shift-name (namestring
(merge-pathnames "matlisp"
(ext::default-directory)))))
(format t "~&~% ** To start Matlisp after core dump \ execute the shell script (chmod +x may be needed)")
(format t "~% ~a" shift-name)
(format t "~%~%")
(force-output)
(with-open-file (f shift-name :DIRECTION :OUTPUT)
(write-string (car ext::*command-line-strings*) f)
(write-string " -core " f)
(write-string core-name f))
(ext:save-lisp
core-name
:print-herald nil
:init-function
#'(lambda ()
(in-package "MATLISP")
(user::load-blas-&-lapack-binaries)
(format t "~%")
(ext::print-herald)
(format t "~%")
(defparameter sys::*command-index* 0)
(cl::%top-level))))))
Tunc,
tnx....the instructions and script worked perfect. I added it to the end of start.lisp (as called by the make file) then just re-ran "make cmu". I moved the resulting matlisp.core to /usr/lib/cmucl and moved the matlisp-script to /usr/local/bin/. This is now simple enough I can even handle it :-)
mike