“…you other coders can’t deny”
I want the t-shirt. And the girl, although this isn’t that kind of show.
(this, on the other hand, is definitely that kind of show)
This week, Our Heroes take a stand, refusing to hide what they’re really up to just because everyone’s going to think they’re pervy freaks. This reignites the passion in Our Hot Teacher’s heart, and she backs them up as they head to the battlefield. But first, a good look at the competition, the lickable cosplay queen “753”, Nagomi.
Who promptly pounds Our Heroic Newbie’s confidence into the dust. Next week: drama at the event hall!
Verdict: Nagomi presents as Our First Mean Girl, but they soften the blow by showing what a giant nerd she is, in many ways Our Obsessed Hero’s evil twin. So we not only added more depth to Our Hot Teacher this week, we didn’t get a one-dimensional antagonist stereotype.
(relevant fan-art! and I want a copy of Teacher’s final cos-rom…)
Yeah, I have no idea where this is going. Rather than tying up all the strings from last week, it tugs half-heartedly on a few of them and then throws out half a dozen more. And they managed to make a Belle/catgirl bath scene boring.
Verdict: please make sense next week.
I’ve decided that this is basically the same show as Red Cat Ramen. Except for, y’know, the magic. And the monsters. And the willingness to kill. They’re both just cozy.
If you use sort -n -u
, it will only consider the first field when
deciding if lines are “unique”. That is:
% cat sample.txt
3 pony
1 cat
2 fish
2 dog
% sort -u sample.txt
1 cat
2 dog
2 fish
3 pony
% sort -n -u sample.txt
1 cat
2 fish
3 pony
I was not expecting it to eat the dog. Basically, I’ve always thought
of sort -u
as shorthand for sort | uniq
, but that ain’t quite so.
-n
is actually shorthand for -k1n
, and when you specify a key
field, -u
only considers uniqueness of that field; it doesn’t
matter if the rest of the line differs.
Major progress on analyzing font color.
The simple-minded method of invoking inkscape|magick
for each
character was not only really slow, which I expected, but really
annoying, because every time you exec inkscape on a Mac, even for
command-line-only processing, it animates loading the app icon onto
the Dock. Which is not only visually distracting (it’s like Gainaxing
without the funbags), it interrupts other window-management actions.
So I took the time to look into Inkscape actions and storing the PNGs in a temp directory instead of passing them to ImageMagick through pipes. TL/DR, this works, and is much, much faster:
% cat tmp/uppercase.svg
<svg xmlns="http://www.w3.org/2000/svg" version="1.1">
<path id="A" d="M45,0l210,0l93,346l504,0l93,-346l210,0l-410,1420l-290,0 z M591,1248l18,0l192,-712l-402,0z"/>
<path id="B" d="M160,0l544,0C978,0 1134,142 1134,390C1134,613 975,742 694,746l0,12C912,781 1034,887 1034,1060C1034,1290 870,1420 582,1420l-422,0 z M572,1230C733,1230 824,1162 824,1040C824,915 737,845 586,845l-226,0l0,385 z M632,655C818,655 924,569 924,420C924,274 822,190 646,190l-286,0l0,465z"/>
</svg>
% cat tmp/actions.txt
file-open:tmp/uppercase.svg;
export-type:png;
export-id-only;
export-background:white;
select-all;
transform-scale:0.1;
object-flip-vertical;
export-id:A;export-do;
export-id:B;export-do;
% inkscape --actions-file=tmp/actions.txt > /dev/null 2>&1
% magick tmp/*.png -colors 2 -format "%t %c" histogram:info:- |
tr -d ':' | awk '!/^ /{print $1,$2}'
So far, the best match for my visual impression is to average together the average darkness of two groups of characters, the first containing the digits and all capital letters except “Q”, and the second containing x-height lower-case letters (“acemnorsuvwxz”). I’d have to do some more work to correctly measure proportional fonts and those with lower-case digits (which I’ve only seen in one “coding” font, Monofur; don’t use that one).
This method produces plausible ratings for my sample set:
54.91 Hermit-Bold
49.54 CascadiaMono-Bold
46.24 CascadiaMono-SemiBold
44.99 Hermit-Regular
40.93 Hermit-Light
40.72 CascadiaMono-Regular
35.55 GoMono
35.28 Consolas
34.77 CascadiaMono-SemiLight
34.23 IO-Terminal
34.23 CallingCode-Regular
33.77 CodeSaver-Regular
33.25 AnonymousPro-Regular
33.17 CourierPrimeCode-Regular
32.80 IBMPlexMono-Regular
29.39 SenpaiCoder-Regular
28.34 CascadiaMono-Light
21.31 CascadiaMono-ExtraLight
Yes, the Hermit and Cascadia families really are that dark; too bold at larger sizes, but they remain readable at much smaller sizes than the rest. If, y’know, you want to watch the logs go by.
Now that it’s acceptably fast (~1 second per font), and I’ve added a debug option to tar up all the intermediate files, I’m able to throw a lot more fonts at it and tinker with the results.
And I renamed the script thicc
. 😁
Markdown formatting and simple HTML accepted.
Sometimes you have to double-click to enter text in the form (interaction between Isso and Bootstrap?). Tab is more reliable.