Subject: [clisp-list] clisp, defsystem and UncommonSQL

From: Saul Hazledine <[email-masked]>
Date: Sun Dec 30 04:19:01 2001

Hello,
  I am a perl programmer who is learning lisp. I am using clisp on debian (woody) and am enjoying the language so far and am blown away by topend (what a great way to develop functions). I also like the simplicity of clisp and the interaction with my chosen editor (vim). I have written a few simple functions but want to get on to doing something more useful.

I want to connect to mysql using the UncommonSQL system and have installed this without any trouble (thanks to the lisp-controller package that debian uses). However, I hit problems when I try to use this system. For instance (when running as root to compile up the system) ...

;; Loading file /etc/clisprc ...
;; Loading of file /etc/clisprc is finished.
[1]> (load "~saul/.clisprc.lisp")
;; Loading file /home/saul/.clisprc.lisp ...
;; Loading of file /home/saul/.clisprc.lisp is finished.
T
[2]> (load "UncommonSQL.system")
;; Loading file /usr/share/common-lisp/repositories/onshore/uncommonsql/UncommonSQL.system ...
;; Loading of file /usr/share/common-lisp/repositories/onshore/uncommonsql/UncommonSQL.system is finished.
T
[3]> (require "UncommonSQL")
;      - Binary file /usr/lib/common-lisp/clisp/uncommonsql/sql/dbms-interface.fas is old or does not exist. 
;        Compile (and load) source file /usr/share/common-lisp/source/uncommonsql/sql/dbms-interface.lisp instead? y
dbms-interface.lisp instead? y
;      - Should I bother you if this happens again? n
n
;      - Should I compile and load or not? y
y

*** - DEFGENERIC DATABASE-LIST-TABLES: No initializations are allowed in a generic function lambda-list: (DATABASE &KEY (SYSTEM-TABLES NIL))

My question is, am I doing something foolish or is there a problem with UncommonSQL when used with clisp? Thanks for any help (and have a successful New Year).

Saul Hazledine 

_____________________________________________________________
Sign up for a 6mb FREE email from     
http://www.spl.at

---

From: Sam Steingold <[email-masked]>
Date: Tue Jan 1 20:37:01 2002

> * In message <[email-masked]>
> * On the subject of "[clisp-list] clisp, defsystem and UncommonSQL"
> * Sent on Sun, 30 Dec 2001 04:18:17 -0800 (PST)
> * Honorable Saul Hazledine <[email-masked]> writes:
>
>   I am a perl programmer who is learning lisp.

welcome!

> My question is, am I doing something foolish or is there a problem
> with UncommonSQL when used with clisp? Thanks for any help (and have a
> successful New Year).

this indicates a bug in the code you are loading.
the form

(defgeneric database-list-tables (DATABASE &KEY (SYSTEM-TABLES NIL))
  ...)

is illegal in ANSI Common Lisp:
<http://www.lisp.org/HyperSpec/Body/sec_3-4-2.html>
3.4.2 Generic Function Lambda Lists
...
Optional and keyword arguments

Optional parameters and keyword parameters may not have default initial
value forms nor use supplied-p parameters.

...

a quick fix for you is to edit the file and replace the above form with

(defgeneric database-list-tables (DATABASE &KEY SYSTEM-TABLES)
  ...)

you should definitely report this bug to the authors of the program you
are using!

-- 
Sam Steingold (http://www.podval.org/~sds)
Keep Jerusalem united! <http://www.onejerusalem.org/Petition.asp>
Read, think and remember! <http://www.iris.org.il> <http://www.memri.org/>
Warning! Dates in calendar are closer than they appear!