Rough Book

random musings of just another computer nerd

Month: December, 2009

Happy New Year

Happy New Year! Well, this year is already starting off pretty well because of:

Aparna

Aparna

I wonder what this decade (alright, I know it technically starts in 2011, but still) is going to be like. I hope there’s better music for one. At any rate, a whole set of new experiences and new memories; the last one wasn’t short on that! Here’s to another great decade!

Note: This post shows up on December 31st because it isn’t New Year’s yet in Arizona (and this blog runs on MST)! I’m in India right now and it’s January 1st, 2010 here.

Glenn Beck is an asshole

…within the span of a few minutes, Beck implied that there are no quality medical schools in India; implied that medical care in India is a shoddy imitation of real health care; implied that the entire nation is an undeveloped backwater without even so much as indoor plumbing; and compared the Ganges River, a holy body of water for one of the world’s oldest and largest religions, to a disease…

I guess the only reason Glenn Beck is popular is because there is apparently a marketable-segment of idiots in America. You know, the morons that watch Fox News and actually believe what they hear. Glenn Beck, you are an asshole. You are an ignorant bigot and a douchebag. There are a few people that I know, that oppose the health reform. But the strange thing is that they have rather valid arguments, and even though I may not agree with them, I find them rather intelligent and well thought-out. I mean, Mr. Beck. I realize that by being an ignorant douchebag it’s beyond you to form coherent arguments but seriously… do you have to stoop to the level of offending an entire nation? Or what about the entire community of Indian-Americans?

Usually when people make arguments or counter-arguments about a topic, they usually know what they’re talking about because they’ve researched the topic thoroughly. Oh wait. That’s only if they have a proper show that actually discusses political topics with valid arguments instead of gleefully bending over for the lunatic far-right and being their sockpuppet. Hell, I probably shouldn’t blame you. You are making money after all, even if you have to sell your soul for it. No, your show is a circus and your arguments are bullshit. Even still, I find it appalling that you would denigrate an entire nation and community. You may not think much about Indian doctors, but they seem to be a successful and well-respected bunch in India, with a large number of satisfied customers. In one fell swoop you’ve insulted the cultural and religious sentiments of Indians, you’ve made light of the sweat, blood, and tears of her doctors that strive to serve their nation (and who have migrated to other nations, including *gasp* the United States and serve Americans), and you’ve implied that India is some backwater country without any sort of facilities. Sure, India is no United States and it has a long way to go, and even though you may have the right to say whatever the hell you want, it’s really, really bad form to make fun of a country and her people. You xenophobic, ignorant, douchebag. I find it surprising that even you would stoop this low for ratings.

You sir, are an asshole.

She Said Yes

Yes

She said, “Yes”. Although I guess it was never in doubt that she would say anything else (being a semi-arranged marriage and all), it still feels nice :). The official engagement ceremony was today. It was a traditional Nair engagement ceremony (known as a nischayam – literally translated, “decision”) where both families express their consent to the alliance and inform everyone in attendance of the same. I don’t have pictures of the ceremony on me; I’m waiting on the CD of photos from the photographers. This picture is from when I first gave her the ring.

bAdkOde is Turing Complete

In my previous post, I suggested that bAdkOde might be Turing Complete by writing a quine. One of the ways to actually prove Turing Completeness is to try and write an interpreter for another Turing-Complete language in bAdkOde. Another approach involves providing a direct translation from another Turing-Complete language into bAdkOde. Here, I prove the Turing Completeness of bAdkOde by providing a direct translation from Brainfuck into bAdkOde.
Read the rest of this entry »

A bAdkOde quine (which suggests that bAdkOde is Turing Complete)

On the bAdkOde project page, I mentioned that I didn’t know whether bAdkOde is Turing Complete (although I suspected it). I also mentioned that if I was able to write a quine in bAdkOde, then it would probably mean that it is Turing Complete. I was able to write one after going through this excellent quine tutorial by Dave Cope.
Read the rest of this entry »

End of a Journey

December 19th, 2000 was a Tuesday. It was the day I enlisted into the Arizona Army National Guard. Today, 9 years later, I’m finishing up my service. From my very first days at C Btry, 1/180th FA, a tour in Iraq, and all the way to Eco 29th BSB, it’s been quite a ride. I didn’t reenlist because I want to concentrate of my career, and frequent deployments would put me at a serious disadvantage in my field. This is not to say that I’m not torn by my decision. Part of me wants to stay in. Part of me will always want to be in the Army. It has been an amazing 9 years for me. Being part of the Army has given me discipline and confidence and has taught me the meaning of honor, duty, loyalty, and courage. I think I was a good soldier and as an NCO I think I did my best to take care of the soldiers under me. Along the way, I also made some wonderful friends who might as well be family now. The kind of camaraderie that forms when you serve with people in a combat zone cannot be put into words.

Looking back I think I can say that I’m satisfied with my career. I still remember coming in as a 19-year old Private… I knew that I at least wanted to make Sergeant before I got out, and I’m glad that I was able to achieve that. Being able to wear the uniform is something amazing. You are a part of something larger than yourself. It’s hard to put into words… I just know that it’s something that I will miss terribly.

I can’t say that I’ve looked forward to this day (although my family has). 9 years is a long time to serve and after doing something for so long, it becomes a very integral part of you and your identity. I guess I will always be a soldier and a veteran; I have earned that right. But I know I’ll always be looking back at my Army years fondly, half-wishing I was still wearing the uniform and still serving the nation.

Go Army! HOOAH!

The Sun’s not going to blow up

