“Numderline.”
October 29, 2019 9:44 AM   Subscribe

I could have made specific solutions for each, but I thought “How could I solve this in the most general way possible?” and an idea came to me: I could make a font that uses fancy font shaping features to insert commas in all numbers, everywhere. 2000 words from Tristan Hume for Jane Street.
posted by cgc373 (26 comments total) 24 users marked this as a favorite
 
This is legit brilliant. Simple, effective elegant. Installing now. Next I'm going to start getting mad at applications that won't use custom fonts.
posted by Lame_username at 10:00 AM on October 29, 2019


Neat! The R tidyverse has had "numderlining" (and red NA/negative values, and aligned decimals) for a while via the pillar library.. I wonder if that was an inspiration, or if he just stumbled into the same solution.
posted by theodolite at 10:09 AM on October 29, 2019


Counterpoint: Stop putting commas in your numbers.
posted by fimbulvetr at 10:12 AM on October 29, 2019 [5 favorites]


aaaah fuck i love this
posted by Sokka shot first at 10:16 AM on October 29, 2019


Installed! This is delightful! Best of the web! Thanks!
posted by Homeboy Trouble at 10:24 AM on October 29, 2019


Counterpoint: Stop putting commas in your numbers.

The comma and period changing places is something I was vaguely, theoretically aware of, until I moved to Sweden, where the decimal marker is a comma and the thousands marker is either a period or a space. Now it's an artefact of being in a subtly parallel universe.

Having said that, a thousands marker is useful for cutting down on mistakes when reading numbers. Even the programming world has now caught up, and languages like Swift let you use the underscore for this, i.e., 1_234. Which is a good thing and will hopefully spread to other languages.
posted by acb at 10:26 AM on October 29, 2019 [1 favorite]


Counterpoint:

This doesn't really seem like a counterpoint, since it argues for using a thin space instead which is also one of the options that Tristan Hume explored and implemented.
posted by biogeo at 10:26 AM on October 29, 2019 [7 favorites]


Regardless of whatever else I think we can all agree that the EU way of swapping commas and dots is fucking insane. Jesus. I bet they don't call it a "decimal comma" 'round those parts so WHY TF
posted by MiraK at 10:35 AM on October 29, 2019 [1 favorite]


On the other hand regarding that counterpoint, the thing about one million hats was cool!
posted by cgc373 at 10:36 AM on October 29, 2019 [2 favorites]


I bet they don't call it a "decimal comma" 'round those parts so WHY TF
Germans do!

To be honest, I came from a decimal point land, but am now working in Germany and find the comma better as a decimal separator - particularly in handwriting. Dots can get a bit lost sometimes, whereas commas are much clearer and more noticeable.
posted by scorbet at 10:51 AM on October 29, 2019 [2 favorites]


Wouldn't the answer to the comma/dot problem just be to create the Euro version of this font? The numbers stay the same, and only the presentation differs.
posted by clawsoon at 10:58 AM on October 29, 2019


Thin space seems like the worst possible proposed solution. A space could be created by weird kerning or alignment issues, or seem to just be a separate set of numbers entirely. I'm slightly offended that such an idea was ever suggested, let alone implemented.
posted by GoblinHoney at 10:59 AM on October 29, 2019 [6 favorites]


this is wonderful. the idea to underline seems especially good for this purpose, because you'd learn which factors (millions, billions, trillions) are underlined and which aren't, and be able to tell instantly what magnitude a number is without having to read it all the way through.
posted by FirstMateKate at 11:09 AM on October 29, 2019 [1 favorite]


Thin space is great for variable-width, utter pants for fixed-width outside of super structured tables.

I feel like this would take some getting used to. I know it goes against the "do it once and all software works with it" but man I feel like scientific notation / floating point expression, maybe "snapping" to a multiple of 3 if you want metric prefixes (e.g. 327.2E6 population of United States, c = 299.8E6 m/sec), would be a whole lot better. Numderline (love a good portmanteau) is a little more parseable than without, but I'm still counting groups of 3 by eye above trillions.

