Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

111 lines (93 sloc) 3.694 kB
;;; a quick startup script that can be loaded with all supported lisps
(in-package :cl-user)
(let ((quicklisp-init (merge-pathnames "quicklisp/setup.lisp" (user-homedir-pathname))))
(when (probe-file quicklisp-init)
(load quicklisp-init)))
(ql:quickload :quicklisp-slime-helper)
#+sbcl (require 'asdf)
#+sbcl (require 'sb-posix)
#+sbcl (assert (eql sb-impl::*default-external-format* :utf-8))
(setf stream:*default-external-format* :utf-8
ext:*gc-verbose* nil
*compile-print* nil
ext:*bytes-consed-between-gcs* (* 64 1024 1024)
*default-pathname-defaults* (pathname (format nil "~A/" (nth-value 1 (unix:unix-current-directory)))))
;; load cl-gd early so that uffi is loaded in order to prevent it from
;; using cffi-uffi (which is loaded as a dependency later)
(asdf:oos 'asdf:load-op :cl-gd)
;;; some helpers
(defun setup-registry (directory)
(format t "; setting up ASDF registry, please be patient...")
(mapc #'(lambda (asd-pathname)
(pushnew (make-pathname :directory (pathname-directory asd-pathname))
:test #'equal))
(directory (merge-pathnames #p"**/*.asd" (truename directory)))))
(defun read-configuration (pathname)
(with-open-file (s pathname)
(loop for form = (read s nil :end-of-file)
while (not (eq form :end-of-file))
;; 2008-03-12 kilian: I have added eval here (e.g. for merge-pathnames)
collect (eval form))))
;; Image dumping functions
(defvar *initial-shared-libraries* (copy-list ccl::*shared-libraries*))
(defun dump-image (&optional (image-name "bknr.image"))
(format t "~&;;; --- dumping image ~A~%" image-name)
(ccl:save-application image-name))
(defun dump-image (&optional (image-name "bknr-sbcl.image"))
(format t "~&;;; --- dumping image ~A~%" image-name)
(sb-ext:save-lisp-and-die "bknr-sbcl.image"))
;;; setup asdf:*central-registry*
(setup-registry "./")
;; clean up here, offline hack
(setup-registry (merge-pathnames #P"ediware/" (user-homedir-pathname)))
;;; load bos project
(asdf:oos 'asdf:load-op :bos.web)
(defvar *sbcl-home* (sb-int:sbcl-homedir-pathname))
(defun ensure-sbcl-home ()
(sb-posix:putenv (format nil "SBCL_HOME=~a" *sbcl-home*)))
(defun env-ascii-check ()
(assert (block top
(dolist (string (posix-environ) t)
(loop for ch across string
unless (< 0 (char-code ch) 128)
do (return-from top nil))))
"We will have a problem if your environment contains anything else than ASCII characters.~
~%So I'd like to enforce this here."))
(defun start (&key (swank-port 4005))
(sb-alien:extern-alien "disable_lossage_handler" (function sb-alien:void)))
;; check for changes that are not yet in the core
(asdf:oos 'asdf:load-op :bos.web)
(setf swank::*log-output* nil)
(mapcar #'cl-gd::load-foreign-library ; for now...
(format t "BOS Online-System~%")
;; slime
(eval (read-from-string (format nil "(progn (swank-loader::init) (swank:create-server :port ~D :dont-close t))" swank-port)))
;; start the bos server
(apply #'bos.m2::reinit (read-configuration "m2.rc"))
(apply #'bos.web::init (read-configuration "web.rc"))
#+(and cmu mp)
Jump to Line
Something went wrong with that request. Please try again.