From: Carl Worth <cworth@cworth.org>
To: sup-talk <sup-talk@rubyforge.org>
Subject: Re: [sup-talk] [PATCH] Allow thread index view to sort oldest first
Date: Mon, 12 Oct 2009 16:02:30 -0700 [thread overview]
Message-ID: <1255388543-sup-7477@yoom.home.cworth.org> (raw)
In-Reply-To: <1255350472-sup-5679@masanjin.net>
[-- Attachment #1.1: Type: text/plain, Size: 2492 bytes --]
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.
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 190 bytes --]
[-- Attachment #2: Type: text/plain, Size: 140 bytes --]
_______________________________________________
sup-talk mailing list
sup-talk@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-talk
next prev parent reply other threads:[~2009-10-12 23:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-25 21:08 Carl Worth
2009-10-01 17:04 ` William Morgan
2009-10-01 17:43 ` Carl Worth
2009-10-12 12:48 ` William Morgan
2009-10-12 23:02 ` Carl Worth [this message]
2009-10-13 20:51 ` Olly Betts
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1255388543-sup-7477@yoom.home.cworth.org \
--to=cworth@cworth.org \
--cc=sup-talk@rubyforge.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox