A font for machine instructions

No, not a font for programmers, or at least not directly. This is a font for actually encoding machine instructions.

For instance, the standard programming constructif is composed of the ASCII codes 0x69 and0x66(or Unicode U+0069 and U+0066). This singular concept takes two codes to write and uses a language that's only spoken by a fraction of the planet.

Think that last part through. Almost every major programming language is based on English. Wow.

Anyhow, imagine if we could remove the dependency upon the English language and instead encode the concept of "if" in just a single character. People could then create fonts that renders glyphs appropriate to the user's language and writing system!

If you read the last post here you'll find a font called Quest PIOC 009 along with a sample text file that uses plane 15 from Unicode (the private use area which people often use for testing) to do just that.

Here's a sample of the font rendering five parts of the if-then-elseif-else-endif concepts (font on the left, human interpretation on the right):

The if concept above is represented by the Unicode code-point U+FA02A which is encoded in UTF-16 LE as A8-DB-2A-DC. So, although we now need 4 bytes to encode the concept of "if" we can do it in a language-agnostic way!

There's other language and low-level constructs in there including registers, loops, display output via "putpixel", mathematical functions (cos, arc, etc.) and even actual functions. At the bottom of this page there's a screenshot showing everything that's included in version 9 of the font that's based off of draft 5 of William Overington's proposal.

Overall, I'm not sure if this is going to go anywhere. This was all from 2010 and there's a post in the Unicode mailing list that says:

As Andrew pointed out, you are wasting your time and ours. "There is 
absolutely NO CHANCE that the UTC or WG2 will accept (or even waste their 
time discussing) your proposal as it is totally out of scope for character 
encoding standards." 

Honestly, at first glance I thought this was weird, esoteric and possibly even stupid. (Sorry William!). But as I was writing this and started to think more about it I've come to the decision that I think this could actually be a really good idea, although possibly not for reasons that the author might have really wanted.

Each code point used in the portable interpretable object code would represent a command to a virtual machine that would be obeyed by the application program, such as a document reader, that processed the Unicode characters as software. Thus dynamic illustrations and indeed interactive illustrations could be added into a text document using a non-proprietary format that is also in Unicode plain text format. This could perhaps have far-reaching implications for the future of information technology.

I'm still trying to wrap my brain around that but I generally believe that encoding programming instructions, with the intention of actually being executed relative to the surrounding content is very dangerous. Most email clients don't even all JavaScript for this specific reason. And remember those wonderful macros and VBA scripts from the 90's and 2000's?

But, I think that actually encoding these programming concepts themselves could have potentially great value. I don't know what the learning curve is for bringing people in that don't have a grasp of the English language to start programming. For instance, a quick translation of if from English to Tamil gives me என்றால். And in Vietnamese you get nếu.

And maybe the language barrier isn't a big problem, I don't know. Here's a simple for loop written in Chinese BASIC. I can tell you that except for the line numbers, this is a show-stopper for me!

10 卜=0

20 入 水, 火

30 從 日 = 水 到 火

40 卜 = 卜+對數(日)

50 下一 日

60 印 卜

Finally, here's the full rendering of the font as promised above. Remember, each box is a single glyph encoding a concept, and that this specific font is intended for English speakers although someone could make another font for other languages.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.