rkrishnan is currently certified at Journeyer level.

Name: Ramakrishnan Muthukrishnan
Member since: 2001-04-06 12:31:31
Last Login: 2011-01-26 13:15:34

FOAF RDF Share This

Homepage: http://rkrishnan.org

Projects

Recent blog entries by rkrishnan

Syndication: RSS 2.0

NixOS

Posted on April 15, 2014 by rkrishnan

I am a long time (and proud) Debian GNU/Linux user and developer. As a debian developer, I have not been active for one or two years but off late, I am following mailing lists, uploading a package or two and starting to be more active.

I have also been getting more and more convinced that Functional Programming paradigms are more suited to solve problems than using imperative languages, at least for a lot of tasks. I have been learning Haskell for the past few months and thoroughly enjoy the beauty and expressiveness of Haskell and the purely functional programming which lends itself to many tasks. It has some kind of beauty that is only found in Mathematics, which I have never seen in any other programming language I ever use.

I also sometimes use a work Macbook Air machine. Since my work involves building linux kernel, making changes to it and so on, I generally work on GNU/Linux boxes. But sometimes I am not in the office or sitting on a couch and I really like the portability of the Macbook hardware. I am not a fan of Apple and do not intend to replace my PC hardware and the very nice Debian system with Apple hardware and software, expecially in the wake of Snowden revelations. But just to make my life easier while using the Mac, I had been looking at various “packaging” systems in the OS X.

People have attempted a few times to create a good packaging system for OS X. Mac-ports, the NetBSD pkgsrc and so on. And then there is homebrew which seem to be the current popular package manager, which was recommended to me by one of my friends who is a long time Apple aficionado.

The problem with brew is that it is source based. This is both good and bad. Bad because it takes me ages to get stuff built and installed. I would love to have binary packages available that can be readily installed. But then there is the binary compatibility between OS X versions. I admit to know nothing about the binary compatibility.

Enter NixOS. NixOS is a GNU/Linux distribution (well, they call it a linux distribution, but I prefer to call it GNU/Linux distro to give some credit to the GNU project which started this all and still contribute a big chunk of software we all use) that brings the concept of Purely Functional programming languages to an OS distro. What does that mean? It means many things.

  • if a package installation fails, it does not leave the system in a useless state. It is in the same state as we started with.
  • The expectations from the OS is “declared” in a configuration file written in a lazy, functional, dynamically typed language called nix expression.
  • One can roll back to any of the previous states of the system.
  • One can install multiple versions of a package. If a package is not used by any other package, it can be “garbage collected”.
  • One does not need any special privilages to install packages. Any user of the system can install packages.
  • NixOS does not have the traditional /etc, /usr, /bin and other directories. Instead, there is a ~/.nix-profile that takes care of linking to the package which is stored in the “nix store”.

If all these sound interesting (or not), I would encourage everyone to read this wonderfully detailed and readable paper on Nix.

Another thing to note. Nix is the name of the packaging system (like apt or rpm) and NixOS is the OS built around nix. Nix can be installed on any POSIX compatible OS like GNU/Linux, *BSD or OS X or any other Unix-like systems.

Nix packages are maintained via github. I don’t personally like such a crucially important project dependent on a commercial network infrastructure like github. But at the same time, I see that github “pull requests” is certainly one of the reasons why a project like Nix is able to keep up with the ever changing Free software versions and builds. It certainly reduces the bureaucracy.

I already sent a couple of pull requests which were merged readily. Github and the pull request mechanisms greatly reduce the barrier to contributions. But the same time, I should note that Debian’s trust model for developers using the GPG “web of trust” and signed package uploads exist for a reason. I wish more and more distributions adopt it.

My OS X experience is now a lot better. I have latest versions of a lot of packages installed. For those that are failing, I am trying to fix them and send the fixes in. And I am having a lot of fun learning about the Nix. There are many rough edges with Nix still. A lot of free software is not packaged yet and packaging itself is boring and a thankless job. But in my opinion the Nix expressions is a nice “Domain Specific Language” to do the packaging. I will certainly be playing with it more in the coming days. But of course, I do not plan to stop using Debian any time soon.

