Introduction: Learning Ruchy Programming
Introduction: Learning Ruchy Programming
What is Ruchy?
Ruchy is a modern programming language that transpiles to Rust, combining ease of use with systems-level performance. It's designed for developers who want to write fast, safe code without wrestling with complex syntax or lifetime annotations.
Core Philosophy: Write code that reads like Python but runs like Rust.
Key Features
Simplicity First
Ruchy code is clean and readable:
fun greet(name) {
println(f"Hello, {name}!");
}Zero-Cost Abstractions
Every Ruchy feature compiles to optimal Rust code with no runtime overhead. You get the performance of compiled code with the ergonomics of interpreted languages.
Progressive Complexity
Start simple, add complexity only when needed. You can write entire programs without thinking about ownership, then gradually adopt advanced features as your needs grow.
First-Class Data Science Support
Built-in DataFrame support via Polars integration makes data manipulation as easy as Python pandas but with Rust's performance.
Who Should Learn Ruchy?
This interactive book is for you if you:
- Want to write high-performance code without the complexity
- Are coming from Python and want compiled language benefits
- Know Rust but want a more ergonomic syntax for rapid development
- Need to process data efficiently without sacrificing safety
What You'll Learn
We'll take you on a journey from "Hello, World!" to building complex systems:
- Chapter 1: Hello, World! - Your first Ruchy program
- Chapter 2: Variables and Types - Storing and manipulating data
- Chapter 3: Functions - Organizing code into reusable blocks
- Chapter 4: Practical Patterns - Real-world coding techniques
- Chapter 5: Control Flow - Conditionals and loops
- Chapter 6: Data Structures - Lists, dictionaries, and more
- Advanced Topics - Error handling, concurrency, and data science
Interactive Learning
This book features interactive code blocks where you can:
- Edit code directly in your browser
- Run Ruchy programs with instant feedback
- Experiment and learn by doing
- See real-time output from your modifications
All powered by WebAssembly - no installation required to start learning!
Prerequisites
You should be comfortable with:
- Basic programming concepts (variables, functions, loops)
- Using a terminal/command line
- A text editor or IDE
You don't need to know Rust - we'll explain everything as we go.
How to Use This Book
- Read the explanatory text to understand concepts
- Run the interactive examples to see code in action
- Modify and experiment with the code blocks
- Complete the challenges to reinforce learning
Code examples build on each other within chapters but are self-contained enough that you can jump to topics of interest.
Getting Help
If you have questions:
- Check the error messages - Ruchy provides helpful, actionable errors
- Join our community forums
- Report issues on GitHub
Ready to Start?
Let's begin your Ruchy journey with Chapter 1: Hello, World!