Modular

M

Modular

This server is the home of the MAX and Mojo community. Join us to chat about all things Modular!

Join

questions

community-showcase

WGPU-Mojo

This is more of a proof of concept of what's possible, but here's an example of calling wgpu-native from Mojo. It's not enough to make a full game right now, but Mac users can at least get a triangle in a window. It's also to an extent an example of using the Conda ecosystem to manage C dependencies. https://github.com/lsh/wgpu-mojo...
No description

USL: A Shader transpiler written in mojo

USL is a shader transpiler written in the Mojo programming language, designed to allow a standard programmer to write code in a single shader language that can then be transpiled into any shader language (HLSL, GLSL, WSGL and others). This will basically allow one shader to run on any platform. Right now I have written out the base parser and lexer. https://github.com/Hammad-hab/USL This is a sample of it's syntax:...
No description

24.5 project updates and shared conda channel

Hello everyone! Instead of bumping a bunch of different community posts for a my few projects, I figured I'd just group them up here. mog (terminal styling): https://discord.com/channels/1087530497313357884/1239277959508922408/1239277959508922408 mist and weave (ANSI coloring/formatting): https://discord.com/channels/1087530497313357884/1250128768866058251/1250128768866058251 gojo (Go stdlib port): https://discord.com/channels/1087530497313357884/1252045387259445278/1252045387259445278...

Terminal Snake Game: from scratch (no 3rd party libraries)

I made a terminal snake game from scratch (without third party libraries) in mojo and a bit of C. C is used to detect user's keystrokes. The rest is in mojo. https://github.com/yetalit/Terminal-SnakeGame...

mo3d: 3D library for Mojo

Hello wonderful Mojicians, I thought I would share my (very immature) side project! Introducing https://github.com/thomas-gale/mo3d "mo3d is aiming to be a 3d graphics library built from the ground up in Mojo, with minimal external dependencies. It utilizes only a basic subset of SDL2 for rendering, employing parallelized copying of Mojo-rendered scenes directly to texture data. Unlike traditional shader pipelines, mo3d aims to rethink rendering by consolidating shaders into Mojo code, while planning for future support of Mojo’s hardware accelerators."...

Modverse #42 is out!

Modverse #42 is live! https://www.modular.com/modverse/modverse-42 Featuring @Maxim, @Ghostfire, @DobyDabaDu, @phomola, @mad alex 1997, @vguerra, @msaelices, @gabrieldemarmiesse, @sora, and @toasty. Huge thank you for all your awesome contributions! 🫶

Language learning tool: a small Bash script for interactive search over a bunch of Mojo codebases

I put together a Bash script that 1. Downloads a bunch of existing Mojo codebases, 2. Runs The Silver Searcher and FZF so you can do a quick and beautiful full-text search over them. Might be helpful for finding out how other people used this feature/keyword/library/whatever. https://gist.github.com/schtschenok/3c03f8009ae94c296a6447f47d5cc6b4...

Created a job posting app for less popular languages like Mojo

App focuses on esoteric and less popular languages that still have fortune 1000 companies using them. https://syntaxmakers.com/...

NuMojo V0.2 Release: Simplified Type Handling, New Features, and Enhanced Compatibility

We’re excited to announce NuMojo V0.2, featuring significant improvements and new features. This update simplifies data type management by removing in_dtype and out_dtype parameters and introduces Rust-like data type aliases (e.g., f64). Function overloads were implemented in arithmetic to allow easy symmetric usage of NDArray and Scalar types. Array operations have seen major enhancements, including the introduction of the diagflat() method for creating diagonal arrays, improved slicing functionality that aligns with NumPy, and added boolean masking for NDArrays. The NDArray constructor now supports string array initialization, making array creation easier. Documentation has been expanded with an updated README, improved function docstrings, and a new style guide. We’ve also introduced new test files compatible with the mojo test framework, improving NuMojo’s reliability....

CrazyString explanation Video

I took some time to explain the concepts behind the CrazyString, a string data structure with small strings optimization and code point indexing Give me thumbs up if you would be interested in more videos. https://youtu.be/31Ka0bUTo2U...

Tokeniser & CSV parser

Hi all, I’m new to Mojo. I like the language and would like to use it in some of my projects. I started by developing a tokeniser (as a basis for a JSON parser, not finished yet) and a simple CSV parser so I can “play” with data frames in Mojo. Any feedback is welcome (I mostly write code in Go and Rust, this is my first code in Mojo, would like to get suggestions for improvement). https://github.com/phomola/mojolibs

Mojmelo: Machine Learning algorithms

I want to introduce you Mojmelo. Implementation of machine learning algorithms from scratch in pure Mojo. Here is the list of the algorithms: Linear Regression Polynomial Regression Logistic Regression KNN...

Dustbin

I made a little falling sand game today in mojo. https://github.com/helehex/dustbin...

Reading from stdin

Hey everyone! Here's a github gist with a struct to read from stdin and a recreation of the Python input function. https://gist.github.com/thatstoasty/20752ad6fb1d97790c208c007792de4b I was working on this snippet for the stdlib a month or two ago, but got held up figuring out how to add some clean tests where we read from stdin. The furthest I got was feeding stdin to one test, but then the subsequent ones failed. Maybe I'll return to it soon, but I figured people might get some use out of this for now 🙂...

FireTCP

I recently updated the mojo FireTCP socket programming package! build client-server applications in pure mojo https://github.com/Jensen-holm/FireTCP...

Thermo

A Physics Engine written in Mojo.

🔥🎨🎛 mojo_neovim_theme_app

It is a tool to create neovim themes in real-time.
No description

Devcontainer Setup for Mojo and Neovim

https://github.com/melodyogonna/mojo-nvim-devcontainer-cli This provides a sample template to help with setting up devcontainer for Mojo without the need for Vs Code....