<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://panoptic.com/mediawiki/aolserver/index.php?action=history&amp;feed=atom&amp;title=Nsuuid</id>
	<title>Nsuuid - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://panoptic.com/mediawiki/aolserver/index.php?action=history&amp;feed=atom&amp;title=Nsuuid"/>
	<link rel="alternate" type="text/html" href="https://panoptic.com/mediawiki/aolserver/index.php?title=Nsuuid&amp;action=history"/>
	<updated>2026-04-15T23:24:35Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.2</generator>
	<entry>
		<id>https://panoptic.com/mediawiki/aolserver/index.php?title=Nsuuid&amp;diff=2804&amp;oldid=prev</id>
		<title>WikiSysop: imported from WiKit id 1370</title>
		<link rel="alternate" type="text/html" href="https://panoptic.com/mediawiki/aolserver/index.php?title=Nsuuid&amp;diff=2804&amp;oldid=prev"/>
		<updated>2004-10-08T13:55:17Z</updated>

		<summary type="html">&lt;p&gt;imported from WiKit id 1370&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;'''Universally Unique IDentifiers (UUIDs)'''&lt;br /&gt;
&lt;br /&gt;
[[John Havard]] implemented [http://www.havpyro.com/nsuuid.tar.gz nsuuid], a C module which uses libuuid1 (part of e2fsprogs).  It may be possible to link against OSSP's uuid implementation.  http://www.ossp.org/pkg/lib/uuid/&lt;br /&gt;
&lt;br /&gt;
[[Dossy]] provides a simple pure-Tcl solution here with [[RHS]]'s help:&lt;br /&gt;
&lt;br /&gt;
 #&lt;br /&gt;
 # ns_uuid_v4 --&lt;br /&gt;
 #&lt;br /&gt;
 # This generates Version 4 &amp;quot;random&amp;quot; UUIDs.&lt;br /&gt;
 #&lt;br /&gt;
 # http://www.ietf.org/internet-drafts/draft-mealling-uuid-urn-03.txt&lt;br /&gt;
 #&lt;br /&gt;
 #    The algorithm is as follows:&lt;br /&gt;
 #    o  Set the two most significant bits (bits six and seven) of the&lt;br /&gt;
 #       clock_seq_hi_and_reserved to zero and one, respectively.&lt;br /&gt;
 #    o  Set the four most significant bits (bits 12 through 15) of the&lt;br /&gt;
 #       time_hi_and_version field to the four-bit version number from&lt;br /&gt;
 #       Section 4.1.3.&lt;br /&gt;
 #    o  Set all the other bits to randomly (or pseudo-randomly) chosen&lt;br /&gt;
 #       values.&lt;br /&gt;
 #&lt;br /&gt;
 &lt;br /&gt;
 proc ns_uuid_v4 {} {&lt;br /&gt;
     ns_uuid_gen [[binary format &amp;quot;IIII&amp;quot; \&lt;br /&gt;
         [expr {wide(0x0ffffffff*rand())}]] \&lt;br /&gt;
         [[expr {wide(0x0ffffffff*rand()) &amp;amp; 0xffff4fff}]] \&lt;br /&gt;
         [[expr {wide(0x0ffffffff*rand()) &amp;amp; 0x7fffffff}]] \&lt;br /&gt;
         [[expr {wide(0x0ffffffff*rand())}]]]&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 proc ns_uuid_gen {bits} {&lt;br /&gt;
     binary scan $bits &amp;quot;H8 H4 H4 H4 H12&amp;quot; a b c d e&lt;br /&gt;
     return &amp;quot;$a-$b-$c-$d-$e&amp;quot;&lt;br /&gt;
 }&lt;/div&gt;</summary>
		<author><name>WikiSysop</name></author>
		
	</entry>
</feed>