Tip on using CPAN

August 29, 2007

For as long as I have used Perl (which is not *that* long, mind you) I have had some difficulties installing modules from CPAN. I never really looked into it, but yesterday I did and found an easy way to make sure things work:

Install as root

Before, I was trying to install my modules in my home directory without using sudo. Things often failed because some modules needed to modify files in /usr. Using sudo for the entire process, from the configuration of CPAN to the installation of modules fixed all my issues.


Poor man’s password manager

August 28, 2007

As a web developer, I often need to connect to our clients’ FTP sites to upload updates. Because I care about security (a little at least), I don’t want to keep passwords in a plain text file. I could’ve probably used one of the many password manager programs out there, but as a vim geek, I decided to go with a more low-level way.

Vim has a command, :X which will prompt for a key and encrypt the file when it’s written. When you open the file in Vim again, Vim will prompt you for the encryption key. If you get it, you’ll see the text, if you don’t, it’s all garbage.

There are some security concerns: when you’ve opened the file, the swap file is in clear text, so someone with read access to your swap files could get your password.


Project Euler in Perl 6

August 26, 2007

I started doing some of Project Euler’s problem in Perl 6. The solutions are in pugs/examples/euler/. Some of them run quite slowly, so if you know how to speed things up, go for it!


The slow downfall of Emacs?

August 6, 2007

For many, many years, vi derivatives and emacsen were the top 2 *nix editors. They owned pretty much everything except the occasional pico user. Today, I read this article where a majority of users still prefer vi editors. This isn’t unexpected, vi and vim are *always* #1 in all editor polls. What really surprises me is that both GEdit and Kate are more popular than Emacs. Why is that? Not pretty enough? Too powerful for the simple needs of the new users that Ubuntu brought to the Linux world?


Erlang and Erlang manpages: not made for one another

August 3, 2007

I wanted to install erlang and the erlang man pages on my Edgy Eft machine at work to play around during lunch. I ran into a bit of a problem: the erlang-manpages package conflicts with all other erlang packages! So what, Erlang is a R^W language?

Package: erlang
Priority: optional
Section: universe/interpreters
Installed-Size: 68
Maintainer: Ubuntu MOTU Developers
Original-Maintainer: Erlang Packagers
Architecture: all
Version: 1:11.b.1-1
Depends: erlang-base (>= 1:11.b.1-1) | erlang-base-hipe (>= 1:11.b.1-1), erlang-base (< < 1:11.b.1-1.0) | erlang-base-hipe (<= 1:11.b.1-1), erlang-dev (< < 1:11.b.1-1.0), erlang-examples (= 1:11.b.1-1)
Suggests: erlang-manpages, erlang-doc-html
Conflicts: erlang-manpages (< < 1:11.b.1), erlang-doc-html (<< 1:11.b.1)

Filename: pool/universe/e/erlang/erlang_11.b.1-1_all.deb

Update: I was told on #erlang that this was fixed in Feisty Fawn.