Live data from Hacker News

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

github.com

1–10 of 22 posts

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

#2
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

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

#3
post #2

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

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?

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

#5

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

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

what else could you justify it doing?

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

#6
post #5

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

would it not just produce 'b/c'? assuming 'b/c' is an existent file path what else could you justify it doing?

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

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

#7
post #5

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

would it not just produce 'b/c'? assuming 'b/c' is an existent file path what else could you justify it doing?

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.
Post reply on HN