Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Collapsing Re:'s in Titles.

by demerphq (Chancellor)
on Jun 02, 2004 at 20:24 UTC ( #359711=monkdiscuss: print w/replies, xml ) Need Help??

A while back I put together a patch that will handle collapsing Re:'s in a consistant and automatic fashion. A few people who know about it have been nudging me to get it moved over from test to here. And so today I did. Here is an example of what will happen: (Actually this is a piece of code that I think we could open up to a golf competition. :-)

# In : •Re: Bypassing strict refs # Out: Re^2: Bypassing strict refs # # In : Re: •Re: Bypassing strict refs # Out: Re^3: Bypassing strict refs # # In : Re: •Re: •Re: Bypassing strict refs # Out: Re^4: Bypassing strict refs # # In : Re: (12345) Re: Re: •Re: •Re: Bypassing strict refs # Out: Re^6: Bypassing strict refs # # In : Re: (12345) Re: Re: • Re: •Re: Bypassing strict r +efs # Out: Re^6: Bypassing strict refs # # In : Re: (12345) Re: Foo Bar # Out: Re^3: Foo Bar # # In : Re: Re^3: New code wrap options (in-line code CSS class)| # Out: Re^5: New code wrap options (in-line code CSS class)| # # In : Re: (tye)Re: New code wrap options # Out: Re^3: New code wrap options # # In : Re: Re: Re: Re: The ethics of humour # Out: Re^5: The ethics of humour # # In : Re: Foo Bar # Out: Re^2: Foo Bar # # In : Re: (demerphq) Re: Foo Bar # Out: Re^3: Foo Bar # # In : Re: (tye) Re: (demerphq) Re: Foo Bar # Out: Re^4: Foo Bar # # In : Re^2: (tye) Re: (demerphq) Re: Foo Bar # Out: Re^5: Foo Bar # # In : Re^2: (tye) Re: Re^2: Re: (demerphq) Re: Foo Bar # Out: Re^8: Foo Bar #

No doubt some people will be upset, but I hope most people will like it, certainly a lot of folks do something like this themselves. The code also actually involved refactoring a chunk of code out of a few places so on the structural side its been useful for the site. In fact if folks decide the rules I'm using aren't the best we can easily change them to suit.

Anyway, just thought you all should know whats up and who to yell at. :-)


---
demerphq

    First they ignore you, then they laugh at you, then they fight you, then you win.
    -- Gandhi


Replies are listed 'Best First'.
Re: Collapsing Re:'s in Titles.
by kvale (Monsignor) on Jun 02, 2004 at 20:33 UTC
    This patch looks useful to me for two reasons: (1) we won't have to manually count Re prefixes in a deep discussion and (2) it removes distracting cruft like personal monikers from the title.

    Cool!

    -Mark

Re: Collapsing Re:'s in Titles.
by b10m (Vicar) on Jun 02, 2004 at 20:38 UTC

    I still believe it's rather weird to have a title saying "Regarding: Regarding: Regarding:" so if it were up to me, "Re: $original_title" would be enough with any reply (even up to a milion levels deep)

    --
    b10m

    All code is usually tested, but rarely trusted.

      Several people, including me, very much hate node titles that don't give any hint at how deep they are in a thread. A non-"Re" node should be a root note and is usually a question or a proprosal. A "Re:" node should be a reply and is usually an answer. A "Re^2:" is usually quite different than either of the preceeding types of nodes. A "Re^15:" is quite deep in a thread and, at that point, a "Re:" showing up for the same thread means it isn't just more of the same back-and-forth that I've been ignoring.

      So part of the point of this patch is to encourage people to stop removing depth indicators that several people find quite useful. The hope is that the quite compact "Re^15:" is not so bothersome as to motivate people to mess with it.

      I'd rather the depth in "Re^$depth:" be calculated based on the real depth of the node in a thread, but that requires other changes.

      Thanks, demerphq for implementing this.

      - tye        

        I'd rather the depth in "Re^$depth:" be calculated based on the real depth of the node in a thread, but that requires other changes.

        Its on my todo list on the test site to do it this way. IMO there are some minor issues to resolve as I don't think the logic needed quite meshes with Everythings normal update logic.

        Thanks, demerphq for implementing this.

        No problem. Now that addnewform and addnewnoteform are somewhat refactored it should be easier to introduce better ways to do this.


        ---
        demerphq

          First they ignore you, then they laugh at you, then they fight you, then you win.
          -- Gandhi


        The depth of a node in a thread is a property of the node, not of its title. Just like with usenet and email, I think that root nodes should be non-Re titled, and so should articles that change the title. The rest should get "Re:", and nothing more.

        Abigail (this is my 4000th posting - more worthy as a profound meditation, but I've no interesting subjects to write about at the moment. Perhaps when I reach posting 5000).

      As I said above one of the major advantages of this is that all the code for adding Re:'s to titles (which happens in a few places) has been refactored into a single htmlcode node which can be easily patched by the pmdev crew. So for instance if you pester one of them im sure they could whip up a user setting to do this. Personally, its not on my list though. :-( Sorry.


      ---
      demerphq

        First they ignore you, then they laugh at you, then they fight you, then you win.
        -- Gandhi


        Put the ^\d+ part inside a <div class="redepth"> and people that didn't want it could make it disappear with div.redepth { display: none; }.

      Another way to think about nested re's is by joining not with " ", but with "that which was". So, you'd get "Regarding that which was regarding that which was regarding $original_title".

      thor

      if it were up to me, "Re: $original_title" would be enough with any reply (even up to a milion levels deep)

      Agreed. This reply-marking-for-subject-lines stuff has all been tried every possible way and the advantages and disadvantages of various systems discussed and rediscussed to death over the course of thirty plus years for usenet and email, and the consensus after all that was, just one "Re: " and nothing more, unless the user manually changes the subject line. I was under the impression that everyone on the internet was aware of this, until I came to Perlmonks. Replacing Re: Re: Re: with Re^3: brings us up-to-date with what newsreaders and mailreaders were experimenting with in the 1980s that was subsequently determined to be the Wrong Thing (as eventually codified in the GNKSA).

      Yes, I realize Perlmonks isn't usenet, but for all practical purposes the subject lines are doing exactly the same thing, and lessons learned about subject lines there do apply just as well here. Experimenting with alternatives that the rest of the world already tried and rejected is a waste; I wasn't going to say anything about it before because I figured it was something that just hadn't been gotten around to yet, but if we're going to go to the trouble to change the behavior, the behavior to shoot for is the behavior we already know will eventually be determined to be right, I would think.


      ;$;=sub{$/};@;=map{my($a,$b)=($_,$;);$;=sub{$a.$b->()}} split//,".rekcah lreP rehtona tsuJ";$\=$;[-1]->();print
Re: Collapsing Re:'s in Titles.
by davido (Archbishop) on Jun 02, 2004 at 20:34 UTC
    It looks from your example like it's counting things that aren't just "re". For example: "Re: •Re: Re:" you said would turn into Re^4, but it's only three replies deep.


    Dave

      For example: "Re: &bul;Re: Re:" you said would turn into Re^4, but it's only three replies deep.

      Sorry, maybe I should have been more clear. The sub add_re_to_title takes a title and adds a Re: to it, collapsing whatever Re:'s (and junk) are there. So all of the examples should be like that.


      ---
      demerphq

        First they ignore you, then they laugh at you, then they fight you, then you win.
        -- Gandhi


        I know some people like to change a followup's title entirely (I'll not pass judgement on whether or not that is a good idea; I'll just point out that it happens). That would get clobbered too. Someone might not like that. ;)

        Dave

Re: Collapsing Re:'s in Titles.
by adrianh (Chancellor) on Jun 02, 2004 at 22:22 UTC
    but I hope most people will like it

    Add me to the 'thank god at last' category :-)

      Yeah dito. I just came here again after a long absence and it certainly was a pleasant surprise to find this.

      Makeshifts last the longest.

