Older blog entries for shlomif (starting at number 123)


Gabor contacted me yesterday about the File::FTS module. He said he assigned me as co-author and that I should upload a new version or reindex it. So I uploaded a new version (0.03) with some corrections. I see that it is not registered in CPAN in the main space.

The rest of the time I spent working on Quad-Pres: just more autoconfisication and automakization. It takes a lot of effort to get to a stage where a make dist and tar -xzvf and ./configure; make ; make install is fully working after every change I make.

Then I went to Haifa to hear Gilad's lecture.

Haifux Lecture

I travelled to Haifa by train and it took me quite a lot of time to get there. But when I got there, I still had a few hours left. I bought a fried chicken sandwich to eat, and then went to the Com-Net farm. I read some comics and tried to learn some more O'Caml, but faced the problem of the heating making the temperature there too hot. But then it was time to go to the lecture.

I met Muli's outside the hall, and we chatted a bit. He told me about the slab allocators in the Linux kernel. Then I went to hear the lecture. There were two surprises involved. One was that Gilad decided to give a lecture about dynamic linking instead of embedded Linux, and the other was that the lecture was given in English because there was someone in the audience who did not know Hebrew well.

In any case, the lecture was quite nice. I learned that the dynamic linker was fully implemented in userland and used a shared mmap call to make sure all libraries reside in the same physical memory space.

Since the lecture was finished at 19:40, I decided to travel back that day without staying to sleep in Haifa. So I took a cab to Hadar, and there a cab to Tel-Aviv, and was home at about 21:40.


I finished the Camel Book chapter about Tying variables. This morning I also read through the chapter about Unicode which is quite short.


I adopted the CPAN module File::FTS which was maintained by the late Ariel Brosh. I modified the code a bit and released version 0.02 of it. I had to register as a CPAN author for the process, and I'm not sure the module I uploaded is in the core CPAN modules yet. I'm in contact with Gabor about it.

I spent most of my hacking time today hacking on Quad-Pres, my Perl presentation tool. I started creating an Autoconf-based distribution for it. Automake gave some problems, in not allowing me to install a hierarchy of files. I went to rest, and when I got out of bed, I inspected how dia did it, and found out, it had a Makefile.am for every directory. So, I did that too, by writing a bash script to generate them automatically.

There's still a lot of work to be done, and it is hardly usable as it is.


I read part of the chapter about tying variables in the Camel Book today. I also read Linux Weekly News and their 2002 timeline. That's it, I think.


The weather was nice most of the day. At the early afternoon, I went for a walk and it was very nice. I played Simple Simon in PySol a lot today to relieve my mind of different (more serious ?) matters.

Tomorrow I'm planning to travel to Haifa and attend Gilad's lecture for the Haifa Linux Club.


The newer method using SGID for directories, and a 02775 mode worked beautifully so I switched Quad-Pres to using. Afterwards, I spent most of the day cleaning up Quad-Pres and adding some new functionality. I still did not got to implementing the global installation of the executable, Perl code, and the common base WML template yet, but it was still a lot of important work.

ladypine applied most of my changes to syscalltrack's home-site. I wrote a message to its mailing list with some other observations. I'll have to see what the other web-masters think about them.

At the evening, I added the ability to generate a raw list of the future lectures to the lectures manager. This required cleaning up the code a little, but I intended to do it anyway.


The sun came out at the late morning, so I went out for a walk (taking an advice from my mother). Michal was busy all day preparing a Linear Algebra assignment she got from school, and I helped her out a little.


Yesterday, I started the morning with giving some final touches to the lectures' management code, and adding an extra future lecture. Then I went on to handle the Syscalltrack homepage, converting everything to table based layout, and handling the various issues ladypine had with it. It took me sometime to understand where things went wrong, but I was finally able to.

Finally, I did some work on Quad-Pres. I encountered a Permissions conflict, where I wanted files to be created with a certain group, so they can be handled by both the user and the httpd-ran process. Two kind Linux-ILers answered to me how I can do that (with two different methods), and one method I tried worked so far. (using a chgrp-like system call). The other method seems even nicer, and I'll have to check if it works.


I finished the chapter about Objects in "Programming Perl". Then, I went on and finished the one about Operator Overloading. That's it, I think.


There was a strong wind and some raining yesterday, so I could not go out biking again. I stayed at home most of the time, either reading or working on the computer. At the evening, I watched "Whose Line is it Anyways?", "Just Shoot Me" and "Third Rock from the Sun", which are given on Friday nights.

19 Dec 2002 (updated 19 Dec 2002 at 19:35 UTC) »


I left's Graham function alone today... ;-) Instead I began with some work on Quad-Pres (my presentation tool) which involved some minor cleanups. After breakfast, I discovered it started to rain so I could not go out to bike today. Instead, I spent some time working on a lecture management system for the Haifa Linux Club Home-Site.

As of today, the situation is, that every lecture has to be placed and maintained in several pages. I wrote a Perl script and module that will render everything based on a set of tables that are updated at one place. Here's what sloccount has to say about it:

SLOC    Directory       SLOC-by-Language (Sorted)
1008    top_dir         perl=1008
0       CVS             (none)
0       dest            (none)

Totals grouped by language (dominant language first): perl: 1008 (100.00%)

Total Physical Source Lines of Code (SLOC) = 1,008 Development Effort Estimate, Person-Years (Person-Months) = 0.20 (2.42) (Basic COCOMO model, Person-Months = 2.4 * (KSLOC**1.05)) Schedule Estimate, Years (Months) = 0.29 (3.50) (Basic COCOMO model, Months = 2.5 * (person-months**0.38)) Estimated Average Number of Developers (Effort/Schedule) = 0.69 Total Estimated Cost to Develop = $ 27,244 (average salary = $56,286/year, overhead = 2.40). SLOCCount is Open Source Software/Free Software, licensed under the FSF GPL. Please credit this data as "generated using 'SLOCCount' by David A. Wheeler."

2.42 person-months of effort concentrated in a day...

Afterwards, I spent the late afternoon, vainly trying to re-design the Syscalltrack Homepage the way I want it while using only <div>'s and CSS 2 for layout. If I had been able to use table tags, I would have finished it in no time. After I visited the #html channel on EF-Net I found a site that accomplishes what I wanted to do, but was not able to fully duplicate its functionality. I'll try again later tomorrow, or simply fall back on tables.


I made some progress with "Programming Perl", reading part of the chapter about Objects. By reading it, I become familiar with a lot of new tricks and new Perl nuances.

Camel Book

I'm progressing nicely with it. I have just finished the chapter about modules, and am on page 308. By skipping to the history part, I found out it was Perl's birthday today by coinicidence. Happy Birthday, Perl!

Graham's Function Program

By profiling Perl using the Devel::DProf module, I found out that the multiple_squaring_factors function takes out %40 of the run-time. I tried to optimize it in several ways but they all proved to be worse than the original. Then I tried to code it in C, so I can give a lower bound to its CPU requirements. By using the Inline::C module I was able to write my first Perl extension:

SV * multiply_squaring_factors(SV * n_ref, SV * m_ref) {
    AV * ret, * n, * m;
    int n_idx = 0, m_idx = 0, n_elem, m_elem, n_len, m_len;
    SV * * n_elem_proto, * * m_elem_proto;

n = (AV *)SvRV(n_ref); m = (AV *)SvRV(m_ref);

ret = newAV();

n_len = av_len(n)+1; m_len = av_len(m)+1;

while((n_idx < n_len) && (m_idx < m_len)) { n_elem_proto = av_fetch(n, n_idx, 0); n_elem = SvIV(*n_elem_proto);

m_elem_proto = av_fetch(m, m_idx, 0); m_elem = SvIV(*m_elem_proto); if (n_elem == m_elem) { n_idx++; m_idx++; } else if (n_elem < m_elem) { av_push(ret, newSViv(n_elem)); n_idx++; } else { av_push(ret, newSViv(m_elem)); m_idx++; } } while (n_idx < n_len) { n_elem_proto = av_fetch(n, n_idx, 0); av_push(ret, newSViv(SvIV(*n_elem_proto))); n_idx++; } while (m_idx < m_len) { m_elem_proto = av_fetch(m, m_idx, 0); av_push(ret, newSViv(SvIV(*m_elem_proto))); m_idx++; } return newRV_noinc((SV *)ret); }

This required a lot of consulting from the perlguts man page and the Inline::C-Cookbook one. After I ran the script using it, I found out its CPU usage was reduced to %10, which means the Perl implementation slows it down a bit. Using a C extension is cheating, but I still wanted to identify some bottlenceks.

Aside from that I also implemented code to generate the sequence that compose the perfect squares. Then I decided to see if I can generate the linear base of n+1 based on that of n, but I realized that the base generated was lossy, and so it will not give good results.

