This is a Dockerized installation of Symbolics OpenGenera.
At the moment, this ONLY runs on Linux hosts, and does not support Docker or Docker-Machine running on OS X. I'm still working on getting that to work.
# ABOUT | |
This is a Dockerized installation of Symbolics OpenGenera. | |
# WARNING! | |
At the moment, this ONLY runs on Linux hosts, and does not support | |
Docker or Docker-Machine running on OS X. I'm still working on getting | |
that to work. |
(ql:quickload :cl-fad) | |
(let ((ancestor #P"/home/rett/quicklisp/dists/quicklisp/software/cl-fad-0.7.4/") | |
(path #P"/home/rett/quicklisp/dists/quicklisp/software/cl-fad-0.7.4/path.lisp")) | |
(cl-fad:pathname-equal ancestor (cl-fad:pathname-directory-pathname path))) |
(defvar *jni-lib-path* | |
#+:darwin-target "/System/Library/Frameworks/JavaVM.framework/JavaVM" | |
#+:win32-target "C:/Program Files/Java/jre6/bin/client/jvm.dll" | |
#+android-target "libdvm.so" | |
#-(or darwin-target win32-target android-target) | |
"need to define *jni-lib-path*" | |
"Set this to point to your jvm dll prior to calling create-jvm") |
To load "asdf-test": | |
Load 1 ASDF system: | |
asdf-test | |
; Loading "asdf-test" | |
; compiling file "/home/rett/dev/common-lisp/asdf-test/file1.lisp" (written 04 NOV 2017 09:04:15 PM): | |
; /home/rett/.cache/common-lisp/sbcl-1.3.3.debian-linux-x64/home/rett/dev/common-lisp/asdf-test/file1-TMP.fasl written | |
; compilation finished in 0:00:00.000 | |
args (#P"/home/rett/dev/common-lisp/asdf-test/file1.lisp" :OUTPUT-FILE | |
#P"/home/rett/.cache/common-lisp/sbcl-1.3.3.debian-linux-x64/home/rett/dev/common-lisp/asdf-test/file1.fasl" |
(asdf:defsystem :asdf-test | |
:around-compile | |
(lambda (compile-function) | |
(flet ((compile-success (&rest args) | |
(format t "args ~s~%" args) | |
t)) | |
(apply compile-function (list :compile-check #'compile-success)))) | |
:components | |
((:file "file1") | |
(:file "file2"))) |
;; Dot notation (see how forms parameter is used in macro) | |
(defmacro with-my-error-handling-dot (context &body forms) | |
`(handler-bind | |
((error | |
(lambda (condition) | |
(my-error-handler ,context condition)))) | |
,.forms)) | |
;; At notation (see how forms parameter is used in macro) | |
(defmacro with-my-error-handling-at (context &body forms) |
(defmacro with-foreign-slots ((vars ptr type) &body body) | |
"Create local symbol macros for each var in VARS to reference | |
foreign slots in PTR of TYPE. Similar to WITH-SLOTS. | |
Each var can be of the form: slot-name - in which case slot-name will | |
be bound to the value of the slot or: (:pointer slot-name) - in which | |
case slot-name will be bound to the pointer to that slot." | |
(let ((ptr-var (gensym "PTR"))) | |
`(let ((,ptr-var ,ptr)) | |
(symbol-macrolet | |
,(loop :for var :in vars |
CL-USER> *gensym-counter* | |
78744 | |
CL-USER> (gensym "T") | |
#:T78744 | |
CL-USER> *gensym-counter* | |
78745 |
(defun main () | |
(format t "Hello, world!~%")) | |
(sb-ext:save-lisp-and-die "hello-world.exe" | |
:executable t | |
:compression 9 | |
:toplevel 'main) | |