evan@telly.on.ca (Evan Leibovitch) (05/09/89)
One need only look at the references line above to see how quicly this gets unwieldy. In reply to Brian Onn, geoff@utstat.uucp (Geoff Collyer) writes: >C news generates longish Message-IDs because I didn't want to have a >sequence-number file, which can get truncated by a crash during >updating, and because Message-IDs are currently generated by a shell >script. >However, there are reasons other than aesthetics for preferring short >Message-IDs, including limitations in dbm(3) on total key and data >lengths per block. >One could omit high-order digits of >the year or encode the information more compactly, perhaps printing >integers in radix 64 (e.g. <1989May7.041643.29194@utzoo.uucp> could be >expressed as <!e9`nl()+@utzoo.uucp>, saving 12 characters). A visible sense of sequence would be nice. How about something in the middle - a 9-digit representation of seconds, similar to the way it's used in the Cnews history file, together with the process ID? This way, an article could be: <610566286.20194@foo.bar> From 21 characters down to 15 and possibly less. A possible compromise? (I don't think there's much Cnews can do about long message IDs resulting from domain names as long as <ncrcan.Toronto.NCR.COM> :-). -- Evan Leibovitch, SA, Telly Online, located in beautiful Brampton, Ontario evan@telly.on.ca / {uunet!attcan,utzoo}!telly!evan / (416) 452-0504 Scientists have proven conclusively: Research causes cancer in lab animals
brian@ncrcan.Toronto.NCR.COM (Brian Onn) (05/09/89)
In article <big C news ID :-)> evan@telly.UUCP (Evan Leibovitch) writes: >One need only look at the references line above to see how quicly this gets >unwieldy. Yes. The reference line is now three lines long. I seem to recall that rn will blow up at some limit. >A visible sense of sequence would be nice. How about something in the >middle - a 9-digit representation of seconds, similar to the way it's >used in the Cnews history file, together with the process ID? > >This way, an article could be: <610566286.20194@foo.bar> > >From 21 characters down to 15 and possibly less. A possible compromise? I like this. This would satisfy Geoff's requirement for unique IDs without having to keep a separate message counter file that could get truncated. It may not be as easily generated from standard unix tools, though. It is possible to create the current ID in a shell script from date and expr contortions. The new method (if adopted) would require a helper program. >(I don't think there's much Cnews can do about long message IDs resulting >from domain names as long as <ncrcan.Toronto.NCR.COM> :-). Ok. I'll change it to ncrcan.uucp :-) Brian. -- +-------------------+--------------------------------------------------------+ | Brian Onn | UUCP:..!{uunet!attcan, watmath!utai}!lsuc!ncrcan!brian | | NCR Canada Ltd. | INTERNET: Brian.Onn@Toronto.NCR.COM | +-------------------+--------------------------------------------------------+
peter@ontmoh.UUCP (Peter Renzland) (05/10/89)
In article <1394@ncrcan.Toronto.NCR.COM>, brian@ncrcan.UUCP (Brian Onn) says: ... [ quoting Evan, who says:] >>This way, an article could be: <610566286.20194@foo.bar> ... > I like this. This would satisfy Geoff's requirement for unique IDs without > having to keep a separate message counter file that could get truncated. > It may not be as easily generated from standard unix tools, though. It is ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > possible to create the current ID in a shell script from date and expr > contortions. The new method (if adopted) would require a helper program. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ... You mean like this?: TZ=GMT0GMT export TZ set -- `date "+ %y %j %H %M %S"` EPOCHDATE=`expr $5 + 60 \* \( $4 + 60 \* \( $3 + 24 \* \( $2 - 1 + \( \( $1 - 69 \) / 4 \) + 365 \* \( $1 - 70 \) \) \) \)` That's how Shnews does it. -- Peter Renzland @ Ontario Ministry of Health 416/964-9141 peter@ontmoh.UUCP
henry@utzoo.uucp (Henry Spencer) (05/10/89)
In article <1394@ncrcan.Toronto.NCR.COM> brian@ncrcan.Toronto.NCR.COM (Brian Onn) writes: >>A visible sense of sequence would be nice. How about something in the >>middle - a 9-digit representation of seconds, similar to the way it's >>used in the Cnews history file, together with the process ID? > >I like this. This would satisfy Geoff's requirement for unique IDs without >having to keep a separate message counter file that could get truncated. >It may not be as easily generated from standard unix tools, though... Geoff and I have tentatively decided to do this, in fact. It's easy; we already have a program called "getdate" (and its inverse, ctime) for use in bits of housekeeping. -- Mars in 1980s: USSR, 2 tries, | Henry Spencer at U of Toronto Zoology 2 failures; USA, 0 tries. | uunet!attcan!utzoo!henry henry@zoo.toronto.edu
brian@ncrcan.Toronto.NCR.COM (Brian Onn) (05/11/89)
In article <1394@ncrcan.Toronto.NCR.COM>, I said: ... [ quoting Evan, who says:] >>This way, an article could be: <610566286.20194@foo.bar> > [This] may not be as easily generated from standard unix tools, though. > [The current C News IDs are shell scriptable using date and expr] > The new method (if adopted) would require a helper program. and then ... In article <610787517.10071@ontmoh.UUCP> peter@ontmoh.UUCP (Peter Renzland) writes: >You mean like this?: > > TZ=GMT0GMT export TZ > set -- `date "+ %y %j %H %M %S"` > EPOCHDATE=`expr $5 + 60 \* \( $4 + 60 \* \( $3 + 24 \* \( $2 - 1 + \( \( $1 - 69 \) / 4 \) + 365 \* \( $1 - 70 \) \) \) \)` > >That's how Shnews does it. > >-- >Peter Renzland @ Ontario Ministry of Health 416/964-9141 peter@ontmoh.UUCP Yeah, I mean like that. Ok, so it's possible to do this with date and expr too, using the perfect example of an expr contortion above :-) But this still may not be OK in a general purpose News distribution, as all implementations of date(1) do not support the format string concept. However, I will not be so narrow minded this time and say that it cannot be done in a shell script. Somebody could write an awk script to take the standard date format "Wed May 10 19:45:02 GMT 1989" and convert it into a 9 digit seconds string. So I conclude with a different position than I had taken previously, but honestly have forgotten why it was important to be able to do this in a shell script :-) Brian. -- +-------------------+--------------------------------------------------------+ | Brian Onn | UUCP:..!{uunet!attcan, watmath!utai}!lsuc!ncrcan!brian | | NCR Canada Ltd. | INTERNET: Brian.Onn@Toronto.NCR.COM | +-------------------+--------------------------------------------------------+
woods@eci386.uucp (Greg Woods) (05/13/89)
In article <1396@ncrcan.Toronto.NCR.COM> brian@ncrcan.Toronto.NCR.COM (Brian Onn) writes: > Yeah, I mean like that. Ok, so it's possible to do this with date and expr > too, using the perfect example of an expr contortion above :-) But this > still may not be OK in a general purpose News distribution, as all > implementations of date(1) do not support the format string concept. Ah ha! But there's at least one "free" version of date(1) that does support the SysV format strings. I believe it was packaged with the recent timezone/ctime stuff. -- Greg A. Woods woods@{{utgpu,eci386,ontmoh,tmsoft}.UUCP,gpu.utcs.UToronto.CA,utorgpu.BITNET} +1-416-443-1734 [h] +1-416-595-5425 [w] Toronto, Ontario CANADA
brian@ncrcan.Toronto.NCR.COM (Brian Onn) (05/14/89)
In article <1989May13.144700.3912@eci386.uucp> woods@eci386.UUCP (Greg Woods) writes: >In article <1396@ncrcan.Toronto.NCR.COM> I said: >> Yeah, I mean like that. Ok, so it's possible to do this with date and expr >> too, using the perfect example of an expr contortion above :-) But this >> still may not be OK in a general purpose News distribution, as all >> implementations of date(1) do not support the format string concept. > >Ah ha! But there's at least one "free" version of date(1) that >does support the SysV format strings. I believe it was packaged >with the recent timezone/ctime stuff. Sigh. I'll just sit back here an shut up :-) Brian. -- +-------------------+--------------------------------------------------------+ | Brian Onn | UUCP:..!{uunet!attcan, watmath!utai}!lsuc!ncrcan!brian | | NCR Canada Ltd. | INTERNET: Brian.Onn@Toronto.NCR.COM | +-------------------+--------------------------------------------------------+