From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 26 18:25:11 2008 Return-Path: Delivered-To: hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0EB5B1065681; Tue, 26 Aug 2008 18:25:11 +0000 (UTC) (envelope-from gabor@kovesdan.org) Received: from server.mypc.hu (server.mypc.hu [87.229.73.95]) by mx1.freebsd.org (Postfix) with ESMTP id A111D8FC19; Tue, 26 Aug 2008 18:25:10 +0000 (UTC) (envelope-from gabor@kovesdan.org) Received: from localhost (localhost [127.0.0.1]) by server.mypc.hu (Postfix) with ESMTP id 1EEB714D6C5D; Tue, 26 Aug 2008 20:25:09 +0200 (CEST) X-Virus-Scanned: amavisd-new at t-hosting.hu Received: from server.mypc.hu ([127.0.0.1]) by localhost (server.mypc.hu [127.0.0.1]) (amavisd-new, port 10024) with LMTP id yrMrd3pRcMsJ; Tue, 26 Aug 2008 20:25:04 +0200 (CEST) Received: from [89.134.207.83] (catv-5986cf53.catv.broadband.hu [89.134.207.83]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by server.mypc.hu (Postfix) with ESMTPSA id 9F16914D6C54; Tue, 26 Aug 2008 20:25:04 +0200 (CEST) Message-ID: <48B44A7D.3070108@kovesdan.org> Date: Tue, 26 Aug 2008 20:25:01 +0200 From: Gabor Kovesdan User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: hackers@FreeBSD.org Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Tue, 26 Aug 2008 18:30:50 +0000 Cc: Max Khon , dougb@FreeBSD.org, krion@FreeBSD.org, current@FreeBSD.org Subject: CFT: BSD grep X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Aug 2008 18:25:11 -0000 Hello all, I've reviewed BSD grep based on your comments and the bug reports I received. The new version is committed to the ports tree as textproc/bsdgrep and there is a base patch available: http://kovesdan.org/patches/grep-base.diff I've asked portmgr to test my patch on pointyhat if they have available resources, but haven't got an answer yet. In the meantime, I'd like to ask for your comments and feedback on BSD grep. Currently, it is supposed to be highly compatible with GNU grep, except from some differences in the handling of the regular expressions. This comes from the different manners in the GNU regex library and in our regex library, thus it would be very difficult to fix at the level of grep. For example, GNU grep accepts empty subexpressions in regexes, like "(|b)", but BSD grep does not. I don't know how often such non-standard constructions are used, we need to see the results of a portbuild first, but I know that there are some in portmaster. That's why I CC'd Doug, I'm interested in his comments. There are another question to discuss. GNU grep supports -P for Perl regexes based on PCRE. This is not available in FreeBSD, though, but I'd be glad to add it to BSD grep. This would require us to import PCRE to base. It is BSD-licensed and maybe other tools would make use of it in the future. I don't know how this can cooperate with the ports version and how difficult it would be to maintain it in base. I remember that Perl was removed from base due to this overhead. What do you think about this? I've CC'd krion@, the maintainer of devel/pcre, maybe he can comment on this. Thanks, Gabor