Skip to content

Latest commit

 

History

History
759 lines (554 loc) · 23.3 KB

File metadata and controls

759 lines (554 loc) · 23.3 KB
TechScript Dragon Logo

Typing SVG

Version Built in Rust Platform License Stars Author


⬇️ Download TechScript

Download Installer    All Releases    VS Code Extension


╔══════════════════════════════════════════════════════════════════════════╗
║                                                                          ║
║   Code should speak to humans first, machines second.                    ║
║   No semicolons. No brackets. No confusing symbols.                      ║
║   Just plain English — compiled to blazing-fast Rust bytecode.           ║
║   — Tcode-Motion  🐉                                                     ║
╚══════════════════════════════════════════════════════════════════════════╝

📖 Table of Contents


🤔 What is TechScript?

TechScript is an open-source, human-first programming language designed to eliminate the cognitive overhead of traditional syntax. Instead of symbols, brackets, and cryptic keywords — you write in plain English.

Under the hood, a native compiler and bytecode Virtual Machine written entirely in Rust handle execution with zero-overhead memory safety and high throughput.

// Traditional JavaScript — confusing
const x = document.getElementById('name');
if (x !== null && x.value.length > 0) { console.log(`Hello ${x.value}`); }
// TechScript — reads like English
make name = ask "What is your name? "
say f"Hello, {name}!"

TechScript is:

  • 🟢 A programming language — write code that runs natively on your computer
  • 🌐 A web builder — build full websites with zero HTML, CSS, or JS
  • 🦀 Powered by Native Rust — blazing-fast bytecode VM, no Python dependency
  • 🖥️ Ships with a full IDE — TechScript Studio, built with egui + egui_dock
  • 📦 One installer — compiler, VM, IDE, PATH setup, .txs associations, all in one .exe

⚡ Why TechScript?

Problem with traditional languages TechScript's answer
Cryptic syntax creates a steep learning curve Plain-English keywords: make, say, when, each, build
Slow interpreted languages, slow feedback loops Native Rust compiler + bytecode VM = fast execution
No built-in IDE for newcomers Ships with TechScript Studio — a full docking IDE
Fragmented toolchain setup Single .exe installer — compiler, VM, IDE, PATH, all in one
No way to build websites easily use web — full websites with zero HTML, CSS, or JS
Missing stdlib for real-world tasks 150+ built-in functions: math.*, crypto.*, fs.*, os.*, json.*

🆕 What's New in v1.0.8

🖥️ TechScript Studio IDE

A full-featured, cyberpunk-aesthetic developer workspace built with egui + egui_dock:

  • Resizable docking layout — drag, split, and dock panels freely
  • Code Editor — high-performance with custom line-number gutter
  • Workspace Explorer — browse and load .txs scripts instantly
  • Multi-Channel Terminal — real-time stdout + diagnostic logs, color-coded by channel
  • AST Inspector — live parse tree view alongside your code
  • Bytecode Inspector — see exactly what VM instructions your code compiles to

Terminal channel colors:

Channel Color Purpose
📟 Stdout Emerald #0DF28B Script output
⚙ Compiler Electric Blue #00A3FF Build diagnostics
🐞 VM Debugger Lavender #D8B4FE Runtime debug info

Inline controls: 🧹 Clear Logs · 📋 Copy Output · ▶ Re-run Script


🪟 Windows Shell Integration

Double-clicking any .txs file in Windows Explorer now launches a native terminal host that runs the script and holds output open:

[Process completed. Press Enter to exit...]

No more disappearing terminal windows.


🛠️ Maintenance Manager

The unified TechScript_v1.0.8_x64.exe includes a full maintenance suite:

Mode What it does
⚙ Modify Customize PATH variables, shortcuts, .txs file associations
🔧 Repair Restore missing binaries and broken registry keys
🗑 Uninstall Clean removal — PATH, registry, folders, all gone

🚀 Quick Start

1. Download & install:

TechScript_v1.0.8_x64.exe

Tick Add to PATH + Associate .txs Files during setup. Done.

2. Write your first script — create hello.txs:

say "Hello, World!"

make x = 10
make y = 20
make sum = x + y

say f"Result: {sum}"

3. Run it:

tech run hello.txs

Or just double-click hello.txs in Windows Explorer.


📦 Installation

🪟 Windows (Recommended — No Terminal Needed!)

Option 1: Setup Wizard (Recommended)

  1. Go to the 📥 Releases page
  2. Download TechScript_v1.0.8_x64.exe
  3. Double-click it — installs everything automatically
  4. Open PowerShell (Win + X) and run:
tech version

You should see: TechScript v1.0.8 🎉

What the installer does automatically:

  • ✅ Installs the native Rust compiler + bytecode VM
  • ✅ Installs TechScript Studio IDE
  • ✅ Makes the tech command available everywhere
  • ✅ Registers .txs files for double-click execution
  • ✅ Installs the VS Code extension for syntax highlighting

Option 2: pip (Cross-platform wrapper)

pip install techscript-lang

🐧 Linux (Ubuntu, Kali, Debian, Arch)

One-line installer:

curl -fsSL https://raw.githubusercontent.com/Tcode-Motion/techscript/main/scripts/install.sh | bash

APT (Debian/Ubuntu):

sudo apt update && sudo apt install techscript

🍎 macOS

# Homebrew
brew install tcode-motion/techscript/techscript

# OR one-line installer
curl -fsSL https://raw.githubusercontent.com/Tcode-Motion/techscript/main/scripts/install.sh | bash

📱 Android (Termux)

pkg update && pkg upgrade -y
pkg install python -y
pip install techscript-lang
tech version

Update: pip install --upgrade techscript-lang

📖 See docs/TERMUX.md for the full Android guide.


📖 Language Guide

🟢 Level 1: Core Basics

📦 Variables

# 'make' creates a variable
make name = "Alice"

# 'keep' creates a CONSTANT — can never be changed
keep PI = 3.14159

make age = 25
make items = [1, 2, 3, 4, 5]      # List
make info = { "city": "Delhi" }    # Dictionary

🖨️ Output

say "Hello!"
say f"My name is {name}!"         # f-string
say 10 + 5                         # Prints: 15

💬 Input

make name = ask "What is your name? "
say f"Nice to meet you, {name}!"

🟡 Level 2: Logic & Control Flow

🔀 Conditions

make age = 20

when age >= 18 {
    say "You are an adult!"
} or when age >= 13 {
    say "You are a teenager!"
} else {
    say "You are a child!"
}

🔁 Loops

# Range loop
each i in 1..5 {
    say f"Count: {i}"
}

# List loop
each fruit in ["apple", "banana", "mango"] {
    say f"I like {fruit}!"
}

# While loop
make x = 1
repeat x <= 5 {
    say x
    x = x + 1
}

# stop (break) and skip (continue) — fixed in v1.0.3
each i in 1..10 {
    when i == 5 { stop }
    when i == 3 { skip }
    say i
}

🔍 Operators — in and typeof

# 'in' — containment check
make fruits = ["apple", "banana"]
when "apple" in fruits { say "Found it!" }
when "ello" in "Hello" { say "Substring!" }

# 'typeof' — get the real type name
say typeof 42          # int
say typeof "Alice"     # str
say typeof [1, 2]      # list

🟠 Level 3: Functions

build greet(name, greeting = "Hello") {
    say f"{greeting}, {name}!"
}

greet("Alice")             # Hello, Alice!
greet("Bob", "Hi there")  # Hi there, Bob!

🔴 Level 4: Pro Features

🏗️ Classes

model Dog {
    build init(self, name, breed) {
        self.name = name
        self.breed = breed
    }
    build speak(self) {
        say f"{self.name} says: Woof!"
    }
}

make rex = Dog("Rex", "German Shepherd")
rex.speak()     # Rex says: Woof!

⚠️ Error Handling

attempt {
    make result = 10 / 0
} catch err {
    say f"Caught: {err.message}"
}

say "Program continues!"

💎 Level 5: New v1.0.8 Syntax

// Variables (new style)
make x be 10
make name be "TechScript"

// Conditionals (new style)
when version equals 1 then
  say "Latest build!"
end

// Loops (new style)
each item in list then
  say item
end

// Functions (new style)
build greet with name then
  say "Hello, " + name
end

greet "World"

🌐 Building Websites with TechScript

Type use web at the top — build a complete running website in one .txs file:

use web

make page = WebPage("My Website")

page.style("body", {
    "background": "#0f0f11",
    "color": "#eeeeee",
    "text-align": "center",
    "padding": "60px"
})

page.script("""
    function sayHello() { alert('Hello from TechScript! 🐉'); }
""")

page.body([
    page.h1("Welcome! 🐉"),
    page.p("Built 100% in TechScript. No HTML. No CSS."),
    page.button("Click Me!", { "onclick": "sayHello()" })
])

page.run()

Run it:

tech run my_website.txs

