Sammi Turner
MModular
•Created by Sammi Turner on 10/12/2023 in #questions
External Python dependencies and Mojo binaries
I've just compiled a small Mojo program that uses Python iterop and the numpy library. Running the binary, everything works fine.
Hypothetically though, if I shared the binary with someone using the same os and hardware architecture as me, would they need to have Python and numpy installed (bare metal or virtualenv) to run the binary?
Or is the binary standalone?
8 replies
MModular
•Created by Sammi Turner on 10/4/2023 in #questions
Refactoring from DynamicVector to a different data structure?
I'm currently teaching myself Mojo by porting the solutions to Codewars katas in Python over to the new language.
The "safecracker" problem asks you to write a function that returns a tuple of three integers.
My Python solution used the tuple type. My Mojo solution uses DynamicVector in place of tuple.
There must be a better way to do it than that, surely?
I'm having difficulty with the official docs (skill issue on my part). Suggestions welcome. Help appreciated.
3 replies