In any science fiction story I’ve read (or science fiction movie or TV show that I’ve seen) that talks about death of the Sun. I’ve always heard references to Earth’s sun “going nova”. I’ve read about this even in Asimov’s stories. In most cases, they’re talking about a supernova. But here’s the thing. The Sun is not going to blow up. Even if the writers were talking about an actual nova, they’re still wrong. Here’s why:

Our Sun is a yellow dwarf star (more precisely known as a G-type main-sequence star), and doesn’t have enough mass to undergo a supernova explosion (type IIa). You need a star that’s at least nine times the Sun’s mass for a supernova explosion. If we’re simply looking at a nova (type Ia), then the Sun doesn’t have a companion to draw matter from when it turns into a white dwarf. So no matter which way you look at it, the Sun is not going to blow up. It’s just going to be really, big and red and will eat the Earth. Unless the Earth moves outward due to the Sun losing mass. Finally the Sun with eject its outer layers and turn into a white dwarf. See? No blowing up. I don’t know why some science fiction authors still talk about the Sun “going nova”. Maybe it’s because it sounds more dramatic.

If anyone has read a science fiction story (or seen a science fiction movie or TV show) that talked about the death of the Sun/Earth and did so realistically, then let me know.

if-else in bAdkOde

I was talking to my CSE 200 (my first CS class at ASU) professor Richard Whitehouse about bAdkOde and he (rightly) pointed out that it didn’t have an explicit selection statement. He also said that unless I wanted it to be really ugly I’d need to have a selection statement. However, since I was going for ugly I figured that I’d just emulate the operation of an if and an if-else with the existing while statement.

If you know assembly, then you know that a while is simply a set of statements wrapped with a conditional branch at the top and a backwards branch at the bottom (or in other words, an if with a goto at the end. A do-while is simply a set of statements with a conditional branch (at the bottom) that branches to the top of the loop. In fact, in assembly programming there really aren’t any for loops or while loops. These keywords are simply abstractions and syntactic sugar. In bAdkOde, you can implement an if with the existing while statement if you explicitly make it break out of the loop. For example, let’s say that we want to check whether the user entered the character “0”:

?a
-48a
# print a line break
"10
# if a is zero
{=a
 # print the string "zero"
 "122"101"114"111"10
 # set the a register to a non-zero value so that we can break out of the loop
 >1a
}

I knew there was a way to implement an if-else with just while statements but I didn’t remember exactly how. Then my friend and co-worker Juan reminded me that I needed two variables. In our case, we need to use two registers:

?a
-48a
# copy the value of a into b
>ab
"10
# if a is zero
{=a
 # print the string "zero"
 "122"101"114"111"10
 # set the a register to a non-zero value so that we can break out of the loop
 >1a
}
# if the top loop failed, it means that b (which holds the same value as a) is 
# non-zero and so we can enter this block.
# if the top loop was successful, it means that b (which holds the same value
# as a) is zero and so we won't enter this block. Hence, the second block acts
# as an 'else'
{!b
 # print the string "non-zero"
 "110"111"110"45"122"101"114"111"10
 # zero out the b register
 >0b
}

Yes, quite ugly. But that’s what I’m going for! 🙂

bAdkOde: An Esoteric Language

I’ve added another project to the projects page. It’s called bAdkOde, an interpreter for an esoteric language that I designed. The very first incarnation of bAdkOde was written in Java and I actually posted it (or made a blog entry about it) over 8 years ago. For some reason I took it down. Probably because I stopped working on it. Anyway, I redesigned the language and wrote an interpreter for it in Perl about 4 or 5 years ago. I finally got around to posting it. Check out the project page for more details. Let me know what you think.

Telengana

I was reading the BBC on Thursday and was surprised to find that India is going to create a new southern state out of the existing state of Andra Pradesh. I knew that at least one new state had been created in the last decade (the actual number is 3: Chhattisgarh, Uttarakhand, and Jharkhand). I didn’t think much of it, but my interest was piqued and so I read the article. To be completely honest, I don’t have a strong opinion on the subject, except for one thing: Hyderabad is going to be the capital of the new state. Hyderabad is a very important Indian city. It’s kind of like an Indian Silicon Valley and several Fortune 500 companies have their offices there. It’s a prosperous, modern, and hi-tech city.

Now some background. After reading the article about Telengana on Wikipedia, it seems that when the states of India were being re-organized along linguistic lines by the State Reorganization Committee, they were not in favor of merging the Telengana region with the Andra region due to economical disparities. The Central government decided to ignore the SRC recommendations and performed the merger anyway (perhaps using the reason that both areas spoke Telugu, and so there was no reason to split them). As was to be expected, over the past few decades, the Andra region has prospered whereas the Telengana region is still economically underdeveloped.

It would seem that in principle, there needs to be a separate state. However, I’m not so sure of the wisdom of handing over Hyderabad to a fledgling state. It will take time to create a new state-machinery and I think that Hyderabad could suffer in the process. In addition, the city is going to a state with an untested and nascent administration (obviously, because it’s a brand new state). So… maybe not such a great idea. On the general topic of creating more states in India (as a result of the imminent creation of Telengana, many other groups are agitating for their own states) I don’t really have a well-formed opinion. Maybe it’s a good thing – you can have more focused state-administrations and better management. However, the side-effect is increased fragmentation. The last few governments in India have been coalition governments formed with the support of regional parties. Creating more states is probably going to create even more regional parties and it’s not going to help the situation.

All original content on these pages is fingerprinted and certified by Digiprove
%d bloggers like this: