Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I rewrote it in C, so it's faster and can work more efficiently on different data sets. It also uses a prettier algorithm for determining heights. Have fun:

http://git.zx2c4.com/spark/tree/spark.c

    $ git clone http://git.zx2c4.com/spark
    $ cd spark
    $ make
    $ ./spark 1 4 2 8 14
    ▂▃▂▅█
    $ curl -s http://earthquake.usgs.gov/earthquakes/catalogs/eqs1day-M1.txt | cut -d, -f9 | ./spark
    ▂▃▄▃▃▃▄▃▇▃▄▄▄▅▃▄▄▄▅▅▅▄▄▄▃▃▃▃▃▄▃▄█▅▄▄▄▄▃▇▄▄▄█▄▃▄▄▄▄▃▃▄▅▄▅▃▃▃▃▇▄▅▄▇▃▅▃▄▃▄▃▇▃▃▄▇▃▄▃▄▃▃▃▄▃▃▃▃▃▃▅▃▄▃▃


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: