☛ King Tut’s dagger was made from a meteorite

An analysis of the dagger’s blade led by Daniela Comelli, a professor of materials science at the Polytechnic University of Milan in Italy, showed that it contains 10 per cent nickel and 0.6 per cent cobalt, the researchers report in the journal Meteoritics and Planetary Science.

(Also, I really love it when a news article references the actual journal article prominently. Nothing better for the interested reader!)


☛ Mumbai Police go after comedian for “mocking” celebrities

An Indian comedian, known for “edgy”, “controversial” material, apparently created something that pokes fun at Indian mega-stars and national heroes Lata Mangeshkar and Sachin Tendulkar.

And of course, this being India, some people found reason to be outraged. And of course, since these people have political affiliations linked to the government, the police are now “looking into the matter”.

Mumbai police has begun an inquiry into complaint against comedian Tanmay Bhat’s video of a mock conversation with Lata Mangeshkar and Sachin Tendulkar that prompted the Shiv Sena, Bhratiya [sic] Janata Party and MNS to call for action against Bhat and AIB.

The inquiry is based on the complaint by Raj Thackeray’s Maharashtra Navnirman Sena.

Bollywood has also reacted sharply to the comedian’s portrayal of the music and cricket icons, saying it is in poor taste.

Making videos in poor taste is not against the law, people. I have not seen the video; I will go ahead and concede nevertheless that the video is not worth its time on Youtube. OK, then don’t watch it! If no one watches it, guess what happens: they stop making such videos!

I find stuff like this maddening. “Freedom of speech” should be simple to understand, no? I can speak my mind; you can speak yours. Unless you’re putting words in my mouth, or are preventing me from living my life fully, I have no right to stop you making your speech, however offended or outraged I feel. Yes, if I feel your speech is “wrong” or “bad”, I might encourage my friends and family to boycott you. But only my sense of offense should have no effect on the legality of your speech!

The only people with say in the matter are the celebrities in question. Did Sachin Tendulkar complain? No. Did Lata? No! As long as everyone understands that the video was made by someone else and not the celebrities in question, how in the world does legality come into the picture?

Please, let the police do their thing and go after actual crime and actual criminals. “Distasteful” and “offensive” mean very different things than “illegal”.




Octopress — adding category tags to the blog RSS feed

Right from the beginning, I’ve assigned broad categories to every post I’ve written here. (For example, this is my—very lacking—Health Monitoring series of posts.) However, Octopress does not include these category tags by default into the RSS feed. So if a reader is using an RSS feed-reader app or website, they cannot make use of the assigned categories even if the app or website was capable of doing so.

I’ve now added some code necessary to add the categories to the RSS feed, and this is what I did.

cellArray = {'Alpha','Beta','Gamma','Delta','GammaSquared'};
refString = 'Gamma';

At the outset, here is the code that I added:

{% for post in site.posts limit: 20 %}
<entry>
<!-- Other items that are included in the feed -->

{% capture catnum %}{{ post.categories | category_links | size }}{% endcapture %}
{% unless catnum == '0' %}
    <categories>
    {% for cct in post.categories %}
        {% assign idx=forloop.index0 %}<category>{{ post.categories[idx] }}</category>
    {% endfor %}
    </categories>
{% endunless %}

<!-- Other items that are included in the feed -->
<content type="html"><![CDATA[{{ post.content | expand_urls: site.url | cdata_escape }}]]></content>
</entry>

{% endfor %}

This code works great, but allow me to confess that I am not sure that this is the optimum implementation. To me this seems inelegant, but until I have a better solution, this performs the function appropriately and perfectly adequately.

I’ve only included the relevant portion and the context in which it must be inserted. (See the comment tags <!-- Other items that are included in the feed -->.)

The meat of the algorithm is from lines 7 through 11.

  • A <categories> tag is defined, and a for loop is executed over post.categories, which contains the list of categories for the post.
  • Within the for loop, each post category is enclosed in a <category></category> tag.

Now I had initially thought that the loop variable (cct here) would inherit sequentially the value of each category in post.categories, but apparently that does not work properly. Therefore, the workaround is to

  • identify the loop index (assign idx=forloop.index0) and
  • use individual values of the categories (post.categories[idx]).

We must use forloop.index0 and NOT forloop.index (both are valid commands; the index key starts numbering from 1) because the array numbering starts from 0, not 1.

OK, now that the meat of the algorithm is done, we must put in some code to handle the “unusual” cases—what happens if a post does not have any categories assigned? Such a scenario is handled by the capture command (line 5) and the unless segment that encloses our actual algorithm. The capture command simply captures a value, in our case the number of categories that exist. We only want to include the categories when they exist, therefore our algorithm is run only unless catnum=='0' i.e. when the number of categories is not 0.

Well, that’s it! I have added the code segment before the actual content of each post, but I don’t think it makes any difference if the segment appears after the <content> tag. It should work fine anywhere within the <entry> environment.