Syndicated 2014-04-15 00:00:00 from Ramakrishnan Muthukrishnan

rkrishnan.org -- now with SSL padlock

Posted on March 9, 2014 by rkrishnan

I just bought an SSL certificate (free for the first year) from gandi.net and configured nginx to serve the pages over SSL. It was very easy to enable SSL, the whole process took me about 30 minutes (including the verification time from Gandi). I mostly followed Ben Jeffrey’s excellent blog post with a few trivial changes. I chose to use a “file” verification method instead of DNS or email. This is very easy to do, one needs to download a file and put it at the root of one’s website.

A friend tells me that I should probably get the EV Certificate. I think it probably makes sense for e-commerce websites or those websites that authenticate users and take their personal data. I am doing none of these. My website is just serving some static pages. Then why bother with https at all? Because one can. I just wanted to convince myself that it is easy to encrypt data between the browser and the server.

Syndicated 2014-03-09 00:00:00 from Ramakrishnan Muthukrishnan

On writing books

Posted on March 2, 2014 by rkrishnan

Off late, I had been reading the Plan9 papers from Bell Labs. The papers prompted me to go back and read some of the books written by the same folks at Bell Labs.1 What is so astonishing is that the books written by these finest engineers are the clearest form of writing about programming that has ever been produced. These books almost never exceed 300 pages. Let me list some of the books here:

  • The C Programming Language, Kernighan and Ritchie.
  • The Unix Programming Environment, Kernighan and Pike.
  • The practice of programming, Kernighan and Pike.
  • Software tools, Kernighan and Plauger
  • C traps and pitfalls, Andrew Koenig
  • The AWK programming language, Aho, Weinberger and Kernighan
  • Elements of programming style, Kernighan and Plauger
  • Programming Pearls, Jon Bentley.
  • More programming pearls, Jon Bentley.
  • Compilers: Principles, Techniques, and Tools, Aho, Sethi and Ullman.
  • The design of the Unix operating system, Maurice J. Bach.

I believe this covers the list related to Unix/C and other related tools. There could be more that I don’t know about.

At the risk of repeating myself, here are the salient features of these writing (and also the Plan9/Unix papers).

  • concise.
  • clear and unambiguous.
  • lots of clean code examples to illustrate the points.
  • wonderful exercises.
  • lots of real life examples.

The AWK book has an example showing a simple implementation of make, in ~5 pages. Tell me any other book that does that.

Why is it that these authors consistently wrote these high quality books and papers? I believe it is because they worked on it first and were genuinely interested in sharing their work with others. They also strived for the highest quality in all their work - be it writing software or writing documentation.

Contrast it with the modern world. Within a few months of a new language or a library or better a “framework” appearing in the Internet, a bunch of books gets announced on Twitter and twitter handles setup to announce the upates of the book. Most of these are written by people with the sole intention of getting more search hits for their names in the popular search engines and have not built anything big and “real world”. Some of these books only discuss very superficial examples and lack exercises and real examples. Some present-day authors like to fill their books with footnotes. If I were interested in history rather than content, I would rather look up elsewhere on the web.

The Bell Labs books were all “Real World” books without attaching “Real World”2 on the titles that some of the current generation books do in order to differentiate themselves from the non-real-world ones. This is a pity and is mostly the author’s fault. In their rush to fame, the poor reader and her money and time has no place!

If you are a potential author, please read at least some of the above listed books and try to emulate them, please, for the sake of computer science!


  1. Reading these papers also prompted me to think how much of an antithesis of Unix, the “modern unices” have become.

  2. I didn’t mean anything bad about “Real World Haskell” or “Real World Ocaml”. They are both fine books written by great authors with lots of experience on the topic and it shows.

Syndicated 2014-03-02 00:00:00 from Ramakrishnan Muthukrishnan

Haskell books

Posted on January 3, 2014 by rkrishnan