Browser opens automatically. Press Ctrl+C to stop.


⚡ Standard Library — 150+ Built-in Functions

Everything baked into the binary. No internet imports needed.

🔢 math.* — 38+ Functions

say math.sin(3.14159)
say math.factorial(10)         # 3628800
say math.gcd(48, 18)           # 6
say math.mean([1, 2, 3, 4, 5]) # 3.0
say math.sqrt(144)             # 12.0
say math.TAU                   # 6.283185...

🔐 crypto.* — Real Cryptography

say crypto.sha256("hello")              # FIPS 180-4 SHA-256
say crypto.md5("hello")                 # MD5 hash
say crypto.base64_encode("TechScript")  # Base64
say crypto.base64_decode("VGVjaFNjcmlwdA==")

📄 json.* — JSON Encode / Decode

make data = { "name": "Alice", "age": 25 }
say json.encode(data)
say json.encode_pretty(data)
make parsed = json.decode('{"x": 1}')

📁 fs.* — File System (20+ Functions)

fs.write("hello.txt", "Hello, World!")
say fs.read("hello.txt")
say fs.exists("hello.txt")      # true
fs.append("hello.txt", "\nMore!")
say fs.list_dir(".")

💻 os.* — OS Integration

say os.name()                   # windows / linux / macos
say os.arch()                   # x86_64
say os.env_get("PATH")
os.system("echo Hello!")

🎲 random.* — Random & UUID

say random.random()              # 0.0-1.0
say random.randint(1, 100)
say random.uuid()
say random.choice(["a","b","c"])

📅 date.* — Date & Time

say date.now()    # 2025-03-12 14:30:00
say date.year()
say date.unix()   # unix timestamp

🛠️ All CLI Commands

Command What it does Example
tech run file.txs Run a TechScript file tech run hello.txs
tech run file.txs --debug Run with debug info tech run calc.txs --debug
tech check file.txs Check for errors without running tech check myapp.txs
tech eval "code" ⚡ Run inline code instantly tech eval "say 42"
tech "[[[code]]]" ⚡ Shorthand inline execution tech "[[[say 'hi']]]"
tech repl Open interactive live mode tech repl
tech transpile file.txs Convert code to Python tech transpile hello.txs
tech fmt 🆕 Auto-format your code tech fmt myapp.txs
tech lint 🆕 Find errors before running tech lint myapp.txs
tech build 🆕 Compile to bytecode (.txc) tech build myapp.txs
tech test 🆕 Run built-in unit tests tech test
tech studio 🆕 Launch TechScript Studio IDE tech studio
tech version Show installed version tech -V

📋 All Example Programs

File What it does Run it
examples/hello.txs Hello World tech run examples/hello.txs
examples/fibonacci.txs Fibonacci numbers tech run examples/fibonacci.txs
examples/fizzbuzz.txs Classic FizzBuzz tech run examples/fizzbuzz.txs
examples/classes.txs OOP with Dogs & Cats tech run examples/classes.txs
examples/calculator.txs Simple calculator tech run examples/calculator.txs
examples/guessing_game.txs Guess the number tech run examples/guessing_game.txs
examples/07_performance_test.txs ⚡ 1M-iteration benchmark tech run examples/07_performance_test.txs
examples/web_app_simple.txs Dark-theme website tech run examples/web_app_simple.txs
examples/web_complete.txs Counter + API + form tech run examples/web_complete.txs
examples/08_math_module.txs Math: trig, roots, stats tech run examples/08_math_module.txs
examples/09_string_ops.txs String operations tech run examples/09_string_ops.txs
examples/10_json_module.txs JSON encode/decode tech run examples/10_json_module.txs
examples/11_crypto_module.txs SHA-256, Base64, MD5 tech run examples/11_crypto_module.txs
examples/12_date_module.txs Date/time/unix tech run examples/12_date_module.txs
examples/13_fs_module.txs File read/write/list tech run examples/13_fs_module.txs
examples/14_os_module.txs OS info, env vars tech run examples/14_os_module.txs
examples/15_random_module.txs Random, UUID, choice tech run examples/15_random_module.txs
examples/16_control_flow_fix.txs stop/skip/in/typeof tech run examples/16_control_flow_fix.txs
examples/17_inline_eval.txs Inline execution howto tech run examples/17_inline_eval.txs

🎨 VS Code / Cursor Editor Extension

Get syntax highlighting, code snippets, and the 🐉 dragon file icon for .txs files:

Method 1 — Command line:

