Skip to content

Getting Started with Ellex

Welcome to Ellex, a natural language programming environment designed for young learners aged 6-16. Ellex combines the safety and fault-tolerance of the BEAM VM with an intuitive natural language syntax, making coding accessible and fun. With AI-powered assistance and modal editing, Ellex provides a pathway to full Elixir development.

Ellex is a programming language that allows you to write code in a way that feels like speaking or writing in everyday language. Instead of complex syntax, you use commands like tell "Hello!" to output text or ask "What's your name?" → name to get input from a user. This approach helps beginners focus on the logic of programming without getting bogged down by syntax errors.

Ellex also features:

  • Safety First: Built-in limits on execution time, memory usage, and recursion to prevent crashes.
  • Modal Programming: Different modes like @speak, @listen, @think, and @build to help structure your coding process.
  • Turtle Graphics: Visual programming with commands to draw shapes and patterns.
  • Progressive Learning: Start with natural language and gradually learn full Elixir syntax.
  • Real-time Feedback: See the results of your code instantly with visualizations.

To start using Ellex, you’ll need to set up the environment on your computer. Follow these steps to get started:

  1. Check Prerequisites: Ensure you have Rust, Elixir, and Node.js installed on your system. You can check by running:

    • rustc --version
    • elixir --version
    • node --version
  2. Clone the Repository: Download the Ellex codebase from GitHub by running:

    Terminal window
    git clone https://github.com/ellex-lang/ellex.git
    cd ellex
  3. Setup Environment: Run the setup script to prepare your development environment:

    Terminal window
    ./scripts/setup.sh

    Alternatively, you can use:

    Terminal window
    make setup
  4. Build the Project: Compile the Rust and Elixir components:

    Terminal window
    make build
  5. Start the REPL: Launch the interactive Read-Eval-Print Loop (REPL) to start coding:

    Terminal window
    make dev

    Or directly:

    Terminal window
    cargo run --bin ellex_cli repl

Once the REPL is running, you’re ready to write your first Ellex program!

Let’s write a simple program to say hello. In the REPL, type the following:

tell "Hello, World!"

Press Enter, and you’ll see the output Hello, World! displayed on the screen. That’s it! You’ve just written your first Ellex command.

Now, let’s make it interactive by asking for the user’s name:

ask "What’s your name?" → name
tell "Nice to meet you, {name}!"

When you run this, Ellex will prompt for input. Type your name, press Enter, and it will respond with a personalized greeting.

Ellex is designed to grow with you. Here are a few things to try next:

  • Loops: Use repeat 3 times: to repeat actions.
  • Functions: Define reusable code with make say_hello:.
  • Conditionals: Add logic with when {name} is "Alex":.
  • Turtle Graphics: Draw with commands like move forward 50 or turn right 90.

Check out the other guides in this documentation for detailed tutorials on each of these topics.

If you get stuck or have questions, Ellex provides kid-friendly error messages with suggestions to help you recover. You can also join our community for support:

  • Visit our GitHub repository for issues and contributions.
  • Join discussions on our forums or chat channels (coming soon).

Welcome to the world of programming with Ellex! Let’s create something amazing together.