Skip to main content

Minimalist programming language with 8 primitives

Project description

🧬 CYPHER Programming Language

Version: 0.1.0
Author: Daouda Abdoul Anzize
Organization: Nexus Studio
License: MIT


🌟 What is CYPHER?

CYPHER is a minimalist programming language inspired by biological information processing concepts, featuring:

  • 8 core primitives for all operations
  • Unified architecture - one source file generates frontend, backend, and database code
  • Automatic hardware optimization - transparent CPU/GPU/Worker management
  • Single-file runtime - entire language in ~1,800 lines
  • Zero-dependency deployment

🚀 Quick Start

Installation

pip install cypher-lang

Your First Program

Create hello.cy:

# Hello World in CYPHER
A(greeting)
G(greeting;text:Hello, CYPHER!)
T(greeting;render:console)
F(greeting;fixed)
L(greeting;life)

Run it:

cypher run hello.cy

📚 The 8 Primitives

Primitive Function Example
A Create/Allocate A(user)
C Connect/Link C(database)
G Generate/Store G(name:Alice)
T Transform/Compute T(validate:email)
F Fix with constraints F(min:0;max:100)
L Execute/Live L(life)
I Conditional I(condition)
J Jump/Loop J(label)

💡 Key Features

Multi-Context Execution

One CYPHER file generates multiple outputs:

A(user)
G(user;name:Alice;email:alice@example.com)
C(user;database)
T(user;validate:email)
F(user;fixed)
L(user;life)

Outputs:

  • Frontend: HTML user interface
  • Backend: Rust-like API code
  • Database: SQL schema

Automatic Hardware Management

CYPHER automatically selects the best hardware:

A(processing)
T(processing;normalize:data)  #  Auto-routed to GPU if available
C(processing;database)         #  Auto-routed to async Workers
F(processing;fixed)
L(processing;life)

Evolution Constraints (F Primitive)

Define state boundaries with auto-evolution:

# Temperature controller with safety limits
A(temperature)
G(temperature;value:20)
F(temperature;min:15;max:30;auto_evolve:true;adapt_rate:0.1)
L(temperature;life)

📖 Documentation

🧪 Examples

Web Application

A(dashboard)
G(dashboard;title:Analytics Dashboard)
T(dashboard;layout:grid)
C(dashboard;api)
F(dashboard;fixed)
L(dashboard;life)

API Server

A(get_users)
G(get_users;endpoint:/api/users;method:GET)
C(get_users;database)
T(get_users;format:json)
F(get_users;fixed)
L(get_users;life)

🔧 CLI Commands

# Run CYPHER file
cypher run app.cy

# Compile to bytecode  
cypher build app.cy

# Multi-context execution
cypher run app.cy --contexts frontend,backend,database

# Version info
cypher version

🐍 Python API

from cypher import execute_cypher

result = execute_cypher("""
A(user)
G(user;name:Alice)
F(user;fixed)
L(user;life)
""", contexts=['frontend', 'backend'])

print(result['frontend'])  # HTML output
print(result['backend'])   # Backend code

🤝 Contributing

Contributions welcome! See CONTRIBUTING.md

📄 License

MIT License - see LICENSE

🔗 Links


Made with ❤️ by Nexus Studio

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

cypher_lang-0.1.0.tar.gz (18.1 kB view details)

Uploaded Source

Built Distribution

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

cypher_lang-0.1.0-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

Details for the file cypher_lang-0.1.0.tar.gz.

File metadata

  • Download URL: cypher_lang-0.1.0.tar.gz
  • Upload date:
  • Size: 18.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for cypher_lang-0.1.0.tar.gz
Algorithm Hash digest
SHA256 fd36f0024c9e626a1da7ae5fd0f7e9a244b8e9d47edbfeb819678549bb9e9b96
MD5 1474b9958298c8c99f40d49af8e554e8
BLAKE2b-256 03c7bb4723849405e96d86b796ddd8a0adfcc4bd21f71560ee284680e0f9e0e5

See more details on using hashes here.

File details

Details for the file cypher_lang-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: cypher_lang-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for cypher_lang-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 97b44604c5d254f828fc2670e16327ce0af856d39bd4441fd8a97c741e710efc
MD5 2bb45d0b56bab866c9f221906ac0c2d7
BLAKE2b-256 c8efc5caee031e763c1f9ad0d2a65afdd2c64e16468e95d12b79f900a47421fb

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