bug#72524: how does grep determine locale if no LC environment variables are set

2024-08-08 Thread mark . yagnatinsky--- via Bug reports for GNU grep
I ran into an odd issue... the workaround is easy enough but the issue is weird. In case this relevant, my grep coms from git bash. (which I think is mostly Cygwin? (or maybe msys2??)) Anyway, grep -P doesn't work if no LC vars are set, and complains that it only works in unibyte locales or UTF-

bug#72524: how does grep determine locale if no LC environment variables are set

2024-08-08 Thread mark . yagnatinsky--- via Bug reports for GNU grep
Re: how am I doing that ... via bash, just like the way you suggested I run "locale" the second time: LC_CTYPE=C.UTF-8 grep -P needle haystack.txt # just CTYPE seems to be enough, no need for ALL Re: output difference for locale: First way, everything is C.UTF-8 except LANG and LC_ALL, which ar

bug#72524: how does grep determine locale if no LC environment variables are set

2024-08-09 Thread mark . yagnatinsky--- via Bug reports for GNU grep
Re: debugger: will that work if grep wasn't built with debug symbols? I think this one wasn't. -Original Message- From: Paul Eggert Sent: Friday, August 9, 2024 5:57 PM To: Yagnatinsky, Mark : IT (NYK) Cc: 72...@debbugs.gnu.org Subject: Re: bug#72524: how does grep determine locale if

bug#72524: how does grep determine locale if no LC environment variables are set

2024-08-09 Thread mark . yagnatinsky--- via Bug reports for GNU grep
Yeah but that would involve compiling the SAME WAY that this one was compiled, and I have no idea how the Git Bash for Windows project does this kind of thing. I tried it on a grep in a more full-featured distribution (namely MSYS2) and it works fine. I'm tempted to try it on a different computer

bug#72524: how does grep determine locale if no LC environment variables are set

2024-08-09 Thread mark . yagnatinsky--- via Bug reports for GNU grep
I suspected as much... I'll try to get my other one working then. -Original Message- From: Paul Eggert Sent: Friday, August 9, 2024 6:10 PM To: Yagnatinsky, Mark : IT (NYK) Cc: 72...@debbugs.gnu.org Subject: Re: bug#72524: how does grep determine locale if no LC environment variables a

bug#72524: how does grep determine locale if no LC environment variables are set

2024-08-12 Thread mark . yagnatinsky--- via Bug reports for GNU grep
I checked; it's happens on Git for Windows on the other computer too. Must be something with how they implemented locals. Thanks! -Original Message- From: Yagnatinsky, Mark : IT (NYK) Sent: Friday, August 9, 2024 6:12 PM To: Paul Eggert Cc: 72...@debbugs.gnu.org Subject: RE: bug#72524: h

bug#73721: grep perf docs barely mention mem usage

2024-10-09 Thread mark . yagnatinsky--- via Bug reports for GNU grep
This page: https://www.gnu.org/software/grep/manual/html_node/Performance.html discusses how to get good performance out of grep. That is nice, but the perf advice focuses almost entirely on speed. I'm more interested in how to avoid excessive memory usage. After a bit of research, it seems that on

bug#73721: grep perf docs barely mention mem usage

2024-10-09 Thread mark . yagnatinsky--- via Bug reports for GNU grep
Thanks!! Re: wouldn't help much: maybe it wouldn't help with speed. But how could it possibly not help with memory usage? In particular, the "commit charge" is surely far lower, right? With a read() based approach, grep needs to explicitly allocate an array, and as far as the kernel knows, this ar

bug#73721: grep perf docs barely mention mem usage

2024-10-10 Thread mark . yagnatinsky--- via Bug reports for GNU grep
Okay, that's a surprise. I had assumed the buffer would be mapped read-only. If indeed it needs to modify the buffer then even the memory gains start to look marginal. Thanks for explaining where my assumptions were wrong, and thanks also for confirming the parts that were right. I now know tha