EzRyder
MModular
•Created by EzRyder on 3/14/2024 in #questions
Mojo Dict: Store struct instances based on a common trait as CollectionElement.
I'm trying to use a Mojo Dict to store different instances of structs which conform to a common trait. I've created a 'playground' file to work out a solution, but I am stumped. Feels like I'm really close, but no joy yet. Any suggestions?
GitHub: https://github.com/johnsoez4/dict
The code snippet below uses the structs defined earlier in the file. The last line below causes the error:
9 replies
MModular
•Created by EzRyder on 2/1/2024 in #questions
error: use of unknown declaration '_ZeroStartingRange'
In a Mojo function, how can I use the built in type _ZeroStartingRange as a return type? I received the following code snippet from kapa.ai on Modular's Discord server, but it has the same issue. https://discord.com/channels/1087530497313357884/1119100298456215572/1202422957947879524
I'm currently using Mojo SDK 0.7.0. Thanks!
4 replies
MModular
•Created by EzRyder on 1/21/2024 in #questions
Jupyter - Import Custom Mojo Modules?
How can we import and use a custom Mojo module from a Jupyter notebook? I added details of what I've tried so far by replying to an existing post started by @hogepodge. Thanks!
Here's a link to that post: https://discord.com/channels/1087530497313357884/1119100298456215572/1198684128091058198
3 replies