From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by 10.90.117.16 with SMTP id p16cs367317agc; Mon, 12 Oct 2009 16:02:40 -0700 (PDT) Received: by 10.224.78.207 with SMTP id m15mr5260745qak.3.1255388559898; Mon, 12 Oct 2009 16:02:39 -0700 (PDT) Return-Path: Received: from rubyforge.org (rubyforge.org [205.234.109.19]) by mx.google.com with ESMTP id 9si4837392qyk.27.2009.10.12.16.02.39; Mon, 12 Oct 2009 16:02:39 -0700 (PDT) Received-SPF: pass (google.com: domain of sup-talk-bounces@rubyforge.org designates 205.234.109.19 as permitted sender) client-ip=205.234.109.19; Authentication-Results: mx.google.com; spf=pass (google.com: domain of sup-talk-bounces@rubyforge.org designates 205.234.109.19 as permitted sender) smtp.mail=sup-talk-bounces@rubyforge.org Received: from rubyforge.org (rubyforge.org [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id 8750C13C8976; Mon, 12 Oct 2009 19:02:39 -0400 (EDT) Received: from olra.theworths.org (olra.theworths.org [82.165.184.25]) by rubyforge.org (Postfix) with ESMTP id 84A6B13C896A for ; Mon, 12 Oct 2009 19:02:25 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 0B1BB4028BF for ; Mon, 12 Oct 2009 16:02:25 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VY-ktPvTphrh for ; Mon, 12 Oct 2009 16:02:24 -0700 (PDT) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id A520A4041FF for ; Mon, 12 Oct 2009 16:02:23 -0700 (PDT) From: Carl Worth To: sup-talk In-reply-to: <1255350472-sup-5679@masanjin.net> References: <1253911610-sup-2052@yoom.home.cworth.org> <1255350472-sup-5679@masanjin.net> Date: Mon, 12 Oct 2009 16:02:30 -0700 Message-Id: <1255388543-sup-7477@yoom.home.cworth.org> User-Agent: Sup/git MIME-Version: 1.0 Subject: Re: [sup-talk] [PATCH] Allow thread index view to sort oldest first X-BeenThere: sup-talk@rubyforge.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: User & developer discussion of Sup List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============1772413028==" Sender: sup-talk-bounces@rubyforge.org Errors-To: sup-talk-bounces@rubyforge.org --===============1772413028== Content-Transfer-Encoding: 8bit Content-Type: multipart/signed; micalg="pgp-sha1"; boundary="=-1255388550-834284-9326-4727-1-="; protocol="application/pgp-signature" --=-1255388550-834284-9326-4727-1-= Content-Type: text/plain; charset=UTF-8 Excerpts from William Morgan's message of Mon Oct 12 05:48:50 -0700 2009: > I've finally gotten a chance to look at this. It looks good so far. Thanks for taking a look at it. > So I definitely don't want the second patch which changes the default > order. The configuration boolean is fine. (And if you want to add a > question to sup-config, that's icing on the cake.) I totally understand that, and that's why I did that part as a separate patch. > I would also like to disable forcing the loading of all messages. I can understand that too. > It is possible in Ferret: remove the DESC in ferret_index.rb line 160. > It is also possible in Xapian, but we're building the Xapian index to > optimize newest-first access. (Of course that would also be possible to > change, but then we're talking about a total index rebuild.) > > If you wanted to tweak that, the load-all-threads wouldn't be necessary. How do we get this behavior in xapian? I'm fine if the index is not optimized for this. The current newest-first optimization is perfect for actual searching, (as opposed to reading of new messages), and the patches don't change that. > Either way, I'm happy to merge the first patch with the "n = -1" thing > removed. I wouldn't want the patch accepted with just that change. It results in a "broken" view, (it claims to be showing the oldest message first, but it doesn't, and trying to scroll "up" to see earlier messages also doesn't work). So I'll see if I can figure out how to just load the N oldest message instead. (My working theory was that this perform similarly to actually loading all the messages, and that's why the patch just did that). > Pretty easy to change. In thread.rb, there's a date method which takes a > max; you can make it take a min instead. Excellent. I'll take a look at that. > The hard work for both of these things is wiring this option through. > Although $config is a global variable, I don't really want to use it > directly in e.g. thread.rb. OK. I'll see if there's nearby code to mimic for this. -Carl > > PS. We're still total ruby newbies, so please point out any silly > > mistakes we're missing with respect to ruby idioms. > > Everything looks good. The only slgihtly non-idiomatic thing is using > "if !x" instead of "unless x". Heh. Just today I noticed "unless" while poking around in some sup code. I have to say that "unless ... else" seems like a downright malicious construct to unleash against people reading code. --=-1255388550-834284-9326-4727-1-= Content-Disposition: attachment; filename="signature.asc" Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iD8DBQFK07WG6JDdNq8qSWgRAj4RAJ9X4o6b/d2LrCoTriD8Ue4R16bNiwCfeiBS biKOIGr4228H3TXdwFtTxKc= =aEbQ -----END PGP SIGNATURE----- --=-1255388550-834284-9326-4727-1-=-- --===============1772413028== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ sup-talk mailing list sup-talk@rubyforge.org http://rubyforge.org/mailman/listinfo/sup-talk --===============1772413028==--