Received: from mx0.gmx.net (mx0.gmx.net [213.165.64.100]) by h1439878.stratoserver.net (8.14.2/8.14.2/Debian-2build1) with SMTP id p2DMB41a018013 for ; Sun, 13 Mar 2011 23:11:05 +0100 Received: (qmail 22679 invoked by alias); 13 Mar 2011 22:10:59 -0000 Delivered-To: GMX delivery to rainer.schoepf@gmx.net Received: (qmail invoked by alias); 13 Mar 2011 22:10:59 -0000 Received: from relay2.uni-heidelberg.de (EHLO relay2.uni-heidelberg.de) [129.206.210.211] by mx0.gmx.net (mx112) with SMTP; 13 Mar 2011 23:10:59 +0100 Received: from listserv.uni-heidelberg.de (listserv.uni-heidelberg.de [129.206.100.94]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id p2DM97Bk028096 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 13 Mar 2011 23:09:07 +0100 Received: from listserv.uni-heidelberg.de (localhost.localdomain [127.0.0.1]) by listserv.uni-heidelberg.de (8.13.1/8.13.1) with ESMTP id p2DAHdWW014519; Sun, 13 Mar 2011 23:09:01 +0100 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 1209088 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Sun, 13 Mar 2011 23:09:01 +0100 Received: from relay2.uni-heidelberg.de (relay2.uni-heidelberg.de [129.206.210.211]) by listserv.uni-heidelberg.de (8.13.1/8.13.1) with ESMTP id p2DM91NK022632 for ; Sun, 13 Mar 2011 23:09:01 +0100 Received: from lon1-post-3.mail.demon.net (lon1-post-3.mail.demon.net [195.173.77.150]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id p2DM8oVE028058 for ; Sun, 13 Mar 2011 23:08:54 +0100 Received: from cremornelane.demon.co.uk ([80.177.25.195] helo=palladium.local) by lon1-post-3.mail.demon.net with esmtp (Exim 4.69) id 1PytT0-0000xB-dy; Sun, 13 Mar 2011 22:08:50 +0000 User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-GB; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 MIME-Version: 1.0 References: <905C5ED0-6639-4DEB-95AC-A2FCB2C4491D@gmail.com> X-Enigmail-Version: 1.1.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Message-ID: <4D7D4072.1080609@morningstar2.co.uk> Date: Sun, 13 Mar 2011 22:08:50 +0000 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Joseph Wright Subject: Re: expl3's seq_pop_right etc. To: LATEX-L@listserv.uni-heidelberg.de In-Reply-To: Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: X-GMX-Antispam: 0 (Mail was not recognized as spam); Detail=5D7Q89H36p4U4jfdfC5HDevlx1X2sAZgAaLl3DbFfW0PXxL7WgvovMFXXSEPrACW/b9IW Qp+GhEViZlUW4mdBntgP1X8KwB5tjHCA/yxSZMu7BXBiPs3ujyaoi2xLHDqpg8dk65Dhpb3Lg0c1 iTjGg==V1; X-Resent-By: Forwarder X-Resent-For: rainer.schoepf@gmx.net X-Resent-To: rainer@rainer-schoepf.de Status: R X-Status: X-Keywords: X-UID: 6670 On 13/03/2011 20:14, Bruno Le Floch wrote: > Hello all, > > >> **So my question is: do we want to support braces in seq items or not?** > > Here is what I could code today. The absence of braces around each > element makes most functions rather tricky to implement, although at > most a factor of 2 in speed, I'd say. All the functions in the file > I'm attaching are linear in the length of the seq (I think), i.e. > quicker than storing the elements one by one in a new seq. > > The only reason to not brace items is to be able to find an item > faster using delimited arguments, and that this will only work for > "nice" items (i.e., no brace, no `#`). So I have the following more > radical proposal: brace the arguments, and propose two searches, > > - one true search, which goes through each element and compares with > `\tl_if_eq:nn`, > > - a `str`-like one, which detokenizes the seq, and searches for the > detokenized version of `\seq_elt:n {}` with a delimited argument > (now ok, since everything is detokenized). > > That proposal would make the code much, much clearer in my opinion. > Also slightly faster, but not more than two-fold. > I need to read through everything, but as you are looking at a total reimplementation, more or less, do we really need two markers in a sequence? I've got an 'alternative' sequence system to work with just one (\q_seq), but at present it strips braces. (I know that because I checked after you started this thread: I'd have suggested my version otherwise!) -- Joseph Wright