Recent blog entries for shlomif

21 Aug 2008 »

Recent Hacktivity Summary

Well, I added more tests to Module-Starter, and while I was writing the tests, I discovered some bugs in it. So now there's a patch with the tests and the bug fixes and another one with only the bug fixes. Both of them are unapplied.

Having been trying to learn Ruby recently, I decided to write a Conway's Game of Life implementation for it. It took me most of one evening to get it working and then part of the other day to make it more idiomatic with the help of the people on Freenode. It felt good in a way.

Then I decided to finally see why my Test-Run failed many tests recently. As it turns out, this was due to broken TAP-Parser compatibility: the skip message in skip_all field now accepts only "SKIP " and not something like "skipping: ". Fixing the Test-Run tests fixed it and I released new versions.

I also noticed that many of the Test-Run-CmdLine plugin had the following pattern:

sub _init
{
    my $self = shift;
    $self->NEXT::_init(@_);
    $self->add_to_backend_plugins("AlternateInterpreters");
}

So I overloaded the construction function, only to add a plugin. I decided to fix this by doing an accumulation of such plugin specifiers in every plugin, and so got only:

sub private_backend_plugins
{
    my $self = shift;

    return [qw(AlternateInterpreters)];
}

Which is much cleaner and less intrusive.

Next on my plate was Freecell Solver. I decided to work on make_pysol_freecell_board.py which is a Python script that generates the initial boards of PySol. The script was crudely written to begin with and it became even cruder as time went by. I decided to give it a serious face-lift. So what I did was:

  • Convert the columns (of the card games) from strings to arrays. Each card was stored there individually.

  • Convert the cards to a class, instead of integers and strings. Create similar classes for managing columsn and boards.

  • Extract many functions and methods.

  • Create a class to manipulate the various game types, and forward the different logic based on it.

  • Pythonised the script by employing some Python paradigms.

You can find what I have so far in the repository. It's much better than what I started with two days ago. Writing such Python code now seems more fun than I recall it, and I actually enjoyed it.

In regards to SMOP, they convinced me to install Ruby-1.9.x under a prefix, which I did, but then it yelled at me for not having a Haskell cabal thingy. Turns out that the Pugs Makefile.PL installs it somewhere under the home-directory, which I didn't want to happen, because I want to keep it tidy. Again, this reminded me of Drivl.com recipe on how to make square corners, and I decided to give up on SMOP again.

And I should note that I was able resolve a long-standing problem I had with XML-LibXML/XML-LibXSLT on my Mandriva system, and now I simplified the XML-Grammar-Fortune build-system.

I also spent some time writing a backup system for some of the Israeli MediaWikis that I manage. This involved a bunch of Perl scripts.

So - Perl, Ruby and Python - all in a few days work. Cheers everybody.

Syndicated 2008-08-21 20:09:24 from shlomif

15 Aug 2008 »

קריאה ליחצנים לפעילות קוד פתוח בארץ

בארץ מתקיימים אירועים רבים של קוד פתוח (ראו רשימה של המועדונים). הבעייה כרגע היא שיש ערוצים רבים בהם צריך לפרסם וליחצ"ן את המידע: וואטסטפ, לין-מגזין, רשימות דיוור (לינוקס-IL, פרל/PHP/רובי/פייתון, האקרס-IL, של המועדונים) אתרי חדשות ובלוגים בארץ ובעולם, פייסבוק, טוויטר, פורומים וו'ביים (כולל נאנה/תפוז/וו'אללה ושאר פורומים זוועתיים), Digg/Reddit/StumbleUpon ומי עוד יודע מה.

אני חשבתי שכדאי לרכז את כל פעילות היחצון/פרסום על-ידי קבוצה אחת שתטפל בכל המועדונים ותשלח לכל ערוצי הפרסום. כך שאם אתם מעוניינים לתרום לקהילה בארץ ולדאוג שתהיה פעילות ערה של קוד-פתוח בארץ, ושאנשים רבים ידעו מקוד-פתוח, אז אנא צרו עימי קשר וביחד ננסה לארגן משהו. זה לא דורש השקעה רבה וגם לא ידע טכני רב. לי, אישית, נמאס לדאוג לכל בעצמי.

Syndicated 2008-08-15 16:30:40 from shlomif

