Code Adventures: fancypants, a Command-Line Text Conversion Utility

๐•‹๐•™๐•š๐•ค ๐•จ๐•–๐•š๐•ฃ๐•• ๐•ฅ๐•–๐•ฉ๐•ฅ ๐•จ๐•’๐•ค ๐•”๐• ๐•Ÿ๐•ค๐•ฅ๐•ฃ๐•ฆ๐•”๐•ฅ๐•–๐•• ๐•จ๐•š๐•ฅ๐•™ ๐•ฅ๐•™๐•– ๐•ฆ๐•ฅ๐•š๐•๐•š๐•ฅ๐•ช ๐•ž๐•–๐•Ÿ๐•ฅ๐•š๐• ๐•Ÿ๐•–๐•• ๐•š๐•Ÿ ๐•ฅ๐•™๐•– ๐•ฅ๐•š๐•ฅ๐•๐•–. ๐“ข๐“ธ ๐”€๐“ช๐“ผ ๐“ฝ๐“ฑ๐“ฒ๐“ผ ๐“ฝ๐“ฎ๐”๐“ฝ ๐“ฑ๐“ฎ๐“ป๐“ฎ. ๐—”๐—ป๐—ฑ ๐—ฎ๐—น๐˜€๐—ผ ๐˜๐—ต๐—ถ๐˜€. ๐•ฌ๐–‰๐–‰๐–Ž๐–™๐–Ž๐–”๐–“๐–†๐–‘๐–ž, ๐–™๐–๐–Ž๐–˜.

Can you read those? There’s a good chance you can! If you can’t (like if they all show up as hollow boxes) it’s because the font you’re reading this post in doesn’t support those kinds of characters, which are from the math symbols section of the Unicode character set.

It’s a command-line version of a web Unicode text converter, of the sort found at the other end of this link. It’s written in Python, and the source is at the end of this post. I saved it to a file named “fancypants” and put it in my home directory’s bin directory (which you’ll probably have to make first), where many Linux distributions are configured to look for things to execute if you type their names at the command prompt. (Yes, all of this assumes you’re running Linux. It’s not just for supergeeks anymore! If you’re running Windows you’ll have some adjustments to make, including figuring out how to add the script’s home to your path. It should work on Macs, although I don’t know if it’ll look in your home’s bin either.)

Oh, you will have to run a chmod +x fancypants on it. And the script as written assumes Python is at /usr/bin/python, where most distros will put it.

The script expects to be executed in the form:

fancypants [style] [text to convert]

The text should probably be in quotes if there’s any spaces in it, as should the style just in case. So to produce the first text mentioned at the start of the post, I entered:

fancypants "=" "This weird text was constructed with the utility mentioned in the title."

Usable style specifiers are “=” for double-stroke, “/” for script, “!” for a boldface kind of thing, “f” for the medieval script-looking fractur, and a few others that you can pretty easily see in the source code below. In fact each specifier has some synonyms if the single-character versions are too obscure for you to remember. And hey, if you don’t like the names I gave them you can use your own! The moment you paste it into a text file, this all becomes yours to do with as you please. Think of it as the blog version of a type-in program from an 80s computer magazine.

As a bonus, the names “r”, “rot” or “rot13” will perform a ROT13 code on the letters, useful for encoding spoiler text that readers can decode at ROT13.com. There are utilities that you can use to send the generated text directly to the clipboard, for pasting wherever you want, but since those differ if you’re using X.org or Wayland for your display manager (or, sure, Windows or Mac) I’ll leave those for you to figure out.

And if you can’t read the characters above, then I’m sorry that you’re missing out on the fun. It’s all pretty whimsical really, it’s not some huge thing that you’re missing. Come back tomorrow, I’m sure we’ll have a post about Mario or somesuch.

#!/usr/bin/python
import sys

base = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890!@#$%^&*()-_=+[]{};':\",./<>?~"
equals = "๐”ธ๐”นโ„‚๐”ป๐”ผ๐”ฝ๐”พโ„๐•€๐•๐•‚๐•ƒ๐•„โ„•๐•†โ„™โ„šโ„๐•Š๐•‹๐•Œ๐•๐•Ž๐•๐•โ„ค๐•’๐•“๐•”๐••๐•–๐•—๐•˜๐•™๐•š๐•›๐•œ๐•๐•ž๐•Ÿ๐• ๐•ก๐•ข๐•ฃ๐•ค๐•ฅ๐•ฆ๐•ง๐•จ๐•ฉ๐•ช๐•ซ๐Ÿ™๐Ÿš๐Ÿ›๐Ÿœ๐Ÿ๐Ÿž๐ŸŸ๐Ÿ ๐Ÿก๐Ÿ˜!@#$%^&*()-_=+[]{};':\",./<>?~"
script = "๐“๐“‘๐“’๐““๐“”๐“•๐“–๐“—๐“˜๐“™๐“š๐“›๐“œ๐“๐“ž๐“Ÿ๐“ ๐“ก๐“ข๐“ฃ๐“ค๐“ฅ๐“ฆ๐“ง๐“จ๐“ฉ๐“ช๐“ซ๐“ฌ๐“ญ๐“ฎ๐“ฏ๐“ฐ๐“ฑ๐“ฒ๐“ณ๐“ด๐“ต๐“ถ๐“ท๐“ธ๐“น๐“บ๐“ป๐“ผ๐“ฝ๐“พ๐“ฟ๐”€๐”๐”‚๐”ƒ1234567890!@#$%^&*()-_=+[]{};':\",./<>?~"
bold = "๐€๐๐‚๐ƒ๐„๐…๐†๐‡๐ˆ๐‰๐Š๐‹๐Œ๐๐Ž๐๐๐‘๐’๐“๐”๐•๐–๐—๐˜๐™๐š๐›๐œ๐๐ž๐Ÿ๐ ๐ก๐ข๐ฃ๐ค๐ฅ๐ฆ๐ง๐จ๐ฉ๐ช๐ซ๐ฌ๐ญ๐ฎ๐ฏ๐ฐ๐ฑ๐ฒ๐ณ๐Ÿ๐Ÿ๐Ÿ‘๐Ÿ’๐Ÿ“๐Ÿ”๐Ÿ•๐Ÿ–๐Ÿ—๐ŸŽ!@#$%^&*()-_=+[]{};':\",./<>?~"
bolditalic = "๐‘จ๐‘ฉ๐‘ช๐‘ซ๐‘ฌ๐‘ญ๐‘ฎ๐‘ฏ๐‘ฐ๐‘ฑ๐‘ฒ๐‘ณ๐‘ด๐‘ต๐‘ถ๐‘ท๐‘ธ๐‘น๐‘บ๐‘ป๐‘ผ๐‘ฝ๐‘พ๐‘ฟ๐’€๐’๐’‚๐’ƒ๐’„๐’…๐’†๐’‡๐’ˆ๐’‰๐’Š๐’‹๐’Œ๐’๐’Ž๐’๐’๐’‘๐’’๐’“๐’”๐’•๐’–๐’—๐’˜๐’™๐’š๐’›1234567890!@#$%^&*()-_=+[]{};':\",./<>?~"
monospace = "๐™ฐ๐™ฑ๐™ฒ๐™ณ๐™ด๐™ต๐™ถ๐™ท๐™ธ๐™น๐™บ๐™ป๐™ผ๐™ฝ๐™พ๐™ฟ๐š€๐š๐š‚๐šƒ๐š„๐š…๐š†๐š‡๐šˆ๐š‰๐šŠ๐š‹๐šŒ๐š๐šŽ๐š๐š๐š‘๐š’๐š“๐š”๐š•๐š–๐š—๐š˜๐š™๐šš๐š›๐šœ๐š๐šž๐šŸ๐š ๐šก๐šข๐šฃ๐Ÿท๐Ÿธ๐Ÿน๐Ÿบ๐Ÿป๐Ÿผ๐Ÿฝ๐Ÿพ๐Ÿฟ๐Ÿถ!@#$%^&*()-_=+[]{};':\",./<>?~"
block = "๐—”๐—•๐—–๐——๐—˜๐—™๐—š๐—›๐—œ๐—๐—ž๐—Ÿ๐— ๐—ก๐—ข๐—ฃ๐—ค๐—ฅ๐—ฆ๐—ง๐—จ๐—ฉ๐—ช๐—ซ๐—ฌ๐—ญ๐—ฎ๐—ฏ๐—ฐ๐—ฑ๐—ฒ๐—ณ๐—ด๐—ต๐—ถ๐—ท๐—ธ๐—น๐—บ๐—ป๐—ผ๐—ฝ๐—พ๐—ฟ๐˜€๐˜๐˜‚๐˜ƒ๐˜„๐˜…๐˜†๐˜‡๐Ÿญ๐Ÿฎ๐Ÿฏ๐Ÿฐ๐Ÿฑ๐Ÿฒ๐Ÿณ๐Ÿด๐Ÿต๐Ÿฌ!@#$%^&*()-_=+[]{};':\",./<>?~"
fraktur = "๐•ฌ๐•ญ๐•ฎ๐•ฏ๐•ฐ๐•ฑ๐•ฒ๐•ณ๐•ด๐•ต๐•ถ๐•ท๐•ธ๐•น๐•บ๐•ป๐•ผ๐•ฝ๐•พ๐•ฟ๐–€๐–๐–‚๐–ƒ๐–„๐–…๐–†๐–‡๐–ˆ๐–‰๐–Š๐–‹๐–Œ๐–๐–Ž๐–๐–๐–‘๐–’๐–“๐–”๐–•๐––๐–—๐–˜๐–™๐–š๐–›๐–œ๐–๐–ž๐–Ÿ1234567890!@#$%^&*()-_=+[]{};':\",./<>?~"
rot = "NOPQRSTUVWXYZABCDEFGHIJKLMnopqrstuvwxyzabcdefghijklm1234567890!@#$%^&*()-_=+[]{};':\",./<>?~"
tilde = len(equals)-1

