\

Zlob.h 100% POSIX and glibc compatible globbing lib that is faste and better

17 points - today at 5:07 AM

Source
  • neogoose

    today at 5:07 AM

    100% POSIX and glibc compatible globbing library for C, Zig, and Rust that is faster and supports all the modern globbing formats (more than libc and rust glob crate)

    It supports all the formats like * and {a,b} expansion as long as have a very efficient syscall and SIMD optimization for faster processing

      • gary_0

        today at 7:25 AM

        Thanks for sharing. Just curious, is there any way to perform globbing over a list of path-like strings instead of only directly on the filesystem?

  • kreetx

    today at 9:08 AM

    Was this vibe coded? Readme has typos and somehow reads "fast and loose".

      • kryptiskt

        today at 9:18 AM

        I thought typos was a signifier for human-created these days, because an LLM is unlikely to land on something that is not a word.

    • commandersaki

      today at 8:46 AM

      Nice licence, I would've probably used this a few years ago on a project had I known it existed.

      • oguz-ismail2

        today at 7:38 AM

        Since when `{...}' syntax is a glob pattern? What does `{a,b}/c' produce when there is no directory named `a'?

          • hidroto

            today at 8:06 AM

            would it not just produce 'b/c'? assuming 'b/c' is an existent file path

            what else could you justify it doing?

              • thayne

                today at 8:09 AM

                The behavior of bash would be to produce "a/c" and "b/c", even if both files don't exist

                • oguz-ismail2

                  today at 8:16 AM

                  What sibling comment says. Bash does suppress nonexistent products when the pattern includes a glob metacharacter and `shopt -s nullglob' is in effect, but I didn't see a flag or anything to achieve that in the project README.