15 Aug 2008 »

Song Recommendation: Gomenasai

It's been a while since there was a soft song that I really liked, but now my wait is over. Having discovered it on last.fm, I fell in love with t.A.T.u's Gomenasai (link to YouTube clip). Gomenasai means "I'm sorry" in Japanese. Wikipedia has more information on this single.

I hope you'll find it as enjoyable as much as I do.

Syndicated 2008-08-14 23:27:20 from shlomif

9 Aug 2008 »

Tip: Fixing rpm hangup as root on RPM-based Linux distributions

This is more of a memo-to-self than a tip, but it may prove useful to others.

When rpm (the package manager for Linux) as root gets stuck right at the start without doing anything, try the following:

  1. Kill all rpm-related processes.
  2. Move away /var/lib/rpm/__db.* to a temporary location.
  3. Run rpm --rebuilddb.

That's it! It already fixed my wedged RPM database twice, so I'm putting this advice here so I won't forget it.

Syndicated 2008-08-09 10:55:25 from shlomif

5 Aug 2008 »

Presenetation Sources, Interviews and updated Resources

In 2004, lkcl wrote an article on Advogato saying "Love is Golden: All Ideas Have and Always Will be". For a long time, I've been supplying the HTML material for my presentations under permissive, free-content licences, but did not supply the source code and markup used to generate them. Inspired by the article, I set to remedy it, and now there are links from the individual presentations to the source tarballs.

Note that some presentations were created using other tools, and so are not available with their source yet, but hopefully this will be remedied soon, too.

The two Interviews with open-source people were now converted to XML-Grammar-Screenplay and their source is available on the page.

The Software Contruction and Management Tools page was heavily updated.

New links have been added to the pages "Against Bad Software".

New film recommendations have been added to the movie recommendations. Moreover, two new book reviews have been added: about "The Pragmatic Programmer" and about "Extreme Programming Explained".

New links have been added to the links page.

New quotes have been added to the Fortune Cookie Collection. More information is in their web-feeds.

There were also internal improvements to the site's build system making the building of the DocBook/XML documents and other resources less error-prone and more powerful and customisable.

Syndicated 2008-08-05 13:28:12 from shlomif

3 Aug 2008 »

2008-08-03: Review of KDE 4.1 on Mandriva Cooker

Since KDE 4.1.x was recently released and was made available in Cooker, I decided to give it for a test drive. So I created a new UNIX account logged in to the console and ran startx. KDE 4 started, looking like I was used to, and I started making it behave like I was used to.

Here are a few problems I encountered, with solutions or workarounds, based on my memory and my IRC logs:

  1. I had problems putting an icon of Konsole, the KDE terminal emulator, on the panel. The problem was that the KDE "K" menu was configured in Mandriva to be the "Classic Menu", where the right mouse button does not work. After switching it to the Kickoff style, I could right-click the menu item to add it to the panel.

    I don't understand why the right-mouse button does not work in the classic menu, or why I cannot drag&drop menu items to the panel.

  2. Right-clicking on an applet or application launcher in the panel does not give one an option to move it. The only way to do it is by clicking the GNOME-logo-like icon at the right of the panel and entering into panel-editing mode. There is a "Move" option in the context menu of panel icons in KDE 3, so I wonder why it's absent.

  3. There doesn't seem to be a system tray by default in the panel, and after I added it its display of the akregator icon is a bit awkward.

  4. There aren't any tooltips for any of the icons in the panel, so it's hard to know what they are all about (One needs to click them to find out.)

  5. I had problems finding the equivalent of the KDE Control Centre (kcontrol) in KDE 4. Apparently it's called System Settings in the menus, and is invoked using "sysetemssettings".

  6. I had problems making sure the taskbar only displays windows from the current virtual desktop. Apparently, one has to click on the taskbar in a place where "there's no application" (i.e: in the space between applications) and then choose "Task Manager Settings", where the option is present.

    This option is not present in the KDE 4 "system settings" because it's relevant only to an individual taskbar, of which there can be many. Still, I would like to see a button on the left of a taskbar invoking a context menu.

  7. The "Expandable" property of the "Details view" of Konqueror does not get preserved across invocations of Konqueror, despite the fact that I pressed "Apply" and "OK". This seems like a bug.

  8. Finally, on Mandriva, KDE 4.1 does not make use of KDE 3's data, so KDE 4.1 applications like KMail, Akregator, etc. are useless to me.