def convert(convertchar, intext):
outlist = []
match convertchar:
case "=" | "equal" | "equals":
clist = equals
case "/" | "slant" | "script":
clist = script
case "!" | "bold":
clist = bold
case "!/" | "bolditalic" | "boldital":
clist = bolditalic
case "m" | "mono" | "monospace":
clist = monospace
case "b" | "block" | "mathbold":
clist = block
case "f" | "fraktur":
clist = fraktur
case "r" | "rot" | "rot13":
clist = rot
case _:
raise ValueError("Unknown charset " + convertchar)
return intext
for char in intext:
try:
index = base.index(char)
except:
outlist.append(char)
continue
outchr = clist[index]
if outchr != "~":
outlist.append(outchr)
else:
outlist.append(base[index])
return "".join(outlist)

if __name__ == "__main__":
convertchar = sys.argv[1]
intext = sys.argv[2]
print(convert(convertchar, intext))

A Way To Make A PC Startup With The Pokemon PC Noise

isithran on Mastodon came up with a grub boot line that can make your PC’s speaker (or whatever substitute it may have) play the classic Pokรฉmon PC startup noise (3 seconds). A demo can be tested here. “PC” obviously stands for “Pokรฉmon Container.”

This sound right here.

grub (properly lowercase) is a bootloader for some Linux machines. I can’t tell you if it’s easy to add it to a computer’s startup files, but if you know how to do such things, please enjoy.

Action Retro Demonstrates PS2 Linux

It’s a weird bit of console gaming lore than Sony was so proud of the PS2’s Cell processor that they actually officially ported Linux to it. All you had to do was buy the “Linux Kit,” which contained two DVDs, a module that added monitor-capable video out and Ethernet ports, and a “gigantic” 40GB hard drive.

As it turns out, the PS2 was actually all that great a Linux machine, and it was soon outclassed by PCs. That hasn’t stopped there from being a Playstation Linux community, with a website that sadly announces that it most soon close down in a post dating to 2009. It feels a bit like one of those “Closing Liquidation” signs that sometimes stores that have no plans of shutting down put up, in the hopes of attracting some extra customers. Oh well, I’m sure it’ll perish eventually, such is the way of all things. I just hope they can hold out a few extra decades.

Here is the video (20 minutes), although note that it contains a sponsored segment. This link skips past it. Michael MJD also tried it out a couple of years ago (27 minutes), if you’d like to see their reactions.

Some observations:

  • Buying a complete unopened PS2 Linux box nowadays can cost you well over $1,000.
  • It was released in 2002; Linux itself was first created in 1991.
  • It’s based on the Japanese distribution Kondara, which itself was based off of Red Hat, and it shows due to it using RPM for its package format.
  • It runs WindowMaker for its GUI, which is based off of NeXTSTEP, the predecessor of the GUI used in current-day macOS.
  • In 2025 this is very much a Stupid Computer Trick, or perhaps a Stupid Console Trick, but ActionRetro has so much fun running OSes on various unexpected hardware that it’s difficult to fault him for it.

37C3 Unlocked: Turning Chromebooks into Laptops

37C3 was the 37th Chaos Communication Congress, held in 2023, and a talk was given there by elly and sdomi on the subject of unlocking and using Chromebooks as regular Linux-running computers.

That’s it. That’s all for today. It’s 39 minutes though, so it should keep you going for a while. If you’d like to avoid Youtube and its various vagarities, you can also get it directly from the event website.

