Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Automatic Re-ing with numbers (searching)

by tye (Sage)
on Aug 11, 2003 at 06:16 UTC ( #282766=note: print w/replies, xml ) Need Help??


in reply to Automatic Re-ing with numbers

searching on very common keywords did not provide with any conclusions

I hit super search and looked for nodes the had "re:" in the title but that weren't replies and found how many levels of 'RE:' do we need :-), Re: Re: Re: Re: Re: Re: Reply, Title Re: collapsing revisited, and "Re:" getting out of hand.. If you search only PMD root nodes, then you'll find almost nothing but those. (:

About halfway down on tye's scratchpad (search for "Re: ", with the space and quotes) you'll find some work I did on the subject. But I've since noticed that there are styles that aren't properly handled by it. There is a field in the database for "depth" of a reply. Currently, this isn't being used. If we make the fixes required to have this field be accurate (even after nodes are moved), then there might be some hope of allowing users to collapse "Re:"s automatically.

Note that I adopted the "Re^$N: " style when I noticed that it was the most commonly used one (it wouldn't have been my first choice for format). I also switched from prepending "(tye)" onto titles to appending " ($summary)" onto the end (because I strongly prefer unique node titles). This is less obnoxious/distracting and usually gives a better indication of what the node is about. I encourage others to follow suit, but don't have any delusions about it being possible to enforce such much less plans to do so. :)

                - tye
  • Comment on Re: Automatic Re-ing with numbers (searching)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://282766]
help
Chatterbox?
[Eily]: you could tie a variable into not having the same value each time, if you like to make people who try to debug your code facepalm
[Corion]: perl -wle 'package o; use overload q("") => sub {warn "str"; ""}, bool => sub{warn "bool"; 1}; package main; my $o={}; bless $o => o; print "Yay" if ($o && !length($o))'
[Corion]: But people writing such code should document the objects they construct and why it makes sense for an object to be invisible as string while being true in a boolean context
[hippo]: That's equal parts clever and horrendous.
[Eily]: the overload version wouldn't return true with "$x" && !length $x though, I guess
[hippo]: The more I look at this code, the more $x is a plain old scalar and the more this condition will never be true. I'm calling it a bug at this point.
[hippo]: Thanks for your input which has soothed my sanity (a little)
[Corion]: Eily: Sure - if you force both things into stringy things, then you break that magic. But that would also mean that you changed the expression, as now $x = 0.00 will be true instead of false as it were before
[Corion]: Ah no, at least in my feeble experiments that doesn't change the meaning
[Corion]: We sell sanity in small packages ;)

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (8)
As of 2017-07-27 13:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (413 votes). Check out past polls.