From: Sam S. <sd...@gn...> - 2002-06-28 20:29:56
|
> * In message <m2y...@be...> > * On the subject of "building clisp on powerpc with ffi" > * Sent on 28 Jun 2002 17:46:52 +0200 > * Honorable Marco Baringer <em...@be...> writes: > > after having built them both i tried (just to see what would happen) > to build clisp with the queens module. CLISP builds without errors and > produces queens/callqueens.m.c however when ./lisprun -M lispinit > -norc -x '(LISP::QUEENS 2)' gives me an undefined function > error. running clisp-link manually produces no errors, it as if > everything seems ot compile fine but then the function isn't there. shouldn't it be USER::QUEENS? > MODULES > or > WHERE SHOULD CLISP OS INTERFACE GO?: > > while trying to provide os/fs interface functions to CLISP > (unlink/opendir/chmod/dup/etc.) i wanted to ask: what is the advantage > of using modules as opposed to adding .d files in CLISP's src dir? if you want something similar to modules/bindings/linuxlibc6, you should go for modules. if you want something portable, like RESOLVE-HOST-IPADDR, you put this into the POSIX package. The idea is that if you are working just with your own platform, then you use modules since it's the fastest option. If you want a POSIX system call to be exported across all platforms that CLISP supports, you put it into the POSIX package and think of a "Lispy interface" - trying to use the existing CL functions. E.g., CL has the DIRECTORY function which should make opendir() unnecessary, it has DELETE-FILE, which should make unlink() unnecessary. I don't know what dup is for (I did read the man page, but I see no use in it), and chmod() makes no sense on non-unix systems. > as far as i can tell: > > 1) both require me to rebuild clisp nope. changing the module does not require CLISP rebuild - just module rebuild and full image re-dump. this is much faster and easier. > 2) modules allow me to forgo writing any c (or d) code, but there > always seems to be some wrapper code so i don't know if this is a > big advantage. > > 3) build "directly" into clisp requires me to hand edit constsym.d > and friends (btw: why can't these be automatically generated from > the source code?), while using modules i can just use the > DEFMODULE and DEFUN macros. parts of constsym.d and subr.d/subrkw.d can be generated, yes, but then they will have to depend on every *.d file, and since lispbibl.d depends on them, this would mean that any change in any *.d file will require full rebuild of all *.o files. > i ask because since ffi doesn't work on my computer and i'd like to > add some os interface functions to CLISP, but i don't know if i should > wait for ffcall to be ported to powerpc or add them in in the posix*.d > and unix.d files (as i am currently doing) don't wait - do it yourself! :-) ask the Fink people for help - they must be quite knowledgeable. -- Sam Steingold (http://www.podval.org/~sds) running RedHat7.2 GNU/Linux <http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/> <http://www.mideasttruth.com/> <http://www.palestine-central.com/links.html> Bus error -- driver executed. |