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

mojo and c++ interop

Hi, I was wondering if it is possible to call foreign c++ libraries from Mojo? Thanks...

List of memory-only structs

I am trying to create a struct for a neural network layer with memory-only list of neurons: ``` struct Neuron: '''Implementation of a neuron.''' var weights: Tensor[DType.float64]...

MLIR syntax

In the low level IR in mojo tutorial I saw this line return Self(__mlir_op. index.cmp.[pred=#index<cmp_predicate eq>])(lhsIndex, rhsIndex)) I'm just a bit confused as to what #index<cmp_predicate> does. I wanted to try to make structs that use a different MLIR dialect. But because I found this syntax confusing I don't really know how I could generalize this....

Excited about the Mojo language! Are there any plans for JetBrains IDE support?

I was wondering if anyone knows if there are any plans to integrate Mojo with JetBrains IDEs like IntelliJ IDEA or PyCharm? It would be amazing to have all the great features and tools of JetBrains IDEs combined with the awesomeness of Mojo. I've found the post here: https://github.com/modularml/mojo/discussions/87 and you have same mindset as me - feel free to vote for this feature...

buffer function is no longer available for String ?

I see some old examples of String(“mojo”).buffer, but doesn’t look like it works now. Can anyone please help me point me on how to get the byte array that can handle Unicode bytes too

SIMD produces weird results without print statement at the end

The code below produces weird results: ```python from algorithm import vectorize from tensor import Tensor...

Swapping pointers would cause memory problems ?

Hello, does this code would cause problems please? the motivation is to not allocate another pointer of the same size and not do a copy ```python var fd = open("stories15M.bin","r") var data = fd.read()...

Are there any plans for native NDArray <-> Tensor interop support?

I was wondering if there were plans to have a native NDArray <-> Tensor interop support? Unless I missed something obvious, there is nothing out of the box that would make conversion between the two objects a simple function call.

Independent Developers

Well Mojo be free For independent developers to integrate into their project? Have you thought about flutter plugins?

Why Mac first, Windows second?

Isnt Windows alot more popular?

What kind of tools do people use to profile Mojo binaries?

I tried using "perf" but I had no luck displaying the symbols, I only see exadecimal values. Did someone make a tutorial somewhere? I'd be interested 🙂

error: Unable to locate a suitable libpython when running Mojo executable

There's no libpython.so file with .so extension on macOS, how to set MOJO_PYTHON_LIBRARY then?

Does owned make the variable copy on write?

Does the owned specifier make the copy copy on write? fn set_fire(owned text: String) -> String: text += "🔥" return text...

Mojo debug support in VSCode

I see Mojo has support for debug directive in the REPL, but is it supported in the VSCode plugin yet?

I get this error when installing Mojo on Mac:

Failed to initialize Crashpad. Crash reporting will not be available. Cause: while creating crashpad database: Operation not supported modular: error: /home/codespace/.modular could not be created: Operation not supported...

Docker Container Issues

I've been trying to build a docker container for a while and I'm not sure what I'm doing wrong. No matter what I do I get something like this on the install mojo command. Any ideas? ```=> ERROR [ 5/10] RUN modular install mojo 0.2s...

unable to locate module 'list'

I have my project structured as follows main.🔥 utils/ imports.🔥...
No description

Create a CSR

I can create CSR in Go as below, is there something similar in Mojo ```go package main import (...

Problem installiing mojo on mac:

I keep getting this error message. I tried modular clean && modular auth (mykey) but even after that I still get the error. It says error with SSL peer certificate or SSH remote key.
No description