Praveen Kumar

Eternal Quest for Incremental Improvement

Org-Mode, LaTeX and Minted - Syntax Highlighting

Comments

I use Org-Mode excessively for taking notes, publishing, and even presentation. As a programmer, most of the stuff I write has snippets of source code from various languages. I always feel that well formatted, syntax highlighted code is easy to read in published documents. It is possible to mark a block as source code in Org-Mode.

When exporting an Org file to LaTeX, Org-Mode provides options to format the source code block using one of two popular source code formatting TeX packages namely Listings and Minted. I personally was not that thrilled by Listings. Minted uses Pygments, a Python based syntax highlighter. I already use Pygments in a couple of other scenario. Also, Minted looked more modern compared to Listings. So, I decided to use Minted as my primary code highlighting tool for LaTeX.

C++ Refactoring Using Clang

Comments

Lately, I have been playing with LLVM and clang a lot on some projects. Yesterday, I ran into an interesting talk by a Google employee in the last LLVM developers meeting. It was about automatic C++ refactoring using clang.

With the power of clang and easy access to its AST information, I can finally see the possibility of having a decent C++ refactoring tool in the near future.

Sikh Rights Group Protests Sonia Gandhi’s Presence in the United States

Comments

Sonia Gandhi’s entry and presence in the U.S. is in violation of
section 212(a)(3)(E)(ii) & (iii) of the Immigration and Nationality
Act and section 604 of the International Religious Freedom Act of 1998
which prohibit entry into the U.S. of any individual who, outside of
the U.S., has ordered, incited, assisted or in any way participated in
the commission of any act of torture or extra judicial killing. Sonia
Gandhi is ‘inadmissible’ to the U.S. because as President of the
Indian National Congress party she has been actively covering up the
Sikh genocide and shielding her party leaders who were key players in
executing the atrocities of November 1984.

Byzantine Generals’ Problem

Comments

One of the important considerations that has to be made with respect to distributed systems is fault tolerance against Byzantine failures.

The generals of the Byzantine Empire’s army must decide unanimously
whether to attack some enemy army. The problem is complicated by the
geographic separation of the generals, who must communicate by sending
messengers to each other, and by the presence of traitors amongst the
generals. These traitors can act arbitrarily in order to achieve the
following aims: trick some generals into attacking; force a decision
that is not consistent with the generals’ desires, e.g. forcing an
attack when no general wished to attack; or confusing some generals to
the point that they are unable to make up their minds. If the traitors
succeed in any of these goals, any resulting attack is doomed, as only
a concerted effort can result in victory.

The World According to David Cheriton

Comments

I just can’t agree more with Dr. David Cheriton’s view of the trend in computer innovation.

For 30 years, computer innovation has moved up the “stack” from chips to operating systems, to middleware, applications and finally social networks.

There is much more we can do to build a better infrastructure.

Octopress Linklog Feature

Comments

I got interested in the new linklog feature provided by Octopress and started playing with it. According to the developer, this feature is still a preview. I have already started using it on my blog though.

Be aware this is a preview. Don’t merge this into your main branch and
run along using it. I’ve tested it a lot but there may be issues I’m
unaware of. Create a test branch for your blog before you
continue. When everything gets cleared up, I’ll release this feature
and you can pull from the master branch.

Here are the characteristics of a link.

  • The font size of a link’s title is smaller than the font size of a post’s title.
  • A link’s title has a → symbol at the end of it.
  • Clicking the link’s title will take you to the linked URL.

Building Hadoop and HBase for HBase Maven Application Development

Comments

Introduction

HBase 0.90.3 needs Hadoop common 0.20-append branch in order to not lose data. More information about this can be found “Getting Started” section of HBase guide. However, there is no official release of Hadoop common 0.20-append binary. In order to have consistent and right bits on your cluster and your development platform, you need to compile your own binary version of Hadoop common from the 0.20-append branch source and your own version of HBase 0.90.3 using that Hadoop common binary.

This article provides an overview of building Hadoop and HBase for developing HBase applications that are managed using Maven.

Making Mac Applications to Make Use of Memories Larger Than 4 GB

Comments

Today, I upgraded the memory on my Macbook Pro (2010) from 4 GB to 8 GB. One of the main reasons for the memory upgrade was to be able to run Mircosoft Windows 7 virtual machine using Oracle VirtualBox. However, I noticed that VirtualBox was not able to see more than 4 GB of memory even after the upgrade while the system reported that there was 8 GB of installed memory.

A quick research showed that Mac OS X 10.6 (Snow Leopard) uses 32-bit kernel by default. This limits the applications to use only 4 GB of memory. In order for the applications to use larger memories, one need to use the 64-bit kernel (provided that you are on a 64-bit platform). There is an Apple support page that describes how to select the desired kernel.

Plotting a Weight Chart Using Emacs Org-Mode and Gnuplot

Comments

I discovered about Org-Mode a couple of years ago. Since then, I have started using it for various tasks. One of the recent usage is to track my daily weight. This article describes how to use Org-Mode and Gnuplot to plot your weight measurements.

Here is the list of software that I use in my setup.

For the purpose of this article, it is assumed that you have a similar setup that works for you.

Permanence

Comments

I enjoy reading XKCD. One of the recent comic that I enjoyed the most was published last week, titled ”Permanence”, that was about naming servers.

One of the reasons that I enjoyed this the most was due to the fact that I can totally correlate this comic to my behavior in naming things. I have an obsession of naming my laptops, servers, PCs, gadgets and more based on Greek mythological names. I am not sure how I developed this obsession. I think that it was mainly influenced by the games Zeus: Master of Olympus and Age of Mythology, the two games that I played a lot almost 8 years ago.