From: "Hal E. Fulton" Date: 2003-08-21T04:50:19+09:00 Subject: Re: Punctuation as noise ----- Original Message ----- From: "Paul Brannan" To: "ruby-talk ML" Sent: Wednesday, August 20, 2003 2:40 PM Subject: Re: Punctuation as noise > Hmm, I just noticed that the script counts _'s as puntuation, and thus > has a significant bias toward camelCase. I changed the script to count > them as whitespace instead, and here are the results: Oh, thanks, have to regard that as a bug. Hmm, if we cheated and considered @ alphanumeric, it would help my theory even more. :) But my theory doesn't appear to be really borne out anyway. I'm sure a statistician would laugh. I expected significant, noticeable differences between Ruby and Perl and C and C++. Don't really see those here. Hal > On Thu, Aug 21, 2003 at 04:32:42AM +0900, Paul Brannan wrote: > > On 27K lines of integration test code (Ruby), I get: > > Signal/noise: 458705/119801 = 3.8 > Signal/noise: 458705/90543 = 5.1 > > > On 10K lines of C++ extension code that the above tests test: > > Signal/noise: 163676/40803 = 4.0 > Signal/noise: 163676/26609 = 6.2 > > > On 1.3K lines of unit test code (C++), I get: > > Signal/noise: 28549/8335 = 3.4 > Signal/noise: 28549/6064 = 4.7 > > > On 544 lines of unit test code (Perl), I get: > > Signal/noise: 9365/4350 = 2.2 > Signal/noise: 9365/3710 = 2.5 > > > On 4K lines of vim scripts that I regularly use, I get: > > Signal/noise: 500/73 = 6.8 > Signal/noise: 107184/21843 = 4.9 > (I think the original result I gave here was wrong) > > > On the 63K lines of Ruby code that come with 1.8: > > Signal/noise: 912431/218858 = 4.2 > Signal/noise: 912431/200519 = 4.6 > > > On the 60K lines of C extension code that comes with 1.8: > > Signal/noise: 823062/251038 = 3.3 > Signal/noise: 823062/211752 = 3.9 > > > On the 71K lines of C code that make up the Ruby 1.8 interpreter: > > Signal/noise: 904042/313624 = 2.9 > Signal/noise: 904042/266126 = 3.4 > > > punc = '\',./`=[]\\;~!@#$%^&*()_+{}|:"<>?-' > > white = " \t\r\n" > punc = '\',./`=[]\\;~!@#$%^&*()+{}|:"<>?-' > white = " \t\r\n_" > > Paul > >