GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com โ€” GitHub - puzzlet/seshat: Code like an Egyptian

BranchesTags
Open more actions menu

Latest commit

 

History

11 Commits
11 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
build
build
 
 
docs
docs
 
 
grammar/seshat
grammar/seshat
 
 
tests
tests
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
bundle.mjs
bundle.mjs
 
 
egyptianNumber.ts
egyptianNumber.ts
 
 
eslint.config.mjs
eslint.config.mjs
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 
run-tests.sh
run-tests.sh
 
 
seshat.ts
seshat.ts
 
 
seshatStandardLibrary.ts
seshatStandardLibrary.ts
 
 
seshatToJavascript.ts
seshatToJavascript.ts
 
 
tsconfig.json
tsconfig.json
 
 

Repository files navigation

Seshat is a programming language in Egyptian hieroglyphs. Its goal is to make programming easy for anyone who can read and write Egyptian hieroglyphs.

"Seshat" (๐“‹‡ Zแบ–๊œฃ.t) is the name of an Egyptian goddess. The goddess of writing, architecture, and mathematics, she would definitely be the goddess of programming.

# hello.seshat
๐“น๐“Žก ๐“ž๐“œ๐“Žก ๐“…“ ๐“†“๐“Œƒ๐“‡‹๐“ฉ๐“‹‡๐“…จ๐“‚‹๐“๐“ŽŸ๐“ž๐“ŽŸ๐“ช๐“ง๐“‚ข
# ir=k zแบ–๊œฃ=k แธd-mdw j.nแธ Zแบ–๊œฃ.t Nb.t Wr.t Zแบ–๊œฃ Nb.t Jqd.w grแธฅ
# "Do write: "Hail Seshat, the Great, Mistress of the Script, Mistress of the Builders."
$ node build/lib/seshat.js hello.seshat
๐“‡‹๐“ฉ๐“‹‡๐“…จ๐“‚‹๐“๐“ŽŸ๐“ž๐“ŽŸ๐“ช๐“ง

But seriously, there are upsides about ancient Egyptian programming

Algorithms before antiquity

Among the oldest mathematical texts in human history are Rhind Mathematical Papyrus and Moscow Mathematical Papyrus. They mostly consist of problems and their solutions, and the solutions are written as line-by-line instructions. Like a description of an algorithm, they're very programmatic:

Make 10 heqats of the fat into ro; it shall become 3200.
Make a year into days; it shall become 365.
Divide 3200 by 365; it shall become 8 + 2/3 + 1/10 + 1/2190.
Make this in [haqet and ro notation]; 1/64 [haqet and] 2/3 + 1/10 + 1/2190 ro.

-- from Rhind Mathematical Papyrus Problem 66

x = heqat_to_ro(10)
assert x == 3200
assert days_in_a_year == 365
x = x / days_in_a_year
assert x == 8 + 2/3 + 1/10 + 1/2190
result = ro_to_haqet_and_ro(x)
assert result.haqet == 1/64
assert result.ro == 2/3 + 1/10 + 1/2190

Binary calculations

For multiplications and divisions, Egyptians used a method called "doubling." For example, to calculate 2000 * 5, they simply doubled 2000 until the multiplier reachs high enough for 5, and added things up:

\ 1     2000
  2     4000
\ 4     8000
Total  10000

-- from Rhind Mathematical Papyrus Problem 52

Over 3000 years later, it is similar to how computers multiply numbers every day.

Type systems everywhere

Egyptians used what we call "determinatives" at the ends of words to specify the categories of the meanings of the words. For example, the words ๐“Šข๐“‚๐“‚ป ๊œฅแธฅ๊œฅ "to stand" and ๐“Šข๐“‚๐“‡ค ๊œฅแธฅ๊œฅ "heap, quantity (in mathematics)" share the same spelling ๐“Šข๐“‚ ๊œฅแธฅ๊œฅ, but the determinatives ๐“‚ป and ๐“‡ค tell the meaning and make the words different. Like when we declare variables in typed programming languages.

In Seshat, you might use ๐“‡ค at the end of a variable to indicate it's about the quantity, namely a number variable. Or a papyrus scroll ๐“› for the string variables.

Documentation

TODO

References & Further Readings

The first books

Reimer (2014) is a good introductory book about ancient Egyptian mathematics.

