fix Makefile and README.md for 2013/dlowe
This commit is contained in:
1 parent
118e11f2b4
commit
3aea2311e3
2 files changed
+237
-111
No files matched your search
+41
-36
@@ -1,33 +1,35 @@
|
||||
# Best sparkling utility
|
||||
|
||||
J. David Lowe
|
||||
434 Tenney Drive
|
||||
Rogue River, OR
|
||||
97537
|
||||
<j.david.lowe@gmail.com>
|
||||
<http://www.pootpoot.net/>
|
||||
J. David Lowe
|
||||
434 Tenney Drive
|
||||
Rogue River, OR
|
||||
97537
|
||||
<j.david.lowe@gmail.com>
|
||||
<http://www.pootpoot.net/>
|
||||
|
||||
# To build:
|
||||
|
||||
## Judges' comments:
|
||||
### To build:
|
||||
|
||||
make dlowe
|
||||
```sh
|
||||
make
|
||||
```
|
||||
|
||||
### To run:
|
||||
|
||||
./dlowe [numbers...]
|
||||
```sh
|
||||
./dlowe [numbers...]
|
||||
```
|
||||
|
||||
### Try:
|
||||
|
||||
./dlowe 0 1 2 3 4 5 6 7
|
||||
./dlowe 16 32 64 128
|
||||
```sh
|
||||
./dlowe 0 1 2 3 4 5 6 7
|
||||
./dlowe 16 32 64 128
|
||||
|
||||
echo sparkline of file sizes: `wc -c * | awk '{print $1}' | xargs ./dlowe`
|
||||
echo sparkline of file sizes: `wc -c * | awk '{print $1}' | xargs ./dlowe`
|
||||
./dlowe 0
|
||||
```
|
||||
|
||||
./dlowe 0
|
||||
|
||||
|
||||
### Selected Judges Remarks:
|
||||
## Judges' comments:
|
||||
|
||||
We liked how this entry used Unicode, specifically UTF-8, in a somewhat obfuscated way.
|
||||
|
||||
@@ -36,10 +38,12 @@ or when all arguments are equal?
|
||||
|
||||
For extra fun, compile and run
|
||||
|
||||
#include <stdio.h>
|
||||
int main() {
|
||||
printf("%d %d %d\n", (int)(-1.0/0.0), (int)(0.0/0.0), (int)(1.0/0.0));
|
||||
}
|
||||
```c
|
||||
#include <stdio.h>
|
||||
int main() {
|
||||
printf("%d %d %d\n", (int)(-1.0/0.0), (int)(0.0/0.0), (int)(1.0/0.0));
|
||||
}
|
||||
```
|
||||
|
||||
with gcc and clang.
|
||||
|
||||
@@ -53,28 +57,30 @@ and with clang (3.3), we get
|
||||
|
||||
Which one is correct? :)
|
||||
|
||||
|
||||
## Author's comments:
|
||||
# sparkl
|
||||
|
||||
### sparkl
|
||||
|
||||
A tiny implementation of command-line 'sparkline' data visualization.
|
||||
|
||||
## Synopsis
|
||||
### Synopsis
|
||||
|
||||
$ sparkl 0 1 2 3 4 5 6 7
|
||||
▁▂▃▄▅▆▇▉
|
||||
```sh
|
||||
$ sparkl 0 1 2 3 4 5 6 7
|
||||
▁▂▃▄▅▆▇▉
|
||||
|
||||
$ echo sparkline of file lengths: `wc -c * | awk '{print $1}' | xargs sparkl`
|
||||
sparkline of file sizes: ▁▁▁▃▃▂▁▂▁▁▉
|
||||
$ echo sparkline of file lengths: `wc -c * | awk '{print $1}' | xargs sparkl`
|
||||
sparkline of file sizes: ▁▁▁▃▃▂▁▂▁▁▉
|
||||
```
|
||||
|
||||
## Description
|
||||
### Description
|
||||
|
||||
This is a handy little tool for visualizing numeric series from the
|
||||
command-line, using 'sparklines'. Pass it a numeric series as arguments, and
|
||||
sparkl will display a sparkline graph, which you can use to very quickly get a
|
||||
sense of the shape of your data.
|
||||
|
||||
## Limitations
|
||||
### Limitations
|
||||
|
||||
* Crashes with 0 arguments. It'd be trivial to fix, but adds a few bytes to the
|
||||
code.
|
||||
@@ -83,7 +89,7 @@ sense of the shape of your data.
|
||||
used.
|
||||
* Produces a few harmless compiler warnings.
|
||||
|
||||
## Obfuscation
|
||||
### Obfuscation
|
||||
|
||||
The code is very terse. I was torn between submitting this version, and a
|
||||
one-line version compressed using a couple more -D flags.
|
||||
@@ -91,7 +97,7 @@ one-line version compressed using a couple more -D flags.
|
||||
Hand-rolled utf-8 sequence, magic numbers (what's that 7 for?), meaningless
|
||||
variable names, reused variables, and so on.
|
||||
|
||||
## Acknowledgements
|
||||
### Acknowledgements
|
||||
|
||||
Edward Tufte invented sparklines (among other things.) Brilliant.
|
||||
|
||||
@@ -103,11 +109,10 @@ write an obfuscated C sparkline utility! Vicent Martí created
|
||||
[this one](https://gist.github.com/vmg/1368661) years (!) ago. (My
|
||||
implementation is completely independent.)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
<!--
|
||||
## Copyright:
|
||||
|
||||
(c) Copyright 1984-2015, [Leo Broukhis, Simon Cooper, Landon Curt Noll][judges] - All rights reserved
|
||||
This work is licensed under a [Creative Commons Attribution-ShareAlike 3.0 Unported License][cc].
|
||||
|
||||
[judges]: http://www.ioccc.org/judges.html
|
||||
[cc]: http://creativecommons.org/licenses/by-sa/3.0/
|
||||
-->
|
||||
Reference in new issue
Block a user