Next-Generation Browser-Native Programming Experience
๐ฏ๐ต ๆฅๆฌ่ช็ใฏใใกใ / Japanese Version
No installation, no setup - just open and code!
๐ ๐ฎ Launch Nyash Browser Playground ๐
Experience features like:
// Traditional languages: manual memory management, crashes, security issues
// Nyash: Everything is Box - automatic, safe, elegant
static box Main {
init { player, enemies, canvas }
main() {
me.player = new PlayerBox("Hero", 100)
me.canvas = new WebCanvasBox("game", 800, 600)
// Memory automatically managed - no crashes, no leaks!
me.player.render(me.canvas)
return "Game running safely!"
}
}
// Create art with code - naturally!
box Artist {
init { name, color }
paintMasterpiece(canvas) {
canvas.fillCircle(100, 100, 50, me.color)
canvas.fillText("Art by " + me.name, 10, 200, "24px Arial", me.color)
}
}
// Multiple artists collaborate
picasso = new Artist("Picasso", "red")
monet = new Artist("Monet", "blue")
// Each Box maintains its own state and behavior!
// Parallel processing without complexity
nowait future1 = heavyComputation(10000)
nowait future2 = renderGraphics()
// Do other work while they run...
setupUI()
// Get results when ready
result1 = await future1
result2 = await future2
Every value in Nyash is a Box - a unified, memory-safe container:
Traditional Languages | Nyash |
---|---|
int x = 42; |
x = new IntegerBox(42) |
string name = "Hello"; |
name = new StringBox("Hello") |
Complex canvas setup | canvas = new WebCanvasBox("game", 800, 600) |
Manual memory management | Automatic Box lifecycle management |
// Clean, predictable program structure
static box Main {
init { database, ui, gameState } // Declare all fields upfront
main() {
// Initialize in logical order
me.database = new DatabaseBox("save.db")
me.ui = new UIManagerBox()
me.gameState = new GameStateBox()
// Your program logic here
return runGameLoop()
}
}
debug = new DebugBox()
debug.startTracking()
player = new PlayerBox("Hero")
debug.trackBox(player, "Main Character")
// Real-time memory visualization in browser!
print(debug.memoryReport()) // Live stats, no debugging hell
// Object-oriented programming made natural
box Player {
init { name, health, inventory }
Player(playerName) {
me.name = playerName
me.health = 100
me.inventory = new ArrayBox()
}
takeDamage(amount) {
me.health = me.health - amount
if me.health <= 0 {
me.respawn()
}
}
respawn() {
me.health = 100
print(me.name + " respawned!")
}
}
// Natural language operators for clarity
isAlive = health > 0 and not poisoned
canCast = mana >= spellCost or hasItem("Magic Ring")
gameOver = playerDead or timeUp
// Mathematical operations built-in
distance = sqrt((x2 - x1)^2 + (y2 - y1)^2)
angle = atan2(deltaY, deltaX)
// Type-safe generic containers
box Container<T> {
init { value }
Container(item) { me.value = item }
getValue() { return me.value }
}
numbers = new Container<IntegerBox>(42)
texts = new Container<StringBox>("Hello")
# 1. Clone repository
git clone https://github.com/moe-charm/nyash.git
cd nyash
# 2. Build WebAssembly version
cd projects/nyash-wasm
./build.sh
# 3. Open playground in browser
# Open nyash_playground.html in any modern browser
# Build native version
cargo build --release
# Run programs locally
./target/release/nyash program.nyash
# Try examples
./target/release/nyash test_async_demo.nyash
./target/release/nyash app_dice_rpg.nyash
# Install cross-compiler
cargo install cargo-xwin
# Build Windows executable
cargo xwin build --target x86_64-pc-windows-msvc --release
# Generated executable (916KB)
target/x86_64-pc-windows-msvc/release/nyash.exe
Nyash is open source and welcomes contributions!
MIT License - Free for personal and commercial use.
Moe Charm - Programming Language Designer & Developer
Creating innovative programming languages with AI assistance and dedication ๐ค
Nyash is developed with cutting-edge AI collaboration!
If you enjoy Nyash and want to support continued development:
โ Support Development - Help fuel innovation!
Powered by Claude Code - Advanced AI development tools arenโt free! ๐ค
Your support helps maintain the project, develop new features, and continue pushing the boundaries of programming language design. Every contribution makes a difference! ๐
Built with โค๏ธ, ๐ค Claude Code, and the Everything is Box philosophy
Nyash - Where every value is a Box, and every Box tells a story.