Warning
This is vibe coded slop. You should never use it unless you are truly brave.
GPU-accelerated Unix utilities with Zig frontends and Metal/Vulkan compute backends.
Each utility is available in two variants:
| Variant | Description | Vulkan on macOS | --gnu flag |
|---|---|---|---|
| pure | Zig + SIMD + GPU only. Self-contained, no external dependencies. Source code is public domain (Unlicense). | No | Not available |
| gnu | Includes GNU utilities + Vulkan via MoltenVK for full POSIX compliance. Binaries are GPL-3.0-or-later. | Yes | Works |
# Pure builds (self-contained, no dependencies)
brew tap e-jerk/utils
brew install e-jerk/utils/utils # all 4 tools
brew install e-jerk/utils/grep # individual
# GNU builds (--gnu flag for full POSIX compliance)
brew tap e-jerk/utils-gnu
brew install e-jerk/utils-gnu/utils-gnu # all 4 tools
brew install e-jerk/utils-gnu/sed # individualmacOS: Add Homebrew bin to PATH to override Apple's built-in tools:
echo 'export PATH="$(brew --prefix)/bin:$PATH"' >> ~/.zshrcAll utilities support:
--auto— Automatically select optimal backend (default)--gpu— Force GPU (Metal on macOS, Vulkan on Linux)--cpu— Force CPU backend (SIMD-optimized)--gnu— Force GNU implementation (gnu build only)--metal— Force Metal backend (macOS only)--vulkan— Force Vulkan backend
Use -V or --verbose to see timing and backend information.
| Package | Description | Tests | Version |
|---|---|---|---|
| grep | GPU-accelerated grep with context lines, recursive search, color output | 42/42 | v0.1.0 |
| sed | GPU-accelerated sed with multiple expressions, line addressing | 37/37 | v0.2.0 |
| find | GPU-accelerated find with size/time filters, prune support | 36/36 | v0.2.0 |
| gawk | GPU-accelerated awk with built-in functions, NR/NF variables | 32/32 | v0.2.0 |
Total: 147 GNU compatibility tests passing
Each tool includes native implementations with GPU and SIMD optimization:
| Tool | GPU+SIMD Features | GPU VM Features | GNU Fallback (gnu build) |
|---|---|---|---|
| grep | -e -E -G -P -F -i -w -v -n -c -l -L -q -o -A/-B/-C -r --color |
— | — |
| sed | s///gi /d /p -i -n -E |
y/// -e line addressing |
Backrefs, hold space, branching |
| find | -name -iname -path -ipath -regex -iregex |
— | -exec -delete -newer |
| gawk | /pattern/ {print $N} -F -i -v length substr index toupper tolower NR NF gsub regex |
BEGIN/END, variables, if/while/for, math functions | arrays, printf |
Optimization key: [GPU+SIMD] means the feature runs on GPU compute shaders (Metal/Vulkan) with SIMD-optimized CPU fallback. [GPU VM] means features are compiled to bytecode and executed on a GPU virtual machine. Use --help on any tool to see optimization annotations for each flag.
Use --gnu flag (gnu build only) for unsupported features to fall back to GNU implementation.
| Package | Description | Version |
|---|---|---|
| gpu | GPU capability detection and auto-selection library | v0.1.0 |
| shaders-common | Shared SIMD shader utilities for Metal and Vulkan | v0.1.0 |
All tools share the e_jerk_gpu library for:
- Hardware capability detection (threads, memory, buffer limits)
- Performance-based backend scoring (Entry/Mid/High/Ultra tiers)
- Automatic CPU/GPU selection based on workload characteristics
- Swappable compute backend interface
- CPU: Zig
@Vector(16, u8)and@Vector(32, u8)for parallel byte operations - Metal:
uchar4vectorized operations (4-byte SIMD) - Vulkan:
uvec4vectorized operations (16-byte SIMD)
| Tool | Pattern Type | CPU | GPU | Speedup |
|---|---|---|---|---|
| grep | Single char | 128 MB/s | 2.2 GB/s | 17x |
| sed | Single char | 177 MB/s | 2.8 GB/s | 16x |
| grep | Common word | 335 MB/s | 2.4 GB/s | 7x |
| find | Case-insensitive | 3.5M paths/s | 15M paths/s | 4x |
| gawk | Pattern match | 357 MB/s | 476 MB/s | 1.3x |
Results measured on Apple M1 Max.
| Backend | Platform | Status |
|---|---|---|
| Metal | macOS | Supported |
| Vulkan | Linux, macOS (MoltenVK) | Supported |
| CUDA | Linux, Windows | Planned |
Each tool uses the same build pattern:
# Build with optimizations
zig build -Doptimize=ReleaseFast
# Run tests
zig build test # Unit tests
zig build smoke # Integration tests (GPU verification)
zig build bench # Benchmarks
bash gnu-tests.sh # GNU compatibility testsRequirements:
- Zig 0.15.2+
- glslc (for Vulkan shader compilation)
- macOS Metal or Vulkan runtime
- Native
-A/-B/-Ccontext lines with proper group separators - Native
-rrecursive search with combined options - Native
--coloroutput with ANSI highlighting
- Native
-emultiple expressions - Native line addressing (
2s/...,2,4s/...,$s/...)
- Native
-size [+-]N[ckMG]file size filtering - Native
-mtime/-atime/-ctime [+-]Ntime filtering - Native
-prune PATTERNdirectory pruning
- GPU Bytecode VM: Complex AWK programs compile to bytecode and execute on GPU
- Supports: variables, arithmetic, comparisons, control flow (if/while/for), math functions
- Each GPU thread processes one input line independently
- Native built-in functions:
length(),substr(),index(),toupper(),tolower(),sin(),cos(),sqrt(),log(),exp(),int() - Native special variables:
NR,NF - Native GPU regex: Thompson NFA execution on Metal and Vulkan
- Full backend parity (CPU, Metal, Vulkan produce identical results)
Source code: Unlicense (public domain) Binaries: GPL-3.0-or-later (due to linked dependencies)