Skip to content

letterScript is a hyper-minimalist, AI-optimized programming language with a single, radical purpose: to be the most token-efficient language for an AI to write.

License

Notifications You must be signed in to change notification settings

TheMaster1127/letterScript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

letterScript

🚧 This project is in super early development!!! 🚧

letterScript: The Language Made For AI


What is letterScript?

letterScript is a hyper-minimalist, AI-optimized programming language with a single, radical purpose: to be the most token-efficient language for an AI to write.

It is not designed for humans. It is not designed for readability. It is designed for raw, uncompromising machine efficiency. letterScript strips away every extraneous character—spaces, delimiters, verbose keywords—to create a language so dense that it can be considered a text-based bytecode for Large Language Models.

The entire philosophy is built on a simple premise: fewer tokens means faster, cheaper, and more powerful AI code generation.

The Core Philosophy: Unapologetic Minimalism

letterScript achieves its revolutionary token efficiency by adhering to a few simple but strict rules:

  1. Single-Character Keywords: Every command is a single lowercase character or a symbol. l is a loop. i is a conditional. x closes a block. There is zero waste.
  2. Uppercase-Only Identifiers: All variable and function names are UPPERCASE. This creates a perfect, unambiguous distinction between commands and names, making the language incredibly simple to parse.
  3. No Whitespace, No Delimiters: Code is written as a single, continuous stream of characters. There are no spaces between tokens unless absolutely necessary to separate two adjacent uppercase identifiers. There are no semicolons. The parser infers statement endings based on a simple "continuation token" algorithm.

The result is a language that compresses complex logic into an incredibly small footprint.

Example: A Simple Program A standard if statement block in a C-style language:

int VAR = 5;
if (VAR == 5) {
  print("Hello");
}

Is represented in letterScript as:

#VARa5iVAR=5PRINT "Hello")x

The Genius: letterScript is Transpilable

letterScript is not just a theoretical experiment. It is a fully functional component of the HTVM Ecosystem.

While unreadable to humans, letterScript code is designed to be transpiled into a clean, human-readable HTVM language, which can then be further converted into any of HTVM's 15 target languages (C++, Python, JavaScript, etc.).

This is achieved through a multi-stage parsing architecture designed by its creator:

  1. String Isolation: All strings are first found and replaced with unique, safe placeholders.
  2. Disambiguation with Spaces: The parser intelligently injects spaces around identifiers and operators, transforming the dense string into a clean, space-delimited list of tokens.
  3. Code Generation: The parser walks through the clean token stream and generates the corresponding, fully-formatted HTVM code.
  4. String Re-insertion: The original strings are put back in their correct places.

The Proof: Real-World Efficiency Gains

This isn't a minor optimization. Benchmarks show letterScript provides a revolutionary level of compression.

  • FizzBuzz: A letterScript implementation required 44 tokens, while the equivalent C-style code took 84 tokens—a 47.6% reduction.
  • Tic-Tac-Toe: A complete Tic-Tac-Toe game in letterScript took 374 tokens, while its Python equivalent required 643 tokens—a 41.8% reduction.

By nearly halving the number of tokens required, letterScript proves its potential to fundamentally change the economics and speed of AI-driven development.

Why letterScript?

  • For AI Efficiency: To push the boundaries of what's possible in automated code generation.
  • For HTVM: As the ultimate demonstration of HTVM's power to parse and generate code from even the most unconventional syntax.
  • As a Philosophical Statement: To prove that the "right" way to design a language depends entirely on who—or what—is writing it.

letterScript is what happens when you stop designing languages for human comfort and start designing them for pure, logical efficiency. It's not just a language; it's a new way of thinking about code.


License

This work is licensed under the GNU General Public License v3.0 (GPLv3).

You are free to:

  • Share — copy and redistribute the material in any medium or format
  • Adapt — remix, transform, and build upon the material for any purpose, even commercially.

Under the following terms:

  • Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made.
  • ShareAlike — If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original.
  • No additional restrictions — You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits.

For full license details, see: https://www.gnu.org/licenses/gpl-3.0.html

About

letterScript is a hyper-minimalist, AI-optimized programming language with a single, radical purpose: to be the most token-efficient language for an AI to write.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published