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 p2DN3mAC003401 for ; Mon, 14 Mar 2011 00:03:49 +0100 Received: (qmail 12032 invoked by alias); 13 Mar 2011 23:03:43 -0000 Delivered-To: GMX delivery to rainer.schoepf@gmx.net Received: (qmail invoked by alias); 13 Mar 2011 23:03:43 -0000 Received: from relay2.uni-heidelberg.de (EHLO relay2.uni-heidelberg.de) [129.206.210.211] by mx0.gmx.net (mx084) with SMTP; 14 Mar 2011 00:03:43 +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 p2DN1SKG006139 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 14 Mar 2011 00:01:29 +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 p2DN14rT027001; Mon, 14 Mar 2011 00:01:27 +0100 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 1205089 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Mon, 14 Mar 2011 00:01:11 +0100 Received: from relay.uni-heidelberg.de (relay.uni-heidelberg.de [129.206.100.212]) by listserv.uni-heidelberg.de (8.13.1/8.13.1) with ESMTP id p2DMwf8g025706 for ; Sun, 13 Mar 2011 23:58:41 +0100 Received: from mail-yi0-f49.google.com (mail-yi0-f49.google.com [209.85.218.49]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with ESMTP id p2DMwZik016056 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=FAIL) for ; Sun, 13 Mar 2011 23:58:40 +0100 Received: by yic15 with SMTP id 15so3321541yic.22 for ; Sun, 13 Mar 2011 15:58:35 -0700 (PDT) MIME-Version: 1.0 Received: by 10.146.232.9 with SMTP id e9mr16850756yah.21.1300057115498; Sun, 13 Mar 2011 15:58:35 -0700 (PDT) Received: by 10.147.170.13 with HTTP; Sun, 13 Mar 2011 15:58:35 -0700 (PDT) References: <905C5ED0-6639-4DEB-95AC-A2FCB2C4491D@gmail.com> <4D7D4072.1080609@morningstar2.co.uk> Content-Type: multipart/mixed; boundary=000e0cd56d8e8e9c7b049e652204 X-Spam-Whitelist: Message-ID: Date: Sun, 13 Mar 2011 18:58:35 -0400 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Bruno Le Floch Subject: Re: expl3's seq_pop_right etc. To: LATEX-L@listserv.uni-heidelberg.de In-Reply-To: <4D7D4072.1080609@morningstar2.co.uk> Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: X-GMX-Antispam: 0 (Mail was not recognized as spam); Detail=5D7Q89H36p77e5KAPs1l6v/Sb97LojnDtMgfETrECMLUO9erHzOJe+OynZRhvlGqb5A0X bbiCt2rAnnct/NAlbHMvoAL6GY+23tB3khNK7aqcuJkHrktl7heUBBMuxWDU8MR6sgnaA+ruWxex YrTyw==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: 6673 --000e0cd56d8e8e9c7b049e652204 Content-Type: text/plain; charset=ISO-8859-1 > 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 If we want to avoid losing braces, there are essentially two ways. Either have two markers, `\seq_elt:w \seq_elt_end:`, but the code is tricky, or have one marker only, and braces, as `\seq_elt:n {}`. I'm essentially taking this from the TeXbook, p. 378 (and thinking on my own, but well... I do trust Knuth's knowledge of TeX). Will's version (and I guess yours if you use `\quark_if_recursion_tail_stop:n`) breaks for items like {{{{{{a}}}}}}, or some cases with conditionals. So let me also propose a fix for `\quark_if_recursion_tail_stop:n` and friends (see attached for examples where the current version is broken, and for the fix). The new version should be \~10\% slower (not really checked that claim), but would not break, although it would consider `{}\q_recursion_tail` to be `\q_recursion_tail`. -- Regards, Bruno --000e0cd56d8e8e9c7b049e652204 Content-Type: application/x-tex; name="quarktestfix.tex" Content-Disposition: attachment; filename="quarktestfix.tex" Content-Transfer-Encoding: base64 X-Attachment-Id: file0 JSBUaGUgYDpuYCBxdWFyayB0ZXN0cyBhcmUgY3VycmVudGx5IGJyb2tlbjogYm90aCBsaW5lcyBi ZWxvdyBjcmFzaC4KJQolICAgXHF1YXJrX2lmX3JlY3Vyc2lvbl90YWlsX3N0b3A6biB7e3t7YX19 fX0KJSAgIFxxdWFya19pZl9yZWN1cnNpb25fdGFpbF9zdG9wOm4ge3thYlxpZmZhbHNlfVxmaX0K JQolIEhlcmUgaXMgdGhlIHByb3Bvc2VkIGZpeCAoY2hhbmdpbmcgb2YgY291cnNlIGBNcXVhcmtg IHRvIGBxdWFya2ApLiBGWUksCiUgICAgIGBcaWZfY2F0Y29kZTp3IEEgXHRsX3RvX3N0cjpuIHsu Li59IEFgIAolIHRlc3RzIHdoZXRoZXIgey4uLn0gaXMgZW1wdHkuIEl0IGlzIGEgdmFyaWFudCBv ZiAKJSAgICAgYFxleHBfYWZ0ZXI6d04gXGlmX21lYW5pbmc6dyBcZXhwX2FmdGVyOndOIEEgXHRs X3RvX3N0cjpuIHsuLi59IEFgCiUgd2hpY2ggaXMgdGhlIHZlcnNpb24gdXNlZCBmb3IgYFx0bF9p Zl9lbXB0eTpuKFRGKWAuCgpcY3NfbmV3Ok5wbiBcTXF1YXJrX2lmX3JlY3Vyc2lvbl90YWlsX3N0 b3A6biAjMSB7CiAgXGlmX2NhdGNvZGU6dyBBIFx0bF90b19zdHI6biBcZXhwX2FmdGVyOndOIHsK ICAgIFxNcXVhcmtfaWZfcmVjdXJzaW9uX3RhaWxfYXV4OncgIzEgXHFfcmVjdXJzaW9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