Re: Collapsing Re:'s in Titles.
by rockwiz (Friar) on Jun 03, 2004 at 11:52 UTC
    Personnally though I'm new I like the idea of seeing the increment of Re as opposed to seeing all the Re making one huge line.. I think this is a great idea.. Plus you can see what the node is all about..
If you can predict the future, code for it :)
by PodMaster (Abbot) on Jun 02, 2004 at 22:38 UTC
    No doubt some people will be upset, but I hope most people will like it, certainly a lot of folks do something like this themselves.
    If some people will be upset, why is there no option to preserve the old behavior?

    MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
    I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
    ** The third rule of perl club is a statement of fact: pod is sexy.

      The option for the old behavior is the same option that was already there. You can put the "Re:"s back in by hand. q-:

      Are you upset or are you asking more of a rhetorical question? I'd hope the level of outrage is low enough that the effort to support multiple options isn't required and we can have consistency. Part of the point of the patch was that several people were getting tired of the wide variations.

      As for my personal preference, I'd prefer to be able to have a clue what a node is in reference to when I see the title out of context of viewing the thread that it is in. So I'd prefer you retitle replies to still start "Re" and to preserve some part of the original title (or some other representation of what the thread is about), not just summarize your particular contribution to the thread.

      Your current retitling style makes sense when viewed in a thread, but makes no sense (IMO) outside of the thread.

      - tye        

        Are you upset or are you asking more of a rhetorical question? I'd hope the level of outrage is low enough that the effort to support multiple options isn't required and we can have consistency.
        It's more rhetorical. I don't think there is any outrage as to which style of Re prefixes to adopt.
        So I'd prefer .... Your current retitling style makes sense when viewed in a thread, but makes no sense (IMO) outside of the thread.
        One or two monks has mentioned that to me, and no, it's not supposed to make sense outside of the thread. An editor even edited my node once to restore the Re: (I changed it back). All I can say is tough noogies (my note titles are my own). If you ask me, a better idea would be to either disallow editing of node titles on replies (notes) or track node depth independently (and perhaps represent [id://359839] as My notes title is my own3 ).

        MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
        I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
        ** The third rule of perl club is a statement of fact: pod is sexy.

Re: Collapsing Re:'s in Titles.
by eric256 (Parson) on Jun 02, 2004 at 22:39 UTC
    Great addition. Could we get CSS class tags for the title and textarea inputs too? Then we could widen the title and change the size of the writing area in nice flexible manner. Or can this be done already?

    ___________
    Eric Hodges
      Yes, it can. If your browser is up to now several year old standards (read: anything but IE), you can use a few custom CSS rules to do that. See my Perl-blue theme for examples.

      Makeshifts last the longest.

Re: Collapsing Re:'s in Titles.
by belg4mit (Prior) on Jun 03, 2004 at 01:00 UTC
    Some people use ** instead of ^, and rightly so. It may be one more byte to transmit but it's more perlish... exponentiation vs. XOR.

    --
    I'm not belgian but I play one on TV.

      And I use Re:x2, which I feel is even more Perlish, since it's the string repetition operator :o)

      But no matter, the new style is easier to edit for me than the old one, so it's an improvement.

Re: Collapsing Re:'s in Titles.
by andyf (Pilgrim) on Jun 06, 2004 at 06:46 UTC
    I've been wondering about that, I just spotted the post. It's excellent, great patch sir.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: monkdiscuss [id://359711]
Approved by kvale
Front-paged by thor
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2017-12-16 17:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (457 votes). Check out past polls.

    Notices?