From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=AWL,MAILTO_TO_SPAM_ADDR autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id 01378BC6B for ; Sat, 4 Aug 2007 17:36:10 +0200 (CEST) Received: from ipmail01.adl2.internode.on.net (ipmail01.adl2.internode.on.net [203.16.214.140]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l74Fa8Bi012730 for ; Sat, 4 Aug 2007 17:36:10 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAADI3tEZ5LGJp/2dsb2JhbAAN X-IronPort-AV: E=Sophos;i="4.19,220,1183300200"; d="scan'208";a="167084122" Received: from ppp121-44-98-105.lns10.syd6.internode.on.net (HELO [192.168.1.201]) ([121.44.98.105]) by ipmail01.adl2.internode.on.net with ESMTP; 05 Aug 2007 01:06:07 +0930 Subject: Re: [Caml-list] Sorted list From: skaller To: tmp123@menta.net Cc: ocaml ml In-Reply-To: <46B48F3C.1040904@menta.net> References: <46B4485B.7040406@menta.net> <46B454ED.700@philippewang.info> <1186226538.14440.105.camel@rosella.wigram> <46B48F3C.1040904@menta.net> Content-Type: text/plain Date: Sun, 05 Aug 2007 01:36:06 +1000 Message-Id: <1186241766.11801.3.camel@rosella.wigram> Mime-Version: 1.0 X-Mailer: Evolution 2.10.1 Content-Transfer-Encoding: 7bit X-Miltered: at discorde with ID 46B49CE8.001 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; 0200,:01 pointers:01 sourceforge:01 wrote:01 integer:01 integer:01 caml-list:01 seems:03 identifier:04 identifier:04 tmp:05 queue:07 modulo:07 timer:08 john:08 On Sat, 2007-08-04 at 16:37 +0200, tmp123@menta.net wrote: > It seems dificult to generate an unique identifier, for this subject > or any other (in this sense, I feel nostalgic of the old C pointers). > > An integer counter could be valid, but, when the counter reaches the > maximum, the counter needs to return to "0". From now on, before to > return a new identifier, it should be checked if this value is already > in use. And that means O(n). > > I do not see solution for that. Use the date + time + fresh integer modulo something big enough you know the if the CPU count that fast, your timer queue runs out of memory .. :) -- John Skaller Felix, successor to C++: http://felix.sf.net