Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!samsung!uunet!looking!brad From: brad@looking.on.ca (Brad Templeton) Newsgroups: news.software.b Subject: Re: C News milestone Message-ID: <1990Dec12.213026.6408@looking.on.ca> Date: 12 Dec 90 21:30:26 GMT References: <4_377B@xds13.ferranti.com> <1990Nov27.230750.3478@looking.on.ca> <1990Dec7.114243.12454@warwick.ac.uk> Organization: Looking Glass Software Ltd. Lines: 16 Well, hey, if you want to get really small, you can use a 64 char safe set without problems (letters,digits,dash and dot) and also divide the time by 64, unless you suspect your system will reboot and assign your pid in 60 seconds. In fact, if it takes over 64 seconds to boot, you could take only the lower 11 bits of the process number, unless your system will fork 2K processes per minute. Subtract today from your date and you will also keep within 20 bits on the date for the next couple of years. Thus 6 chars will do it for as long as your software exists. One could get even smaller. Actually "guaranteed unique short ascii string" might be a handy standard library routine to have around, to use in place of all the getpid() file names in the world. -- Brad Templeton, ClariNet Communications Corp. -- Waterloo, Ontario 519/884-7473