Editing 1277: Ayn Random
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 8: | Line 8: | ||
==Explanation== | ==Explanation== | ||
− | + | {{incomplete}} | |
− | + | [[White Hat]] is explaining to [[Cueball]] a program he wrote, the "Ayn Random Number Generator", which is a pun on {{w|Ayn Rand}}, the name of a writer who created a philosophical system known as {{w|Objectivism (Ayn Rand)|Objectivism}}. Objectivists believe that the primary aim of life is to maximise personal happiness. In their view, if some humans are born more capable of satisfying their desires than other people, they deserve to reap greater rewards from life than others. In the comic, White Hat uses a similar line of reason to justify some numbers appearing more often than others in a {{w|Random number generation|"random" number generator}}. Since the primary virtue in Objectivist ethics is rationality, and since rationality is highlighted extensively in Rand's writings, the implication may be that the random number generator favors rational numbers (numbers that can be written as a fraction, i.e. a quotient p/q where p and q have no common factor). | |
− | + | The title text identifies a group of people whose names match the {{w|Perl (programming language)|Perl}} {{w|regular expression}} <code>/(\b[plurandy]+\b ?){2}/i</code>. A step-by-step explanation of the expression: | |
− | + | *\b is a word boundary, matching anywhere there is a 'word character' next to a non-word character—punctuation, digit, spacing, etc. | |
− | |||
− | |||
− | The title text identifies a group of people whose names match the {{w|regular expression}} <code | ||
− | *\b is a word boundary, matching anywhere there is a 'word character' next to a non-word | ||
*[plurandy] is a character class, and will match any single character from the set inside the square brackets; [adlnpruy] means exactly the same | *[plurandy] is a character class, and will match any single character from the set inside the square brackets; [adlnpruy] means exactly the same | ||
*the plus sign means ''one or more'' of the previous thing, so [plurandy]+ matches one or many of the characters in that class, one after the other | *the plus sign means ''one or more'' of the previous thing, so [plurandy]+ matches one or many of the characters in that class, one after the other | ||
Line 25: | Line 21: | ||
*The slashes at each end mark out the pattern, and the "i" at the end is an expression qualifier means it is "case insensitive" (uppercase and lowercase match interchangeably) | *The slashes at each end mark out the pattern, and the "i" at the end is an expression qualifier means it is "case insensitive" (uppercase and lowercase match interchangeably) | ||
− | Overall, it matches two words separated by a space, composed entirely of the letters in [plurandy], which is what all the names listed have in common | + | Overall, it matches two words separated by a space, composed entirely of the letters in [plurandy], which is what all the names listed have in common. |
{| class="wikitable" | {| class="wikitable" | ||
Line 31: | Line 27: | ||
! Person !! Brief Description | ! Person !! Brief Description | ||
|- | |- | ||
− | | style=white-space:nowrap | {{w|Ayn Rand}} || Author, best known for her novels | + | | style=white-space:nowrap | {{w|Ayn Rand}} || Author, best known for her novels {{w|The Fountainhead}} and {{w|Atlas Shrugged}}. |
|- | |- | ||
− | | style=white-space:nowrap | {{w|Paul Ryan}} || US | + | | style=white-space:nowrap | {{w|Paul Ryan}} || US Politician known to have been influenced by the writings of Ayn Rand. |
|- | |- | ||
− | | style=white-space:nowrap | {{w|Rand Paul}} || US | + | | style=white-space:nowrap | {{w|Rand Paul}} || US Politician, also influenced by Ayn Rand's writings. |
|- | |- | ||
| style=white-space:nowrap | {{w|Ann Druyan}} || Author, widow of {{w|Carl Sagan}} | | style=white-space:nowrap | {{w|Ann Druyan}} || Author, widow of {{w|Carl Sagan}} | ||
Line 41: | Line 37: | ||
| style=white-space:nowrap | {{w|Paul Rudd}} || Actor, screenwriter, comedian | | style=white-space:nowrap | {{w|Paul Rudd}} || Actor, screenwriter, comedian | ||
|- | |- | ||
− | | style=white-space:nowrap | {{w|Alan Alda}} || Actor, best known for the role of Hawkeye Pierce in the TV series | + | | style=white-space:nowrap | {{w|Alan Alda}} || Actor, best known for the role of Hawkeye Pierce in the TV series M*A*S*H. Played Arnold Vinick, a fiscally-conservative Republican presidential candidate, in {{w|The West Wing}}. |
|- | |- | ||
− | | style=white-space:nowrap | {{w|Duran Duran}} || New Wave/Rock band | + | | style=white-space:nowrap | {{w|Duran Duran}} || New Wave/Rock band |
|} | |} | ||
− | |||
− | |||
− | |||
− | |||
− | |||
==Transcript== | ==Transcript== | ||
Line 63: | Line 54: | ||
[[Category:Philosophy]] | [[Category:Philosophy]] | ||
[[Category:Math]] | [[Category:Math]] | ||
− | |||
− |