I go into an awful lot of trouble for this limited task. I'm positively obsessed with it. I can't wait for Mark Jason Dominus to publish the official solution so my mind will be relieved of it.

Gimp Bug

I tried to hack on the CVS Gimp code to get gradient scriptability to work there. I looked at the gradients code a little, and sort of understood where it falls apart. Then, when playing with the gradient editor I discovered a bug which I reported to the GNOME Bugzilla. It turned out to be a bug in glib (!) and is now resolved.

17 Dec 2002 (updated 17 Dec 2002 at 15:03 UTC) »


I've been mostly obsessed with the program I wrote to solve the Perl 'Expert' Quiz of the Week #8. Since it was finalized, I added two optimizations and tweaked it a bit. You can see the results here and here.

Since I decided to learn O'Caml now, I also converted this code to O'Caml. It took a lot of time to get it to compile and then I had a bug or two to iron. Google pointed me to an entire thread about Memoizing in Caml. Now I should take a look at O'Caml object-oriented features.

I also finished all 100 boards of StoneAge, so I'll have another thing that won't distract me anymore. Aside from that, I now finished all the chapters of "Programming Perl" up to and including the one about regexps. I did not read too much of the other books.

I reviewed my WebMetaLanguage lecture today, and corrected some typos in one of the newer pages. I also checked out the GIMP 1.3.x from the CVS, compiled it and installed it. The fact that an older version was installed in its installation directory gave me some problems, but I after I deleted it and ran "make install" again, everything resolved itself. Hopefully, I will work on the Gradients logic a bit and get a functionality similar to my gradient-fu patch.

Lastly and very importantly, I implmemented the "{long_test_name}" notation for Freecell Solver's test order, and refactored the tests' order parser a bit. Now I still have the hard part of implementing the generic state ordering functionality.

14 Dec 2002 (updated 14 Dec 2002 at 13:45 UTC) »

Wow! It's been a long time since I last updated this diary - almost two weeks. OK - let's catch up with what I've been doing.


The architecture document is finalized, spell checked and available. I have some things in mind to do with it, but they are not critical. Other than that, I worked on implementing a more robust aliases to test indexes mapping for Freecell Solver, which is now present in the CVS.

I worked on some of my web-sites a bit and on the Solving lecture. I covered there all of CatB. In my homepage, I used a margin-left and margin-right styles for an image instead of padding-*. This made it look well in MSIE.

Other than that there isn't too much to show for. At the moment, I am very obsessed with solving the boards of StoneAge, an old DOS game I downloaded and play on my Win98 machine. I'm already at board No. 98 out of 100. Lately, I became obsessed with Mark Jason Dominus' Perl 'Expert' Quiz-of-the-Week #8, which is mind-boggling. I wrote a lot of Perl code to try to solve it, but all the methods I tried do not yield very good results.


On Monday there was a presentation about High Perfomance Computing using clusters as part of the Haifa Linux Club. The lecturer was a guest lecturer from IBM and the attendance was very high, some say because the lecturer was very advertised. The lecture was very nice, entertaining and informative, but ended up a bit late.

On Thursday there was an Israeli Perl Mongers meeting where Mark Veltzer talked about Object Oriented Perl. I took the Bus there, and had a long walk to the building in Ramat Gan where it took place. The lecture was very nice, albeit it did not renew too much to me. Afterwards, Mark gave me a lift to Derekh Namir where there was a suitable bus station. On the ride he told us about his CPAN module, which he named "Meta", which contains hundreds of classes and scripts for doing all sorts of miscellaneous tasks.

I downloaded and took a look and indeed it does contain a lot of this stuff. I don't know yet if any of it can prove useful to me.


I've been biking a lot lately, which is good. I could not find a job anywhere, but I think I'll restart studying in the Technion for the spring semester anyway.

I've been helping Michal with her Math and programming homework. I admit that I could not solve some of the exercises she presented to me right away. Maybe I'm getting rusty on this material.


After a long time, I was finally able to finish Bridget Jones 2 ("Bridget Jones - The Edge of Reason"). Now I started to read Emily of New Moon by L. M. Montogemory (of Anne of Green Gables fame). At the Perl meeting, I borrowed "Programming Perl" by Larry Wall et. al. and I began reading it. It's very amusing, quite interesting and I already learned or recalled a few things I did not know by reading it.

Other than that: I borrowed the book "The God of the Machine" by Isabel Paterson from Chen and Omer, but so far have not started to read it.

