Allen Wild

Results 21 comments of Allen Wild

In a vacuum, it looks like wrapping stdout in a BufWriter can make a huge difference. I wrote this test program that prints "Hello World" a bunch. ```rust use std::io::{self,...

> What if we pipe the `fd` output to other programs where we would be interested in immediate feedback? Good point. If I ran `fd foo | tee results.txt` I'd...

Based on a quick glance of the source code, it looks like there's several instances of `Command::spawn()` getting called, the stdin/stdout pipes are taken out and then the `Child` object...

The multiple symbol definition issues are fixed by https://github.com/ggreer/the_silver_searcher/pull/1377 (21eaa1c4160b868b0c5bbf59da17974429f30055)

I opened https://github.com/ggreer/the_silver_searcher/pull/1398 to all compile warnings seen on Arch Linux with GCC 10 (-Wstringop-truncation in lang.c and -Wcast-qual in decompress.c) I don't have a Debian box with GCC10, but...

FWIW, the strncpy->memcpy change makes the code behave identically as it does now (since the *exts array is zero-initialized), but I agree it isn't ideal. strncpy where n==strlen(src) is just...

I got inspired to write some nontrivial C tonight, so I refactored the entirety of make_lang_regex and combine_file_extensions (removing the latter). This should remove the potential overflow vulnerabilities, and IMO...

I've implemented PCRE2 support in [my fork](https://github.com/aswild/the_silver_searcher). It was fairly straightforward to add a shim layer so that ag can work with either PCRE version: https://github.com/aswild/the_silver_searcher/blob/master/src/pcre_api.h

Hey, thanks for the shout-out. One word of warning - most of my open PRs on this repo are pretty old and in most cases I have better versions of...

AFAIK, files are free'd (or munmap'd) when ag is finished with them, i.e. after their results have been printed. But there can be one allocated file per worker thread, and...