Re: [notmuch] [PATCH] Added regress option to tags iterator
authorRuben Pollan <meskio@sindominio.net>
Tue, 5 Jan 2010 15:33:32 +0000 (16:33 +0100)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:35:57 +0000 (09:35 -0800)
b2/99dfe8ef08e9a42bb7db3921c321398dc54d79 [new file with mode: 0644]

diff --git a/b2/99dfe8ef08e9a42bb7db3921c321398dc54d79 b/b2/99dfe8ef08e9a42bb7db3921c321398dc54d79
new file mode 100644 (file)
index 0000000..07d4ab7
--- /dev/null
@@ -0,0 +1,139 @@
+Return-Path: <meskio@sindominio.net>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id DDC87431FBD\r
+       for <notmuch@notmuchmail.org>; Tue,  5 Jan 2010 07:30:58 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id MlkEsf6rm2dI for <notmuch@notmuchmail.org>;\r
+       Tue,  5 Jan 2010 07:30:58 -0800 (PST)\r
+Received: from flatline.sindominio.net (flatline.sindominio.net [82.144.4.26])\r
+       by olra.theworths.org (Postfix) with ESMTP id AAC91431FAE\r
+       for <notmuch@notmuchmail.org>; Tue,  5 Jan 2010 07:30:57 -0800 (PST)\r
+Received: from localhost (localhost.localdomain [127.0.0.1])\r
+       by flatline.sindominio.net (Postfix) with ESMTP id 7DEB0348027;\r
+       Tue,  5 Jan 2010 16:30:56 +0100 (CET)\r
+X-Virus-Scanned: Debian amavisd-new at sindominio.net\r
+Received: from flatline.sindominio.net ([127.0.0.1])\r
+       by localhost (flatline.sindominio.net [127.0.0.1]) (amavisd-new,\r
+       port 10024)\r
+       with ESMTP id IjHqg6yMjaY8; Tue,  5 Jan 2010 16:30:50 +0100 (CET)\r
+Received: from blackspot (rpollan-laptop.cern.ch [137.138.192.228])\r
+       by flatline.sindominio.net (Postfix) with ESMTPA id 63BEE34802C;\r
+       Tue,  5 Jan 2010 16:30:49 +0100 (CET)\r
+Received: by blackspot (Postfix, from userid 1000)\r
+       id 8B6058BCC3; Tue,  5 Jan 2010 16:33:32 +0100 (CET)\r
+Date: Tue, 5 Jan 2010 16:33:32 +0100\r
+From: Ruben Pollan <meskio@sindominio.net>\r
+To: Carl Worth <cworth@cworth.org>\r
+Message-ID: <20100105153332.GE9339@blackspot>\r
+References: <20091126202347.GA16654@blackspot>\r
+       <1260364206-344-1-git-send-email-meskio@sindominio.net>\r
+       <20091209132446.GC23878@blackspot>\r
+       <877hsv6hbo.fsf@yoom.home.cworth.org>\r
+       <87r5qnol78.fsf@yoom.home.cworth.org>\r
+       <87pr67ofz2.fsf@yoom.home.cworth.org>\r
+MIME-Version: 1.0\r
+Content-Type: multipart/signed; micalg=pgp-sha1;\r
+       protocol="application/pgp-signature"; boundary="Dzs2zDY0zgkG72+7"\r
+Content-Disposition: inline\r
+In-Reply-To: <87pr67ofz2.fsf@yoom.home.cworth.org>\r
+User-Agent: Mutt/1.5.20 (2009-06-14)\r
+Cc: notmuch@notmuchmail.org\r
+Subject: Re: [notmuch] [PATCH] Added regress option to tags iterator\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Tue, 05 Jan 2010 15:30:59 -0000\r
+\r
+\r
+--Dzs2zDY0zgkG72+7\r
+Content-Type: text/plain; charset=iso-8859-1\r
+Content-Disposition: inline\r
+Content-Transfer-Encoding: quoted-printable\r
+\r
+On 19:16, Mon 21 Dec 09, Carl Worth wrote:\r
+> On Mon, 21 Dec 2009 17:23:55 -0800, Carl Worth <cworth@cworth.org> wrote:\r
+> >   New function             Corresponds to existing function (if any)\r
+> >   ------------             -----------------------------------------\r
+> >   move_to_first            <implicit in iterator creation>\r
+> >   has_next         has_more\r
+> >   move_to_next             advance\r
+> >=20\r
+> >   move_to_last             <none>\r
+> >   has_previous             <none>\r
+> >   move_to_previous <none>\r
+> >=20\r
+> >   get                      get\r
+> >=20\r
+> > The semantics of those all seem clear enough to me. They provide what's\r
+> > necessary for all three portions of a for loop, (in either direction),\r
+>=20\r
+> Except that they don't. :-P\r
+>=20\r
+> We don't want has_next and has_previous but something more like "has\r
+> current", (perhaps to pair with get_current?).\r
+\r
+Not sure if I understand that. Let's see if I understand well. move_to_first\r
+(or move_to_last) will put the iterator in the first (or last) valid item.\r
+move_to_next (and move_to_previous) will be able to reach an invalid item\r
+outside the list. Is it like that?\r
+\r
+In some implementations of iterators (like C++ STD) you can reach invalid i=\r
+tems\r
+only in one side of the list, at the end, but not at the beginning. Some pe=\r
+ople\r
+get use to this idea, but should not be a big deal to do it different.\r
+\r
+So you are thinking in a function has_current showing if the current item is\r
+valid. Am I right?\r
+\r
+> > The only downside is that the function names are a bit long in some\r
+> > cases, but I'm willing to live with that until someone comes up with\r
+> > better.\r
+>=20\r
+> One option is to just drop the "move_ " prefix.\r
+\r
+I think that's a good option. The names of the functions are still clear li=\r
+ke\r
+that, and the original names are too long.\r
+\r
+\r
+PS: Sorry for the late reply, Christmas is a busy time.\r
+\r
+\r
+--=20\r
+Rub=E9n Poll=E1n  | jabber:meskio@jabber.org\r
+-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=\r
+=3D-=3D-=3D-=3D-=3D-\r
+=C9sta es la historia de una sociedad que se hunde\r
+y mientras cae se repite:\r
+hasta ahora todo va bien, hasta ahora todo va bien ...\r
+Pero lo importante no es la caida sino el aterrizaje.\r
+                               el odio\r
+\r
+--Dzs2zDY0zgkG72+7\r
+Content-Type: application/pgp-signature; name="signature.asc"\r
+Content-Description: Digital signature\r
+Content-Disposition: inline\r
+\r
+-----BEGIN PGP SIGNATURE-----\r
+Version: GnuPG v1.4.10 (GNU/Linux)\r
+\r
+iEYEARECAAYFAktDW8wACgkQGKOQ92SwNMKmnwCgkgXud/hxGjbVS0QFM+n0cRMB\r
+B4YAnjnmIXD2Y/bFTUNyV1P6vn4dZsUV\r
+=EzM/\r
+-----END PGP SIGNATURE-----\r
+\r
+--Dzs2zDY0zgkG72+7--\r