Skip to main content

DotCode: Dot and NumDot esoteric programming languages

Project description

DotCode

DotCode is a family of dot-based esoteric programming languages with reversible, Python-interoperable tooling.

This project provides two languages:

  • Dot — unary dot-length encoding
    (each character → . repeated ASCII times; groups separated by spaces)
    File extension: *.dcode

  • NumDot — numeric dot-terminated encoding
    (each character → <ASCII>.)
    File extension: *.nd

DotCode includes:

  • A clean compiler (Python → Dot / NumDot)
  • A runtime and decoder (Dot / NumDot → Python + execution)
  • Two command-line tools: dot and numdot
  • Fully reversible, lossless translation

Installation

For users (recommended)

Install directly from PyPI:

pip install dotcode

This installs the dot and numdot commands system-wide.


For development / contributors

If you want to modify DotCode or run it from source:

git clone https://github.com/CarbonIt-Labs/dotcode.git
cd dotcode
pip install -e .

Quick start

Dot language

dot compile hello.py -o hello.dcode
dot run hello.dcode

NumDot language

numdot compile hello.py -o hello.nd
numdot run hello.nd
numdot decode hello.nd -o hello.py

Example hello.py:

print("Hello from DotCode")

File extensions & conventions

  • Dot language files: *.dcode
    (chosen to avoid collision with Microsoft Word .dot files)
  • NumDot language files: *.nd
  • Python source input: *.py (recommended)

Language summaries

Dot (DotCode)

  • Encoding: each character encoded as . repeated ord(character) times
  • Character groups separated by a single space

NumDot

  • Encoding: each character encoded as <decimal ASCII value>.

Both languages are fully reversible. The runtime decodes the source back to Python and executes it.


CLI reference

dot

dot compile <input.py> [-o output.dcode]
dot run <input.dcode>

numdot

numdot compile <input.py> [-o output.nd]
numdot run <input.nd>
numdot decode <input.nd> [-o output.py]

Security notice

DotCode executes decoded Python source using exec.

Do NOT run untrusted .dcode or .nd files.

Running encoded programs can execute arbitrary Python code. Always inspect source or use a sandboxed environment when handling third-party files.


Project structure

dotcode/
├─ pyproject.toml
├─ README.md
├─ CHANGELOG.md
├─ LICENSE
├─ dotcode/
│  ├─ dot/
│  ├─ numdot/
│  └─ common/
└─ tests/

License

MIT License.


Author

Edwin Sam K Reju

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dotcode-1.0.0.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dotcode-1.0.0-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file dotcode-1.0.0.tar.gz.

File metadata

  • Download URL: dotcode-1.0.0.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for dotcode-1.0.0.tar.gz
Algorithm Hash digest
SHA256 189ac95a0bf0b180f8aaaf02302514d34ef96fdf7d361d932709979f64799f78
MD5 27b18b2d7c5600f384498f4be7b3d65d
BLAKE2b-256 74e692a38cd6627885dcbcce92ddaa0a0378dcb95a096417de81dc03d1f1bdd2

See more details on using hashes here.

File details

Details for the file dotcode-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: dotcode-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 6.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for dotcode-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 baac3ba68f0a25297182af383c1df63e7cfdbef55db3fd80772ff69c8f183fe2
MD5 e2da4b3a43f5612042c162416cc6300b
BLAKE2b-256 1b3d2518532226bf6c45a16cad5b2ddd04a2594bdf8c502c55a18a73a8fbafda

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page