Remove hint.html and index.html
As per discussions on GitHub the index.html and hint.html files should be deleted in favour of README.md files (from any .text/.txt/.markdown/.md files which will be turned into README.md in an upcoming commit).
This commit is contained in:
1 parent
ee8a36310f
commit
77fb0f11a2
143 files changed
-28606
No files matched your search
@@ -1,140 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta name="GENERATOR" content="mkd2html 2.1.5a DL=DISCOUNT">
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
|
||||
<link rel="stylesheet"
|
||||
type="text/css"
|
||||
href="../hint.css">
|
||||
<title>Best sparkling utility</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Best sparkling utility</h1>
|
||||
|
||||
<ol type="a">
|
||||
<li>David Lowe<br>
|
||||
434 Tenney Drive<br>
|
||||
Rogue River, OR<br>
|
||||
97537<br>
|
||||
<a href="mailto:j.david.lowe@gmail.com">j.david.lowe@gmail.com</a><br>
|
||||
<a href="http://www.pootpoot.net/">http://www.pootpoot.net/</a></li>
|
||||
</ol>
|
||||
|
||||
|
||||
<h2>Judges' comments:</h2>
|
||||
|
||||
<h3>To build:</h3>
|
||||
|
||||
<pre><code>make dlowe
|
||||
</code></pre>
|
||||
|
||||
<h3>To run:</h3>
|
||||
|
||||
<pre><code>./dlowe [numbers...]
|
||||
</code></pre>
|
||||
|
||||
<h3>Try:</h3>
|
||||
|
||||
<pre><code>./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`
|
||||
|
||||
./dlowe 0
|
||||
</code></pre>
|
||||
|
||||
<h3>Selected Judges Remarks:</h3>
|
||||
|
||||
<p>We liked how this entry used Unicode, specifically UTF-8, in a somewhat obfuscated way.</p>
|
||||
|
||||
<p>Also, why doesn’t it crash, and produces a correct output when called with one argument
|
||||
or when all arguments are equal?</p>
|
||||
|
||||
<p>For extra fun, compile and run</p>
|
||||
|
||||
<pre><code>#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));
|
||||
}
|
||||
</code></pre>
|
||||
|
||||
<p>with gcc and clang.</p>
|
||||
|
||||
<p>With GCC (4.7.2), we get</p>
|
||||
|
||||
<pre><code>-2147483648 -2147483648 -2147483648
|
||||
</code></pre>
|
||||
|
||||
<p>and with clang (3.3), we get</p>
|
||||
|
||||
<pre><code>-2147483648 0 2147483647
|
||||
</code></pre>
|
||||
|
||||
<p>Which one is correct? :)</p>
|
||||
|
||||
<h2>Author’s comments:</h2>
|
||||
|
||||
<h1>sparkl</h1>
|
||||
|
||||
<p>A tiny implementation of command-line ‘sparkline’ data visualization.</p>
|
||||
|
||||
<h2>Synopsis</h2>
|
||||
|
||||
<pre><code>$ 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: ▁▁▁▃▃▂▁▂▁▁▉
|
||||
</code></pre>
|
||||
|
||||
<h2>Description</h2>
|
||||
|
||||
<p>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.</p>
|
||||
|
||||
<h2>Limitations</h2>
|
||||
|
||||
<ul>
|
||||
<li>Crashes with 0 arguments. It’d be trivial to fix, but adds a few bytes to the
|
||||
code.</li>
|
||||
<li>Produces bogus graphs when given > about 5000 arguments.</li>
|
||||
<li>Only works if your terminal is utf-8 and your font supports the 8 glyphs
|
||||
used.</li>
|
||||
<li>Produces a few harmless compiler warnings.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Obfuscation</h2>
|
||||
|
||||
<p>The code is very terse. I was torn between submitting this version, and a
|
||||
one-line version compressed using a couple more -D flags.</p>
|
||||
|
||||
<p>Hand-rolled utf-8 sequence, magic numbers (what’s that 7 for?), meaningless
|
||||
variable names, reused variables, and so on.</p>
|
||||
|
||||
<h2>Acknowledgements</h2>
|
||||
|
||||
<p>Edward Tufte invented sparklines (among other things.) Brilliant.</p>
|
||||
|
||||
<p>Zach Holman’s <a href="https://github.com/holman/spark">‘spark’ utility</a> was absolutely
|
||||
an inspiration.</p>
|
||||
|
||||
<p>As I was writing up this description, I discovered I’m not the first person to
|
||||
write an obfuscated C sparkline utility! Vicent Martí created
|
||||
<a href="https://gist.github.com/vmg/1368661">this one</a> years (!) ago. (My
|
||||
implementation is completely independent.)</p>
|
||||
|
||||
<hr />
|
||||
|
||||
<TABLE><TR>
|
||||
<TD><a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-sa/3.0/88x31.png" /></a></TD>
|
||||
<TD><P>© Copyright 1984-2015,
|
||||
<A HREF="/judges.html">Leo Broukhis, Simon Cooper, Landon Curt Noll</A>
|
||||
- All rights reserved<BR>
|
||||
This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons Attribution-ShareAlike 3.0 Unported License</a>.</P></TD>
|
||||
<TD> <!--<a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01 Transitional" height="31" width="88"></a>--></TD>
|
||||
</TR></TABLE>
|
||||
</body>
|
||||
</html>
|
||||
Reference in new issue
Block a user