If you are interested in Egyptian hieroglyphs for the first time, McDermott (2001) would be a good starter. Collier & Manley (1998) gives more about grammar and vocabulary.

  • Collier, M. & Manley, B. (1998). How to read Egyptian hieroglyphs: a step-by-step guide to teach yourself. Univ of California Press.
    • at archive.org
    • ใ€Š(๋Œ€์˜๋ฐ•๋ฌผ๊ด€์ด ๋งŒ๋“ ) ์ด์ง‘ํŠธ ์ƒํ˜•๋ฌธ์ž ์ฝ๋Š” ๋ฒ•ใ€‹. ํ•˜์—ฐํฌ ์˜ฎ๊น€. ๋ฃจ๋น„๋ฐ•์Šค, 2005.
  • McDermott, B. (2001). Decoding Egyptian hieroglyphs: How to read the secret language of the pharaohs. Chronicle Books.
    • at archive.org
    • ใ€ŠํŒŒ๋ผ์˜ค์˜ ๋น„๋ฐ€๋ฌธ์ž: ์ด์ง‘ํŠธ ์ƒํ˜•๋ฌธ์ž ์ฝ๋Š” ๋ฒ•ใ€‹. ๊ถŒ์˜์ง„ ์˜ฎ๊น€. ์˜ˆ๊ฒฝ, 2005.
  • Reimer, D. (2014). Count like an Egyptian: a hands-on introduction to ancient mathematics. Princeton University Press.

Language & dictionaries

  • Allen, J. P. (2000). Middle Egyptian: An introduction to the language and culture of hieroglyphs. Cambridge University Press.
    • at archive.org
  • Budge, E. A. W. (1911). A Hieroglyphic Vocabulary to the Theban Recension of the Book of the Dead: with an index to all the English equivalents of the Egyptian words (Vol. 31). Kegan Paul, Trench, Trรผbner & Co. Ltd.
    • at archive.org
  • Budge, E. A. W. (1920). An Egyptian Hieroglyphic Dictionary: with an index of english words, king list, and geographical list with indexes, list of hieroglyphic characters, coptic and semitic alphabets (Vols. 1-2). John Murray.
    • Vol. 1 at archive.org
    • Vol. 2 at archive.org
  • Dickson, P. (2006). Dictionary of middle Egyptian in Gardiner classification order.
  • Faulkner, R. O. (1964). A concise dictionary of Middle Egyptian.
    • at archive.org
  • Gardiner, A. H. (1927). Egyptian grammar: being an introduction to the study of hieroglyphs. 3rd ed. Oxford University Press.
    • at archive.org
  • Loprieno, A. (1995). Ancient Egyptian: a linguistic introduction. Cambridge University Press.
    • at archive.org

Online dictionaries

  • Kilani, Marwan. (2000). Madรนwwe Project - ThotBank dataset.
  • Ancient Egyptian Dictionary.
  • Thesaurus Linguae Aegyptiae.

The texts & researches

  • Chace, A. B., Archibald, R. C., Bull, L., Glanville, S. R. K., & Manning, H. P. (1929). The Rhind Mathematical Papyrus. Volume II: Photographs, Transcription Transliteration, Literal Translation. Mathematical Association of America.
    • at archive.org
  • Clagett, M. (1999). Ancient Egyptian Science: A Source Book (vol. 3). American Philosophical Society.
    • at archive.org
  • Imhausen, A. (2002). ร„gyptische Algorithmen: eine Untersuchung zu den mittelรคgyptischen mathematischen Aufgabentexten (Vol. 65). Harrassowitz Verlag.
  • Ritter, J. (2002). Closing the Eye of Horus: The Rise and Fall of 'Horus-eye Fractions'. In J. M. Steele & A. Imhausen (Eds.), Under One Sky: Astronomy and Mathematics in the Ancient Near East (pp. 297-323). Ugarit-Verlag.
  • Sethe, K. (1908). Die altรคgyptischen Pyramidentexte nach den Papierabdrucken und Photographien des Berliner Museums, (Vols. 1-2). J. C. Hinrichs'sche Buchhandlung.
    • at uchicago.edu
  • Struve, W. W. (1930). Mathematischer Papyrus des staatlichen Museums der schรถnen Kรผnste in Moskau: herausgegeben und kommentiert von WW Struve, unter Benutzung einer hieroglyphischen Transkription von BA Turajeff (Quellen und Studien zur Geschichte der Mathematik, Abt. A, Quellen, Band 1). Verlag von Julius Springer.

About

Code like an Egyptian

puzzlet.github.io/seshat/interpreter.html

Topics

egyptian-hieroglyphicsesolanghieroglyphs

Resources

Readme
License
Activity

Stars

77 stars

Watchers

2 watching

Forks

1 fork
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402520 โ€” GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800ร—600. No cookies required.