Can You Code in Ancient Egyptian Hieroglyphs?
By: James Anthony
Tags: Ancient Egypt, Hieroglyphics, Programming, Coding

Can one use the language of the priest, of the sage, of the scribe to build software?

Yes. Kind of. Maybe…Let me explain.

Though, you might be thinking why? Why would anyone do this? Umm — because why not?

I mean we have a programming language that is just variations of Pikachu. Seriously, the whole syntax is modulations to the Tail Whippin’, Thunderbolt using name of Pikachu. Can you say Pika, Pika, “Hello World”?

But first, we’ll have to go through a quick run-through of how the Egyptian hieroglyphs work. They might seem to the occasional tourist or somebody taken with cultural wanderlust to be clearly pictographic (think emojis 😎😝💯) but that would be wrong. Pictographic hieroglyphs are used only as determinatives on the end of a word or phrase to help the reader fully understand the meaning. Think man with his hand to his mouth to indicate speech or eating. Or this kneeling man with the headdress and beard to represent a god.

𓀭

Most of the hieroglyphs you see represent sounds — sounds that form words. Like a syllabic alphabet! And what’s better, over a thousand translated hieroglyphs are available in Unicode. That means we can type them into any document, code editor, or terminal. By the way, how awesome would it be to send work emails in hieroglyphs? “That project you wanted done? Here it is in the attachment. A’nekh djet! 𓋹𓏙”

Rosetta Stone for the win.

Okay, so that helps us if we endeavor to write code, but what happens if we need to write a line of code that consists of numbers?

Now comes the snag in the Egyptian cotton.

Numbers and math, the bane of any middle schooler’s existence, were also a sticking point for the Ancient Egyptians. Which is surprising since they built the fricken pyramids after all. But their algebraic system and way of using fractions were extremely bulky and hard to use.

For example, if you wanted to write 397 out in hieroglyphs. You’d need three ‘hundred’ symbols — the corded ropes. Nine ‘ten’ symbols — the hoops. And then seven vertical strokes for the ‘ones’.

𓍢 𓍢 𓍢 𓎎 𓐀

That’s just to write out a number. If you wanted to work with a fraction — well the Egyptians only used fractions that had a numerator of one.

So…if you had to write out 4/7, you’d have to factor it out so it was 1/2 + 1/14. That’s too much work when you have code to write and pyramids to build. And it’s no surprise the Ancient Egyptians often approximated answers to mathematical problems.

Amazing designers and craftsmen for sure, but their mathematics were not exact. I think it’s pretty safe to say: the pyramids were not galactic beacons and landing hangars for motherships journeying from the far spirals of the Milky Way.

Still, it’s cool to think that the people who designed and built the pyramids were closer to living wooly mammoths then we are to them. And I’m sure you’ve heard already that Cleopatra (𓈎𓃭𓇋𓍯𓊪𓄿𓂧𓂋𓄿) is closer in time to modern humans than the pyramids.

That’s one seriously long-lived civilization! Let Ra watch over your soul for millions of years indeed.

𓁚𓇳𓌵𓅓𓂓𓁨𓆴

Okay, so if we substitute our modern way of using numbers and mathematical expressions and plug in the hieroglyphs for if-else statements and the like, we can make that work. Yes!

We can now scribe our way to building software like the Ancient Egyptians did. 😉