In addition to Mojo syntax being merged to GitHub linguist, the JavaScript syntax highlighting library shiki has merged a Mojo definition. This is one of the best syntax highlighters for the web, and is also what VS Code uses. If you're building your own website with Mojo code snippets, give it a try!
We did a minor release 24.1.1 for the Mojo 🔥 and MAX ⚡️ this week, which fixes a variety of small bugs. You can update MAX and Mojo with modular update max if you have the MAX package, and if you just have Mojo you can use modular update mojo.
Blogs, Tutorials, and Videos
- Celebrate Pi Day with Mojo🔥 ❤️ Pi 🥧: Approximating Pi with Mojo🔥 using Monte Carlo methods
- Learn to call Mojo from C in Getting started with MAX Engine C API
- Highlight your high-performance Mojo code with How to Be Confident in Your Performance Benchmarking
- Tale a deep dive with an X tutorial about Pointers and DTypePointers
- rd4com released a new tutorial: 🐍🔍 type-checking a PythonObject
Awesome Mojo
- Benny created a repo: MojoLazyTensor where all the attributes like shape are compile time known
- Stijn has made major updates to his ML Framework written in pure Mojo, and renamed it from Dainemo to Basalt
- rd4com has added a lot of functionality to his HTML UI library: mojo-ui-html that can call Mojo code directly
Upcoming Events
- Maxim will be talking about Mojo at PyCon LT 2024 on the 4th of April
Feature Request Updates
1895: Do not crash if an imported module isn't installed as long as it's unused
The team discussed allowing imports to silently fail if the imported module is missing but never used. We think the current behavior is correct: the compiler should fail if an imported module is missing. Users should be explicit about conditional imports, just like they are in Python. As the language and our Python interop story evolves, we will continue to re-evaluate the semantics of import, but for now, we want to keep it strict.