Of course, KDE 4.1 still seems likable, and I enjoy using it. But I feel like they need to work on better usability. I am not a newbie - I'm actually a computer geek and an experienced software developer - and I felt like I could not make sense of some of the new UI there.

I'll try filing bugs in the KDE bug-tracker about it next, and see where it leads me. Hopefully these usability problems will be fixed in KDE 4.2.

Syndicated 2008-08-03 13:29:15 from shlomif

2 Aug 2008 »

Hacktivity Log: CMake and JavaScript XSLT

In an email to the fc-solve-discuss mailing list, I detailed recent work on Freecell Solver. I added an suite of automated tests, which in turn allowed me to perform the conversion of its build-and-configuration system from the GNU Autotools (Autoconf, Automake and Libtool a.k.a Autohell) to CMake. I ran into a few problems in the process of the conversion, but it took less than 2 days, which was probably much less than its Autoconfisication of Freecell Solver took, excluding the constant maintenance of its Autotools configuration and random breakages.

You can refer to the trunk for the present state of the CMake configuration and the conversion-to-cmake branch for the gradual CMakification process.

In any case, now the source archive is smaller, configuring it is faster, make runs faster, and I have a configuration GUI. In the process, I also added support for the Qt GUI to the Mandriva CMake. There are probably still some quirks in the config+build system, but all in all, I'm very happy.

I also ran into a problem that Firefox completely refused to display the https:// URLs of svn.berlios.de, without letting me add an exception. As it turned out, the certificates were probably changed, and I had to manually delete all *.berlios.de related certificates, and then add them with exceptions.

Next - yesterday I read about jdavidb's problem of finding differences in two versions of a Fedora RPM, which prompted me to find out about Fedora's packages' version control repository, which I did. Then I ran into a comment in that page about the Better-SCM comparison, which inspired me to do further work on it.

I decided to finally experiment with the Google implementation of XSLT in JavaScript in an attempt to customise the output of the XML in the client-side. I wanted to fetch the contents of the XML document and XSLT stylesheet from the server which involved doing AJAX using jQuery. It took me a long time to get right, because I didn't realise the jQuery $.get(...) callbacks were asynchronous and executed at their own time. I guess it's called "Asynchronous JavaScript And XML" (= AJAX) for a reason.

Then I got it running, but then ran into a Google JS XSLT limitation of "not implemented: key" (probably the XSLT "<xsl:key />" feature which I'm using). Still, I gained a useful experience working with AJAX, JavaScript and jQuery.

In regards to August Penguin - I don't have a lot to report, because I was too tired due to lack of sleep in the previous days and so left early, right after the opening sessions.

All that put aside, I should note that the Cooker version of Mandriva (which is its development/experimental version), which I'm using now is now relatively broken on this machine, and many applications get hang for noticable periods of time or even completely. Part of it may be due to the switch from KDE 3 to KDE 4.1.x, but maybe there's something wrong on this machine's configuration, which I cannot get to the bottom of.

Syndicated 2008-08-02 18:53:54 from shlomif

22 Jul 2008 »

"We, the Living Dead" additions, and "The Perfect IT Workplace"

New text has been added to the screenplay "Star Trek: We, the Living Dead":

[ There's a cat lying on a table there content. He's half-white and half-grey. ]

Katie: oh, look! A cat. [She approaches the cat and starts petting it.]

[ The cat purrs and then says: ]

George the Cat: oh, yeah!

Katie: [Startled] Bleh, you're a talking cat.

George: yes, but why did you stop?

Katie: I'm not used to cats talking to me.

George: ah, well, yes, it takes some pre-vampires time to get used to that here.

Katie: I suppose you're older than me.

George: most probably. I'm about 5 milliard years old.

Katie: bleh!! You're older than my planet!

Two of my newest aphorisms were added to the Aphorism collection:

Two female dogs talking about modern-life:

Jasmine: It's so cool! On the Internet, no one knows you're a dog!

Daisy: Yeah, but everyone can tell right away that you're a bitch!

The first revision of a new essay - "The Perfect IT Workplace" was published. It was released pre-maturely due to someone redditing the article, but may still be of interest:

The Best Tools that Money Can Buy

This cannot stressed enough. As Joel Spolsky notes (based on Steve McConnell) in item No. 9 of the Joel Test, you need to "use the best tools that money can buy".

If you buy old, broken and/or barely functioning hardware, you'll spend a lot of time debugging the problems there, which will waste a lot of precious time. And you may lose a lot of reputation and customers due to down-time. Relying on reliable, high-end hardware is a much better idea.

I've been to two workplaces that gave me an old computer with a 40 GB hard-disk. It wasn't enough at all. At one place, we've reached the limit of this hard-disk due to several large source code checkouts, and as a result needed a bigger hard-disk. And the only hard-disks the lab had were 80 GB ones, which were bought because they were the cheapest (per-disk, not per-capacity). Please, buy large enough hard-disks.

At the same workplace, I was given a computer with a read-only CD-ROM drive. It was not even a DVD reader. I brought a DVD of audio files from home, and could not read it. In this day and age, read/write DVD drives are the standard, and are ultra-cheap.

The interview with Adrian Ettlinger was converted into XML-Grammar-Screenplay in a true fashion of "Eating one's own dog food". The proto-HTML source will be placed online soon.

New links have been added to the Guide to Israeli Open-Source Resources.

New film recommendations have been added to the movie recommendations.

New quotes have been added to the Fortune Cookie Collection. Chronological updaets can now be found for them in their web-feeds.

Syndicated 2008-07-22 04:02:40 from shlomif

21 Jul 2008 »

Hardware Log: ATI HD 2600 Pro

Up until this Saturday, my Linux workstation had an old Nvidia GeForce 4 MX card, whose fan recently died. We decided to upgrade the card, and I told my father that an ATI card would be preferable over Nvidia, because AMD/ATI are more FOSS-friendly and released SPECs. So he bought an ATI HD 2600 Pro card. It's r600, but quite low-end (but still not as much as the GeForce 4.).

We delayed installing it, but this Saturday, after I had to reboot after the new kernel update, we got to it. The hardware replacement went surprisingly well, and then we booted the computer. Everything went well on startup, and we got the login prompt. Then startx worked right away, as my Mandriva Cooker installation detected the hardware change and set up all the drivers accordingly. Mandriva++ .

Not everything worked flawlessly. I had to edit the xorg.conf file to re-add the settings for the Xkb Hebrew keyboard, and to change the Bits Per Pixel from 16-bits to 24-bits. Then I was happy. I'm using the RadeonHD open-source drivers, which don't really do 3-D yet, but since there are SPECs for them, the situation is expected to improve.

I'm so glad I've now escaped from Hang-vidia-land, and have a card from a company that plays along with the open-source ideology. I hope to contribute further to the open-source drivers by reading the SPECs and writing code, and hopefully I would be able to understand what I need to do better than with Nouveau. In any case, since I'm not obsessed with "gamer" computer games and am not using the high-performance 3-D/2-D effects in much, I can survive just fine using the non-3-D enabled drivers. (Just as I used the "nv" driver before the upgrade.).

Syndicated 2008-07-21 13:26:36 from shlomif

17 Jul 2008 »

What Meital is Doing in the IDF

(in Hebrew, this time.)

בעברית הפעם - מה הפקאצה עושה באמת בצבא. שיחה ביני לבין שלומי ישראל:

שלומיף: אז מה אתה עושה בצבא? מיטל מאוד שומרת על סודיות לגבי מה שהיא עושה שם.

שיג'פ: אני עושה דברים בכל אופן... מצטער... אני כמו מיטל פה... בשאלות כאלה.

שלומיף: אה.

שיג'פ: רק שמיטל סתם משקרת. התפקיד שלה זה מש"קית ורוד. היא אחראית על הצבע הורוד בצבא.

שלומיף: הא. הא. לא משקית פקציות? אז איך המדים שלה אינם ורודים?

שיג'פ: לא, בשביל זה צריך להיות קצינה. היא תקבל דרגות ורודות.

Syndicated 2008-07-17 08:32:20 from shlomif

370 older entries...

New Advogato Features

FOAF updates: Trust rankings are now exported, making the data available to other users and websites. An external FOAF URI has been added, allowing users to link to an additional FOAF file.

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!