Update: Today, I came up with a relatively efficient solution to the expert quiz of the week #8. You can find it here.

Internet Bits and Pieces

The Technion's connectivity is fine now, but has been a bit sporadic lately. (sometimes it congests). What does not work is my CVS repository at BerliOS. It seems that I can't even login into the CVS server, even from shell.berlios.de. And the new CVS instructions on the project's page are lacking.

I joined a web-designers mailing list which I spotted on Google. So far, the traffic there has not been particularily high, and the SNR is quite high (lots of talk about HTML standards, CSS, etc.). I received one response (in private) to my question about how to make the navigation looks fine in MS Internet Exploder, so I'm going to switch to Windows and tinker with the CSS stylesheet. Then I'll have to switch back to Linux and fix it in the WMLized source, and upload it again. <sigh /> Maybe I should use VMWare or Cross-Over Office.


I download the source RPM of the new version of aspell, compiled and installed. Using its HTML/SGML mode I was able to spell check one of the chapters of the Architecture Document. I could not commit it into the CVS yet, due to the aformentioned BerliOS problems so I'm on hold now until it is fixed. The previous version of aspell gave me problems when ran in HTML mode, and Emacs's ispell-buffer mode started asking me to verify all the DocBook/XML tags, which made it quite useless. It's good to know Kevin Atkinson is hard at work on aspell.

I also managed to do a lot of the Solving lecture: covered Neo-Tech, and Homesteading the Noosphere and almost finished the Magic Cauldron. What's left is giving a section that explains how Solving integrates and expands on the two, and giving it some final touches, and adding sections if necessary.

I received a user account on a Co-Op server and am going to set up a globally accessible Subversion repository there. So far Berkeley DB-4.0 compiled without a problem. However, Apache 2.0.x requires the headers of OpenSSL to compile mod_ssl and it is not available there. I guess I'll have to wait for it to be installed.

./configure and the compilation of C modules is very fast on this machine, so it must be a pretty spiffy one. I remember timing the Freecell Solver scans ran so much faster on the Pentium 4 1.7 gHz at the Com-Net Lab than it did on my P3 667 MHz workstations. Working on my home P3 600 MHz is also pretty nice and fast, but greater speed still makes you a bit less frustrated.


It's Hanukah now, so I light up the candles every evening, and we eat latkes. The weather has become quite cold at night. The Technion was closed yesterday and today, so I'll have to postpone doing my arrangements on Tuesday.

I have to check the "Hever" students' personnel company for available temporary positions, register as a tutor for some of the courses I have taken (those that I received a suitable grade and feel confident enough about teaching to others), and talk with the supervising lecturer of "Intro to Software Systems" about breezing through the course. I basically know this course already, and would just like to get the extra points for it.

I got to bike twice yesterday. What I could not do was wash my hair, because we ran out of available shampoo and then there was a lack of hot water. I'm already three days late in washing my hair.

29 Nov 2002 (updated 29 Nov 2002 at 16:57 UTC) »

My Home-site and Internet Explorer - a war story

I just discovered MSIE 5.5 ignores the padding-left, padding-bottom etc. CSS styles and so the navigation bar on my homepage is indented to the right. What should I do to fix it while still keeping my homepage XHTML 1.0 Strict (or at least XHTML 1.0 Transitional)?

Please E-mail me if you know what to do. Meanwhile I'll start STFWing.

Responses to Some Friends

moshez: as opposed to you I'd like my program to be useful to many people. As many as possible if you may. That's the difference between Shrinkwrap and an internally-used program.. If you distribute a program as open-source but do not think about making it appeal to many users (I do not mean all users, but as many as you can), then it will never really take off. There are zillions of such programs that do something right, but only their author can truly understand how to use them. A real OSS fits the needs of many users, has a portable build process, a usable documentation, and a rich and growing feature-set.

Otherwise, it is just a project which happens to be distributed under an open-source license. Not something that can compete in the market-place. If you don't feel this way about free software you right, then I don't think you understand why it is important.

ladypine - it's good to see something new finally coming out of you, Muli and Orr. I usually only check your diaries regularly since I personally know you and care about you. I should note that I was almost unaware of the process with making an open-source NPO. Please put the discussion in a public forum that I will know of.

As for voting: I found that Internet-polls hardly ever work. The best way is for someone to set up a day and to accept the fact that some people won't be able to make it.

114 older entries...

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!