From: Joel VanderWerf Date: 2006-12-03T05:35:55+09:00 Subject: Re: [OT] calculations on lists of numbers Paul Lutus wrote: > Joel VanderWerf wrote: > >> Paul Lutus wrote: >>> ara.t.howard@noaa.gov wrote: >>> >>>> for years i've felt that i should be able to pipe numerical output into >>>> some unix command like so >>>> >>>> cat list | mean >>>> cat list | sum >>>> cat list | minmax >>>> >>>> etc. >>>> >>>> and have never found one. right now i'm building a ruby version - >>>> before i continue, does anyone know a standard unix or ruby version of >>>> this? >>> It is so easy to create in Ruby, a matter of minutes, that it is not >>> terribly important to do the search you are suggesting. >> Disagree. > > It's a bit too late to disagree, in the face of the evidence that I said it, > then I did it. > >> I would like to know if a unix version exists, since it will >> certainly be faster than ruby, run in less memory, and probably exist in >> environments where ruby doesn't. So I think the search is worth while. > > Yes, all true, but that isn't what you disagreed with. I read your statement as (It is so easy to create in Ruby, a matter of minutes) THEREFORE (it is not terribly important to do the search you are suggesting) I was in fact disagreeing with all three parts of your statement, premise, deduction, and conclusion: - A matter of minutes is not enough. These things take a little more thinking, even in a programming language as elegant as ruby. For example, it took a little thought to notice the #to_f vs. #Float distinction. Also, some time should be spent on unit tests. I stumbled around with these sorts of things for close to an hour. - Even if the premise were true, it would not follow from this premise that a search is not important. What does the length of time it takes you to write a piece of code have to do with being aware of prior art? - In any case, a search is important. One should always be aware of prior art, for many reasons. There's nothing wrong with posting code without exhaustive analysis, unit testing, and search of prior art. I do it all the time, but I try to have a little humility about it. -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407