Home

Two Productive Days

  • Jan. 5th, 2007 at 11:30 PM
EvilPHish evil fish shlomi fish

Yesterday at work, I tried to configure the soundcard again, this time using the Windows "Add New Hardware" wizard, and it still rebooted the machine. Then my supervisor came and told me I can just use Linux for what I need to do. So I did. So I was able to finally write some code. At the end of the work day it compiled. Yay! I'm going to test it next week.

I left work early in order to go to the Israeli Perl Mongers meeting. Since I arrived at home early, I did some work on my old "Graham's Function" Perl code. Then I went to the meeting.

The meeting was very nice. Shmuel Fomberg gave an interesting talk about Perl/Tk. It didn't renew too much to me, but it was still fun. Then Gabor Szabo gave a talk about Perl 6, which from what I understood was a port of his Perl 5 course to Perl 6. Several things there sparked a lot of discussion, especially the junctions. For example, it turns out that in Perl 6 "if ((3|4) == 3) { ... }" will execute the condition, but so will "if ((3|4) != 3) { ... }". That's because the "|" means "any", and so it tests whether any of the operands is equal to 3 or whether any of them is not. Another interesting feature is the chained conditionals: "if (3 < 7 == 7 < 10 > 8)" will evaluate to true in Perl 6.

I left the meeting prematurely along with my ride (Shmuel), so I may have missed some more interesting stuff. The slides are online, however. I spent the rest of the evening reading the 2006 Perl Advent Calendar, which while I took part in preparing, did not have a chance of fully reading until then.

The whole work week was sunny and bright, but the weekend was and is going to be stormy, so I cannot go out a lot. In any case, today I woke up relatively early (before 9 AM), and decided to perform many outstanding tasks on the computer. As it turned out, I performed quite a lot of them, and felt I was very productive. Among the things I did were:

  1. Schedule two upcoming Tel Aviv Linux Club lectures, after talking with the future presenters.
  2. Wrote 4 blog entries (in three different blogs) and decided against writing on one topic I kept in my todo list.
  3. Researched how to get QClam to connect to clamd instead of using clamscan, which is very resource intensive - just tell it to use clamdscan instead of clamscan. I also hacked on QClam a bit in the process.
  4. Added a new link to my "Stop Using Internet Explorer" page.
  5. Read the latest "People behind KDE" feature"
  6. Added some books to my Amazon.com wishlist.
  7. Reported two bugs in perl-5.8.x.
  8. Continued porting my Graham's Function program (see above) to Common Lisp. This time I also dabbled a bit with creating new Lisp classes and methods.
  9. Right now, I've started the upgrade process to upgrade my system to Mandriva 2007.1 Alpha.

So I think I can give myself a positive mental feedback for all this. Some days I feel like I'm not doing anything, but that was certainly not the case for these last two days.

Building GHC 6.6 on Mandriva

  • Nov. 3rd, 2006 at 6:24 PM
millie O&M David C. Simpson

I decided to try to build the latest Pugs (from the subversion trunk). The INSTALL file said: "Pugs needs the Glasgow Haskell Compiler (GHC), preferably version 6.6 or above.". OK, but Mandriva only has GHC 6.4. So I decided to make the world a bit better by preparing ghc-6.6 packages for Mandriva.

At first I installed the Mandriva ghc-6.4 source rpm, and then looked at the ghc 6.6 RPM Spec from the ghc homepage and adapted the Mandriva RPM accordingly. Then I started the building. It took a long time so I let it run overnight. In the morning when I woke up, I realised the RPM building was not successful. Apparently, the Mandriva RPM Spec building process also built the documentation and the makefile called haddock with an unknown flag. I realised I had to install the latest haddock version (0.8).

So I had to prepare an up-to-date haddock package. I started but then the build failed towards the end because the /usr/bin/haddock-0.8 binary was not installed. I guessed it was removed, and removed it from the RPM spec and built again. This time it was OK and I was able to install the binary RPM.

After haddock-0.8 was installed, I was able to install and build ghc-6.6. (After a few hours of compilation time). However, afterwards when I tried to compile pugs, but it compiled that it could not find the "mtl" library. I consulted people on the IRC about it and someone told me I should also build the src-extralibs package of ghc by unpacking it in the same directory.

I modified the RPM SPEC of ghc-6.6 to do exactly that, and rebuilt. I installed ghc-6.6 again, and again tried to compile pugs. It still complained about the "mtl library". Searcing for "mtl" in the ghc RPM build tree yielded the fact it was installed under the "ghc-6.6/ghc-6.6/" sub-directory there. As it turned out I used the rpm %setup macro in the wrong way: I used the -a 1 (which unpacks the source in 1 after cd'ing into the directory) instead of -b 1, which unpacks the source before cd'ing there.

Thus, I had to rebuild ghc after this correction. After a few more hours of compilation, the rpm was prepared, and I was able to install it. This time, I was able to compile pugs, and I even tested it and submitted a smoke test. This report to the Mandriva bug tracker is the result of my efforts and contains links to the RPMs I prepared.

I spent at least a day working on it, but a hacker got to do what a hacker got to do.

Latest Month

August 2008
S M T W T F S
     12
3456789
10111213141516
17181920212223
24252627282930
31      

Tags