Git Product home page Git Product logo

mojo-gym's Introduction

Mojo Gym

Small hands-on exercises to practice the basics of the Mojo programming language. Ideal for developers who are new to Mojo but know basics of Python.

Inspired by Rustlings project that has a similar approach to teach Rust.

Getting started

  1. Install Mojo
  2. Clone this repository or better yet, fork it and clone your fork.
  3. Install necessary Python packages to run the exercises:
    pip3 install -r requirements.txt
    Feel free to use virtualenv or any other tool to manage your Python packages.
  4. Run the exercises:
    python mojo_gym.py
  5. Follow the instructions and have fun!

Learning approach

This is an optional reading if you are interested in how mojo-gym structures the learning material.

Because Mojo is very similar to Python, we omit some of the basic concepts that are shared between the two languages, for example, control flow statements. We focus on the concepts that are unique to Mojo.

We start with variables, functions, and value ownership (+ mutability). This is a bit different from what Mojo documentation has. The reason is we try to avoid introducing new concepts and we also want to build new knowledlge on top of the previous exercises.

When you are familiar with the previous topics, we move to structs, value lifecycle, metaprogramming and traits.

We finish the learning with exercises on Python integration and modules/packages in Mojo.

Hopefully, you will find this project useful and fun!

mojo-gym's People

Contributors

vmois avatar mizoru avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.