Frank Saez
MModular
•Created by Frank Saez on 7/31/2024 in #community-showcase
HaldClut
Hi,
I've created a (small) HaldClut library.
https://github.com/f-saez/haldclut-mojo
2 replies
MModular
•Created by Frank Saez on 7/25/2024 in #community-showcase
boxblur
Hi,
I've created a boxblur filter. In itself, it's more a demo or a tutorial than a useful piece of code.
I've just wanted to put that code alone for toying with before using it elsewhere.
https://github.com/f-saez/box_blur_mojo
Nothing fancy but it may be useful for a beginner (convolution + a bit of SIMD + multi-threading)
1 replies
MModular
•Created by Frank Saez on 7/9/2024 in #community-showcase
Blend2D
Hi,
The FFI for Blend2D, a 2D vector graphics engine.
https://github.com/f-saez/blend2d-mojo
1 replies
MModular
•Created by Frank Saez on 6/30/2024 in #community-showcase
LZ4
Hi,
https://github.com/f-saez/lz4-mojo
Basic FFI of LZ4, meaning just block compress/decompress ... for now.
1 replies
MModular
•Created by Frank Saez on 6/28/2024 in #community-showcase
LibJpeg
Hi,
https://github.com/f-saez/libjpeg-mojo
My little take on LibJpeg and FFI.
It's just a toy right now, but it may grow in the future
1 replies
MModular
•Created by Frank Saez on 6/14/2024 in #questions
About lifetimes
Hi,
I'm playing with FFI and I need to know how to manage correctly some lifetimes. Let's take an example :
If I understand correctly, for Mojo, the life of bytes stops as soon as my_struct is not used and in this case, it's just after the first call to "external_func". Trouble is external_func will need bytes to be alive for a longer time but Mojo can't know that and external_func will starts to act funny because the values of bytes may have changed
So, my question is : how to manage this kind of lifetime ? an easy answer is to do some useless stuff with my_struct at the end of the block or encapsulate some parts in a function (it's what I do now), but a cleaner way to do that must exists.
I've also try to use DTypePointer but I have only be able to use them with basic types like a bunch of bytes but not structured data
I must have misunderstood something.
2 replies
MModular
•Created by Frank Saez on 6/12/2024 in #questions
FFI
Hi,
I'm working on FFI and I've got two small questions :
1 - what is the equivalent of size_t in Mojo ?
2 - Dynamic linking is easy but I haven't found a way to proceed with a static library (.a file). Is there a clean and official way to do that ?
Thanks.
16 replies
MModular
•Created by Frank Saez on 6/5/2024 in #questions
Question about iterating a list of strings
Hi,
I've got a background in Rust (10 years) and in Python (1 year) and I try to learn Mojo.
I've try this :
and got this obscure error message :
but if I use indexes, it works :
I seem to have a hard time with the most basic things 🙂
What have I misunderstood ?
Thanks
14 replies