Skip to main content

Cyanox - A simple and elegant programming language

Project description

Cyanox Programming Language

Cyanox is a simple and elegant programming language designed for education and community learning.

Features

  • Simple Syntax: Easy to learn for beginners
  • Voice Output: Built-in speak() function for audio feedback
  • Variable Support: Dynamic typing with optional type hints
  • Functions: Define and call custom functions
  • Conditionals: If/elif/else statements with intuitive syntax
  • Syntax Highlighting: Full VS Code integration with custom theme

Installation

Prerequisites

  • Python 3.6+
  • VS Code (for syntax highlighting)

Install from PyPI

pip install cyanox-lang

Install VS Code Extension

Search for "Cyanox Syntax" in VS Code Extensions marketplace, or install from:

Quick Start

1. Create a Cyanox file

Create a file named hello.cn:

write("Hello, Cyanox!")
speak("Hello from Cyan Code")

2. Run the file

cyanox hello.cn

Language Guide

Variables

let name = "Alice"
let int age = 25
let message = "I am learning Cyanox"

Output

write("Hello, World!")
write(42)

Audio Output

speak("This is spoken text")

Input

input("Enter your name: ")

Functions

def greet(name) = write("Hello, " + name)
greet("Alice")

Conditionals

if age > 18 then write("Adult")
elif age > 13 then write("Teenager")
else write("Child")

Operators

  • Arithmetic: +, -, *, /, //, %, **
  • Comparison: ==, !=, <, <=, >, >=
  • Logical: and, or, not

Comments

# This is a comment
write("Code continues")

Examples

Example 1: Simple Program

let greeting = "Welcome to Cyanox"
write(greeting)
speak(greeting)

Example 2: Variables and Math

let int a = 10
let int b = 20
let int sum = a + b
write("Sum: " + sum)

Example 3: Functions

def add(x, y) = x + y
let result = add(5, 3)
write("5 + 3 = " + result)

Example 4: Conditionals

let int score = 85
if score >= 90 then write("Grade: A")
elif score >= 80 then write("Grade: B")
elif score >= 70 then write("Grade: C")
else write("Grade: F")

VS Code Integration

After installing both the PyPI package and the VS Code extension:

  1. Open any .cn file in VS Code
  2. Click the "Run" button in the top right, or press Ctrl+Shift+R
  3. Output appears in the integrated terminal

Project Structure

cyanox-lang/
├── cyanox/
│   ├── __init__.py
│   ├── cli.py           # Command-line interface
│   └── interpretor.py   # Language interpreter
├── setup.py
└── README.md

Contributing

Contributions are welcome! Here are some ways you can help:

  • Report bugs and issues
  • Suggest new features
  • Improve documentation
  • Add examples
  • Contribute code improvements

Community

Join our community to share ideas, ask questions, and discuss Cyanox:

  • GitHub Issues: Report bugs and suggest features
  • Discussions: Share ideas and ask questions

License

This project is licensed under the MIT License - see the LICENSE file for details.

Changelog

Version 0.1.0 (Initial Release)

  • Basic language features: variables, functions, conditionals
  • Built-in functions: write(), input(), speak()
  • VS Code extension with syntax highlighting
  • PyPI package for CLI usage

Support

For issues, questions, or suggestions:

  1. Check existing GitHub issues
  2. Open a new issue with detailed information
  3. Include example code that demonstrates the problem

Happy coding with Cyanox! 🎉

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

cyanox_lang-0.1.0.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

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

cyanox_lang-0.1.0-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for cyanox_lang-0.1.0.tar.gz
Algorithm Hash digest
SHA256 bf439ea7d6d4d12bc779f52c05d9011e4000219fe8ad9a24ad14f4422d941a59
MD5 7b39b8d27246ed8cc710536dfdbc83c8
BLAKE2b-256 2b976c4be74909452c17a3cef4366d240f66cd41482ce83fb2cfb33b8db65d30

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for cyanox_lang-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f2ecf7a16665470a0da3cabcf88a15b195f9d9a0097676c5b70c9bb30eef1291
MD5 628937a80b855ce1c72550c59d70a3df
BLAKE2b-256 d85af2097f923b4e3a15badc8d1c95ab65e53f949a6b2ab72ea91637061898bc

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