News for hackers. Stuff that matters.
Re:Show HN: st – simple statistics from the command line by nferraz on Wednesday September 04, 2013 @08:18AM (#6326941)
I like octave and R!

The reason I wrote this script was to get quick results from the command line.

For instance: I could use grep, cut and other unix tools to get the numbers from a file and make quick calculations.

Of course, for complex processing I would use octave or R.

Re:Show HN: st – simple statistics from the command line by Sprint on Wednesday September 04, 2013 @08:22AM (#6326966)
Yeah, I was thinking about that and spent the past minutes to make me some Bash functions like:

  function mean() {
          octave -q --eval "mean = mean(load('$1'))"
  }
Then just run "mean numbers.txt".

I am sure your approach is much quicker, octave takes a good 0.5s(!) to load on my machine.

Re:Show HN: st – simple statistics from the command line by nferraz on Wednesday September 04, 2013 @08:42AM (#6327090)
Yup, octave requires more time to warm up.

Regarding speed, for simple calculations like sum, mean and variance, the bottleneck is in I/O.