(Yeah I know representing integers as floating point is bad for explicit typing but for my purposes it's usually fine as long as they're not actually supposed to be strings or huge integers -- looking at you, Twitter user_id and message_id. That's bitten pretty much everyone I know who works with social media data.)

Boy I hate the look of the comma-within-monospace.
posted by supercres at 12:13 PM on October 29, 2019


This is clever, but beware of using these outside your own systems. Most open font licences have a requirement that you rename a font if you modify it: SIL and the Ubuntu FL do this for sure, Google doesn't seem to.

This isn't for any preciousness but it's down to the practical reality that most OSs handle fonts really badly. At best, having multiple fonts with the same name will work in an undefined manner. At worst, horrible messy displays and/or crashing.
posted by scruss at 12:31 PM on October 29, 2019


Commas, heh. AtF Sparks — After the flood does charts and line plots.
posted by zengargoyle at 1:05 PM on October 29, 2019


If the goal is to rapidly see things that differ by orders of magnitude, and you don't care about the terminal digits - scientific notation exists for a reason.
posted by benzenedream at 1:16 PM on October 29, 2019


Gah. His example output includes timestamps that look like this:
2,019-10-02 22:11:59 -0,400
Need I say more?
posted by aws17576 at 1:19 PM on October 29, 2019 [9 favorites]


I mean, granted the spacing is better than that. But that 0,400 (for the time 4:00) is totally inappropriate and demonstrates why delimiters shouldn't be forced at the font level.
posted by aws17576 at 1:23 PM on October 29, 2019


If the goal is to rapidly see things that differ by orders of magnitude, and you don't care about the terminal digits - scientific notation exists for a reason.

Is
6.443E08
7.966E06
better at rapidly showing things that differ by orders of magnitude than
644351639
  7965518
even before the underlining?
posted by Homeboy Trouble at 1:30 PM on October 29, 2019 [2 favorites]


Some will certainly go to extremes to avoid COBOL.
posted by RobotVoodooPower at 1:44 PM on October 29, 2019 [1 favorite]


even before the underlining?

Granted, scientific notation takes some training and familiarity to read. If I was making a table for a salesperson or business person I would not use it. In my experience, scientists and engineers will ask for scientific notation in place of large numbers with insignificant digits on the right side.

6.443E08
7.966E06

mentally requires me to scan down the right hand side first to check the exponent, but instantly allows me to see 6.443 is two orders of magnitude larger than 7.966. It also scales to 1E99 which commas may have a problem with.
posted by benzenedream at 2:02 PM on October 29, 2019


I bet they don't call it a "decimal comma" 'round those parts so WHY TF

French does call it a virgule 'comma' (though not virgule décimale -- the general term is séparateur décimal 'decimal separator').

So for example 4.5 would be four point five in English but 4,5 quatre virgule cinq in French.
posted by andrewesque at 2:05 PM on October 29, 2019 [2 favorites]


Sounds like y'all have set yourself a challenge: Create a font which automatically converts all numbers to scientific notation.
posted by clawsoon at 4:45 PM on October 29, 2019 [2 favorites]


Counterpoint: Stop putting commas in your numbers.
Counter-counterpoint: use the robust formatting facilities built into all modern operating systems and web browsers to include the appropriate separators for the type of data represented by those numbers in the user’s preferred format rather than expecting everyone to adopt an unpopular standard which solves no problems and introduces new ones such as breaking reuse of that data.

And, while you’re at it, use tabular-nums for anything like those examples to avoid them being so awkward looking.
posted by adamsc at 7:19 PM on October 29, 2019 [3 favorites]


Sounds like y'all have set yourself a challenge: Create a font which automatically converts all numbers to scientific notation.

but pumping lemmas
posted by aws17576 at 10:37 PM on October 29, 2019


« Older The Court Question   |   Why are you still recommending the Dragon book? Newer »


This thread has been archived and is closed to new comments