I agree, UUID's are becoming increasingly more useful for applications as apps need quick and unique identifiers to send back and form relationships between data.
On Thursday, March 22, 2012, 程劭非 <csf...@gmail.com> wrote: > Random number in big enough range could replace uuid in most cases. > But it's still not truely unique. > > In specified time and specified position(specified device), you can > make sure there is only one uuid generated. > > BTW, we are using crypto.getRandomValues in our project, it works well > until now. But I think it would be better if we have native uuid in > JS. > > 2012/3/23 Mark S. Miller <erig...@google.com>: >> What does time or position have to do with uniqueness? Why not velocity, >> spin and charm? Seriously, given a good source of entropy, a large enough >> random number is globally unique. >> >> Math.random() is not a good source of entropy, but crypto.getRandomValues >> is. See <http://wiki.whatwg.org/wiki/Crypto>. >> >> >> On Thu, Mar 22, 2012 at 3:30 AM, 程劭非 <csf...@gmail.com> wrote: >>> >>> UUID is not only a random Number or String. It has to contain time and >>> position to make itself unique in the world. >>> >>> It looks Math.random is related to time. We have no way to involve >>> position information to JS currently. >>> >>> 2012/3/16 Nuno Job <nunojobpi...@gmail.com>: >>> > Wrong list, sorry about that :) >>> > >>> > >>> > On Thu, Mar 15, 2012 at 4:34 PM, Nuno Job <nunojobpi...@gmail.com> >>> > wrote: >>> >> >>> >> (~~(Math.random() * 1e9)).toString(36) + Date.now(); >>> >> >>> >> >>> >> On Thu, Mar 15, 2012 at 4:33 PM, Rick Waldron <waldron.r...@gmail.com > >>> >> wrote: >>> >>> >>> >>> Axel, >>> >>> >>> >>> Have you ever seen >>> >>> this? http://www.broofa.com/2008/09/javascript-uuid-function/ >>> >>> >>> >>> I've been using this for several years >>> >>> >>> >>> >>> >>> Rick >>> >>> >>> >>> >>> >>> On Thu, Mar 1, 2012 at 5:45 PM, Axel Rauschmayer <a...@rauschma.de> >>> >>> wrote: >>> >>>> >>> >>>> UUIDs are useful for many tasks. One cannot create good ones in >>> >>>> JavaScript without browsers exposing more of the underlying platform. >>> >>>> Would >>> >>>> it make sense to add UUID generation to ECMAScript.next? Or is that >>> >>>> something for a browser API? >>> >>>> >>> >>>> Axel >>> >>>> >>> >>>> -- >>> >>>> Dr. Axel Rauschmayer >>> >>>> a...@rauschma.de >>> >>>> >>> >>>> home: rauschma.de >>> >>>> twitter: twitter.com/rauschma >>> >>>> blog: 2ality.com >>> >>>> >>> >>>> >>> >>>> _______________________________________________ >>> >>>> es-discuss mailing list >>> >>>> es-discuss@mozilla.org >>> >>>> https://mail.mozilla.org/listinfo/es-discuss >>> >>>> >>> >>> >>> >>> >>> >>> _______________________________________________ >>> >>> es-discuss mailing list >>> >>> es-discuss@mozilla.org >>> >>> https://mail.mozilla.org/listinfo/es-discuss >>> >>> >>> >> >>> > >>> > >>> > _______________________________________________ >>> > es-discuss mailing list >>> > es-discuss@mozilla.org >>> > https://mail.mozilla.org/listinfo/es-discuss >>> >< -- Adam Shannon Developer University of Northern Iowa Sophomore -- Computer Science B.S. & Mathematics http://ashannon.us
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss