Re: RFC 283 (v1) C in array context should return a histogram

2000-09-26 Thread Russ Allbery
Paris Sinclair <[EMAIL PROTECTED]> writes: > But as soon as a person labels me a minority, and implies that because I > have been labeled such that I am a rioter, and that my opinions are > based upon this label, then your choices are to filter me, or to listen > to me protest. Then perhaps you

Re: RFC 283 (v1) C in array context should return a histogram

2000-09-26 Thread Paris Sinclair
>Could you please start from the assumption that we're all interested in >supporting the full Unicode space to the greatest degree possible? None >of us are trying to force an ASCII-only alphabet on anyone (although some >of us are interested in keeping ASCII-only operations fast and efficient >s

Re: RFC 283 (v1) C in array context should return a histogram

2000-09-26 Thread Russ Allbery
Paris Sinclair <[EMAIL PROTECTED]> writes: > kOn Tue, 26 Sep 2000, Bennett Todd wrote: >> Someone wrote: >>> What's the upper bound in a 16bit language? Or does that case just >>> have to break? "Sorry, you're not European. Please be assimilated >>> before using this tool. Resistance is futile."

Re: RFC 283 (v1) C in array context should return a histogram

2000-09-26 Thread Paris Sinclair
kOn Tue, 26 Sep 2000, Bennett Todd wrote: > > What's the upper bound in a 16bit language? Or does that case just > > have to break? "Sorry, you're not European. Please be assimilated > > before using this tool. Resistance is futile." > > Lordie lordie lordie, you're one of the persecuted minorit

Re: RFC 283 (v1) C in array context should return a histogram

2000-09-26 Thread Bennett Todd
2000-09-26-21:56:04 Paris Sinclair: > A "small" fixed upper bound? It is N that is bounded, that doesn't > stop it from using N*50 variables to represent N, or N*150 > variables if I'm only matching vs 2 characters. In big-O notation, the N is the size of the problem; in this case, it could be th

Re: RFC 283 (v1) C in array context should return a histogram

2000-09-26 Thread Paris Sinclair
On Tue, 26 Sep 2000, Bennett Todd wrote: > That sounds positively noble when you put it that way. I can > actually hear choirs of cherubim providing atmosphere. I heard them also, but I thought it was the radio. > > And yes, a list of 250 items to store 5 items is HUGE. There is no way to > > kn

Re: RFC 283 (v1) C in array context should return a histogram

2000-09-26 Thread Bennett Todd
2000-09-26-21:11:53 Paris Sinclair: > Please keep your fetishes and/or geocentricism to yourself. They get all ingrown and infested if I don't take 'em out and air 'em out occasionally:-). > There is no need to propose that others should share them. No indeedy! I'm not opposed to i18n support i

Re: RFC 283 (v1) C in array context should return a histogram

2000-09-26 Thread Paris Sinclair
On Tue, 26 Sep 2000, Bennett Todd wrote: > Yup, I'm a sick little monkey who truly doesn't care about anything > other than US-ASCII Please keep your fetishes and/or geocentricism to yourself. There is no need to propose that others should share them. If Perl is going to exist into the future, i

Re: RFC 283 (v1) C in array context should return a histogram

2000-09-26 Thread Bennett Todd
2000-09-26-20:29:22 Paris Sinclair: > On Tue, 26 Sep 2000, Bennett Todd wrote: > > $hist[ord($_)]++ for split //, $string; > > But would technique work with unicode? Beats me, I've never tried programming against unicode, as I don't speak any other language than english I don't expect I will

Re: RFC 283 (v1) C in array context should return a histogram

2000-09-26 Thread Paris Sinclair
On Tue, 26 Sep 2000, Bennett Todd wrote: > 2000-09-26-05:18:57 Paris Sinclair: > > > (%alphabet) = $string =~ tr/a-z//; > > > > also a little more concise (and certainly more efficient...) than > > > > %alphabet = map { $_ => eval "\$string =~ tr/$_//" } (a..z); > > However, compared t

Re: RFC 283 (v1) C in array context should return a histogram

2000-09-26 Thread Bennett Todd
2000-09-26-05:18:57 Paris Sinclair: > > (%alphabet) = $string =~ tr/a-z//; > > also a little more concise (and certainly more efficient...) than > > %alphabet = map { $_ => eval "\$string =~ tr/$_//" } (a..z); However, compared to say $hist[ord($_)]++ for split //, $string;

Re: RFC 283 (v1) C in array context should return a histogram

2000-09-26 Thread Paris Sinclair
On Mon, 25 Sep 2000, Simon Cozens wrote: > On Mon, Sep 25, 2000 at 09:55:38AM +0100, Richard Proctor wrote: > > While this may be a fun thing to do - why? what is the application? > > I think I said in the RFC, didn't I? It's extending the counting use of tr/// > to allow you to count several d

Re: RFC 283 (v1) C in array context should return a histogram

2000-09-25 Thread Simon Cozens
On Mon, Sep 25, 2000 at 01:55:10PM +0100, Richard Proctor wrote: > It does not seem to have much to do with tr///, if you want it, why not put it > in a module with some meaningful name such as histogram()? Hm. Counting doesn't have much to do with tr///, if you think of it like that. Now, if y

Re: RFC 283 (v1) C in array context should return a histogram

2000-09-25 Thread Richard Proctor
Simon, > I think I said in the RFC, didn't I? It's extending the counting use of tr/// > to allow you to count several different letters at once. For instance, letter > frequencies in text is an important metric for linguists, codebreakers and > others; think about how you'd get letter frequenc

RE: RFC 283 (v1) C in array context should return a histogram

2000-09-25 Thread Henrik Tougaard
> From: Bart Lateur [mailto:[EMAIL PROTECTED]] > On Mon, 25 Sep 2000 10:19:05 +0100, Simon Cozens wrote: > > >(%alphabet) = $string =~ tr/a-z//; > > > >Yum. > > You want it in a hash? Ooff. Well, maybe that's ok for Perl6. > > For Perl5, it would seem to make more sense, to me, to return

Re: RFC 283 (v1) C in array context should return a histogram

2000-09-25 Thread Bart Lateur
On Mon, 25 Sep 2000 10:19:05 +0100, Simon Cozens wrote: >(%alphabet) = $string =~ tr/a-z//; > >Yum. You want it in a hash? Ooff. Well, maybe that's ok for Perl6. For Perl5, it would seem to make more sense, to me, to return a list. Simply a matter of consistency with the spirit of the rest

Re: RFC 283 (v1) C in array context should return a histogram

2000-09-25 Thread Simon Cozens
On Mon, Sep 25, 2000 at 09:55:38AM +0100, Richard Proctor wrote: > While this may be a fun thing to do - why? what is the application? I think I said in the RFC, didn't I? It's extending the counting use of tr/// to allow you to count several different letters at once. For instance, letter frequ

Re: RFC 283 (v1) C in array context should return a histogram

2000-09-25 Thread Richard Proctor
Simon, > This has been on the Perl 5 to-do list for ages and ages. The idea is > that when you're transliterating a bunch of things, you want to know > how many of each of them matched in your original string. While this may be a fun thing to do - why? what is the application? Richard

RFC 283 (v1) C in array context should return a histogram

2000-09-24 Thread Perl6 RFC Librarian
This and other RFCs are available on the web at http://dev.perl.org/rfc/ =head1 TITLE C in array context should return a histogram =head1 VERSION Maintainer: Simon Cozens <[EMAIL PROTECTED]> Date: 24 Sep 2000 Mailing List: [EMAIL PROTECTED] Number: 283 Version: 1 Status: Developi