From owner-freebsd-current@FreeBSD.ORG Mon Jun 25 00:54:00 2007 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9ED4416A41F for ; Mon, 25 Jun 2007 00:54:00 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.geekcn.org (tarsier.geekcn.org [210.51.165.229]) by mx1.freebsd.org (Postfix) with ESMTP id 4A24B13C45B for ; Mon, 25 Jun 2007 00:54:00 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from localhost (tarsier.geekcn.org [210.51.165.229]) by tarsier.geekcn.org (Postfix) with ESMTP id 4FADAEB28B0; Mon, 25 Jun 2007 08:53:59 +0800 (CST) X-Virus-Scanned: amavisd-new at geekcn.org Received: from tarsier.geekcn.org ([210.51.165.229]) by localhost (mail.geekcn.org [210.51.165.229]) (amavisd-new, port 10024) with ESMTP id ktf+qyKBgOtV; Mon, 25 Jun 2007 08:53:57 +0800 (CST) Received: from charlie.delphij.net (unknown [221.219.158.154]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tarsier.geekcn.org (Postfix) with ESMTP id EB738EB28AC; Mon, 25 Jun 2007 08:53:56 +0800 (CST) DomainKey-Signature: a=rsa-sha1; s=default; d=delphij.net; c=nofws; q=dns; h=message-id:date:from:user-agent:mime-version:to:cc:subject: references:in-reply-to:x-enigmail-version:openpgp:content-type:content-transfer-encoding; b=OG+I0kG2ly0SdrHTFm8HXkOkjIsjr1faMtLuwxdPAFZln9w6p67sJJ4nMqzxHhjBb y+qzlhaRiLoPAENtc45+g== Message-ID: <467F1224.1040406@delphij.net> Date: Mon, 25 Jun 2007 08:53:56 +0800 From: Xin LI User-Agent: Thunderbird 2.0.0.4 (X11/20070615) MIME-Version: 1.0 To: Gavin Atkinson References: <20070622210119.GA4186@clamps.exit2shell.com> <467C45C7.6020401@FreeBSD.org> <20070624105011.R44958@thor.farley.org> <20070624192739.T88320@ury.york.ac.uk> In-Reply-To: <20070624192739.T88320@ury.york.ac.uk> X-Enigmail-Version: 0.95.1 OpenPGP: url=http://www.delphij.net/delphij.asc Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-current@freebsd.org, "Sean C. Farley" , Steven Kreuzer , Gabor Kovesdan Subject: Re: Port of OpenBSD's sdiff X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jun 2007 00:54:00 -0000 Gavin Atkinson wrote: > On Sun, 24 Jun 2007, Sean C. Farley wrote: >> On Fri, 22 Jun 2007, Gabor Kovesdan wrote: >> >>> these are very good news! You might also want to take a look at >>> textproc/bsddiff, textproc/bsdgrep and textproc/bsdsort. These are the >>> BSD-licensed text processing tools from OpenBSD, >> >> >> >> I have been looking at freegrep (original source of OpenBSD's grep) off >> and on for years. > > ... and I've been looking at patch(1). FreeBSD's is currently under GNU > license, because one of the files (backupfile.c) is. NetBSD have a > slightly earlier version of this, covered by the BSD license. I've yet > to sit down and compare functionality in depth, but initial testing has > shown there's little difference in functionality. It might be more interesting to take a look at our regular expression library as well. IMHO it should be either optimized or replaced by another implementation which is standard conform. Our current implementation is slower than many other implementation, especially the BSD licensed PCRE. This has in turn made a lot of our utilities slow. For instance sed -e 's/^foo [0-9]{3} bar.+$/\1/g' seems to use O(N^2) time where N is the text being processed. Cheers,