Mojo Miji - A Guide to Mojo Programming Language from A Pythonista's Perspective
by Yuhao Zhu 朱宇浩
Table of Contents
- Introduction
- Part I: Start with Mojo
- Install Magic (being deprecated) (This will be deprecated in future)
- Install package manager (Install pixi, the package manager for Mojo)
- Initiate Mojo project (Initiate a Mojo project and install Mojo compiler)
- My first Mojo program (Hello, world!)
- Part II: Move into Mojo
- Convert Python code into Mojo (Three examples, Python becomes Mojo)
- Things that are in common (Similarities between Python and Mojo)
- Things are different (Differences between Python and Mojo)
- Part III: Basic Mojo
- Variables (Declare and use variables in Mojo)
- Functions (Define and use functions in Mojo)
- Data types - basic (Fundamental building blocks of Mojo)
- Operators and assignment (Operators and assignment expressions)
- Structs (Structs in Mojo, similar to classes in Python)
- Part IV: Advanced Mojo
- Data type - SIMD (The first-class
SIMD
type)
- Parameterization (Shift work from run time to compile time)
- Generic and traits (Move to generic programming with traits)
- Ownership (The ownership system in Mojo)
- Data type - SIMD (The first-class
- [Part V: A case study - Matrix type] (Let's implement a Matrix type in Mojo)
- Part VI: Extended Mojo
- Part VII: Miscellaneous
- Memory layout of Mojo objects (How Mojo objects are stored in memory)
- Glossary of Mojo terms (Find explanations of key terms and concepts)
- Useful tips and warnings (Do not fall into the pits I fell into)
- [Further readings]