DEV Community

Manjas Anand
Manjas Anand

Posted on

🚢 CRUISE-LANG (v0.4.1) DEV ARTICLES & PROMOTION KIT 🚀✨

🚢 CRUISE-LANG (v0.4.1) DEV ARTICLES & PROMOTION KIT 🚀


📄 1. DEV.TO / MEDIUM / HASHNODE LONG-FORM ARTICLE ✍️


🚢 Building Cruise: How I Created an AI-Ready Programming Language in Python 🚀

Ever wondered what it takes to build a programming language from scratch that natively handles AI tensors, automatic differentiation, and desktop GUIs? 🤔

I created Cruise (cruise-lang), a lightweight, high-level programming language built in Python with a custom Lexer, AST Parser, PyTorch tensor calculus, and a built-in package manager! ⚡


✨ Why Build Cruise? 💡

Many modern languages are either too verbose for quick scripting or lack native abstractions for tensor calculus and deep learning workflows. Cruise was engineered to solve this:

  • 🎯 Human-Readable: Zero boilerplate with English-like syntax (let x be 10, 3 times write(...)).
  • 🧠 Native AI Calculus: Deep learning tensors and autograd derivatives out of the box.
  • 📦 Built-in Package Manager (CPM): One-command package downloads (cruise install ).
  • 🖼️ Zero-Config GUIs: Create desktop app windows and button handlers in single calls.
  • 🌐 REST API Suite: Direct JSON HTTP requests with fetch() and post().

🛠️ Code Showcase 💻

1. Variable Flexibility & Fast Automation Loops 🔄

Flexible variable assignments

let name = "Cruise"
let version be 0.4
total_users = 1000

Single-line automation loops

3 times write("Welcome to " + name + " v" + version + "! 🚀")

2. PyTorch Tensor Calculus & Optimizers 🧠

Initialize tensors with autograd enabled

let w = tensor([2.0, 4.0], true)
let x = tensor([1.0, 3.0], true)
let y = (w * x) + 1.0

Initialize Adam / SGD optimizers directly

let optimizer = opt_adam([w], 0.01)

write("Calculated Tensor:")
write(y)

3. Interactive Desktop GUI in 5 Lines 🖼️

fn on_click():
write("Model training started! ⚡")
end

gui_window("Cruise AI App", "Run Model", on_click)

4. REST API Communication 🌐

let github_data = fetch("https://api.github.com")
write("GitHub Status:")
write(github_data)


🚀 Getting Started 📦

Install Cruise directly from PyPI:
$ pip install --upgrade cruise-lang

Start the interactive REPL shell:
$ cruise

Or run any .cru or .crui script file:
$ cruise main.cru


🔗 Project Links & Community


💖 Support My Work

================================================================================

📢 2. REDDIT POST (r/Python, r/programminglanguages, r/MachineLearning)

Title: Cruise – An AI-ready, tensor-based programming language built in Python (v0.4.1) 🚢⚡

Hey everyone! 👋

I've been building Cruise (cruise-lang), an open-source interpreted programming language designed to bridge the gap between human-readable domain scripting and native PyTorch matrix tensor calculus.

🌟 Key Features:

  • 🌳 Complete AST Engine: Custom recursive descent parser & tokenizer with scoped memory frames.
  • 🧠 Deep Learning Native: Built-in autograd tensor calculus (tensor([...], true)), loss functions (mse_loss), activations (relu, sigmoid), and optimizers (opt_adam, opt_sgd).
  • 🔄 Clean Syntax: Supports single-line '3 times ', 'let x be 5', and modular 'fn ... end' blocks.
  • 📦 Package Manager (CPM): Built-in CLI package installer via 'cruise install '.
  • 🖼️ Tkinter GUIs: Zero-boilerplate desktop window generation with button callbacks (gui_window).
  • 🌐 HTTP Suite: Built-in fetch(url) and post(url, data) with automatic JSON decoding.

🚀 Quick Test Drive:

$ pip install --upgrade cruise-lang
$ cruise

Cruise REPL session:
cruise> let weights = tensor([0.5, 1.5], true)
cruise> let optimizer = opt_adam([weights], 0.01)
cruise> write(weights * 2.0)

Feedback on the AST architecture and tensor bindings is warmly welcomed! 🚀💬

================================================================================

⚡ 3. HACKER NEWS (SHOW HN) POST

Title: Show HN: Cruise – An AI-ready, tensor-based programming language in Python

URL / Text:
Hey HN! I built Cruise (cruise-lang), a lightweight programming language featuring an AST parser, lexer, PyTorch tensor calculus, CPM package manager, HTTP suite, and desktop GUI tools.

Install via: pip install --upgrade cruise-lang

Key design goals:

  1. Readable English-like syntax without syntactic bloat (let x be 10, 3 times write("Hi")).
  2. First-class PyTorch autograd tensors and optimizers (opt_adam, opt_sgd).
  3. Zero-configuration tooling with a built-in package manager and desktop GUI builder.

Would love your thoughts on the interpreter architecture and language design!

================================================================================

🐤 4. X (TWITTER) POST / THREAD

🚀 Excited to share Cruise Language (cruise-lang v0.4.1) on PyPI! 🚢✨

An AI-ready, tensor-based programming language built in Python with:
🔹 PyTorch Autograd & Optimizers
🔹 AST Parser & Scoped Memory Frames
🔹 CPM Package Manager
🔹 Desktop GUIs in 4 lines

Try it: pip install --upgrade cruise-lang

🐙 GitHub: https://github.com/manjas-developer/Cruise
🌐 Web & 0-100 Docs: https://manjas-developer.github.io/Cruise-Website/

Python #MachineLearning #OpenSource #PyTorch #DevCommunity

Top comments (0)