Indeed using compile the time reduced to 6s.
So one has to be careful before drawing conclusions.
Ok_Specific_7749
For me the availability of libraries is more important.
Even the size of the executable is not important.
Thanks for answering/solving this problem. It was not obvious for me.
Now i have another question would it be possible to do something similar using sbcl or ccl. I.e. creating a compiled library and calling it from a main.lisp file.
I found an interesting abcl function:
(add-to-classpath "some.jar")
Correction. Program works correctly with sbcl & abcl & ccl.
I just needed to put a softlink to whish executable (tk)
No it works with kawa scheme like i specified.
Program below does not work with ccl.
load "~/quicklisp/setup.lisp")
(ql:quickload "ltk")
(in-package :ltk-user)
(declaim (optimize (speed 3) (safety 3)))
(defun main()
(with-ltk ()
(let ((b (make-instance 'button
:master nil
:text "Press Me"
:command (lambda ()
(format t "Hello World!~&")))))
(pack b))))
(main)
I use also kawa (a scheme). It has better documentation. https://www.gnu.org/software/kawa/pt01.html
Program below works fine with sbcl & ccl.
For abcl i get alot of warnings, not errors,
(load "~/quicklisp/setup.lisp")
(declaim (optimize (speed 3) (safety 3)))
(ql:quickload "serapeum")
(defpackage alain
(:use :cl :serapeum)
(:export main));defpackage
(in-package :alain)
(declaim (type (integer) *anint*))
(defparameter *anint* 2)
(-> addtwo ( integer ) integer )
(defun addtwo (x)
( + *anint* x ))
(defun main ()
(print (addtwo 3)));main
(in-package :cl)
(defun main ()
(alain::main))
(main)
; Compilation unit finished ; Caught 22 WARNING conditions ; Caught 10 STYLE-WARNING conditions
I just tried ccl on freebsd. I had only to download two files an executable fx86cl64 and an fx86cl64.image. It works nice.
I tried hy-lisp. The idea is good but it lacks features.
The first library i tried was serapeum.
https://github.com/ruricolist/serapeum
But abcl was spitting out alot of errors.
Program :
Error:
µ