Live data from Hacker News

Spark

github.com

51–60 of 100 posts

Re: Spark

#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.

Re: Spark

#52
post #43

I'm curious: is there a reason U+2584 LOWER HALF BLOCK is missing from the character set, which otherwise contains the progression from U+2581 to U+2587? Edit: U+2588 seems like an obvious candidate as well.

No idea. Here they are for everyone's use: ticks = " ▁▂▃▄▅▆▇█" I've included SPACE as well. That's an obvious missing one.

At least in my OS/X terminal using the "Monaco" font (which I think is the default), the final one (U+2588) doesn't descend as far as the rest of the characters. It really produces some ugly output with that one included.

Including the space character means that you lose a nice baseline if the input is fairly sparse, so it looks less like a bar graph and more like just some random blobs.

Re: Spark

#53
post #48
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.

You'll have difficulty on Windows if you use PuTTY, since it doesn't do font substitution.

Are there any Windows SSH programs that display? I get nothing but garbage or "." characters for any of the symbols.

Re: Spark

#55
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...

And here's a PowerShell version. (Use PowerShell ISE as PowerShell normal prompt doesn't support unicode). http://pastie.org/2867807 [edit: updated, careless variable rename, thanks jcromartie]

$stats should be $minmax

Re: Spark

#57
I've quickly looked at the link, read the reviews here, and there's actually no description of what spark _is_. I gather is an UTF-8 graph generator.

Re: Spark

#58
post #57

I've quickly looked at the link, read the reviews here, and there's actually no description of what spark _is_. I gather is an UTF-8 graph generator.

Sparklines Wikipedia page: http://en.wikipedia.org/wiki/Sparkline

spark, the linked project, is just an implementation of a sparkline generator for the command line.

Re: Spark

#59
post #57

I've quickly looked at the link, read the reviews here, and there's actually no description of what spark _is_. I gather is an UTF-8 graph generator.

Sparklines Wikipedia page: http://en.wikipedia.org/wiki/Sparkline spark, the linked project, is just an implementation of a sparkline generator for the command line.

Thanks! First time I've heard of "sparkline". Of course I've seen these items for as long as I can remember, but I just call them "graphs". :P

Re: Spark

#60
post #59

Earlier quoted context omitted.

Sparklines Wikipedia page: http://en.wikipedia.org/wiki/Sparkline spark, the linked project, is just an implementation of a sparkline generator for the command line.

Thanks! First time I've heard of "sparkline". Of course I've seen these items for as long as I can remember, but I just call them "graphs". :P

A sparkline is a specific type of graph used for certain types of data. The wiki page is pretty clear with the uses and limitations.

Not all graphs are created equal, it's important to use the right tool for the job. This tool isnt just a graph generator, it's a spark bar chart generator that's compact enough to fit in the command line. Overall a cool idea.

Post reply on HN