Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

mysql simple connector

2 views
Skip to first unread message

artob...@yahoo.com

unread,
Dec 25, 2009, 11:37:13 AM12/25/09
to
Maybe someone will be interested in this code. Here is a small and
simple mysql driver for common lisp, that is access to mysql via the
mysql client/server protocol. No third-party libraries are needed
(i.e. mysqllib), no ffi calls, no additional asdf libraries. Right now
it is written for lispworks' cl (easy to port to other cl
implementations). I wrote it in my spare time as an exercise of
learning cl and don't want to perish it forever.

http://paste.lisp.org/display/92632

Scott Burson

unread,
Dec 26, 2009, 7:09:42 PM12/26/09
to
On Dec 25, 8:37 am, artobre...@yahoo.com wrote:
> Maybe someone will be interested in this code. Here is a small and
> simple mysql driver for common lisp, that is access to mysql via the
> mysql client/server protocol.

Cool! I might have a use for this. Thanks!

-- Scott

Art

unread,
Dec 27, 2009, 12:55:30 PM12/27/09
to
I found a minor bug in my code (not critical at all) :)

Function put-int32-to-array. The last line in that function should be
(setf (aref array (+ position 3)) (logand #xFF (ash int -24))))

i.e. (+ position 3)

the fixed version is on my web site at www.obrezan.com/lisp/mysql.lisp

Ariel Badichi

unread,
Dec 27, 2009, 3:26:51 PM12/27/09
to
On Dec 27, 7:55 pm, Art <artobre...@yahoo.com> wrote:
> I found a minor bug in my code (not critical at all) :)
>
> Function put-int32-to-array. The last line in that function should be
> (setf (aref array (+ position 3)) (logand #xFF (ash int -24))))
>
> i.e. (+ position 3)
>
> the fixed version is on my web site atwww.obrezan.com/lisp/mysql.lisp
>

Skimming it, it occurred to me that there might be another bug:
formatting the SHA1 hash incorrectly. Use ~8,'0X rather than ~X.

Art

unread,
Dec 27, 2009, 5:55:39 PM12/27/09
to
Thanks!

Pascal J. Bourguignon

unread,
Dec 27, 2009, 7:50:24 PM12/27/09
to
Art <artob...@yahoo.com> writes:

>> Skimming it, it occurred to me that there might be another bug:
>> formatting the SHA1 hash incorrectly. �Use ~8,'0X rather than ~X.
>

> Thanks!

(let ((digest '(1 2 3 4 5)))
(format nil "~{~8,'0X~}" digest))
--> "0000000100000002000000030000000400000005"


--
__Pascal Bourguignon__ http://www.informatimago.com/

0 new messages