There are lots of books on the programming language, Haskell, which, the folklore say, has a steep learning curve. I am no Haskell expert, having embarked on the journey to learn Haskell myself two years ago and still very much learning. A friend of mine recently asked me for recommendations on Haskell books, which inspired me to write this post. Again, I am no Haskell expert, still very much a journeyman Haskeller.

Usually two books get recommended by almost everyone. Those two books are

There is no question that these two are great books. I have paper copies of both the books and still use them. I think everyone aspiring to learn Haskell should read these books, especially RWH. I am not a big fan of LYH though. I feel that the Haskell Tutorial or YAHT already covers everything in LYH in the same or better way.

There are some other books that I like along with RWH. One of the thing I look, in any programming book that I intend to buy (investing my money) and read (investing my time, because I am serious about learning the material) is that they contain exercises. I feel that testing one’s knowledge of understanding is extremely important and good exercises of varied difficulty (good books indicate the level of difficulty of exercise problems) is very important, as far as I am concerned. So, with that in mind, here are my recommended books on Haskell:

Actually I read the previous edition of this book co-authored by Phil Wadler but that book had its examples in Haskell’s pre-cursor language, Miranda. I think just about every programmer should read this wonderful book for the clarity of presentation.

Hutton’s book is probably what one should read (and work through) to get deep into Haskell. It has some great exercises as well. Some people compare this book to K&R C book. For those experienced in other Functional programming languages, this is a great book.

Writing real world programs

I found myself staring at my editor sometimes with just the below lines on it:

  main = 

The problem is that most of these books teach the purely functional part of Haskell beautifully well. While that is very important and requires a different mindset, especially if one has a prolonged exposure to imperative programming, it can only help to get the room warm by heating up the CPU. One need to interact with the real world to do some stuff in and out. It is extremely easy to do I/O in Haskell. Just start using it without worrying about Monads.

And that brings me to the next topic:

Do not learn monads by analogies. Do not read any Monad tutorials which compares Monads with anything else. Just start using it. Take some time to learn the type signature of Monads and start building programs with them.

If you really want to read a monad tutorial, I highly recommend these two papers.

If you are allowed to read just one blog post on the subject, I would suggest reading Chris Taylor’s post on IO Monad. Be sure to read it after reading Wadler’s and SPJ’s papers.

This is where RWH comes into picture. It has a number of great examples and is written by programmers who have contributed tons of great code to the Haskell community.

Algorithms

Traditional algorithm books describe algorithms in imperative style. Two great books exist in the Haskell world that beautifully describe algorithms.

Other misc resources

Another great resource is Don Stewart’s StackOverflow answers on Haskell and the #haskell freenode irc channel. I am not big into irc. I join the channel occasionally, it is one of the most friendly places to hangout with other Haskell programmers.

Happy Haskell Hacking!

Syndicated 2014-01-03 00:00:00 from Ramakrishnan Muthukrishnan

2013 in review

Posted on December 31, 2013 by rkrishnan

2013, like other years, was a mixed bag. For the first time in years, I had to witness the death of someone very close to me. I spent a lot of time in hospitals, in front of Intensive Care Units, slept on the benches on the hospital corridors, talked to many others like me who were anxiously hanging out at hospitals waiting to hear from the Doctors who made lightning visits, uttered a few words and left.

Some of the people went home alive, some unfortunate old and young didn’t.

On the positive side, I completed two courses on Coursera, Algorithms Part-1 and Algorithms Part-2. I really felt after completing these courses that I made a step forward in my own quest to become a better programmer.

I have no big ambitions for 2014. I just want to be a better human being, spend more time with family, do more of what I like and be with people I love.

I also hope that the world would judge people for what they are, rather than by the tags they carry (age, sex, qualifications, job…).

Happy 2014!

Syndicated 2013-12-31 00:00:00 from Ramakrishnan Muthukrishnan

268 older entries...

 

