MM
MModular
•Created by richard.kiss on 9/15/2024 in #questions
debug
I get the same message too, maybe we should file a bug?
11 replies
MModular
•Created by Martin Dudek on 5/14/2024 in #questions
Regular Expression Engine for Mojo, any plans?
A simd accelerated multiple substring matching algorithm called "Teddy". This is used in Rust's ripgrep. https://github.com/rust-lang/regex/blob/3de8c44f5357d5b582a80b7282480e38e8b7d50d/src/simd_accel/teddy128.rs
87 replies
MModular
•Created by Martin Dudek on 5/14/2024 in #questions
Regular Expression Engine for Mojo, any plans?
While glimpsing through the re2 source code I found this link in a comment https://swtch.com/~rsc/regexp/. It has some bare bones examples in C that may provide a less intimidating starting point than the re2 library for someone toying with the idea of implementing regexes for Mojo.
87 replies
MModular
•Created by Martin Dudek on 5/14/2024 in #questions
Regular Expression Engine for Mojo, any plans?
The only one I know of is a very simple (60 loc) regex match implementaion in Mojo by sstadic (https://github.com/sstadick/ExtraMojo/blob/main/ExtraMojo/regex/simple_re.mojo). However I'm also very interested to know of any plans. To my understanding Rust has a fast regex library.
87 replies
MModular
•Created by MM on 4/19/2024 in #questions
Accessing C struct members from external_call
For the record, here's how I tested the localeconv function of the C standard library. I only manage to print the
decimal_point
member all the other members are blank.
8 replies
MModular
•Created by MM on 4/19/2024 in #questions
Accessing C struct members from external_call
Thanks a lot! I have tried both DLHandle and external_call, but cannot get either one work. A good idea to check the source code of the ffi now that the std library is OS. I tried to read it through, but my grasp of mlir and C and low-level stuff is non-existant, so I'm afraid I was not able to find the answer to the question yet. I'm sure it must be possible though – it's hard to believe that the CPython integration could work with limited interoperability.
8 replies