From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Matt Wette Newsgroups: gmane.lisp.guile.user Subject: Re: regex-case Date: Wed, 10 Feb 2016 17:19:37 -0800 Message-ID: References: <61E420AD-70B6-4DEA-A7DD-EB123E22EFD0@verizon.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1455157263 11403 80.91.229.3 (11 Feb 2016 02:21:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 11 Feb 2016 02:21:03 +0000 (UTC) To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Thu Feb 11 03:20:53 2016 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aTgsC-0001fU-RZ for guile-user@m.gmane.org; Thu, 11 Feb 2016 03:20:48 +0100 Original-Received: from localhost ([::1]:45350 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aTgsB-0004pQ-Oy for guile-user@m.gmane.org; Wed, 10 Feb 2016 21:20:47 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58016) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aTgrw-0004ow-CC for guile-user@gnu.org; Wed, 10 Feb 2016 21:20:33 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aTgrt-0001UH-66 for guile-user@gnu.org; Wed, 10 Feb 2016 21:20:32 -0500 Original-Received: from vms173013pub.verizon.net ([206.46.173.13]:55457) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aTgrt-0001Og-1N for guile-user@gnu.org; Wed, 10 Feb 2016 21:20:29 -0500 Original-Received: from vz-proxy-m003.mx.aol.com ([64.236.83.8]) by vms173013.mailsrvcs.net (Oracle Communications Messaging Server 7.0.5.32.0 64bit (built Jul 16 2014)) with ESMTPA id <0O2C00GLVZOQGD50@vms173013.mailsrvcs.net> for guile-user@gnu.org; Wed, 10 Feb 2016 19:19:39 -0600 (CST) X-CMAE-Score: 0 X-CMAE-Analysis: v=2.1 cv=J+9Xl1TS c=1 sm=1 tr=0 a=Bcm0RCOkHTZ4We9DUxtllQ==:117 a=IkcTkHD0fZMA:10 a=jFJIQSaiL_oA:10 a=o1OHuDzbAAAA:8 a=DhP4zevTNrgnFghQdewA:9 a=QEXdDO2ut3YA:10 Original-Received: by 72.87.204.128 with SMTP id 245a459b; Thu, 11 Feb 2016 01:19:38 GMT In-reply-to: <61E420AD-70B6-4DEA-A7DD-EB123E22EFD0@verizon.net> X-Mailer: Apple Mail (2.2104) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.46.173.13 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:12387 Archived-At: > On Feb 6, 2016, at 11:13 AM, Matt Wette = wrote: >=20 > I have always missed the ease provided by Perl in throwing a string at = a list of regular expressions. I have thought it would be nice if the = (ice-9 regex) module would provide something comparable . So I started = work on a macro =E2=80=9Cregex-case=E2=80=9D. Code attached. > Comments on syntax appreciated. =E2=80=94 Matt >=20 > I was thinking the above expansion has some chance (if it lives in the = regex module?) to memoize the make-regexp part during optimization. =20 I am going to try to optimize by using eval-when and narrowing the = syntax to use only constant strings for the case items. I will post update if I can get it working. Matt