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

Confused New joiner with Modular

I am confused what Modular Cli/Account is. Why does "Modular auth" required to install Mojo?...

Debugging Issue with Mojo's VSCode Debugger

I have a file ./foo/bar.mojo that imports a package in ./, so to run it I have to use the CLI path argument (-I) as follows: mojo build -I . ./foo/bar.mojo. The problem occurs when I try to debug the file with Mojo's VSCode debugger, getting the error message unable to locate module 'x', the same error message that throws if I try to run bar.mojo without the path argument, so it seems like the problem is that I have to specify the path argument for the debugger too. I tried to update the launch file configuration by setting the args property to "args": ["-I", "../"], which does show up in the final command but still doesn't work throwing the same error message....

403 error while installing mojo

modular install mojo modular: error: http error: response code 403 - <html><head> <meta http-equiv="content-type" content="text/html;charset=utf-8"> <title>403 Forbidden</title> </head>...

Check type of a variable

Hi folks At the moment, while the builtin type function is not implemented yet, What's the best way to identify if a variable is a string, an int or another type?...

Question about Shell Commands

Is there a way to run a shell command, say find or ps natively from mojo? I know I can import a python module for this, but want to know if this can be done without adding on a dependency to the python interpreter.

Optional function argument?

Hi everyone I'm wondering if it's possible to have an optional argument for functions in Mojo. So then if an argument were given, it would have a value (int for instance) otherwise, it would be None....

official package manager

Can we expect to ever get a package manager maintained by Modular like Rust’s Cargo or the team is going to leave it to third parties?

How to report a duplicate issue that was previously fixed & closed but has resurfaced?

I have found that a previously fixed issue has resurfaced (it no longer gives the intended error message, instead it just segfaults). Should I revive (comment on) the old issue (a year old) or create a new one?

Changelog for Mojo compiler

As getting what's new from stdlib is quite easy (it is enough to look at commits to nightly), the same for nightly compiler is not trivial. Is it possible to post changelog somewhere?

Less Ugly way to concatenate strings

I have been working on a plotting library in mojo that is based on gnuplot. The code works but the string parts are extremely ugly: ```python ... fn plotArray(inout self, *data: Float32, lineType:Int32=0, lineColor:Int32=7, title:String="Plot") raises: with open("m1v1tf01_temp.dat", "w") as f:...

Async function docs?

Hi! I found a mention of async fn and async def in the roadmap document, but no description of how these actually work? Does Mojo support any sort of async/await workflow? The only mention of async I see is in the changelog and just a tiny bit in the code of the coroutine in the standard library. Can we have better documentation for this?...

Lifecycle doc clarification

I was reading https://docs.modular.com/mojo/manual/lifecycle/life#move-constructor, the following struc is given as an example: ```struct HeapArray: var data: Pointer[Int] var size: Int ...

When opensource of Mojo on github?

Maybe Mojo will be self-hosted language, and you don't make it opensource? The help of mojo community can аccelerate development of Mojo....

Mojo libs and other

Hi, Is there any info about full list of dependencies and other need to build own package for my linux distro ?

Is there a simple way to implement Numpy-style ndarray slicing on Mojo Tensors ?

I have a rank 4 tensor where the first dimension is an index and the last 3 represent a Voxel Grid. ``` # Initialize the observation space as a 4D tensor self.observation_space = Tensor[DType.int32](num_builds, build_volume[0], build_volume[1], build_volume[2])...

How can we harness GPU parallelism using Mojo?

I was wondering how I could use Mojo native or MAX engine to accelerate training models using TensorFlow or PyTorch. What are some good resources I can reference if I am interested in this?

why Mojo

Hello, I came across Mojo a while back and I think I understood the purpose but please correct me if I am wrong. Python with strong typing and MLIR lowering for compiling and accelerating code .. and it targets deep learning framewofk users....

Parameters style guide

I noticed that the style guide (https://github.com/modularml/mojo/blob/4d0b45f74fbcf883c63603a762b0c5c3a11895ed/stdlib/docs/style-guide.md) Is recommending PascalCase for parameters that are values:
fn value parameter fn repeat[Count: Int]() PascalCase
fn value parameter fn repeat[Count: Int]() PascalCase
Can any of the modular people confirm that this is the headed direction?...

web server gateway interface

At some point, mojicians will start assimilating other than AI like web applications. So, should we have a web server Gateway interface which would act as a guiding reference for web server and web Framework authors to assist developers and maintainers of web server. Can we do something like python's PEP 333 and PEP 3333...