From: Hallvard Traetteberg
Subject: Extending the emacs interface to Allegro Common Lisp
Date: 
Message-ID: <3370420F.7A2@idt.unit.no>
Hi,

I'd been using Allegro Common Lisp 4.3 for some time, and found myself
wanting my own emacs menu for running functions on the Allegro CL side.
So I've made some simple functions and macros for doing just that.
Four parts are needed
1. A macro definition, define-emacs-menu-function, to load into ACL, for
   defining functions that  you want to access through emacs menus or
lisp code
2. A macro definition, define-emacs-menu-function, to load into emacs,
   for defining stubs for the functions that you want to access through
   emacs menus or lisp code
3. Use of the above mentioned define-emacs-menu-function macro to define
   the functions. The macro forms are loaded into both emacs and ACL,
since
   the macro syntax is the same, the same definitions may be used.
4. Code for adding menu items in emacs

Hope this will be useful for others! Email me if you experience
difficulties.

;; 1. load into Allegro Common Lisp

(defmacro define-emacs-menu-function (name . args)
  (let ((form-args (mapcar #'(lambda (arg) (if (listp arg) (car arg)
arg)) args)))
	 `(progn
		 (defclass ,name (lep:compute-reply-session) ())
		 (defmethod lep::compute-reply ((starter ,name) &key . ,args)
			(mp:process-run-function ,(string name) #',name . ,form-args)
			(values (princ-to-string (list ',name . ,form-args))))
		 )
	 ))

;; define functions in ACL, that should be accessible from emacs, e.g.
;; (define-emacs-menu-function hui::start-ui top-object)

;; 2. load into emacs, e.g. put in .emacs

(defun define-emacs-menu-function-fun (name args)
  (let* ((form-args (mapcar #'(lambda (arg) (if (listp arg) (car arg)
arg)) args))
			(key-args  (mapcan #'(lambda (arg) `(,(make-symbol (format ":%s"
arg)) ,arg)) form-args)))
	 `(defun ,name ,args
		 (interactive)
		 (let ((msg (format "%s ..." '(,name . ,form-args))))
			;; (fi::note-background-request compilep)
			(message "%s" msg)
			(fi::make-request
				 (,name . ,key-args)
			  (() (text) (fi:show-some-text nil text))
			  ;; Error continuation
			  (() (error) (fi::show-error-text "error during apropos of %s: %s"
string error))
			  )
			))
	 ))

(defmacro define-emacs-menu-function (name &rest args)
  (define-emacs-menu-function-fun name args))

;; 3. define functions in emacs and ACL, that should give access from
emacs
;; to function in ACL, e.g.
;; (define-emacs-menu-function hui::start-ui top-object)
;; hui::start-ui should be defined in ACL, taking top-object as
argument.

;; 4. Add to emacs menu:

;; define shorthand functions
(defun not-ok () (fi::connection-not-open))
(defun ok     () (fi::connection-open))

(add-menu nil "HUI"
 '(["Start Lisp" (fi:common-lisp "*common-lisp*"
"/home/pil/a/hal/lisp/lisp-projects/CLOS-UI-model/"
									"cl" () "vier") (not-ok)]
   ["Load" (fi:load-file
"/home/pil/a/hal/lisp/lisp-projects/CLOS-UI-model/clim-UI-model/load.lisp")
						  (ok)]
   ("Start UI with"
    ["NIL"               (hui::start-ui 'nil)                    (ok)]
    ["*GLOBAL-VIDJETS*"  (hui::start-ui 'hui::*global-vidjets*)  (ok)]
    ["*LIBRARY-VIDJETS*" (hui::start-ui 'hui::*library-vidjets*) (ok)]
    ["*CLIPBOARD*"       (hui::start-ui 'hui::*clipboard*)       (ok)]
   ))
 "Help")
From: Imran
Subject: Genetic Programming Scheduling
Date: 
Message-ID: <3371B9FC.41C67EA6@ic.ac.uk>
Does anyone know how I can solve Scheduling problems usidng Genetic
Programming in Lisp (or other languages).

Any ideas on this and perhaps on applying Koza's GP kernel to solve
schedule problems would be greatly appreciated.


thanks.