[pro] Are you an Imager or a Filer?

Nick Levine ndl at ravenbrook.com
Fri Jan 21 11:37:02 UTC 2011


   From: =?ISO-8859-1?Q?Lu=EDs_Oliveira?= <luismbo at gmail.com>
   Date: Fri, 21 Jan 2011 10:53:51 +0000

   Hello Nick,

   On Fri, Jan 21, 2011 at 10:03 AM, Nick Levine <ndl at ravenbrook.com> wrote:
   > Development uses images which are primed to check that the system
   > is up to date (and to correct that as appropriate) on
   > startup. That way we get rapid startup but everything compiled up
   > to date.

   Can you describe in more detail how that works?

Sure. The detail is a bit mucky and probably unilluminating, because I
postpone the compilation until after the LW GUI had finished firing
up. (If I weren't so picky, I could hand a restart-function to
save-image.) Here are the excerpts from our build script which drive
this:

(defun application-load (&key compile-only)
  (let ((defsys (truename (relative-path "code/defsys.lisp"))))
    (load defsys))
  (compile-system "PROFILER-PLUS" :load (not compile-only)
                  :force (find "-force" sys:*line-arguments-list* :test 'string=)))

(application-load)

[...]

(define-action "Initialize LispWorks Tools" "Reload PPlus"
  (lambda (screen)
    (declare (ignore screen))
    (when-let (listener (mp:find-process-from-name "Listener 1"))
      (mp:process-interrupt listener
                            (lambda ()
                              (application-load)
                              ;; Now activate the app.
                              (pp::activate nil)
                              ))))
  :after "Run the environment start up functions")

LispWorks has these beasts called "action lists": hooks by another
name. What the above is saying is: while initializing the LW tools,
after running LW's internal startup functions, execute this bit of
code which as you see recompiles the system (maybe forcing it,
depending on the -force line argument) and then activates the
application so I can play with it as I hack.

- nick




More information about the pro mailing list