From: Sam S. <sd...@gn...> - 2000-03-03 17:11:52
|
I would like to restate the problem: 1. `eval-when' around `require' is necessary because otherwise clisp complains about non-existing packages (e.g. package X is defined in x.lsp and y.lsp requires x.lsp and uses symbol X:Y, if (require :x) is not eval-when (compile eval load), clisp cannot even compile the file). 2. if y.lsp requres x.lsp; and z.lsp requires x.lsp and y.lsp, then loading z.lsp will load x.lsp TWICE. this is when using the current defsystem, which, apparently, redefines provide/require. -- Sam Steingold (http://www.podval.org/~sds) Micros**t is not the answer. Micros**t is a question, and the answer is Linux, (http://www.linux.org) the choice of the GNU (http://www.gnu.org) generation. Yeah, yeah, I love cats too... wanna trade recipes? |
From: Craig B. <cr...@re...> - 2000-03-03 18:46:05
|
Sam Steingold <sd...@gn...> writes: > I would like to restate the problem: > > 1. `eval-when' around `require' is necessary because otherwise clisp > complains about non-existing packages (e.g. package X is defined in > x.lsp and y.lsp requires x.lsp and uses symbol X:Y, if (require :x) > is not eval-when (compile eval load), clisp cannot even compile the > file). > > 2. if y.lsp requres x.lsp; and z.lsp requires x.lsp and y.lsp, then > loading z.lsp will load x.lsp TWICE. > > this is when using the current defsystem, which, apparently, redefines > provide/require. You can make `provide' and `require' macros which expand into the proper `eval-when' form. I had to do something similiar when whacking on the readtable to add support for an embedded SQL syntax. -- Craig Brozefsky <cr...@re...> Free Scheme/Lisp Software http://www.red-bean.com/~craig "Hiding like thieves in the night from life, illusions of oasis making you look twice. -- Mos Def and Talib Kweli |
From: Bruno H. <ha...@il...> - 2000-03-03 19:29:26
|
Sam writes: > 1. `eval-when' around `require' is necessary because otherwise clisp > complains about non-existing packages (e.g. package X is defined in > x.lsp and y.lsp requires x.lsp and uses symbol X:Y, if (require :x) > is not eval-when (compile eval load), clisp cannot even compile the > file). This would be a bug in clisp. I cannot reproduce it. Followup to cli...@li.... Bruno |
From: Sam S. <sd...@gn...> - 2000-03-03 22:32:04
|
>>>> In message <200...@ob...> >>>> On the subject of "Re: provide/require and `eval-when'" >>>> Sent on Fri Mar 03 14:28:50 EST 2000 >>>> Honorable Bruno Haible <ha...@il...> writes: >> Sam writes: >> >> > 1. `eval-when' around `require' is necessary because otherwise clisp >> > complains about non-existing packages (e.g. package X is defined in >> > x.lsp and y.lsp requires x.lsp and uses symbol X:Y, if (require :x) >> > is not eval-when (compile eval load), clisp cannot even compile the >> > file). >> >> This would be a bug in clisp. I cannot reproduce it. $ cd clocc $ cvs update $ cd src/cllib edit url.lsp not to have `eval-when' around require make sure that your clisp has the current defystem in it (I just modified it not to redefine provide/require in clisp) $ make system ... Compiling file /usr/local/src/clocc/src/cllib/url.lsp ... *** - TYPEP: invalid type specification SOCKET $ if you put eval-when around require :net, you get $ make system ... Compilation of file /usr/local/src/clocc/src/cllib/url.lsp is finished. 0 errors, 0 warnings The following functions were used but not defined: URL-CONSTITUENT-P WITH-TIMEOUT TIMEOUT SLEEP-MESG URL-GET-HOST URL-GET-PORT OPEN-SOCKET-RETRY URL-OPEN-HTTP URL-ASK URL-LOGIN-FTP URL-PATH-FILE OPEN-URL FTP-PARSE-SEXTUPLE URL-PATH-DIR FTP-GET-PASSIVE-SOCKET URL-ETA SOCKET-TO-FILE FTP-GET-FILE URL-DUMP-TO-DOT STRING->ARTICLE URL-TIME RUN-PROG URL-FTP-GET URL-GET-NEWS DUMP-URL ;; Loading file /usr/local/src/clocc/src/cllib/url.fas ... ;; Loading file /usr/local/src/clocc/src/cllib/fileio.fas ... ;; Loading of file /usr/local/src/clocc/src/cllib/fileio.fas is finished. ;; Loading file /usr/local/src/clocc/src/port/shell.fas ... ** - Continuable Error exporting RUN-PROG from #<PACKAGE PORT> produces a name conflict with CLLIB::RUN-PROG from #<PACKAGE CLLIB>. You may choose in favour of which symbol to resolve the conflict. Which symbol should be accessible in #<PACKAGE CLLIB> ? Please choose: 1 -- the symbol to export, RUN-PROG 2 -- the old symbol, CLLIB::RUN-PROG >> i.e., when compiling url.lsp it did not actually load the required files. >> Followup to cli...@li.... I am not sure this is a clisp bug... -- Sam Steingold (http://www.podval.org/~sds) Micros**t is not the answer. Micros**t is a question, and the answer is Linux, (http://www.linux.org) the choice of the GNU (http://www.gnu.org) generation. Just because you're paranoid doesn't mean they AREN'T after you. |
From: Sam S. <sd...@gn...> - 2000-03-03 20:13:41
|
>>>> In message <87g...@pi...> >>>> On the subject of "Re: provide/require and `eval-when'" >>>> Sent on Fri Mar 03 14:01:43 EST 2000 >>>> Honorable Craig Brozefsky <cr...@re...> writes: >> >> You can make `provide' and `require' macros which expand into the >> proper `eval-when' form. I had to do something similiar when >> whacking on the readtable to add support for an embedded SQL syntax. how is this better than eval-when? -- Sam Steingold (http://www.podval.org/~sds) Micros**t is not the answer. Micros**t is a question, and the answer is Linux, (http://www.linux.org) the choice of the GNU (http://www.gnu.org) generation. Perl: all stupidities of UNIX in one. |
From: Bruno H. <ha...@il...> - 2000-03-03 21:26:29
|
Sam writes: > this is a problem with the way *defsystem* redefined provide/require! Oops, I missed the last sentence of your mail. > >> You can make `provide' and `require' macros which expand into the > >> proper `eval-when' form. I had to do something similiar when > >> whacking on the readtable to add support for an embedded SQL syntax. > > how is this better than eval-when? `eval-when' is needed on some CL implementations only. By defining (defmacro mk:require (&rest args) #+some-platforms `(eval-when (load eval compile) (require ,@args)) #+clisp `(require ,@args)) you avoid the "loading z.lsp will load x.lsp TWICE" problem. Bruno |
From: Sam S. <sd...@gn...> - 2000-03-03 20:15:28
|
I am sorry - I did not make it quite clear: this is a problem with the way *defsystem* redefined provide/require! >>>> In message <u66...@ks...> >>>> On the subject of "provide/require and `eval-when'" >>>> Sent on Fri Mar 03 12:17:52 EST 2000 >>>> Honorable Sam Steingold <sd...@gn...> writes: >> I would like to restate the problem: >> >> 1. `eval-when' around `require' is necessary because otherwise clisp >> complains about non-existing packages (e.g. package X is defined in >> x.lsp and y.lsp requires x.lsp and uses symbol X:Y, if (require :x) >> is not eval-when (compile eval load), clisp cannot even compile the >> file). >> >> 2. if y.lsp requres x.lsp; and z.lsp requires x.lsp and y.lsp, then >> loading z.lsp will load x.lsp TWICE. >> >> this is when using the current defsystem, which, apparently, redefines >> provide/require. -- Sam Steingold (http://www.podval.org/~sds) Micros**t is not the answer. Micros**t is a question, and the answer is Linux, (http://www.linux.org) the choice of the GNU (http://www.gnu.org) generation. Binaries die but source code lives forever. |
From: Stefan <st...@hi...> - 2000-03-07 21:26:45
|
Hi everyone, currently and for the next weeks I am rather busy with applying for my next job, (and maybe moving to another town, and...) so the next couple of weeks the DEFSYSTEM docu is at > nohup nice +19 write_DEFSYSTEM_docu > kill -STOP write_DEFSYSTEM_docu :-/ I can issue the "kill -CONT" command maybe in a month or so... Sorry!! Bye, Stefan |