Live data from Hacker News

Spark

github.com

81–90 of 100 posts

Re: Spark

#81
post #74

Earlier quoted context omitted.

All involve awk or sed. That cuts out a large portion of the potential userbase... Perhaps common uses could be wrapped in options to the script? For instance, an option to graph numbers on separate lines, to graph all numbers in the input in order, to graph a specific column of information (like passing through cut first) or to graph commonly graphed sources?

I feel like they're examples of really awesome use cases, so it shouldn't matter if people can't use them. Not to mention, I feel like this tool is targeted for terminal junkies who likely already have awk/sed.

Basically. Are there very many people who would generate sparklines, using a sh program - somewhere that has sh but not awk or sed?

Re: Spark

#83
post #80
post #51

This is pretty cool. Unfortunately it's coupled with some of the more obnoxious documentation I have seen recently. While the docs aren't very long, I had to read through a third of it to figure out simply what Spark is. I'm all for being cute, but it shouldn't come at the cost of a basic understanding of what the program actually does and is useful for.

In my defense, I did try: https://github.com/holman/spark/pull/34/files

Excellent. Does a great job of clarifying.

Re: Spark

#85
post #28

Just did a Haskell version of spark. It supports in 9 lines of code (exclude comment + empty line) Double instead of just Int. Negative numbers. https://github.com/Mgccl/mgccl-haskell/blob/master/random/sp...

Here's a Haskell version that uses a single loop to do the normalizing, and has a main that doesn't use do syntax. This was mostly a nice little brainteaser: https://gist.github.com/1367709 mapNormalize takes a function, and produces a function that runs that function with the normalized input. It runs in a single iteration, rather than 2 maps. Credit to `dylex` for much hand holding on a single iteration normalizer…

Because Haskell is evaluated lazily, two maps doesn't imply two iterations over the data. In this case, I would expect only one pass through the data for both of the maps. Out of curiosity, I did a quick criterion benchmark for both functions. Here's the result on a list of 100 elements:

  benchmarking spark_mggcl
  mean: 49.29483 us, lb 48.77776 us, ub 50.25594 us, ci 0.950
  std dev: 3.495423 us, lb 2.140951 us, ub 6.373469 us, ci 0.950

  benchmarking spark_ocharles
  mean: 60.12347 us, lb 58.95586 us, ub 61.48084 us, ci 0.950
  std dev: 6.434853 us, lb 5.529613 us, ub 7.824865 us, ci 0.950 
The simpler version appears to be faster.

(As an aside, is there something in particular you dislike about do syntax? I find that it often makes things more readable, though slightly more verbose.)

Re: Spark

#86
post #28

Just did a Haskell version of spark. It supports in 9 lines of code (exclude comment + empty line) Double instead of just Int. Negative numbers. https://github.com/Mgccl/mgccl-haskell/blob/master/random/sp...

I made my own Sparks in C. They look like Sparks.

https://gist.github.com/1368661

Re: Spark

#87
post #83
post #80

Earlier quoted context omitted.

In my defense, I did try: https://github.com/holman/spark/pull/34/files

Excellent. Does a great job of clarifying.

Unfortunately, the maintainer didn't like it as much as you.

Re: Spark

#88
post #72
post #51

This is pretty cool. Unfortunately it's coupled with some of the more obnoxious documentation I have seen recently. While the docs aren't very long, I had to read through a third of it to figure out simply what Spark is. I'm all for being cute, but it shouldn't come at the cost of a basic understanding of what the program actually does and is useful for.

This is a totally fair complaint. Sometimes it is a mystery to me why HN-ers downvote things.

In all seriousness: some folks on HN (not all) seem to be the guard in the center of the panopticon.

If you could see a list of who downvoted you, I'd bet that something interesting would happen.

I almost expect to come back and see my karma drop as a result of this comment.

Re: Spark

#89
post #13

What would be really interesting is finding out which decent programming fonts can show block elements. I mean, beyond the DejaVu Sans Mono fiasco.

http://www.levien.com/type/myfonts/inconsolata.html

Doesn't seem to be able to display the block characters neither on PuTTY, gvim on Windows or my Linux terminals/editors. Am I missing something obvious here?

Re: Spark

#90
post #15

This reminds me of another useful utility from the childhood: alias updick='/usr/bin/uptime | perl -ne "/(\d+) d/;print 8,q(=)x\$1,\"D\n\""'

The dick grows depending on how long the system has been running?
Post reply on HN