rkrishnan certified others as follows:

  • rkrishnan certified rkrishnan as Journeyer
  • rkrishnan certified raph as Master
  • rkrishnan certified cjwatson as Journeyer
  • rkrishnan certified rms as Master
  • rkrishnan certified jwz as Master
  • rkrishnan certified greve as Master
  • rkrishnan certified atai as Journeyer
  • rkrishnan certified jfleck as Journeyer
  • rkrishnan certified BrucePerens as Master
  • rkrishnan certified srivasta as Master
  • rkrishnan certified psg as Journeyer
  • rkrishnan certified joey as Master
  • rkrishnan certified mathieu as Journeyer
  • rkrishnan certified ajt as Journeyer
  • rkrishnan certified abraham as Master
  • rkrishnan certified walters as Journeyer
  • rkrishnan certified sjanes71 as Journeyer
  • rkrishnan certified sdodji as Journeyer
  • rkrishnan certified vivekv as Journeyer
  • rkrishnan certified logic as Journeyer
  • rkrishnan certified achitnis as Apprentice
  • rkrishnan certified ole as Journeyer
  • rkrishnan certified chalst as Journeyer
  • rkrishnan certified dpatel as Journeyer
  • rkrishnan certified sri as Apprentice
  • rkrishnan certified jLoki as Journeyer
  • rkrishnan certified RobinS as Journeyer
  • rkrishnan certified edd as Journeyer
  • rkrishnan certified werner as Master
  • rkrishnan certified davidw as Journeyer
  • rkrishnan certified etbe as Master
  • rkrishnan certified gary as Journeyer
  • rkrishnan certified zhaoway as Journeyer
  • rkrishnan certified gman as Journeyer
  • rkrishnan certified scjody as Journeyer
  • rkrishnan certified Archit as Journeyer
  • rkrishnan certified bratsche as Journeyer
  • rkrishnan certified amars as Journeyer
  • rkrishnan certified nixnut as Journeyer
  • rkrishnan certified Kay as Journeyer
  • rkrishnan certified ariya as Journeyer
  • rkrishnan certified cmiller as Journeyer
  • rkrishnan certified ianmacd as Journeyer
  • rkrishnan certified hacker as Master
  • rkrishnan certified Cardinal as Journeyer
  • rkrishnan certified hadess as Journeyer
  • rkrishnan certified RossBurton as Journeyer
  • rkrishnan certified jdub as Master
  • rkrishnan certified fejj as Master
  • rkrishnan certified arvind as Journeyer
  • rkrishnan certified dalinian as Journeyer
  • rkrishnan certified nullity as Journeyer
  • rkrishnan certified roshan as Journeyer
  • rkrishnan certified jamesh as Master
  • rkrishnan certified Chicago as Journeyer
  • rkrishnan certified TordJ as Master
  • rkrishnan certified jpick as Master
  • rkrishnan certified tromey as Master
  • rkrishnan certified Deepa as Journeyer
  • rkrishnan certified wardv as Journeyer
  • rkrishnan certified jaldhar as Journeyer

Others have certified rkrishnan as follows:

  • rkrishnan certified rkrishnan as Journeyer
  • fxn certified rkrishnan as Journeyer
  • greve certified rkrishnan as Journeyer
  • mathieu certified rkrishnan as Journeyer
  • sdodji certified rkrishnan as Journeyer
  • etbe certified rkrishnan as Journeyer
  • jLoki certified rkrishnan as Apprentice
  • nixnut certified rkrishnan as Journeyer
  • ariya certified rkrishnan as Journeyer
  • cmiller certified rkrishnan as Journeyer
  • dalinian certified rkrishnan as Journeyer
  • roshan certified rkrishnan as Journeyer
  • wardv certified rkrishnan as Journeyer
  • domi certified rkrishnan as Journeyer
  • derupe certified rkrishnan as Journeyer
  • nikole certified rkrishnan as Master
  • ahiliation certified rkrishnan as Journeyer
  • achitnis certified rkrishnan as Apprentice
  • dlc certified rkrishnan as Apprentice
  • ataridatacenter certified rkrishnan as Journeyer
  • dangermaus certified rkrishnan as Master
  • sye certified rkrishnan as Master

[ Certification disabled because you're not logged in. ]

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!

X
Share this page