:) -> :( -> :|

14Dec08

I’m feeling a little disappointed.

I’ve been trying to write a script which requires extracting a gzip archive, using something like tarfile in the Python standard library but in Ruby instead. I first looked at zlib, but this was incapable of easily extracting a bunch of files to a directory. It seems to be more suited for compressing small amounts of data to be passed between servers… or so that’s what I’ve read about it. Its documentation is also fairly atrocious as well.

I then remembered Arson and went to have a look at how it solved the problem of gzip extraction. I found out that it used the Archive::Tar::Minitar library that is found in the Facets library. It seemed to do exactly what I wanted. However, I was not happy that the standard library could not do this already. Ruby and Python are constantly compared against each other and it would not serve Ruby well to be lacking in its standard libraries.

So I went about my happy way… until… until I found out that Minitar cannot extract symbolic links.

As per the common lingo, this was a major showstopper. This script absolutely requires that the extraction pick up any symbolic links. I googled for any information about this problem and found that someone had picked up a patch to support this two years ago.

This makes me sad. I want to like Ruby. I like how it is designed. It fits the way I think about problems. Python is good too, but there are things I do not fancy about it. Sometimes I find it confusing. My dislike of Python and fondness for Ruby are partly irrational, I realize, but I still would like to continue using Ruby. If someone was paying me to do this, I might be using something else, but I aim to have fun with programming. I come nowhere close to being a professional programmer; I just enjoy fiddling with code to see what it can do for me.

UPDATE: I’ve realised that simply using the tar command from Ruby through backticks is better for my purposes. Still, I wish there was a Ruby equivalent to tarfile.

Advertisements


One Response to “:) -> :( -> :|”

  1. Hello.

    Would you be willing to exchange links with me?

    You can send me an e-mail through my website if you wish.



%d bloggers like this: