...
 
......@@ -14,15 +14,18 @@ Installation and Running
------------------------------------------
This program includes a web interface. In a common lisp environment with quicklisp
installed, to run the program.
1. set the *install-dir* variable below to the root directory you'd like hunchentoot to use to process web requests. By default this will be the directory from which you started lisp (*default-pathname-defaults*).
2. change the uri "/lisp/ttablepost" to "ttablepost" if you're running hunchentoot as
standalone without a proxy.
2. call (load "kmapper.lisp") from the REPL, and navigate to localhost:8084
in a web browser.
1. cd to the project root
2. call (load "kmapper.lisp") from the REPL
3. call (startup)
4. navigate to localhost:8084 in a web browser.
Quicklisp will handle installing the dependencies. If you don't have quicklisp, google
quicklisp and follow the very easy instructions to install that.
Alternatively, to run from the command line in main-thread blocking mode you can do the following
sbcl --load "kmapper.lisp" --eval '(kmapweb:startup t)'
To use the REPL plain text interface:
1. switch to the package :kmapweb
(in-package :kmapweb)
......
......@@ -4,11 +4,13 @@
;;;;
;;;; This program includes a web interface. In a common lisp environment with quicklisp
;;;; installed, running the program should be as simple
;;;; 1. set the *install-dir* variable below to the directory in which you downloaded
;;;; the project.
;;;; 2. calling (load "kmapper.lisp") from the REPL, and navigating to localhost:8084
;;;; in a web browser.
;;;; Quicklisp will handle installing the dependencies "
;;;; 1. cd to the project root
;;;; 2. call (load "kmapper.lisp") from the REPL
;;;; 3. call (startup)
;;;; 4. navigate to localhost:8084 in a web browser.
;;;;
;;;; alternatively, to run from the command line in main-thread blocking mode you can do the following
;;;; sbcl --load "kmapper.lisp" --eval '(kmapweb:startup t)'
;;;;
;;;; To use the REPL plain text interface:
;;;; 1. switch to the package :kmapweb
......@@ -36,8 +38,13 @@
(ql:quickload "cl-who")
(ql:quickload "hunchentoot")
(require :cl-who)
(require :hunchentoot)
(defpackage :kmapweb
(:use :common-lisp :hunchentoot :cl-who))
(:use :common-lisp :hunchentoot :cl-who)
(:export :startup)
)
(in-package :kmapweb)
;;replace this with your installation directory...
......@@ -69,7 +76,12 @@
:document-root *install-dir*
:access-log-destination *terminal-io*
:message-log-destination *terminal-io*))
(hunchentoot:start *macceptor*)
(defun startup (&optional (block-main nil))
"block-main is provided for running under daemontools or a similar process supervisor. if the main thread is available for interactive input, daemontools thinks the app has died and restarts it"
(hunchentoot:start *macceptor*)
(when block-main
(do () (())
(sleep 300))))
(defun getKMapsOnly (truthtable numinputs)
(let* ((kmapoutput (handler-case (html-create-k-maps truthtable numinputs)
......