From: Jean L. <bu...@gn...> - 2016-12-30 11:23:08
|
On Sat, Dec 24, 2016 at 01:36:20PM +0100, Pascal Bourguignon wrote: > > How would I create executable image? How do you do it? > > http://www.clisp.org/impnotes/image.html <http://www.clisp.org/impnotes/image.html> > > (load “your-program.lisp”) > (ext:saveinitmem “your-program” :executable t :norc t :init-function ‘cl-user::main) While this is working well, when I use (error function below and *args* is missing, and if I run it as executable image created as by the upper line, I get into the REPL. This is good sometimes, for program execution. I was expecting though not to get into the REPL after (error -- but that error is shown and that I exit. I see from HyperSpec it is invoking a debugger. I did not find if it is possible to not invoke the debugger, as it is not invoking debugger when run as: clisp program.cl Jean Louis (defun main nil (unless (car *args*) (error "No valid file specified") (exit 1)) (setf json-file (truename (car ext:*args*))) (unless (probe-file json-file) (error (format nil "File not readable: ~a") json-file)) (setf sms-json (cl-json:decode-json-from-source json-file)) (let ((message (ask-for-message))) (loop for i in sms-json do (let ((number (normalize-number (cdr (assoc :number i)))) (name (first-name (cdr (assoc :name i))))) (when (tanzanian? number) ;; (if (regexp:match "^0" number) (progn (push ;; (first-four number) fournr) ;; (format t "~a~%" (first-four ;; number))))))))) just to add (anssh to run the ;; commands... (format t "~a~%" (termux-sms-send number (replace-string "NAME" name message) name)))))) (exit)) |