1. A Regex Challenge

    This year, for the first time, I participated in a fantasy football league. At some point during the season, I posed to myself the following challenge. Using regular expressions, pull and store all of the historical regular season player statistics from nfl.com. And, if possible, do it with a single line of Bash shell code.


    The Line

    So, here it is.

    wget -q -O - "http://www.nfl.com/players/search?category=team&playerType=current" | grep "filter=" | sed "s_.*href=\"\([^\"]*\)\".*_wget -q -O - \"http://www.nfl.com\1\"_" | sed "s_\&amp;_\&_g" | bash | tr -d "\n\r\t" | sed "s_\(<tr class=\"\(even\|odd\)\">\)_\1\n_g" | grep "/player/" | sed "s_^<td class=\"tbdy\">\([^<]*\)</td><td class=\"tbdy\">[^<]*</td><td><a href=\"\(/player/[^/]*/[0-9]*/\)profile\">\([^<]*\), \([^<]*\)</a></td>.*_<\1><\3><\4>http://www.nfl.com\2gamelogs_" | sed "s_\(<.*>\)\(http://.*\)_wget -q -O - \"\2\" | grep \"option value\" | sed \"s\_.*value=\\\\\"\\\\([0-9]*\\\\)\\\\\".*\_\1\2?season=\\\\1\_\"_" | bash | sed "s_\(<.*>\)\(http://.*season=\)\(.*\)_wget -q -O - \"\2\3\" | tr -d \"\\\\n\\\\r\\\\t\" | grep \"Regular Season\" | sed \"s\_Regular Season\_\\\\n\_\" | tail -n1 | sed \"s\_Postseason\_\\\\n\_\" | head -n1 | sed \"s\_Pro Bowl\_\\\\n\_\" | head -n1 | sed \"s\_.*<tbody>\\\\(.*\\\\)</tbody>.*\_\\\\1\_\" | sed \"s\_class=\\\\\"border-td\\\\\"\_\1<\3>\\\\n\_g\" | grep -v \"TOTAL\"_" | bash | sed "s_.*<tr>\(.*\)</tr>.*<\([^>]*\)><\([^>]*\)><\([^>]*\)><\([^>]*\)>\$_<td>\2</td><td>\3</td><td>\4</td><td>\5</td>\1_" | sed "s_> *_>_g" | sed "s_ *<_<_g" | sed "s_<td>\(<a [^>]*>.*</a>.*\)\?<a href=\"/teams/[^>]*>\([^<]*\)</a></td>_<td>\2</td>_" | sed "s_<td>\(<span>\)\?\([WLT]\)\(</span>\)\?[^-0-9<]*\(<a [^>]*>\)\?\([-0-9]\+\)\(</a>\)\?</td>_<td>\2 \5</td>_" | sed "s_</td><td>_,_g" | sed "s_</td><td colspan[^>]*>_,,_g" | sed "s_,--_,_g" | sed "s_^<td>\([^,]*\),\([^<]*\)</td>\$_echo \"\2\" >> \1.csv_" | bash

    If you have a Mac or run Linux, you likely have all of the commands used in the above line. Simply run this command in an empty directory, and in a few hours, you will have csv files for individual player statistics on a per-position basis. That time can be cut down significantly if you have the gnu “parallel” command; to use it, replace each occurrence of “bash” with “parallel -k” in the above line. And, as a final note on the output, the csv files will only include raw data. So, you will have to go to nfl.com for descriptions of each of the data columns for each of the positions.


    An Explanation of the Line

    The above line is rather complicated, and I most certainly was not able to write it all out in one go. So, for those who care, I will now break it down into smaller sections and discuss.

    The first section downloads a page from nfl.com that has links to each of the team rosters. The output of this page is then “piped" to the next section.

    wget -q -O - "http://www.nfl.com/players/search?category=team&playerType=current" |


    In the downloaded page above, the pattern “filter=” occurs 32 times, one for each link to each of the team rosters. So, the next section removes all lines that do not contain “filter=”.

    grep "filter=" |


    At this point, each line contains an <a> tag with the URL to a particular team roster. Here, the URL is stripped out and used in a bash command (below) to download the roster page. In addition, because we are dealing with HTML, ampersands are represented in their HTML escape form. So, before running the download commands, we need to replace any instance of “&amp;” with “&”. After the pages are downloaded, their output is “piped” to the next section.

    sed "s_.*href=\"\([^\"]*\)\".*_wget -q -O - \"http://www.nfl.com\1\"_" |
    sed "s_\&amp;_\&_g" |
    bash |


    Here, all the player pages are simply put on a single line, so that the “sed” command can be used. Additionally, we no longer care what team roster page the player came from.

    tr -d "\n\r\t" |


    The following pattern is found at the beginning of each player entry in the roster. So, we find every instance of the pattern, and then put a newline character after it. With this, each player entry is now on a separate line.

    sed "s_\(<tr class=\"\(even\|odd\)\">\)_\1\n_g" |


    The section above creates a line break before each player entry, so the first line will be all of the HTML code before the first player. Therefore, we need to cut out all lines that have no player entry. Since “/player/” occurs in every player entry, and nowhere else, we cut out all lines that don’t have that pattern.

    grep "/player/" |


    The next section strips out necessary information about each player. In particular, the player’s position, first name, last name, and also the URL to the player page. Then, that information is rearranged and formatted for use in the next section. The non-URL data is stored in <> brackets at the beginning of each line, which makes for easy retrieval with the “sed” command. This is done because the data will be carried through each following section, all the way to the final output.

    sed "s_^<td class=\"tbdy\">\([^<]*\)</td><td class=\"tbdy\">[^<]*</td><td><a href=\"\(/player/[^/]*/[0-9]*/\)profile\">\([^<]*\), \([^<]*\)</a></td>.*_<\1><\3><\4>http://www.nfl.com\2gamelogs_" |


    This section is a bit more complicated. This creates a command for each player that downloads the player’s page and determines what years the player has statistics for. Then one line is created for each year, for each player. Each of these lines contains the non-URL data (position, first and last name) passed from the above command, and also contains a URL to each player’s page for a given year.

    What is most complicated about this section is the fact that multi-pipe commands are created by the outer “sed” command. That is, for each line, a somewhat complicated command is created, the output of which is then used below. This type of command “nesting” is used one final time in the next section.

    Finally, one may notice the excessive use of the “" character. Those familiar with programming will notice that this is used to “escape" certain special characters, so that they can be used in the "nested" command. This will occur even more in the next section.

    sed "s_\(<.*>\)\(http://.*\)_wget -q -O - \"\2\" | grep \"option value\" | sed \"s\_.*value=\\\\\"\\\\([0-9]*\\\\)\\\\\".*\_\1\2?season=\\\\1\_\"_" |
    bash |


    This is another rather complicated section. This downloads the player pages for each player and year, as discussed above. Then, on each page, it does a set of things, similar to those done above for the roster pages. First, it removes all newlines and tabs. Second, it skips the page if it has no “Regular Season” season, and otherwise it cuts off preseason, postseason, and pro bowl data. Third, all of the individual player data is broken up into lines on a per-week basis. (‘class=”border-td”’ is found one time for each line of data). Finally, lines are removed that contain the word “TOTAL” since we only want per-week data and not total season data.

    As a note, near the end of the line, we see “\1<\3>” in the “replace with” section of a nested “sed” command, and one may wonder why the slashes here are not escaped like most others in this section. The reason is that these actually refer to the outer “sed” command. That is, the “\1” here gets the first group of the outer “sed” command, that is, that which is matched by “\(<.*>\)”. This will end up being the “stored data” mentioned above that is being carried through to the output. The “\3” refers to the current year, which is appended to the “stored data”. The only difference now is that this “stored data” is found at the end of each line, rather than at the beginning as above.

    sed "s_\(<.*>\)\(http://.*season=\)\(.*\)_wget -q -O - \"\2\3\" | tr -d \"\\\\n\\\\r\\\\t\" | grep \"Regular Season\" | sed \"s\_Regular Season\_\\\\n\_\" | tail -n1 | sed \"s\_Postseason\_\\\\n\_\" | head -n1 | sed \"s\_Pro Bowl\_\\\\n\_\" | head -n1 | sed \"s\_.*<tbody>\\\\(.*\\\\)</tbody>.*\_\\\\1\_\" | sed \"s\_class=\\\\\"border-td\\\\\"\_\1<\3>\\\\n\_g\" | grep -v \"TOTAL\"_" |
    bash |


    The following section puts all of the data in a standardized form. The data for each week is found on a single row, between “<tr>” and “</tr>” tags, and each piece of data within each line is found between “<td>” and “</td>” tags. Here, the “<tr>” and “</tr>” tags are removed, along with any other extraneous HTML found outside of them. Then, the “stored data” from above is placed within “<td>” and “</td>” tags. That way, each data point is within those tags.

    sed "s_.*<tr>\(.*\)</tr>.*<\([^>]*\)><\([^>]*\)><\([^>]*\)><\([^>]*\)>\$_<td>\2</td><td>\3</td><td>\4</td><td>\5</td>\1_" |


    This section simply removes any spaces that are between each “<td>…</td>” section, for easier data retrieval with “sed”.

    sed "s_> *_>_g" |
    sed "s_ *<_<_g" |


    Most data rows for each season have a link to watch that week’s game, along with a link to the opponent’s team page. So, this section removes the “watch” link, and then strips out only the raw data for the opponent team that week.

    sed "s_<td>\(<a [^>]*>.*</a>.*\)\?<a href=\"/teams/[^>]*>\([^<]*\)</a></td>_<td>\2</td>_" |


    Each data row contains that week’s game score, along with win/loss/tie information as a single data point. There is also a link to a page for that particular match-up. So, this section just strips out the W, L, or T (win/loss/tie) along with the game score.

    sed "s_<td>\(<span>\)\?\([WLT]\)\(</span>\)\?[^-0-9<]*\(<a [^>]*>\)\?\([-0-9]\+\)\(</a>\)\?</td>_<td>\2 \5</td>_" |


    This section replaces the “</td><td>” tags with commas to prepare for storing in a csv file. Additionally, it replaces blank data points with two commas (so that the columns of the csv file will align). The pattern, “—”, is also treated as a blank data point.

    sed "s_</td><td>_,_g" |
    sed "s_</td><td colspan[^>]*>_,,_g" |
    sed "s_,--_,_g" |


    Now, we create and run a command for each line of comma-delimited data which appends it to the end of the csv file for the current player’s position. After this, all individual player data has been stored in the respective position files.

    sed "s_^<td>\([^,]*\),\([^<]*\)</td>\$_echo \"\2\" >> \1.csv_" |
    bash


    Final Remarks

    So there you have it. A single line for all of the nfl.com individual player statistics. Perhaps next season I’ll try to make something of it. Anyways, if you have any questions or comments about any of the above, feel free to respond here or send me an email.

    7 months ago  /  0 notes  / 

  2. Supposing truth is a woman—what then?
    – Friedrich Nietzsche, Beyond Good and Evil

    1 year ago  /  3 notes  / 

  3. The existence of the experimental method makes us think that we have the means of getting rid of the problems which trouble us; but problem and method pass one another by.
    – Ludwig Wittgenstein, Philosophical Investigations (Philosophy of Psychology  A Fragment)

    1 year ago  /  6 notes  / 

  4. Journal, Selected Entries

    1/23/2013

    Three parts:

    1. Evolution is the Galileo’s heliocentricity of today. And so, regardless of if it is assumed to be properly true or not, we must at least allow it to be. That is, we must be able to argue as if it is true. (Arguably, it may not be true, and a different theory will come along. Or, it is not true in the same sense that the sun is not the center of the solar system—it can be interpreted otherwise by the observer.)
    2. If evolution is assumed (given that it is allowable to be assumed), then it could have been that the “human” was a different being. That is, that we could have evolved differently. And, therefore, what is right, wrong—and even knowable—might have been completely different.
    3. So, since it could have been different, there is no “absolute” truth in the way that people seem to say it. What we can say is that such and such means what it means to us. And though such a statement may not mean anything properly (whatever that means), it still means something, again—to us.


    1/17/2013

    Perhaps one of the most devastating problems of the current age is the conservative view of sex. That is, that it has a very particular stigma and is rather socially unacceptable to discuss. And so, anticipation raises to meet the expectation of some romantic ideal, and then both parties find themselves disappointed, or stronger, disillusioned. For before, this realization was reality, then disappointment, and now finally—that truest theme of this age—disillusionment.

    So, what to do? I say this, in particular, regarding sexuality: in order for good and evil to even be possible, we must get beyond it. We must see ourselves as what we are. That is, as descendants of purely evolutionary beings. That is, beings with a primary and fiery goal of sexuality. And perhaps, as much sex with as many attractive (evolutionarily speaking) partners as possible. For, though such a thing may be considered wrong now, we cannot forget that it once was the norm. And stronger—that we are the way we are now because of it.

    And so, this is the key: that what is wrong now may not have been wrong at another time. And we should use this information, rather than hide ourselves from it. And in this, in escaping our idealism, perhaps we can also escape its most recent of children—that, again, “child-of-age”—disillusionment.


    Undated, probably 12/2012

    Because we can imagine the human as another, as “B-human”; because of free-will, and of the free-will of humanity proper; because the ape is not condemned for his promiscuity; we must see the lack of objectivity. We must see the purest of subjectivity.

    But, what is subjectivity—to us? If even “us” exists? It is this: that regardless of the subjectivity proper of our good-and-evil, we know that to us there is good and there is evil. We can know it, we can feel it! We can love! We can hate! And without us, where are these things? And where—oh, where—are we?

    And so we read of miracles, of resurrection. And we say, “No. Certainly there must be explanation.” But to this meta-explanation, to this non-explained-in-itself, let me explain. Perhaps the proper occurrence is irrelevant. Perhaps the “proper explanation” is irrelevant. But what is relevant, then? Only this. That humans were affected. That, in a sense, we were affected. For this is one of the most beautiful acts of God: that it was humans who wrote down the Holy Scriptures. That it was we that wrote them down. That we wrote down those events, those words of the Christ, those words—of One of us.

    For in this we have that first and final conclusion: There is no objectivity. We see these miracles, these words, the very God-man Himself—through the eyes of our fellow humans, that is, through the eyes of ourselves. And this is what gives it truth!—No. This is what gives it truth—to us.

    But now we must revert to that unanswered question—’if even “us” exists?’—and we must speak to those lost and alone. That is, I must speak to myself, as it were. So, here it is:

    I see you—
    The young, tired woman—
    I see your wrinkles,
    Your tear-stained face,
    Your look of despair,
    Your cold, fiery eyes,
    That last statement of humanity.

    And though these are not your wrinkles—
        —you, youngest of mothers—
    These are your eyes and your tears,
    Your tears for children that never were.

    But, alas, take heart!
    (Yes, that most human of entities.)
    And know this:
    That togetherness will come,
    That humanity is near-by.
    That he will come,
    So tender, so knowing, so human,
    And he will take his own heart,
    And it will also be yours.

    And he will speak those words,
    To you he will speak those words of heart.
    Yes! That long, lost heart he will speak!—

    To you, post-modernity!
    To you, post-maternity!—

    Is not humanity all around you?
    Is not truth all around you?
    For I know you are no solipsist,
    And I know you are no nihilist,
    But you’re on the brink—
    You’re on the brink of those, truest of deaths.

    So hear me when I say:
    I am here
    I am here, I am here—
    And for you I will wait,
    And your hand and your heart, I will hold.

    And as I grasp it,
    So tenderly, so fiercely, so lovingly,
    Know that I mean it,
    That I mean every second of it.
    That is, that we are one.
    And that together, we may truly create,
    Create life, and love, and death.

    But I know your response.
    I see your eyes, slipping into the fire once again.
    Your wrinkles darkening,
    Your despair thickening—
    But wait, my love, wait!
    Your heart is still yet to be won!
    For we will create!
    Yes, we will create!
    And at that, true entities!
    And true in that truest sense!—

        —To us!

    1 year ago  /  0 notes  / 

  5. On Discourse and the Second Amendment

    Some weeks have passed since the gun control debate became one of the centerpieces of politcal debate. And, after hearing many comments from a number of people on the “pro-gun” side, I’ve had a few thoughts. As is a typical style for me, these thoughts have more to do with discourse, and less to do with the gun control debate itself. But, regardless, I hope that their discussion will add to the debate in a positive way.


    On Discourse

    What is the purpose of discourse? I mean, really, why discuss or debate anything? In my opinion, this question must be answered before delving into discussion related to a particular issue. And to that end, I claim that the main purpose of discourse is to elucidate the features, justifications, and differences of certain stances on some issue. Whether a friend and I are discussing free will with no one around, or two presidential candidates are debating economic issues in front of millions of people, this primary goal seems to be the same.

    Now, public discourse seems to always have an added goal, which private discourse sometimes has. That is, to convince people of a particular stance, probably the stance that the one engaged in discourse holds to. (However, this is not necessarily always true. Perhaps we could alleviate many hatreds by forcing people to only argue for stances they don’t agree with?) But what does this really mean? This means that the convincer should hope to actually convince people. That is, he/she must speak to people that don’t explicitly agree with his/her stance on the issue at hand. For what is to convince those who are already convinced?

    This brings me to the following: perhaps the most important feature of good discourse is argument inclusivity. That is, giving arguments that people of differing viewpoints can understand. Because, as stated above, before one can be convinced—that is, before one can agree with a new stance (that “new” is intriguingly crucial)—one must first understand the arguments being presented. And more importantly, one must be able to understand the arguments from a perspective that does not yet agree with the conclusions that those arguments imply.

    But argument inclusivity perhaps can only go so far. For instance, certain holders to an opposing stance may never be convinced. And so, to speak to them might be of little purpose. So then, who should be spoken to? Well, there’s really only one group left: the “non-convinced”. That is, people who have no stance, or people who are willing to alter their stance based upon “convincing arguments”. Of course, it is possible that a “convinced” person would actually switch to an opposing position. However, one should be cautious in arguing based upon this idea; for in attempting to argue only to those who oppose you, you run the risk of forgetting that the “non-convinced” people actually exist.

    So how does all this relate to the second amendment? Well, as I said before, these thoughts were prompted by comments made in the gun control debate. And so, inevitably, they speak to some of those comments. Therefore, I’ll now discuss a particular comment that I found to be rather thought-provoking, along with that comment’s relation to the above thoughts. In addition, I’ll attempt to give a more general idea of what it looks like to apply the above ideas to the gun control debate.


    A Prompting Comment

    The aforementioned comment is the following quote from NRA CEO, Wayne LaPierre. And, it is the main prompting comment of the writing of this document. So, I’ll start with it.

    "Absolutes do exist. Words do have specific meaning in language and in law. It’s the basis of all civilization. Without those absolutes, without those protections, democracy decays into nothing more than two wolves and one lamb voting on, well, who to eat for lunch."

    Let’s suppose that Mr. LaPierre is correct in what he says. That is, that “absolutes do exist” and that this is the viewpoint from which we should address the gun control debate. I claim that this comment adds absolutely nothing to the gun control debate (or any debate, for that matter). In fact, I’ll say something stronger: the best possibility is that such a comment will be completely neutral with respect to the debate. Any other outcome will be negative for the side that claims it, in this case, the “pro-gun” side.

    Why? Well, think about the three groups at hand here: the convinced “pro-gun” people, the convinced “pro-control” people, and the “non-convinced”. First off, claiming that there is an “absolutely right” position is irrelevant to any convinced person on either side. Those who are convinced likely agree with the comment and already believe that their side is the “absolutely right” one. Or, if not, as discussed above, they are probably not willing to change sides. In either case, such a comment would not affect them at all.

    As for those who are “non-convinced”, one problem with such a comment is the following. “Non-convinced” people are likely attempting to weigh evidence and arguments in order to pick a side that seems better for themselves, their families, and/or society. That is, at the time of their hearing this comment, they probably do not yet believe that there is an “absolutely right” stance. Because, at least at that moment, they consider many stances to be possible outcomes of the debate. So, such a comment about absolutes will probably not be very inclusive to “non-convinced” people. That is, such a comment might only work to exclude the only people who have a chance at joining the side that claims it.

    But even more important than that—perhaps most importantly of all to this debate in particular—a “non-convinced” person is not yet even convinced of a particular interpretation of the laws surrounding the debate. For if they were, they would already have picked the side corresponding to that interpretation. And so, now the comment has the potential to bring about an even worse outcome than the one described above. Because now the “non-convinced” people might not only be excluded with respect to a particular side of a particular debate, but also with respect to a particular way of interpreting. And such a thing will likely only serve to push “non-convinced” people to oppose all stances of the claimer of absolutism, even if only by default.

    Now, perhaps those who agree with LaPierre’s comment will counter my arguments with something like: “But still, there is real truth. We can talk and argue all we want, but at the end of the day, there is right and there is wrong.” Fine. Like I said near the beginning of this section, we are assuming that LaPierre is correct. But, as I said in the previous section, this is irrelevant if one hopes to bring people to one’s side. That is, if one hopes to present inclusive arguments to the “non-convinced”. And this is what I’m really speaking to; this is what I am assuming is the goal of those who involve themselves in public discourse, especially as it relates to politics.


    On the Second Amendment

    Now, let’s get a bit more practical. I am going to assume that it is valid to direct LaPierre’s comment toward the second amendment. And, given this, I will show how easy it is for such a comment to alienate “non-convinced” people. First, let me quote the second amendment.

    "A well regulated Militia, being necessary to the security of a free State, the right of the people to keep and bear Arms, shall not be infringed."

    Now, I will list a few possible interpretations of the amendment.

    1. The people have the right to keep property of all sorts, and they also have the right to have the arms of a bear (that is, the animal). The purpose of this is to form a militia: since bears have sharp claws, their arms can be used as weapons. (This would not be the first time strange animal parts would be used as weapons. See the Bible, Judges 15:16.)
    2. The people have the right to remain in possession of their human arms and to bear them in public, that is, to show them off. The militia could be made up of many strong-armed men, bearing their arms to scare off attackers.
    3. The people have the right to keep and bear weapons of any sort, but they are not allowed to fire them. The people could use different sorts of melee-style weapons to form a militia.
    4. The people have the right to keep and bear weapons that the founding fathers might have known about. This would aid in forming a militia.
    5. The people have the right to keep and bear guns of any kind. This would aid in forming a militia.
    6. The people have the right to keep and bear weapons of any kind. This would aid in forming a militia.

    (I am indebted to William Simmons for the idea of interpretation 1. Though, I’m sure he was not the first to come up with it.)

    Of course, the first 3 of these interpretations are a bit farfetched. But why even say “farfetched”? If “absolutes exist”, then there is no “farfetched”. There is only right and wrong. OK, so they’re probably wrong. Also, interpretation 4 seems a bit ridiculous, because the founding fathers were well aware that technology would improve. OK, so interpretation 4 is wrong, too.

    Now, what about interpretation 6? Should we be allowed to keep and use bombs? How about nuclear warheads? How about long-range missiles? Are these not all “arms” that one could “bear”? OK, that seems pretty unreasonable, so probably not—er, sorry, I meant to say: interpretation 6 is wrong.

    Alright, so now we’re getting somewhere. Either interpretation 5 is right, or there is another interpretation that is right. In fact, it looks like we’ve gotten closer to the heart of the debate. Because the following refinements of interpretation 5 are some of the things being argued over currently.

    • The people have the right to keep and bear non-automatic, non-semi-automatic guns with a clip of some maximal size. This would aid in forming a militia.
    • The people have the right to keep and bear non-automatic, non-semi-automatic guns. This would aid in forming a militia.
    • The people have the right to keep and bear non-automatic guns with a clip of some maximal size. This would aid in forming a militia.
    • The people have the right to keep and bear non-automatic guns. This would aid in forming a militia.
    • The people have the right to keep and bear any gun with a clip of some maximal size. This would aid in forming a militia.
    • The people have the right to keep and bear guns of any kind. This would aid in forming a militia.

    At this point, these sub-interpretations start to seem a bit more like potential good and bad ideas, rather than absolute right or wrongs, especially to those who are not yet convinced of a particular stance on the issue. So, should we apply LaPierre’s statement to these sub-interpretations? If not, and this is where the real debate is, then his statement is of no purpose in the debate. But on the other hand, if we should apply the statement here, then it must be that at least 5 (all but one) of the above sub-interpretations are “absolutely wrong”. Since most “non-convinced” people will see the differences in the above sub-interpretations as practicalities, this idea would likely be rather alienating.

    But the exclusivity of argument does not end here. Let’s look at another one of LaPierre’s comments:

    “We believe in our right to defend ourselves and our families with semi-automatic firearms technology.”

    This is a fair statement. And, apart from some claim of absolutism, I am prefectly fine and happy with such a comment. But assuming absolutism, what is LaPierre saying? He’s saying that it is absolutely true that people should have the right to bear semi-automatic firearms to defend themselves and their families.

    But wait a second. If we’re talking about absolute truth, then I see no good reason to stop with semi-automatic firearms technology. That is, I see no good reason not to believe that it is also absolutely true that people should have the right to bear automatic firearms. And maybe this is the right idea, for it seems as though many “pro-gun” people would go for the legality of automatic weapons. In any case, such a thing is fair to go for.

    But how can we stop there? How can we not extend—fully? Why not bombs? Why not nuclear warheads, as discussed above? Why not biological weapons? Why not rocket launchers? I mean, heck, we don’t even need extension for all these: they’re all semi-automatic!

    More seriously, though: why not? I see no reason to leave those weapons out. No, stronger: I see no reason to pronounce the bearing of those weapons as absolutely wrong, which I would say is the only way an absolutist could leave them out. And further, if the second amendment is our guide, where does it leave those weapons out? Where does it disallow weaponry of any kind? That is, it seems to me that the true finale of this talk on absolutes and the second amendment is this: it is absolutely wrong to disallow citizens from bearing any type of weapon at all. And this is perhaps the most alienating statement that one can make in this debate.

    And so, it seems to me that one of two things has to be true about the absolutist “pro-gun” stance. That either: (1) given a particular weapon of any kind, it is absolutely true that a citizen should have the right to bear that weapon, or (2) the logical extension of the absolutist “pro-gun” stance is haphazard or based on pseudo-subjective metrics, contradicting the application of absolutism to some part of the debate at hand. In either case, the “non-convinced” person is likely to not even understand the position. And, as said before, how can one hold to a stance if he or she does not even understand it?


    Broader Conclusions

    Perhaps “pro-gun” people reading this post will believe me to be biased, or convinced of the opposing side on this issue. However, I would like to think that this is not the case. In fact, I feel the exact same way about the opposing claim: that it is absolutely wrong to allow firearms at all. Now, do I think that it would probably be good to limit certain types of legal firearms, or to enforce background checks for purchasing certain types of firearms? Probably. But I don’t believe that these ideas hold any absolute value. I know that in 100 years, the technological landscape will be wildly different than it is now. And so, we will need new laws, new regulations, and subtly new interpretations of previous laws and regulations. That is, so that we can apply previous laws and regulations to the technology of the time.

    But this, in my opinion, is an essential feature of politics and public discourse. Inevitably, the debate surrounding a particular issue is based upon the events, people, and culture of the given time period in which it occurs. And I would imagine that most of the “non-convinced” people on a particular issue would think a similar thing. Especially if the issue is political. For at the point of non-conviction, such people are purely pragmatic. There is no “right” and “wrong”, there is only “probably better for now” and “probably worse for now”.

    Now, as a final statement, let me say the following. With the above talk, many absolutists may start to see a strong argument against me. What about the more basic human rights? What about things like the right to free thought (in a pure sense)? Shall we then throw this out, too? That is, shall we say that this right is not absolutely given to all citizens? And while the answer to such questions could be a long document in and of itself, I will respond merely with this: I never condemned absolutism as absolutely wrong. I simply said that on many issues, absolutism is alienating precisely to the group that one might hope to convince. In fact, if everyone already believes that a particular stance on a particular issue is absolutely right, then perhaps absolutism on that issue would actually be beneficial to discourse. Wait, what am I saying? That even on absolutism, there is no “absolute”? Ha, what else could I say? Such simple statements sure sound so—right.

    1 year ago  /  0 notes  / 

  6. Do you love me?
    Do you love me?
    Do you love me?
    Now that I—can dance?
    – The Kid, The Christ, and The Contours

    1 year ago  /  0 notes  / 

  7. Ceilings, Walls, Floors

    Ceilings, Walls, Floors

    1 year ago  /  1 note  / 

  8. Whatever is done from love always occurs beyond good and evil.
    – Friedrich Nietzsche, Beyond Good and Evil

    1 year ago  /  0 notes  / 

  9. Plight Of The Un-Able

    That sequence, speak,
    For truth, to see.
    Come now, chant:
    1-2-3!


    What can God be, but an object with properties?
    And what would He be without those objective properties:
    Without all-powerful, all-knowing, all-constant?
    For, without His objectivity, what is He?
    What can He be if it is not that He—exists?


    So: we become like children.
    But shall we make of our God a child’s-toy?
    A building block for a perfect playhouse?
    For all-too-simply we define Him:
    We say, “three-in-one”—
          —that is, three-in-precisely-and-exactly-one—
    And we endow that triple-object with that triple-property.


    But what of that two-in-one? That two-becoming-one?
    For if all-power exists, then what man can?
    And what man can become if it is not that he is?
    But:

    If two-in-one is quick to kill,
    Then one-in-two won’t sit so still:
    For if all-will is all-in-One,
    Then all’s too small for making sons!

    And so, if we can-not, we do-not; and then—
          —we sin-not.


    And what of sin? What of death?
    What all-knower plants a fruitless seed?
    What Father gives death when asked for life?
    And what of that death—that death for the whole world?
    Truly, truly, that death needs tidying!
    Truly, truly, that blood needs specifying!—
          —that is, all-specifying!
    For how could we bear its haphazard spilling—on sinners?


    And thus speak those specifiers:

    He keeps His word! He keeps His word!
    Anything else must be absurd!
    For if a God could change and lie,
    Then each new day, that God would die.

    But if He cannot change, then how can He keep His word?
    And if He is all-constant, then He is all-inert;
    And the touching of our hearts is all but His—doing.


    But even this three-in-one is not without its own two-in-one—
          —its two-that-has-always-been-one—
    That that God is all-man, and that that man is all-God:
    This is the two-in-one-of-three.
    And to this 1-2-3, I will bring another:

    "Jesus grew in wisdom and stature,
    and in favor with God and men.”


    If He grew in stature, then what of all-power?
    If He grew in wisdom, then what of all-knowledge?
    And if He grew—at all!—then what of all-constance?
    So this is the fate of that triple-object, that triple-property:
    That it is all-too-powerful!
    That it is all-too-knowing!
    That it—is all-too-constant!


    But reader, know this: I do not bring this triple-gift in vain.
    I bring it so that God might truly live;
    That He might live, and die, and live again.
    For this, we know: I-am who I-am;
    And this, we say: God-is who God-is.
    So let us not speak On-What-There-Is, but on what-is:

    There is One that God-is, but none that is-God;
    One that is You, and none that is It.
    For if such an object could exist,
    Then, I fear, it would be all-too-human,
    Or worse—
          —all-too-God.

    1 year ago  /  0 notes  / 

  10. Thoughts on Describability

    (As a note: After further exploration in this topic, I have realized that much of what I talk about here is problematic, due to the fact that I have not formalized what it means to “describe” something. In any case, I have decided to leave this post up, due to its relation to certain ongoing thoughts of mine on the limits of human description.)

    A few days ago, I found myself pondering the topic of mathematical describability. The subject is quite intriguing to me, due to its connections to philosophy, and so I hope the reader will find the following discussion interesting. And, for those up for a challenge, the culmination of this post will be a question on the topic that I have attempted, with no success, to answer. In any case, on we go.


    Introduction

    Mathematical describabilty is a topic concerned with what we (as humans) can say about mathematical objects. We can see this in the first definition.

    \(\mathrm{Definition\ 1}\)
    A mathematical object is said to be describable if it can be precisely specified with a finite number of words.

    Of course, there are some technical considerations to deal with here. Words in what language? Words in what language in what year? In truth, these questions actually don’t matter, but we won’t get into this now. We’ll just assume that we mean today’s English.

    As for the phrase, “finite number of words”, this can mean any finitely long description of the describable object, or any finitely long description of a process that gives the describable object. For instance, the number 6 can be represented by the description, “6”, or by the description, “two times the second smallest prime number”. But, it is also possible to describe far more complicated numbers than 6. To that end, let’s define a function that will help us.

    \(\mathrm{Definition\ 2}\)
    We define

    \[d_n^x : [0, 1) \rightarrow \{0, 1, 2, …, 9\}\]

    to be the \(n^{\mathrm{th}}\) decimal digit of \(x\), a number in the interval, \([0, 1)\). (For information on interval notation, see Wikipedia.) In this way, we can write \(x\) in terms of its decimal digits, as \(x = 0.d_1^xd_2^xd_3^x…\).

    So, for instance, given the number, \(x = 0.534\), we have that \(d_1^x = 5\), \(d_2^x = 3\), \(d_3^x = 4\), and \(d_i^x = 0\) for every \(i\) greater than 3.

    How does this help us? In this way. Now, if we can provide a finitely long description of precisely how \(d_n\) acts on a particular number, we will have precisely defined that number. This is because no two numbers can have the same decimal expansion. For instance, consider the following definition of a number, \(x\).

    Given any \(n\), define \(d_n^x\) = the ones digit of the \(n^{\mathrm{th}}\) prime number.

    Since the above is a finite number of words, and since this defines \(d_n^x\) for every \(n\), the above description precisely defines \(x\). Even though we probably could never actually calculate this number (the primes are a funny bunch), it doesn’t matter. It still can be described. Just for fun, I’ll write out a few decimal places of \(x\).

    \[x = 0.2357137939171373917139397…\]

    Now, I have only discussed numbers so far, but other mathematical objects can be describable as well. For instance, sets can describable, like \(\{1, 2, 5\}\) or \(\{\mathrm{all\ real\ numbers}\}\) or \(\{\mathrm{all\ rational\ numbers}\}\). And functions can be describable, like \(f(x) = x^2\) or \(g(x) = d_1^x \cdot d_2^x\). However, we’ll get into this a bit more in the next few sections.

    A final thing that I will say about this is the following. Certain numbers might only be able to be described through some connection to the real world. For instance, say I am sitting at a table in a coffee shop and I say,

    "Let \(x\) be defined as follows. I will find the point at which this table has maximal width, and then I will let \(x\) be that width, in inches."

    This description may very probably (“almost surely”, in fact) be the only way to describe this number. And, such numbers may be a problem for us later. So, let’s just assume that we’re not allowed to make descriptions like the one given above. That is, one can only refer to strictly mathematical objects.


    The Limits of Describability

    Describability would not be a very interesting definition if every mathematical object were describable. So, let’s discuss some objects that are not describable.

    At first, it may seem a bit strange that there would be indescribable mathematical objects at all. First, how could we even get to talking about something indescribable, if it is indeed—indescribable? And second, aren’t there an infinite number of finite English phrases that we can use to describe things? Won’t we be able to cover everything?

    The first thing is an interesting point, but the counter is as follows. In mathematics, we can discuss rather interesting sets of numbers by picking out a single property, \(p\), and defining a set as \(\{\mathrm{all\ numbers\ with\ property,\ }p\}\). Even though it’s easy to define such a set, it may contain quite complicated elements. We will see an example of this later.

    As for the second thing, the problem is this: there are many, many sizes of infinity. So, if we can describe an infinite set of numbers that has size larger than that of the number of English phrases, then we inevitably won’t be able to describe every element of that set. (This idea is related to my previous post on mathematics.)

    Let us see an example of both of these points. First of all, what is the size of the set of all finitely long English phrases? (Let’s call this set, \(W\).) Well, we can define this set as follows.

    \[W = \bigcup_{n=1}^\infty \{\mathrm{all\ English\ phrases\ that\ are\ }n\mathrm{\ words\ long}\}\]

    Since this is a countable sum of finite sets, we know that \(W\) must be a countable set. That is, the size of \(W\) is the same size as that of the positive integers. (You can take my word on all this, or you can do some Wikipedia research. This might be a good start.)

    Now, consider the set of all real numbers. Let’s call this set, \(\mathbb{R}\), for short. I won’t give the proof, but this set is known to be uncountable. That is, it has size strictly larger than that of the positive integers, and therefore, strictly larger than that of \(W\). So, even if we were to use every single English phrase to describe as many numbers as we could, we would still not be able to describe every real number. There are simply too many of them.

    And so, we see here the first example of an indescribable mathematical object. And, in fact, because of a particular property of the real numbers, we can say a bit more.

    \(\mathrm{Proposition\ 3}\)
    Given any \(a,b\) in \(\mathbb{R}\), with \(a < b\), we have that the interval, \([a, b)\), is uncountable, and therefore contains indescribable elements. In fact, this is true of any nontrivial interval in \(\mathbb{R}\).

    With this, we are now ready to move on to the main section of this post.


    Describable Enumerations

    The main finding I’ve had on this subject (which inevitably has been found before, likely on the subject of Turing machines) relates to enumerations of sets. Let’s define this term first.

    \(\mathrm{Definition\ 4}\)
    An enumeration of a set, \(S\), is a function, \(L_S : \{1, 2, 3, …\} \rightarrow S\), that is a bijection. By ‘bijection’, I mean that for every \(s\) in \(S\), there is exactly one \(n\) in \(\{1, 2, 3, …\}\) such that \(L_S(n) = s\).

    The reason this is called an enumeration of a set is because the function, \(L_S\), essentially tells how one could list every element of the set. Start with \(L_S(1)\), then \(L_S(2)\), then \(L_S(3)\), and so on. However, an enumeration of a set does not have to be describable. A describable enumeration would be one where \(L_S\) could be precisely defined with a finite number of words. That is, with that finite number of words, we could determine \(L_S(n)\), for any \(n\).

    Now we are ready for the main claim of this post, which I give below, with proof.

    \(\mathrm{Theorem\ 5}\)
    Consider the interval \([0, 1)\), and let \(D\) be the set of all describable numbers in \([0, 1)\). Then, every enumeration of \(D\) is indescribable.

    Proof.
    Suppose, in order to produce a contradiction, that the claim is false. That is, suppose there exists a function, \(L : \{1, 2, 3, …\} \rightarrow D\), which is a describable enumeration of \(D\). So, by definition of describability, there is a finitely long English phrase that precisely defines \(L\).

    Using Definition 2, we can “list” the elements of \(D\) in the following way.

    \[\begin{array}{r|l}
    n & L(n) \\
    \hline
    1 & 0.d_1^{L(1)}d_2^{L(1)}d_3^{L(1)}d_4^{L(1)}d_5^{L(1)}… \\
    2 & 0.d_1^{L(2)}d_2^{L(2)}d_3^{L(2)}d_4^{L(2)}d_5^{L(2)}… \\
    3 & 0.d_1^{L(3)}d_2^{L(3)}d_3^{L(3)}d_4^{L(3)}d_5^{L(3)}… \\
    4 & 0.d_1^{L(4)}d_2^{L(4)}d_3^{L(4)}d_4^{L(4)}d_5^{L(4)}… \\
    5 & 0.d_1^{L(5)}d_2^{L(5)}d_3^{L(5)}d_4^{L(5)}d_5^{L(5)}… \\
    : & : \\
    \end{array}\]

    That is, \(d_i^{L(n)}\) is the \(i^{\mathrm{th}}\) decimal digit of the \(n^{\mathrm{th}}\) element of \(D\), via the enumeration, \(L\).

    Now, before moving on, we need a few functions. Define \(\sigma : \{0, 1, 2, …, 9\} \rightarrow \{0, 1, 2, …, 9\}\) as follows.

    \[\sigma(d) =
    \left\{ \begin{array}{ll}
    5, & 0 \leq d \leq 4 \\
    4, & 5 \leq d \leq 9 \\
    \end{array} \right.\]

    So, it is easily seen that \(\sigma(d) \neq d\) for every \(d\). With this, we define \(\sigma^* : [0, 1) \rightarrow [0, 1)\) as follows.

    \[\sigma^*(x) =\mathrm{\ the\ number\ formed\ by\ applying\ }\sigma\mathrm{\ to\ every\ decimal\ digit\ of\ }x\]

    That is, if \(x = 0.d_1^xd_2^xd_3^x…\), we have that \(\sigma^*(x) = 0.\sigma(d_1^x)\sigma(d_2^x)\sigma(d_3^x)…\). So, every decimal digit of \(x\) is different from that of \(\sigma^*(x)\). And, since this process was described with a finite number of English words, we have that \(\sigma^*(x)\) is describable precisely when \(x\) is describable.

    Now, using the above table, we define \(x_0\) as follows.

    \[x_0 = 0.d_1^{L(1)}d_2^{L(2)}d_3^{L(3)}d_4^{L(4)}d_5^{L(5)}…\]

    That is, the \(n^{\mathrm{th}}\) decimal digit of \(x_0\) is the \(n^{\mathrm{th}}\) decimal digit of \(L(n)\). Since the process of defining \(x_0\) was just described with a finitely long English phrase, and since \(L\) is describable, as we have assumed from the beginning, we have that \(x_0\) must be a describable number. And so, it must be that \(\sigma^*(x_0)\) must also be a describable number, from our above discussion.

    However, as seen above, every decimal digit of \(\sigma^*(x_0)\) is different from that of \(x_0\). So, in fact, we have that

    \[d_n^{\sigma^*(x_0)} \neq d_n^{x_0} = d_n^{L(n)}\]

    for any \(n\) in \(\{1, 2, 3, …\}\). So, in fact, the \(n^{\mathrm{th}}\) decimal digit of \(\sigma^*(x_0)\) is different from that of \(L(n)\), for every \(n\). But this means that \(\sigma^*(x_0)\) differs from each \(L(n)\) at at least one decimal place. And so, \(\sigma^*(x_0) \neq L(n)\), for any \(n\). Since \(L\) maps to every element of \(D\), by Definition 4, it must be that \(\sigma^*(x_0)\) is not an element of \(D\). Therefore, \(\sigma^*(x_0)\) is a describable number in \([0, 1)\) that is not a member of \(D\), the set of all describable numbers in \([0, 1)\). This is a contradiction.

    So, it must have been that our original assumption was false. That is, such an \(L\) cannot exist. Therefore, every enumeration of \(D\) is indescribable.

    \(\Box\)


    And there you have it. Even though every number of \(D\) can be described, we find that any attempt to describe how to list them all would be in vain. In my opinion, a bit strange.


    The Challenge

    The challenge that I will present in this section is what orginally prompted the above finding. But before getting to it, I will discuss a few related questions.

    The first is this: is it possible to construct an indescribable set, consisting only of describable elements? It would seem that this should be impossible. If we can describe each element of a countable set, certainly we should be able to describe that set. However, this is false. The problem is that each element must only be *individually* describable. With this, is may only be possible to describe the entire set using the individual descriptions of each of its members. Unfortunately, this would amount to an infinite number of words. An example of this follows.

    Let \(x\) be any indescribable real number (such numbers exist by Proposition 3). Since the rational numbers are dense in the set of all real numbers (discussion on this here), we have that there is some sequence, \((q_n)\), of rational numbers that limits to \(x\). Now, let \(S\) be the set of all elements of \((q_n)\). So, since every rational number is describable, we have that every element of \(S\) is describable.

    Now, with this definition of \(S\), we can describe \(x\) in the following way.

    ”\(x\) is the limit of any infinite sequence of distinct elements of \(S\).”

    (This actually requires a bit of proof, but to anyone who cares: it’s actually not that difficult.) Here, if \(S\) were describable, then \(x\) would be describable. So, since we know that \(x\) is indescribable (by definition), we have that \(S\) must also be indescribable. And so, our first question is answered.

    The second question has essentially already been answered by Proposition 3. That is: is it possible to construct a nonempty describable set, consisting only of indescribable elements? Well, let’s just define a set, \(I\), as the set of all indescribable real numbers. We know that these exist, so \(I\) is nonempty. And, obviously, this set is describable (as I just described it), and it only contains indescribable numbers. So, our second question is answered.

    This brings us to the challenge. It is similar to the second question given above, with an extra restriction.

    \(\mathrm{Challenge\ 6}\)
    Does there exist a *countable* nonempty describable set, consisting only of indescribable elements? If such a set exists, then we’ll say that that set “answers the challenge affirmatively”.

    The answer we gave to the second question almost answers the challenge affirmatively, but falls short, as it is an uncountable set.

    At this point, I am unsure as to whether or not the set described by the challenge exists. However, there are a few things I do know, which may help the ambitious reader. Here they are.

    \(\mathrm{Proposition\ 7}\)
    If there exists a countable set, \(S\), that contains at least one indescribable element, then \(S^*\), the set of all indescribable elements of \(S\), answers the challenge affirmatively.

    \(\mathrm{Proposition\ 8}\)
    Suppose \(S\) is a set that answers the challenge affirmatively. Then every enumeration of \(S\) is indescribable.

    \(\mathrm{Proposition\ 9}\)
    Let \(S_L\) be the set of all enumerations of \(D\), the describable numbers in the interval, \([0, 1)\). If one can describe any countable subset of \(S_L\), then that set answers the challenge affirmatively.

    Propositions 8 and 9 are the main reasons why I started looking at the describability of enumerations of \(D\) in the first place. However, after more thought on the matter, I’m starting to realize that describing a countable subset of \(S_L\) is likely quite comparable to describing a countable subset of the set of all indescribable real numbers. But, perhaps not.


    Concluding Remarks

    So there you have it: my current thoughts on mathematical describability. And an interesting challenge for anyone who likes that sort of thing. In all honesty, I have a feeling that the set described by the challenge does not exist, but to prove that might be a bit difficult. If anyone has any ideas, I’d love to hear them in the comments.

    1 year ago  /  1 note  /