From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Sorace Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="Apple-Mail-3-881629820" Message-Id: <8D4049D0-5A78-4277-A0D1-9B70B32BC941@9srv.net> Date: Tue, 17 May 2011 00:25:44 -0400 To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v1084) Subject: [9fans] toy: pseudo-sparklines Topicbox-Message-UUID: e49819e4-ead6-11e9-9d60-3106f5b1d025 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --Apple-Mail-3-881629820 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Edward Tufte's sparklines[0] are a wonderful way of representing a wide variety of data in word-like spaces. You can't use them in text-only places, though, leading some folks to come up (very rough) approximations using unicode characters[1]. They're a poor shadow of the real thing, but can still be useful for some types of data and some contexts. Roughly inspired by a writeup of some guy's python implementation[2] of a generator, I threw one together this afternoon in rc and hoc: [3] :; sparkline 0 2 4 7 12 16 3 11 9 0 4=20 =E2=96=81=E2=96=82=E2=96=83=E2=96=84=E2=96=87=E2=96=88=E2=96=82=E2= =96=86=E2=96=85=E2=96=81=E2=96=83:;=20 The internet has noted that in some contexts the baseline gets messed up, but they're still a fun toy. Also, thanks to lmnop in #plan9 for this: fn moustache { sparkline `{seq 0 1 10} `{seq 9 -1 0} ; echo } Maybe a tribute to our go friends[3]. a [0] = http://www.edwardtufte.com/bboard/q-and-a-fetch-msg?msg_id=3D0001OR&topic_= id=3D1 [1] http://kottke.org/11/05/twitter-sparklines [2] = http://www.leancrew.com/all-this/2011/05/textexpander-sparkline-snippet/ [3] /n/sources/contrib/anothy/bin/rc/sparkline [4] http://moustach-io.appspot.com/ --Apple-Mail-3-881629820 content-type: application/pgp-signature; x-mac-type=70674453; name=PGP.sig content-description: This is a digitally signed message part content-disposition: inline; filename=PGP.sig content-transfer-encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.16 (Darwin) iEYEARECAAYFAk3R+M4ACgkQyrb52b5lrs5fBgCfaJs+WK/z1Uz3b8YgMB5i5Uxp pAMAniwykOIJjjr9WxrRD7sABgMPEE4s =3qrP -----END PGP SIGNATURE----- --Apple-Mail-3-881629820--