Hammad Ali
MModular
•Created by Hammad Ali on 11/10/2024 in #questions
Struct containing a list of itself?
Hi, I'm trying to creating a node-like tree which can contain a child (or children), but the mojo compiler doesn't really let me do that:
error: function has recursive call to 'always_inline' function
struct Node:
^
Mojo/USL/shaderlab/libutils/utils_methods.mojo:87:8: note: through call here
/Users/ec2-user/actions-runner/_work/modular/modular/Kernels/mojo/stdlib/collections/list.mojo:186:8: note: to function marked 'always_inline' here
/Users/ec2-user/actions-runner/_work/modular/modular/Kernels/mojo/stdlib/memory/unsafe_pointer.mojo:413:9: note: call here recurses
Mojo/USL/shaderlab/libutils/utils_methods.mojo:87:8: note: back to function here
struct Node:
^
mojo: error: failed to run the pass manager
5 replies
MModular
•Created by Hammad Ali on 9/14/2024 in #community-showcase
USL: A Shader transpiler written in mojo
1 replies
MModular
•Created by Hammad Ali on 9/8/2024 in #questions
always_inline and struct problem
I'm trying to create a transpiler and I've created an architecutre in which every parsed token of the AST is repersented as
ShaderOperation
But I get the error:
I need the arguments
property to be a list of ShaderOperations because AST nodes are usually nested inside each other7 replies
MModular
•Created by Hammad Ali on 8/6/2024 in #questions
Error while importing local python file
Hi I was doing some experiements with python and mojo but when I tried to import the local file I got the following error:
Here is the code:
Python file (python_curl.py)
6 replies
MModular
•Created by Hammad Ali on 4/5/2024 in #questions
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:
So does anyone know a good way to concatenate strings? Does mojo have f-strings
yet?5 replies
MModular
•Created by Hammad Ali on 3/10/2024 in #questions
unable to load package '/Users/hammad/.modular/pkg/packages.modular.com_mojo/lib/mojo/stdlib.mojopkg
I just started working on an educational physics engine when suddenly mojo interpreter got angry at me for no reason and started throwing this error:
Code:
What's wrong?
6 replies
MModular
•Created by Hammad Ali on 2/23/2024 in #questions
Will Mojo Support constants after "let" is gone?
Given that mojo is removing the
let
keyword, will Mojo no longer have constants? Or will there be some other way to declare them?2 replies
MModular
•Created by Hammad Ali on 2/9/2024 in #questions
Will Mojo ever become Open Source?
Mojo is a great language and has amazing potential but the fact that it is NOT open source like it's predecessor Python, is not cool. So will mojo become open source later on in it's development or will it remain proprietary and closed-source forever?
16 replies