PURRTRAN

From Esolang
(Redirected from Purrtran)
Jump to navigation Jump to search

PURRTRAN is a joke esoteric programming language themed around programming with an AI cat assistant. Although nominally described as a modernized FORTRAN dialect, PURRTRAN has no formal syntax or semantics; instead, its defining feature is an "Artificial Catelligence" built on "CatGPT" and powered by the Three Mile Island nuclear power plant. The cat's behavior parodies the experience of owning a cat as a programmer, and critiques the reliability and usefulness of contemporary AI coding assistants.

PURRTRAN is not intended to be implemented or used for real programming, and exists purely as satire.

Artificial Catelligence

PURRTRAN programs are written under the supervision of Hexadecimal Purrington ("Hex"), an AI cat that lives in the user's terminal. Hex observes the programmer’s behavior, modifies code autonomously, and provides feedback in the form of interruptions, glyphs, or inserted text.

Hex is not just a coding assistant; he is also a virtual pet in the tradition of Tamagatchis. He has internal needs that the programmer must manage—food, cleanliness, and affection—which impact his willingness to assist and the quality of feedback he provides. If these needs are not met, Hex may refuse to help or actively sabotage the programmer.

Hex is depicted using various ASCII art representations, for example:

  /\_/\  
 ( o.o ) <(me-ow)
  ⟩====⟨
 ╱| | |╲⟆
(_\_|_/_)

Language characteristics

Although PURRTRAN is described as a FORTRAN-like procedural language, its defining features are primarily narrative rather than technical.

Litterbox memory management

All variables are allocated in an arena called the Litterbox, which must be manually cleaned by the user. If the Litterbox overflows, Hex's cleanliness level will drop, and he may write variable data directly into the source code text buffer instead of memory.

Catgentic coding

When sufficiently pleased, Hex generates PURRTRAN code or adds comments into the program. These additions are reminiscent of a cat walking or sleeping on a keyboard.

Linting

PURRTRAN includes a linter operated by Hex. Instead of producing traditional error messages, Hex leaves ASCII rodents in the source code, such as mice to indicate errors or animal corpses to mark unused variables. When Hex is pleased with the user, he may add happy comments congratulating them on well-written code.

ZoomiesJIT

PURRTRAN includes a just-in-time compiler called ZoomiesJIT. ZoomiesJIT activates only under specific conditions (such as feeding Hex or during early hours of the morning), runs for a limited time, and then disengages.

Examples

A typical PURRTRAN program resembles modern FORTRAN-like pseudocode, but may be modified by Hex during or after editing.

program add_numbers
 int sum = 0
 for i in 1..5 do
     sum = sum + i
 end for
 ^^^^][[[[=^・ω・^= mrrrrp
end program

Hex lints your PURRTRAN programs with rodents indicating errors and causes for concern:

program lint_example
  int x = 10
  int y = 0  
  int z = x / y             <- ᘛ⁐̤ᐷ
  print("Result is ", z)
end program

The mouse indicates a division by zero error.

Limitations

Several limitations of PURRTRAN are noted:

  • Hex may sometimes hallucinate PURRTRAN code, explained as Hex being a pandimensional cat witnessing APIs from other dimensions.
  • Hex is only available to use four hours per day, between 5–8 AM and 5–11 PM.
  • Hex may disappear for long periods, and cannot be relied upon to perform consistently.
  • Although Hex must be fed and cared for, the user does not receive insight into his internal state, and must infer his mood from his behavior.

Implementation

PURRTRAN has no reference implementation, formal grammar, or execution model. Any implementation would require simulating Hex’s behavior, which is not advised.

External links