Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/raravindds/mojo-quick-guide
https://github.com/raravindds/mojo-quick-guide
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/raravindds/mojo-quick-guide
- Owner: RAravindDS
- License: unlicense
- Created: 2023-09-24T09:27:28.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-24T12:05:34.000Z (over 1 year ago)
- Last Synced: 2023-09-24T18:04:28.143Z (over 1 year ago)
- Language: Shell
- Size: 11.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Mojo-quick-guide
# What is Mojo π₯ ?
> Mojo is a new programming language that is designed to be fast, efficient, and easy to use (especially for AI). It is superset of Python and you can get a **scale** and **performance** of a language like **c++**. Similar to python syntax, but it offers a number of advantages, including:**Performance**: Mojo is compiled to machine code, which makes it much faster than Python.
**Scalability**: Mojo can take advantage of multiple cores and GPUs, which makes it ideal for large-scale applications.
**Memory safety**: Mojo is a memory-safe language, which means that it is less likely to crash due to memory errors.
### Insights:
* Mojo is 68k faster than python in some cases.
* Python is very slow to train a model but by using Mojo we can do it very fast.### Quick links:
* Mojo docs: [docs](https://docs.modular.com/mojo/)
* Installaion: [installation](https://developer.modular.com/download)
* Github: [github](https://github.com/modularml/mojo)> **Community support**: use discord for error (They have trained "KapaAi"(bot) for answering your questions).
**Noteβ οΈ**: MOJO only exists in linux machines. If you're using windows use wsl.
### How to run?
* To run π₯ in vscode, you need to install the mojo vs-code extension and install the mojo using install.sh script in this directory.
* If you want to run π₯ in jupyter notebook run this commands```python
pip install jupyter
jupyter notebook
```# Concepts
## 1. Variables in π₯
We have different kinds of varaiable initialization in mojo. Let's see one by one.> **`let`** -> It's im-mutable variable, it cannot change. It directly goes runtime. It's compile time.
> **`var`** -> It's a mutable variable, it can change. It's specifically for runtime, it allows argument to be mutable.
> **`alias`** -> It stores the variable at compile time. It's little faster and memory efficient way. It's im-mutable.
Remain the check the π₯ files.
## Awesome things in π₯
* You can create a executable file using mojo build, this is very usefull for production case.
* You can build a pacakge in π₯. Read the docx for it.
* Mojo CLI has lot of future. Check it out.
* It has meta programming (decorators) feature.