From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ken Raeburn Newsgroups: gmane.emacs.devel Subject: Re: Should Emacs provide a uuid function? Date: Mon, 25 Apr 2011 03:21:23 -0400 Message-ID: <42A7030B-DE0C-4CCA-A768-B82BE70C42F9@raeburn.org> References: <87ipu3v0ru.fsf@stupidchicken.com> <871v0raqub.fsf@uwakimon.sk.tsukuba.ac.jp> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1303716096 10581 80.91.229.12 (25 Apr 2011 07:21:36 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 25 Apr 2011 07:21:36 +0000 (UTC) To: Emacs Dev Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Apr 25 09:21:33 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QEG6t-00063x-9w for ged-emacs-devel@m.gmane.org; Mon, 25 Apr 2011 09:21:31 +0200 Original-Received: from localhost ([::1]:49550 helo=lists2.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QEG6s-0001PI-AH for ged-emacs-devel@m.gmane.org; Mon, 25 Apr 2011 03:21:30 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:55397) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QEG6q-0001P9-4R for emacs-devel@gnu.org; Mon, 25 Apr 2011 03:21:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QEG6p-0004ez-1n for emacs-devel@gnu.org; Mon, 25 Apr 2011 03:21:28 -0400 Original-Received: from mail-vw0-f41.google.com ([209.85.212.41]:51709) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QEG6o-0004ep-Vn for emacs-devel@gnu.org; Mon, 25 Apr 2011 03:21:27 -0400 Original-Received: by vws4 with SMTP id 4so2168026vws.0 for ; Mon, 25 Apr 2011 00:21:25 -0700 (PDT) Original-Received: by 10.220.180.202 with SMTP id bv10mr613635vcb.99.1303716085673; Mon, 25 Apr 2011 00:21:25 -0700 (PDT) Original-Received: from squish.raeburn.org (c-24-128-48-142.hsd1.ma.comcast.net [24.128.48.142]) by mx.google.com with ESMTPS id i12sm941848vcs.39.2011.04.25.00.21.24 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 25 Apr 2011 00:21:24 -0700 (PDT) In-Reply-To: <871v0raqub.fsf@uwakimon.sk.tsukuba.ac.jp> X-Mailer: Apple Mail (2.1084) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.212.41 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:138705 Archived-At: On Apr 25, 2011, at 00:37, Stephen J. Turnbull wrote: > I have to agree with Yidong; there's no good reason not to inline >=20 > (shell-command-to-string "uuidgen") >=20 > in any of the applications you've mentioned if you want an > uuidgen-format UUID. How widespread is the uuidgen program these days? Several systems I = just checked have it, but it's not a program I'd been aware of. Though, = at least one version I ran across generates (by default?) the = information-revealing "version 1" format that encodes the machine's MAC = address, and while some versions have options to control which form is = generated, not all do. Using the version-4 random-number-based form described in wikipedia, it = would probably be faster to just suck in 16 bytes from /dev/urandom or = other good pseudo-random number source (which is a different portability = question) and format the string directly. I wouldn't consider the elisp = 'random' function to be remotely good enough though. Ken=