Running Unix programs under LispOS

Rainer Joswig joswig@lavielle.com
Sat, 3 May 1997 00:54:05 +0200


At 1:20 Uhr -0500 2.5.1997, cwg@deepeddy.com wrote:


>I may be talking through my hat here, but it seems plausible to me to
support 

>a mini-unix environment *within* our lisp universe, but keep it
isolated from 

>the world that we're running.  What I imagine is a subsystem which can
run ELF 

>binaries in their own protected memory.  You might write lisp code
that looks 

>something like this:

>

>(let ((browser (find-elf-binary "netscape"))

>   (funcall browser "http://www.deepeddy.com")))


On my Mac a can talk to other programs. This little code snippet

lets the browser (Netscape Navigator, MSIE, or whatever

you choose) open an URL:


(defun open-url (url &key no-cache window (browser *browser-creator*)
activate-p)

  (ensure-application-active browser)

  (when (find-process-with-signature browser)

    (with-aedescs (appleevent target reply)

      (create-signature-target target browser)

      (create-appleevent appleevent :|WWW!| :|OURL| target)

      (ae-put-parameter-char appleevent #$keyDirectObject url)

      (when no-cache

        (ae-put-parameter-longinteger appleevent :|FLGS| #x1))

      (when window

        (ae-put-parameter-longinteger appleevent :|WIND| window))

      (send-appleevent appleevent reply))

    (when activate-p (select-process browser))))


Applications expose some of their inner workings as objects you

can send messages to.


This is Macintosh Common Lisp.





Rainer Joswig, Lavielle EDV Systemberatung GmbH & Co, Lotharstrasse 2b,
D22041

Hamburg, Tel: +49 40 658088, Fax: +49 40 65808-202,

Email: joswig@lavielle.com , WWW: http://www.lavielle.com/~joswig/