Permalink
Switch branches/tags
Nothing to show
Commits on Nov 16, 2011
  1. merge

    committed Nov 16, 2011
  2. Handle floating-point numbers (closes #28)

    Mostly I just want make this last test green. Shelling out to awk slows things
    down, unfortunately, but at least at this point forward we can just improve the
    performance. I still suspect we can simplify the whole thing with a smarter
    rewrite and speed things up to boot.
    holman committed Nov 16, 2011
  3. Merge pull request #38 from gwern/patch-3

    rm 'set -e' & quote per Riviera's advice; 'set -e' breaks on no trailing...
    holman committed Nov 16, 2011
  4. fix tests that #40 broke

    holman committed Nov 16, 2011
  5. Merge pull request #40 from metcalfc/master

    ▁▂▃▄▅▆▇█ vs more then ▁▂▃▄▅▆▇
    holman committed Nov 16, 2011
  6. UTF-8 has one more bin.

    I got a fever, and the only prescription is more sparklines.
    Chad Metcalf committed Nov 16, 2011
  7. eat stdin with 'cat', not 'read' which doesn't seem to work with stdi…

    …n (this should fix issue #9)
    gwern committed Nov 16, 2011
  8. rm 'set -e' & quote per Riviera's advice; 'set -e' breaks on no trail…

    …ing newline (see issue #37 for detailed discussion)
    gwern committed Nov 16, 2011
Commits on Nov 15, 2011
  1. Merge pull request #30 from gwern/patch-1

    generalize to translating all whitespace, not one character (the space)
    holman committed Nov 15, 2011
  2. Remove debug

    holman committed Nov 15, 2011
  3. Fix tier=0 for 1-5

    joshmoore committed Nov 15, 2011
  4. All ticks the same for 1-5

    joshmoore committed Nov 15, 2011
  5. Fix odd results

    The loop was only going up to the size of numbers
    as opposed to the size of tickets.
    joshmoore committed Nov 15, 2011
  6. Add debugging

    joshmoore committed Nov 15, 2011
  7. update README

    holman committed Nov 15, 2011
  8. add space tests

    holman committed Nov 15, 2011
  9. Merge branch 'allow_spaced_input' of https://github.com/patricklucas/…

    …spark into patricklucas-allow_spaced_input
    holman committed Nov 15, 2011
  10. (failing) test for decimals

    holman committed Nov 15, 2011
  11. Keep individual numbers separate

    Instead of interpreting input "1 3 2 6 8" as "13268", treat spaces
    as commas then condense.
    patricklucas committed Nov 15, 2011
  12. Change back to using 'test' for string equality

    Minimizes this branches overall change.
    patricklucas committed Nov 15, 2011
  13. Allow spaced input

    This allows input like "1, 2, 4, 7, 9" which is sometimes useful
    with longer lists.
    patricklucas committed Nov 15, 2011
  14. merge

    committed Nov 15, 2011
  15. Merge pull request #25 from peff/22439644fb39de086482d71d36a9251966af…

    …fc67
    
    obvious shell cleanups
    holman committed Nov 15, 2011
  16. moved to wiki my simple script

    committed Nov 15, 2011
  17. print sparks incrementally instead of building string

    This shaves a few lines from the print_ticks function. We
    use "printf" instead of "echo -n" as the former is more
    portable (although we are hopelessly tied to bash due to the
    use of arrays, anyway, so either would be fine).
    peff committed Nov 15, 2011
  18. fixed issue

    committed Nov 15, 2011
  19. use shell arithmetic expansion

    This is way faster than invoking bc repeatedly.
    
    Before:
    
      $ DATA=1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20
      $ time spark.old $DATA >/dev/null
      real    0m1.018s
      user    0m0.020s
      sys     0m0.060s
    
    After:
    
      $ time spark $DATA >/dev/null
      real    0m0.089s
      user    0m0.000s
      sys     0m0.008s
    
    Or to make it more clear:
    
      $ elapsed_ms() {
          /usr/bin/time -f %e "$@" 2>&1 >/dev/null |
            perl -lpe '$_ *= 1000'
        }
      $ spark "$(elapsed_ms spark.old $DATA),$(elapsed_ms spark $DATA)"
      ▇▁
    peff committed Nov 15, 2011
  20. drop pointless loop

    We just reassign the data to itself in the loop, and then
    break after reading one line.
    peff committed Nov 15, 2011
  21. that was easy

    holman committed Nov 15, 2011
  22. Merge pull request #22 from benburkert/master

    Add simple roundup tests.
    holman committed Nov 15, 2011
  23. Add simple roundup tests.

    benburkert committed Nov 15, 2011