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

How does memcpy work in 0.6.0 ?

Before, I wrote a helper function for string vector in 0.5.0 and memcpy was working fine, now I am unable to do so in 0.6.0, this is code snippet: ``` alias strtype = DTypePointer[DType.int8] var data: Pointer[strtype] ......

Will the special methods slowly transition to traits?

Will the special methods slowly get replaced by traits to allow for static analysis, optimizations, more safety, parameterized functions discriminating by traits etc. ? e.g. std::ops Traits like Add for __add__, Mul... in Rust ?...

What is the performance impact of interop with python

I want to use pytorch to train model on gpu and mojo for cpu (mojo to prepare data -> pytorch to train and predict-> loop). Any tips on efficiency?

will mojo include an all in one tool like cargo

Will it be easy to create, publish, import / list dependencies like with cargo for Rust or will it be a bit more cumbersome like Python or C++ ? Is it planned in the roadmap or not ?

Error when installing on M1 mac

hello, how can I bring developers from Modular to have a look at this? https://github.com/modularml/mojo/issues/1131 I have no idea what went wrong in this one

Mojo GPU Syntax or specific GPU stdlib data types?

I'm looking forward to using MAX, I'm curious though outside of MAX how will the GPU syntax look? Will we need to use different data types other than SIMD that will be specific for GPU's like what is kind of done with cuda in C++? I'm hoping to be able to test this outside of AI paradigms that I couldn't use MAX for, like maybe improving the speed of opencv-like smoothing kernels or ray tracing.

Compilation does not terminate for recursive function

I'm porting some C++ with templates, and I realize that there is no such thing as if constexpr in mojo. Im trying to write something similar to the following test. However, compilation (not surprisingly) does not terminate. Question: how do other people handle these straightforward recursive functions? ```fn testN: Int -> InlinedFixedVector[Int, 1<<N]:...

boost c++ -> python -> mojo ?

Could i use boost and ctypes for c++/python interop and then the mojo/Python interop to make libraries for mojo ? if so would this be very computationally expensive ?

Documentation for @staticmethod decorator

I can't find any documentation for the @staticmethod decorator. Is there any writeup for why, when, and how to use it? I see it scattered throughout the official docs, but can't quite piece together how it works.

Mojo on ARM?

I saw where Mojo is available for some ARM MCUs. Is this true? Does this mean that Mojo can be installed on all ARM systems, such as NVIDIA Jetson Orin and Raspberry Pi?

I’m unable to signup for MAX developer edition!

The MAX signup seems to be in a loop between the signup page and the homepage of the user, when attempting to signup for the developer edition. Does it mean it’s not open to developers, or there’s something wrong? If this question must be posted in a different channel, please let me know. Thank you for your insight....

Trying to do compile time checking with 'const' type arguments.

``` struct ExposedSecret[T: AnyRegType]: var borrowed_value: T fn init(inout self, borrowed borrowed_value: T):...

Max Install

Anyone able to get max installed yet?
No description

global variable declarations not consistent?!?!

#hello_world.mojo hello_world = 'hello_world' def main(): print(hello_world)...

Mojo on M1 Jupyter Notebooks which Python interpreter it uses when I say %%python?

I am using mojo on mac m1 on jupyter notebooks which python interpreter mojo uses when i start with %%python?

Error handling like in Rust

Is Mojo going to have error handling like in Rust? With OK an Error Result exposed to the user? Or will it have more traditional way to handle errors, like in Python?

Generating a new auth key

Is there a way I can generate a new auth key without creating a new account?

%%python not working

Hello, i want to use some python inside my mojo files. When i run the cli mode on my wsl ubuntu, i can use the %%python functionality. However on the wsl vscode i get "expressions are not yet supported on the file scope level". However in the official github code example https://github.com/modularml/mojo/blob/main/examples/simple_interop.py it looks like there is already interop support. did I do some installation mistake or is this the case for everyone ? thank you.

cellular automata

Hi I am trying to implement a general purposed cellular automata library in mojo and want to use opengl to render the grid. few questions : 1. is opengl or any famous low level/fast GPU based graphics library supported ? if not would you think I would run into backwards compatibility problems if i use the pyopengl library ? 2. is GPU level SIMD going to be supported soon ? because as far as i'm aware the current SIMD parallelization happens on the cpu level only. thank you...

Personal blog post on Mojo

I wrote a long note on Mojo entitled "Mojo: the point of view of a researcher using Python". A first version is available here: http://legi.grenoble-inp.fr/people/Pierre.Augier/mojo-the-point-of-view-of-a-researcher-using-python.html I felt the need to write this note to better understand the project and because I didn't find serious analyses on Mojo that didn't come from Modular. Any comments would be appreciated. I plan to use this text to communicate on Mojo on different mailing lists but I think it is reasonable to first get some feedback from people really knowing Mojo and Modular....