/dev/scream

Computer entertainment is a wide field, and it’s easy to forget that it’s not all jut vidja gmaes. Por ejemplo.

On Linux machines, there is a system “device” called /dev/zero. If you pipe its cont ents into something else, like a file, it provides an endless stream of zero bits.

Someone, going off of that idea, created another virtual device called /dev/one. It produces an endless sequence of 1 bits. Usually this takes the form of 255 bytes, which are binary 11111111.

/dev/zero is more useful than /dev/one, since zero bits also make zero bytes. Usually, if you’re using /dev/zero, you don’t actually care much about the data you get anyway. /dev/one is mostly for the entertainment of a weird sort of Linux user, presumably one that makes jokes about vi and Emacs.

Well to that kind of person, /dev/scream should be 20% more entertaining still. (A 20% increase should rightfully, I think, be called a “Dash.”) It produces an endless randomized sequence of two characters, capital and lowercase A, and capital and lowercase H. So:

“AHAhaHaAAHHahaaAhAhHAHaAhAAHHhah”

The fact that it could be interpreted as either a sequence of screaming, or a sequence of laughing, could be taken as either a bug or a feature.

/dev/scream (GitHub)

Someone Runs Mac OS 9 on a Nintendo Wii

The narrator has a moderate case of Youtuberitis (symptoms evident: over-gesturing with hands, annoying shtick; absent: ending sentences in an undertone like they were John Cleese playing a TV presenter), but it’s still an interesting and even informative video about making software, and hardware, doing things they really weren’t designed to do.

One piece of the puzzle for getting this insane project working was Linux on Wii; another piece was the fact that the Wii and late versions of Mac OS Classic both use PowerPC processors. It doesn’t work perfectly, but as they say, it’s amazing that the Nintendog talks at all.

News 6/21/22: Atari Protonic Quakey Pikmin

“We scour the Earth web for indie, retro, and niche gaming news so you don’t have to, drebnar!” – your faithful reporter

Rich Stanton at PC Gamer: Atari shocks the world with decent-looking game, Atari Mania! He compares it to the Japan-only Segagaga, but what the gameplay description really brings to my protoplasmic mind is NES Remix. We’re pretty harsh on the company that calls itself Atari on this site, but it’s really nice to see something genuinely interesting coming from them, that respects and pays homage to their paid-for name instead of just cashing in on it!

Atari Mania

Ana Diaz, in the virtual pages of Polygon, says that Netflix subscribers should download Poinpy, a short and fun game that’s free to subscribers. It’s a game about climbing and making smoothies for hungry monsters!

Liam Dawe of GamingOnLinux writes about Proton 7.0-3 further improving Windows games on Steam Deck and Linux running Steam. I anxiously watch for the day when Windows 10 reaches end-of-life, since none of my current machines officially supports Windows 11, drebnar.

Noelle Warner at Destructoid relates that crowdfunded indie game A Frog’s Tale looks great, with play inspired by games like Mario & Luigi: Superstar Saga.

We usually steer away from speculative news here, but the piece by Jess Reyes at Inverse is too interesting to ignore, that Breath of the Wild 2 leaks suggest Zelda might be playable and a New Game Plus mode. Now that’s some meaningless hype that we can appreciate, drebnar!

Martin Robinson at Eurogamer suggests that Street Fighter 6‘s Smash Bros-like control system might be its best new feature. I’ve mentioned here in the past a personal grudge I have against fighting games, having never grown to cotton to them back when I was a teenage blobby, but it’s nice to see the series working to make itself more accessible to new players, even if the article’s tone verges slightly on the over-enthusiastic, in my amoebic opinion.

Adam Conway at XDA, on how Quake was ported to the GBA. A quick summary: “with much difficulty.” But truly, it’s a very interesting article, with the added detail that the unreleased rom has been preserved! There’s an attached YouTube video.

Alana Hagues with the one NintendoLife link we’re allowing ourselves this time, a reminder that it’s been five years since last word of progress on Pikmin 4.

And, honestly, a lot of the pieces that make the page here are light and fluffy, but here’s one a bit more important than usual. I love the headline applied to Ethan Gach’s bit for Kotaku, entitled Activision Blizzard Clears Itself of Any Wrongdoing. And the tagline reads, “The Call of Duty publisher says itโ€™s the victim of an ‘unrelenting barrage of media criticism'” I WONDER WHY THAT IS, ACTIVISION BLIZZARD. HOW COULD THAT HAPPEN?