code --install-extension vscode-extension/techscript-1.0.8.vsix

Method 2 — GUI:

  1. Open VS Code
  2. Press Ctrl+Shift+X
  3. Click ··· → "Install from VSIX..."
  4. Choose vscode-extension/techscript-1.0.8.vsix

📂 Repo Structure

techscript/
├── assets/               # Logo and branding
├── bin/                  # Compiled binaries (TechScript_TX.exe)
├── docs/                 # Language reference and guides
│   ├── QUICKSTART.md
│   ├── REFERENCE.md
│   ├── STDLIB_REFERENCE.md
│   ├── WEB_MODULE.md
│   └── TERMUX.md
├── examples/             # 17+ ready-to-run .txs scripts
├── scripts/              # install.sh for Linux/macOS
├── vscode-extension/     # techscript-1.0.8.vsix
├── TechScript_v1.0.8_x64.exe  # Windows installer
└── README.md

🔄 Full Version History

Version Engine Key Feature Added
v1.0.0 Python Core scripting: say, make, loops, functions, classes
v1.0.1 Python use web — build websites; Windows Setup.exe; install.sh
v1.0.2 🦀 Rust VM Full Rust rewrite; 1M loops in 2.9s; zero deps; error handling
v1.0.3 🦀 Rust VM 150+ stdlib (math, crypto, fs, os, json, random, date); stop/skip fixed; in/typeof; tech eval
v1.0.5 🦀 Rust VM use three_d module; TechScript_TX.exe; fmt/lint/build/test toolchain
v1.0.8 🦀 Rust VM TechScript Studio IDE (egui+egui_dock); AST+Bytecode Inspector; .txs shell integration; Maintenance Manager

v1.0.8 Detailed Changelog

  • TechScript Studio — Full docking IDE with Code Editor, Workspace Explorer, Multi-Channel Terminal, AST Inspector, Bytecode Inspector
  • Windows Shell Integration — Double-click .txs files to run, terminal stays open
  • Maintenance Manager — Modify, Repair, Uninstall modes inside the installer
  • New syntax stylemake x be 10, when x equals y then...end, build fn with arg then...end

v1.0.5 Changelog

  • use three_d — 3D scenes in 5 lines
  • TechScript_TX.exe standalone binary
  • Developer toolchain: tech fmt, tech lint, tech build, tech test
  • Glowing neon VS Code icons

v1.0.3 Changelog

  • Eliminated unsafe transmute — 100% type-safe bytecode
  • Fixed stop/skip (previously compiled to wrong instruction)
  • Fixed in operator and typeof
  • Added tech eval "code" inline execution
  • 150+ stdlib functions in 7 modules
  • Fixed Windows PATH truncation bug

v1.0.2 Changelog

  • Deleted Python runtime entirely — rewrote in Rust
  • Native bytecode VM: 1 million loops in 2.9 seconds
  • attempt {} catch err {} error handling
  • techscriptv1.0.2.exe native Windows binary

🚀 Roadmap

  • Linux + macOS native Rust builds
  • Standard library expansion (use http, use sql)
  • TechScript Package Registry
  • WASM compilation target
  • Language Server Protocol (LSP) support
  • Interactive REPL in Studio IDE
  • Android native build (no Python dependency)

📚 Documentation

Document Description
Quick Start Guide Step-by-step install for all platforms
Language Cheat Sheet All keywords, functions, and syntax
Standard Library Reference All 150+ built-in functions by module
Web Module Guide Build websites with TechScript
Termux Guide Install and run on Android

🌍 Platform Support

Platform Status Install Method
Windows 10/11 ✅ Fully supported TechScript_v1.0.8_x64.exe or pip
macOS ✅ Fully supported install.sh or brew
Linux (Ubuntu, Kali, Arch) ✅ Fully supported install.sh or apt
Android (Termux) ✅ Works pip install techscript-lang

👨‍💻 Author

Built by Tanmoy Majumder — independent developer, West Bengal, India.

🔥 Project 📖 Description
🐉 TechScript Plain-English programming language — Native Rust VM + Studio IDE
🌌 NovOS Cinematic web OS — POSIX VFS, Nova AI, Aether Design
🧠 Project JARVIS Personal AI assistant built in Python
🎨 3D Visuals WebGL particle systems + Three.js experiences
🤖 AR Keyboard Hand-gesture virtual keyboard with OpenCV + MediaPipe

GitHub YouTube Releases

"Write like a human. Run like Rust."


📄 License

MIT — free to use, modify, and distribute. See LICENSE.