Hasan Yousef
MModular
•Created by Hasan Yousef on 9/14/2024 in #questions
How can I convert String to StringLiteral
I understood that
str()
is required to convert things to String like (StringLiteral, Int, Bool, ...), but is there a way to covert String to LiteralString.
As part of learning Mojolang I'm trying the below code, then this conversion issue poped up.
5 replies
MModular
•Created by Hasan Yousef on 9/14/2024 in #questions
C/C++ Interop
My understaffed is horror we can get something like:
https://docs.modular.com/mojo/roadmap#cc-interop
And for clib interop we have sys.ffi.external_call
My question is if I have a foo-lib.so that is a c/c++ lob, how can I call it's functions, and do I need the foo.h also?
5 replies
MModular
•Created by Hasan Yousef on 9/12/2024 in #questions
Embedding
Hi all, not sure if I have to ask here or at MAX channek, is there embedding, vector database and similarity search in MAX that I can use with LLM?
3 replies
MModular
•Created by Hasan Yousef on 2/13/2024 in #questions
Printf - print format
Is there a print format in mojo، how can I rewrite this python in mojo:
1 replies
MModular
•Created by Hasan Yousef on 12/23/2023 in #questions
Running Mojo executable at Alpine docker
I created a mojo dockerfile the is working fine:
And wanted to use it as a builder image:
But I could not run the executable at the alpine based docker, and got the error:
I guess there are some dependencies that are exisiting at ubuntu and not exisiting at the Alpine docker, that is making the executable not be seen, noting that I just built the simpletst "heelo world" example.
1 replies
MModular
•Created by Hasan Yousef on 12/15/2023 in #questions
Building Shared and Dynamic library
Can I build an executable and a library with mojo lang or executable only?
2 replies
MModular
•Created by Hasan Yousef on 12/8/2023 in #questions
Distributing the binary as a docker image
I'm playing with mojo at ArchLinux and I am very excited about it, considering it is not yet supporting Windows, nor cross compilation, I would like to build a docker image of my binary, and import it at my Windows docker desktop, I would like to import from the scratch docker, what is the minimal setup or dependencies that should be including in my docker image to get the binary built using mojo run smoothly?
5 replies
MModular
•Created by Hasan Yousef on 11/18/2023 in #questions
Running code at GPU
How can I write a mojo code that is executed at the GPU instead of the CPU?
14 replies
MModular
•Created by Hasan Yousef on 10/19/2023 in #questions
Create a CSR
I can create CSR in Go as below, is there something similar in Mojo
2 replies
MModular
•Created by Hasan Yousef on 9/28/2023 in #questions
Parallelism and multithreading
I couldn't find a sample code of Mojo multithreading, Can anyone guide me where I can find the proper guide, or provide me with sample snippets to learn from. thanks
3 replies
MModular
•Created by Hasan Yousef on 9/25/2023 in #questions
HOWTO fetch internet resources
Is there a way in mojo that can be used for fetching websites, get and post?
14 replies