From: Frank Goenninger DG1SBG
Subject: UUID Generation: Done somewhere already?
Date: 
Message-ID: <m2fyxpbulp.fsf@pcsde001.de.goenninger.net>
Dear c.l.l. readers:

I am currently looking for something that ought to be done
already by someone (googling for it just revealed nothing
usable - at least not in CL). Oh, btw, this is not any
homework ;-)

I am looking for an example of a UUID generation in any
Common Lisp implementation out there that does *not*
call a library via FFI.

I have the UUID spec at hand but, well, I'm lazy ;-)

Thanks for sharing this bit of code!

Frank

From: jame
Subject: Re: UUID Generation: Done somewhere already?
Date: 
Message-ID: <pan.2005.04.17.16.58.06.139555@mails.tsinghua.edu.cn>
Is this what you need?
http://lists.gnu.org/archive/html/help-gnu-emacs/2004-02/msg00309.html

�� Sun, 17 Apr 2005 11:50:10 +0200��Frank Goenninger DG1SBG���

> Dear c.l.l. readers:
> 
> I am currently looking for something that ought to be done
> already by someone (googling for it just revealed nothing
> usable - at least not in CL). Oh, btw, this is not any
> homework ;-)
> 
> I am looking for an example of a UUID generation in any
> Common Lisp implementation out there that does *not*
> call a library via FFI.
> 
> I have the UUID spec at hand but, well, I'm lazy ;-)
> 
> Thanks for sharing this bit of code!
> 
> Frank
From: Frank Goenninger DG1SBG
Subject: Re: UUID Generation: Done somewhere already?
Date: 
Message-ID: <m2wtqx5g58.fsf@pcsde001.local>
jame <····@mails.tsinghua.edu.cn> writes:

> Is this what you need?
> http://lists.gnu.org/archive/html/help-gnu-emacs/2004-02/msg00309.html

Actually, no. But thanks for pointing out. I should have stated more
clearly that I am looking for a CL version.

>
> 于 Sun, 17 Apr 2005 11:50:10 +0200,Frank Goenninger DG1SBG写到:
>
>> Dear c.l.l. readers:
>> 
>> I am currently looking for something that ought to be done
>> already by someone (googling for it just revealed nothing
>> usable - at least not in CL). Oh, btw, this is not any
>> homework ;-)
>> 
>> I am looking for an example of a UUID generation in any
>> Common Lisp implementation out there that does *not*
>> call a library via FFI.
>> 
>> I have the UUID spec at hand but, well, I'm lazy ;-)
>> 
>> Thanks for sharing this bit of code!
>> 
>> Frank

Cheers,
    Frank
From: Wade Humeniuk
Subject: Re: UUID Generation: Done somewhere already?
Date: 
Message-ID: <VYQ8e.33699$yV3.2877@clgrps12>
Frank Goenninger DG1SBG wrote:
> Dear c.l.l. readers:
> 
> I am currently looking for something that ought to be done
> already by someone (googling for it just revealed nothing
> usable - at least not in CL). Oh, btw, this is not any
> homework ;-)
> 
> I am looking for an example of a UUID generation in any
> Common Lisp implementation out there that does *not*
> call a library via FFI.
> 
> I have the UUID spec at hand but, well, I'm lazy ;-)
> 
> Thanks for sharing this bit of code!

Here is a time based one I just wrote, not thoroughy tested and will
only work in its current form on LispWorks For Windows.
(It does not support non-volatile storage of
vars to generate UUIDs, though this should not be a real problem,
unless one sets the system clock backwards between Lisp
processes.)

This should give you a place to start.

http://www3.telus.net/public/whumeniu/uuid.lisp

UUID 28 > (setf uuid (genuuid))
260305377898619593521142403988498528186

UUID 29 > (setf suuid (uuid-string uuid))
"c3d4fe00-b023-81d9-2842-00010331b7ba"

UUID 30 > (setf auuid (uuid-unsigned-byte-array uuid))
#(195 212 254 0 176 35 129 217 40 66 0 1 3 49 183 186)

UUID 31 > (format t "~X" auuid)
#(C3 D4 FE 0 B0 23 81 D9 28 42 0 1 3 31 B7 BA)
NIL

UUID 32 > (format t "~X" uuid)
C3D4FE00B02381D9284200010331B7BA
NIL


Wade