Subject:
|
Re: Reasonable assignment for a third grader?
|
Newsgroups:
|
lugnet.off-topic.geek
|
Date:
|
Thu, 12 Apr 2001 14:11:51 GMT
|
Reply-To:
|
dan@peeron^AntiSpam^.com
|
Viewed:
|
118 times
|
| |
| |
J.D. Forinash <foxtrot@cc.gatech.edu> wrote:
> In article <slrn9dbcub.q9.dan@dodge.rv.tis.com>,
> Dan Boger <dan@peeron.com> wrote:
> > I couldn't help it... and it's my first attempt at a one liner :)
> >
> > perl -ne 'BEGIN{for('a'..'z'){$v{$_}=$v{uc$_}=++$c}}$t=0;for(split//){$t+=$v{$_}};print"$_"if$t==100;' /usr/dict/linux.words
>
> Neither could I. This one's on sloaris, and I apologize for my mediocre coding
> style. It's still much more readable than that perl mess ever hoped to be, but
> probably took me longer. :)
not going into a holy war, it's a mess cause I Wanted it to be :) the
original form was 10 lines, and quite readable :)
>
> It finds 220 such words out of the 25,000 in the Sloaris /usr/dict/words,
> none of which start with k, x, or z.
keyboards
kissers
- not sure if 'kissers' is a word, but I think 'keyboards' should qualify...
:)
--
Dan Boger
dan@peeron.com
|
|
Message has 1 Reply: | | Re: Reasonable assignment for a third grader?
|
| (...) This must be proof that linux is better than solaris. There's 20,000 more words in /usr/dict/words on my dedrat 6.x box, and 242 more of them score 100 points. The religous wars can end now. :) Still no x or z. Oddly enough, my dedrat 7.0 box (...) (24 years ago, 12-Apr-01, to lugnet.off-topic.geek)
|
Message is in Reply To:
| | Re: Reasonable assignment for a third grader?
|
| (...) Neither could I. This one's on sloaris, and I apologize for my mediocre coding style. It's still much more readable than that perl mess ever hoped to be, but probably took me longer. :) #include <stdio.h> int fd; FILE *fi; char buf[20]; int (...) (24 years ago, 12-Apr-01, to lugnet.off-topic.geek)
|
20 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
This Message and its Replies on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|