Marcin Tustin <Marcint@GUeswhatthisbitisfor.mindless.com> wrote:
+---------------
| I've been searching for a couple of days for portable support for
| (posix-style) process forking for common lisp (or at least free
| implementations thereof).
+---------------
What did you mean by "portable" support? Most CL implementations have
such a thing, but because it's not part of the CL standard they tend
to have idiosyncratic names, e.g., CMUCL calls it UNIX-FORK (in the UNIX
package). And even if an implementation. doesn't have "fork" per se, they
usually have some form of "spawn" (fork+exec), which is usually what
you really want anyway. E.g., CLISP has RUN-PROGRAM & RUN-SHELL-COMMAND
[fork()/execlp() & system(), respectively].
But if you're trying to do something that's supported differently
in multiple implementations, just put a wrapper function around it
and use feature tests in the wrapper's definition.
+---------------
| Does scheme have such support?
+---------------
Most Scheme *implementations*, yes, but for the same reason as CL
[it's not in the standard] the functions & features are idiosyncratic.
+---------------
| How easy would it be to port my couple of hundred lines of CLOS code
| ... to scheme?
+---------------
Not worth the pain, IMHO. Scheme and CL are very *different* animals,
despite some surface similarity of syntax, and need to be approached
separately on the merits of each. If you already are using CLOS (and
finding it comfortable), just stick with CL -- especially if you're
already using CLOS's multiple-inheritance & multimethods [dispatching
on the types of multiple arguments].
On Unix, try CMUCL -- its has extensive Unix support. On Windows, try
Corman Lisp or one of the free versions of ACL or LWW. Yes, you may
have to use different implementations on different platforms, but
since CLOS *is* part of the Common Lisp standard, your code can esaily
be made very portable (perhaps modulo a few feature tests, which you
can & should isolate in a library), much more so than the implementations
themselves.
Oh, yes, there are Schemes with object systems, very useful ones, but
(again, because it's not part of the the standard) they tend to vary
all over the place in syntax & features provided in the object system.
So in the Scheme case it's more important to pick just one, one that
runs on the platforms you care about. E.g., PLT MzScheme/MrEd/DrScheme
run on Unix, Win*, NT*, MacOS, etc., but their object system is single-
inheritance (though with a certain style of "mixins") and single-dispatch,
(and has no MOP, if that matters to you).
-Rob
-----
Rob Warnock, 31-2-510 <rpw3@sgi.com>
SGI Network Engineering <http://reality.sgi.com/rpw3/> [until 8/15]
1600 Amphitheatre Pkwy. Phone: 650-933-1673
Mountain View, CA 94043 PP-ASEL-IA
[Note: aaanalyst@sgi.com and zedwatch@sgi.com aren't for humans ]