From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Tom Lord Newsgroups: gmane.lisp.guile.user Subject: Re: Stupid module and pregexp questions Date: Tue, 6 May 2003 02:28:21 -0700 (PDT) Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Message-ID: <200305060928.CAA13979@morrowfield.regexps.com> References: <877k9eobcv.fsf@raven.i.defaultvalue.org> <20030430064840.GC22895@www> <20030430103445.GB23809@www> <20030506095052.GB23667@www> NNTP-Posting-Host: main.gmane.org X-Trace: main.gmane.org 1052212406 17978 80.91.224.249 (6 May 2003 09:13:26 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 6 May 2003 09:13:26 +0000 (UTC) Cc: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Tue May 06 11:13:21 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19CyVl-0004fO-00 for ; Tue, 06 May 2003 11:13:21 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 19CyWI-0001oj-0A for guile-user@m.gmane.org; Tue, 06 May 2003 05:13:54 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 19CyVv-0001hP-00 for guile-user@gnu.org; Tue, 06 May 2003 05:13:31 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 19CyVt-0001fh-00 for guile-user@gnu.org; Tue, 06 May 2003 05:13:29 -0400 Original-Received: from 1cust86.tnt13.sfo8.da.uu.net ([65.234.195.86] helo=morrowfield.regexps.com) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 19CyVZ-0001AB-00 for guile-user@gnu.org; Tue, 06 May 2003 05:13:10 -0400 Original-Received: (from lord@localhost) by morrowfield.regexps.com (8.9.1/8.9.1) id CAA13979; Tue, 6 May 2003 02:28:21 -0700 (PDT) (envelope-from lord@morrowfield.regexps.com) Original-To: tomas@fabula.de In-reply-to: <20030506095052.GB23667@www> (tomas@fabula.de) X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: General Guile related discussions List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.user:1913 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.user:1913 > From: tomas@fabula.de > > Maybe that suggestion, to choose a minimalist, truly regular regular > > expression language -- then do the rest in scheme -- satisfies the > > spirit of "do as little as possible in C". > Hm. Technically, the idea sounds quite attractive, in a way. I > see several issues, though. > - This leaves still the question open whether it'd be possible to > have a regexp interface spec which could be fairly portable > across Schemes. It might leave many things unspecified, but it > would have to be powerful/specific enough that people dare to > use it (when trying to write portable Scheme, that is). POSIX regexps are your friend, in this regard. A _subset_ of Posix regexps is a minimalist, truly regular, regular expression pattern language. So, to the (slightly problematic) extent that you can lay your hands on accurate Posix regexp engines, you can use such engines to implement the kind of Scheme regexp library I'm suggesting. > - If there is a possibility to provide a ``high level'' interface > resembling more traditional regexp languages, I see no problem. > It's this ``high level'' interface I was talking about (after all > it seems pregexp does *everything* in Scheme). It's really foolish, performance-wise, to do _all_ of a regexp engine in scheme until you can scan a string through a dfa table at <20 instructions per character. If some of the hard-core compilers are up to that, I'm impressed -- but I'm quite sure none of the interpreters are. The interpreters will be off by no less than 1, and I'd expect 2 or 3 orders of magnitude (powers of 10, here). > > Another design dimension to consider: what are Guile's plans re: > > Unicode? > Uh, oh. Tee hee. No point talking regexps there until you get characters and strings right. I've actually mapped a bunch of that stuff out: how to do strings at the C level and chars and strings at the C level. I'm starting to fear I'm getting too old to ever make it real, though. -t _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://mail.gnu.org/mailman/listinfo/guile-user