<?xml version="1.0" encoding="utf-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Javascript UUID Function</title>
	<atom:link href="http://www.broofa.com/2008/09/javascript-uuid-function/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.broofa.com/2008/09/javascript-uuid-function/</link>
	<description>(Thoughtful musings, if you&#039;re lucky)</description>
	<lastBuildDate>Tue, 20 Jul 2010 16:43:21 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Philipp</title>
		<link>http://www.broofa.com/2008/09/javascript-uuid-function/comment-page-1/#comment-2708</link>
		<dc:creator>Philipp</dc:creator>
		<pubDate>Fri, 09 Jul 2010 14:23:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.broofa.com/blog/?p=151#comment-2708</guid>
		<description>Thank you for that.
This really help to solve a task of tracking what a user does quick and dirty :)
Best</description>
		<content:encoded><![CDATA[<p>Thank you for that.<br />
This really help to solve a task of tracking what a user does quick and dirty <img src='http://www.broofa.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
Best</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: George V. Reilly</title>
		<link>http://www.broofa.com/2008/09/javascript-uuid-function/comment-page-1/#comment-2459</link>
		<dc:creator>George V. Reilly</dc:creator>
		<pubDate>Wed, 05 May 2010 23:03:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.broofa.com/blog/?p=151#comment-2459</guid>
		<description>I didn&#039;t benchmark Bau&#039;s implementation of Math.random(), but it seems reasonable. I would expect it to be slower than most browser&#039;s native implementation of Math.random(), but that the results are higher quality. He clearly knows quite a bit of math.

His Math.seedrandom() is very slow, however, if you let it gather entropy by walking the window object: about 700ms on Firefox, 100ms on other browsers that I tried. Much better to call his seedrandom with some server-generated random string like, perhaps, a real UUID or two :)</description>
		<content:encoded><![CDATA[<p>I didn&#8217;t benchmark Bau&#8217;s implementation of Math.random(), but it seems reasonable. I would expect it to be slower than most browser&#8217;s native implementation of Math.random(), but that the results are higher quality. He clearly knows quite a bit of math.</p>
<p>His Math.seedrandom() is very slow, however, if you let it gather entropy by walking the window object: about 700ms on Firefox, 100ms on other browsers that I tried. Much better to call his seedrandom with some server-generated random string like, perhaps, a real UUID or two <img src='http://www.broofa.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Broofa</title>
		<link>http://www.broofa.com/2008/09/javascript-uuid-function/comment-page-1/#comment-2457</link>
		<dc:creator>Broofa</dc:creator>
		<pubDate>Wed, 05 May 2010 08:39:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.broofa.com/blog/?p=151#comment-2457</guid>
		<description>@George: Good catch, thanks!  I&#039;ve fixed uuidFast.

BTW, it seems like Math.random() is the biggest performance bottleneck.  Do you have any feel for how David Bau&#039;s implementation compares to the native one?

Also, is there &lt;em&gt;really&lt;/em&gt; a need for a better RNG?  I would expect the native implementations to be pretty good already.  But I don&#039;t have any concrete data for that assumption.</description>
		<content:encoded><![CDATA[<p>@George: Good catch, thanks!  I&#8217;ve fixed uuidFast.</p>
<p>BTW, it seems like Math.random() is the biggest performance bottleneck.  Do you have any feel for how David Bau&#8217;s implementation compares to the native one?</p>
<p>Also, is there <em>really</em> a need for a better RNG?  I would expect the native implementations to be pretty good already.  But I don&#8217;t have any concrete data for that assumption.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: George V. Reilly</title>
		<link>http://www.broofa.com/2008/09/javascript-uuid-function/comment-page-1/#comment-2456</link>
		<dc:creator>George V. Reilly</dc:creator>
		<pubDate>Tue, 04 May 2010 23:08:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.broofa.com/blog/?p=151#comment-2456</guid>
		<description>Math.uuidFast must set uuid[14] to &#039;4&#039; to be v4-compliant.

David Bau provides a much better, seedable random number generator at http://davidbau.com/archives/2010/01/30/random_seeds_coded_hints_and_quintillions.html

I wrote up a slightly different approach to generating UUIDs at http://blogs.cozi.com/tech/2010/04/generating-uuids-in-javascript.html</description>
		<content:encoded><![CDATA[<p>Math.uuidFast must set uuid[14] to &#8217;4&#8242; to be v4-compliant.</p>
<p>David Bau provides a much better, seedable random number generator at <a href="http://davidbau.com/archives/2010/01/30/random_seeds_coded_hints_and_quintillions.html" rel="nofollow">http://davidbau.com/archives/2010/01/30/random_seeds_coded_hints_and_quintillions.html</a></p>
<p>I wrote up a slightly different approach to generating UUIDs at <a href="http://blogs.cozi.com/tech/2010/04/generating-uuids-in-javascript.html" rel="nofollow">http://blogs.cozi.com/tech/2010/04/generating-uuids-in-javascript.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Broofa</title>
		<link>http://www.broofa.com/2008/09/javascript-uuid-function/comment-page-1/#comment-2421</link>
		<dc:creator>Broofa</dc:creator>
		<pubDate>Sun, 18 Apr 2010 04:05:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.broofa.com/blog/?p=151#comment-2421</guid>
		<description>@David

That&#039;s a really good question.  The only verbiage I see in rfc4122 about this is in section 4.4, where it says, &quot;Set all the other bits to randomly (or pseudo-randomly) chosen values.&quot;  But I don&#039;t read this as saying each bit must be generated by a unique call to a random number function.  Random # generators are &quot;in the business&quot; of creating numbers where each bit is randomly set.  So the hex values I&#039;m using are simply clusters of 4 random bits produced by the Math.random() function. 

In fact, there&#039;s a good argument  that *fewer* calls to Math.random() is better.  Pseudo-random # generators are typically evaluated based on how many #&#039;s they can produce before repeating.  So by minimizing the # of calls, we&#039;re maximizing the number of UUIDs we create before the generator begins repeating itself.</description>
		<content:encoded><![CDATA[<p>@David</p>
<p>That&#8217;s a really good question.  The only verbiage I see in rfc4122 about this is in section 4.4, where it says, &#8220;Set all the other bits to randomly (or pseudo-randomly) chosen values.&#8221;  But I don&#8217;t read this as saying each bit must be generated by a unique call to a random number function.  Random # generators are &#8220;in the business&#8221; of creating numbers where each bit is randomly set.  So the hex values I&#8217;m using are simply clusters of 4 random bits produced by the Math.random() function. </p>
<p>In fact, there&#8217;s a good argument  that *fewer* calls to Math.random() is better.  Pseudo-random # generators are typically evaluated based on how many #&#8217;s they can produce before repeating.  So by minimizing the # of calls, we&#8217;re maximizing the number of UUIDs we create before the generator begins repeating itself.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Lalonde</title>
		<link>http://www.broofa.com/2008/09/javascript-uuid-function/comment-page-1/#comment-2418</link>
		<dc:creator>David Lalonde</dc:creator>
		<pubDate>Sat, 17 Apr 2010 16:44:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.broofa.com/blog/?p=151#comment-2418</guid>
		<description>In regards to compliance with RFC 4122, 122 bits need to be independently randomly generated. Although I have not confirmed this, I think the reason is to (partly) deal with the issue of uniqueness in pseudo-random number generators. The Math.uuid.js code generates 31 random hex values. By generating random hex values instead of random bit values, are we not increasing the odds of generating duplicate UUIDs?</description>
		<content:encoded><![CDATA[<p>In regards to compliance with RFC 4122, 122 bits need to be independently randomly generated. Although I have not confirmed this, I think the reason is to (partly) deal with the issue of uniqueness in pseudo-random number generators. The Math.uuid.js code generates 31 random hex values. By generating random hex values instead of random bit values, are we not increasing the odds of generating duplicate UUIDs?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ed</title>
		<link>http://www.broofa.com/2008/09/javascript-uuid-function/comment-page-1/#comment-2318</link>
		<dc:creator>Ed</dc:creator>
		<pubDate>Fri, 05 Mar 2010 16:05:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.broofa.com/blog/?p=151#comment-2318</guid>
		<description>Great script!</description>
		<content:encoded><![CDATA[<p>Great script!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Martin</title>
		<link>http://www.broofa.com/2008/09/javascript-uuid-function/comment-page-1/#comment-2299</link>
		<dc:creator>Martin</dc:creator>
		<pubDate>Mon, 15 Feb 2010 18:51:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.broofa.com/blog/?p=151#comment-2299</guid>
		<description>Thanks! A real little gem :-)</description>
		<content:encoded><![CDATA[<p>Thanks! A real little gem <img src='http://www.broofa.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Broofa</title>
		<link>http://www.broofa.com/2008/09/javascript-uuid-function/comment-page-1/#comment-1900</link>
		<dc:creator>Broofa</dc:creator>
		<pubDate>Sat, 17 Oct 2009 10:31:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.broofa.com/blog/?p=151#comment-1900</guid>
		<description>This code is now dual licensed under MIT and GPL.  I&#039;ve also shortened the verbiage to this effect in the source so it&#039;s not so unwieldy.</description>
		<content:encoded><![CDATA[<p>This code is now dual licensed under MIT and GPL.  I&#8217;ve also shortened the verbiage to this effect in the source so it&#8217;s not so unwieldy.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: OwenK</title>
		<link>http://www.broofa.com/2008/09/javascript-uuid-function/comment-page-1/#comment-1856</link>
		<dc:creator>OwenK</dc:creator>
		<pubDate>Fri, 25 Sep 2009 00:27:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.broofa.com/blog/?p=151#comment-1856</guid>
		<description>The revised BSD license is fully GPL compatible and OSI approved. It is essentially equivalent to the MIT License, and doesn&#039;t have a viral clause. Hope that clears things up for anybody stumbling across this!</description>
		<content:encoded><![CDATA[<p>The revised BSD license is fully GPL compatible and OSI approved. It is essentially equivalent to the MIT License, and doesn&#8217;t have a viral clause. Hope that clears things up for anybody stumbling across this!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
