[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [Gnu-arch-users] Re: grokking arch
From: |
Parker, Ron |
Subject: |
RE: [Gnu-arch-users] Re: grokking arch |
Date: |
Fri, 26 Mar 2004 14:19:11 -0600 |
> From: Charles Duffy [mailto:address@hidden
> On Thu, 2004-03-25 at 17:49, Stefan Monnier wrote:
> > Whether taglines use UUIDs or marshmallows doesn't make any
> difference to
> > the fact that they may be mistakenly modified or even removed[...]
> That said, if it comes up in practice for people who aren't me who use
> UUIDs, I suppose it could be a genuine issue. Something
> tree-lint could
> warn on, maybe, if you have a good detection algorithm?
Using "grep '^[A-Fa-f]*$' /usr/share/dict/words |wc" on SFU turned up 100
English words that theoretically could appear in a UUID and could therefore
fall victim to "s/word/other/".
At least ace, add, cab, cad, db, facade, and face seem likely to turn up in
some code somewhere, if not in a UUID. The following list would seem to
fit: a solitaire game, a calculator, a CAD program, anything with a
database, OO design pattern based code, and a 2D or 3D graphics program.
Looking at "db" alone, it would hit 27 out of every 256 UUIDs. That's over
10%.
This is borne out by the following command:
uuidgen -n30000|egrep -i
"ace|add|cab|cad|db|facade|face">,,dict-test
30,000 files is not an unreasonable size for a project. 10 runs of this
command produced 3,300-3,500 matches per run. The final one produced 3,350
hits. Even eliminating "db" from the pattern resulted in 605 hits, that's
still about 5%. See, the break down of hits below.
$ for word in ace add cab cad db facade face
> do
> echo -ne $word\\t
> fgrep $word ,,dict-test|wc -l
> done
ace 170
add 157
cab 157
cad 128
db 2809
facade 0
face 9
I'm just supplying the raw data. Someone else can decide what to do with
it.