Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

The latter: some kind of algorithm or rather a transform of each weekday into a new name which is alphabetically sorted right (as per the %order or whatever calendar order). For example, transform each weekday by removing the 1st letter, then their cmp order is correct. OK this does not work. But I was looking for this kind of transform. Of course I can try exhaustively find such transform with random masks on the weekday bytes.

monday:011011010110111101101110011001000110000101111001 tuesday:01110100011101010110010101110011011001000110000101111001 wednesday:011101110110010101100100011011100110010101110011011001000110 +000101111001 thursday:0111010001101000011101010111001001110011011001000110000101111 +001 friday:011001100111001001101001011001000110000101111001 saturday:0111001101100001011101000111010101110010011001000110000101111 +001 sunday:011100110111010101101110011001000110000101111001

(with this:

for (qw/monday tuesday wednesday thursday friday saturday sunday/){ print $_ .':'. join('', map { sprintf "%08b", ord($_) } split(//, lc +$_))."\n"; }
)


In reply to Re^2: Challenge: sort weekdays in week-order (elegantly and efficiently) by bliako
in thread Challenge: sort weekdays in week-order (elegantly and efficiently) by bliako

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2022-12-09 17:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?