Older blog entries for shlomif (starting at number 126)

Dmoz

Cleanup is complete! The "CM :: Tools" category now has 4 pending links and they are all inside the CVS sub-category which I cannot edit. Now I can focus on other things, and just login into dmoz occasionally to see if new links were submitted.

Hacktivity

Yesterday I worked a little on Quad-Pres (turned exceptions into classes and wrote a TODO list). I also worked on getting a Freecell Solver command line preset into kpat and wrote two scripts to do that in the process. Then I discovered an incompatibility of the command line interface: it changed a char * argument, which I passed from a global constant. I changed its code in the KDE CVS and now it is working. In any case, I think it is a good idea I change the relevant places to const char *.

Reading

Since I last updated you, I read several Camel Book chapters. I'm now in the middle of Security. Besides that I also started reading the Namesys Future Vision paper which I've been referred to by several people. I admit that I did not fully understand it. And now I also read the latest Linux Weekly News edition, and several documents that were referred there.

Life

My bike broke when I drove it on Saturday. Apparently, the chair fell down and blocked the handle that enables to lower and upper it. When my father came home yesterday's evening he was finally able to fix it, and brought the chair to its right height. Now I can ride it again.

He did notice that I was out of air. The problem is that I don't think the current air pump I use is very good, and I have troubles using it.

dmoz Cleanup

Throughout the last couple of days, I settled out on cleaning the "Configuration Management : Tools" dmoz category. Now I'm left with 17 pending links. Man, this takes a lot of time, but I'm almost finished with it.

Syscalltrack's Homepage

I started a branch in the Syscalltrack CVS to implement some homepage cleanups. Here is a report I wrote on what I did.

Meanwhile, it was reported that MSIE displays the border of the navigation bar in white instead of black. This turned out to be a bug in the CSS stylesheet in which the text specified border-right : medium solid ; color : black; instead of border-right : medium solid black. I also fixed it in my branch.

KDE 3.1

While looking at the KDE archives, I found out that packages of KDE 3.1-RC5 for Mandrake 9.0 were prepared. I decided to install it. The installation went quite OK, and my new system is stable. Some bugs were eliminated from 3.0.x and some were added (as usual).

Strangely enough, I found old bug reports of the same bugs in the KDE bugs tracker, but then realized they were very old. So I reported them again.

kdegames from the CVS

Having KDE 3.1 installed made it possible to compile the HEAD branch of kdegames from the CVS. Took a bit to install, and the out-of-date makefiles (which I had to run automake with) gave me some trouble. Then the DocBook documents absolutely refused to compile, so I removed their directory from the SUBDIRS of the makefile. And naturally, it takes a long time for g++ to compile KDE code. At the end of the day, however, I had it built and installed.

This enabled me to work on kpat and integrate the changes I wanted their. I removed the limitation for game numbers only up to 32,000, and integrated the new Freecell Solver their. gcc was ran with a lot of extra flags (-ansi, -pedantic, -Wundef, etc.) and it spewed a lot of warnings and complained about many things. Eventually, however, I was able to resolve them.

Then, while trying to solve a game, I discovered a bug in Freecell Solver which forced me to release the 2.8.3 version of it. I fixed it in both CVS branches, and in the KDE integration, and now I'm back on track. What's left to do is to hard-code a nice command line preset into kpat, so it will have less unsolvable games reports.

Life

It was raining on and off the last couple of days. On Friday morning, there was a beautiful sunshine and I went to bike. Then it started raining in the afternoon. On Saturday it was also sunny, so I went to a walk in the morning and biked in the afternoon. Today seems sunny as well so far.

My sister Noa and Dad returned from their trip to England and the States. Noa had a surgery which was supposed to handle her over-perspiration problem. They brought a lot of toys, food, books and other stuff.

Michal (my other sister) meanwhile has homework to do. In her "Intro to Programming" class, she had to write an C function, that removes a specified character from a string. It can be done in O(n) time by keeping two pointers. Today, she worked on her Linear Algebra exercises and I also helped her a little.

26 Dec 2002 (updated 26 Dec 2002 at 07:25 UTC) »

Hacktivity

I am an Open Directory Project editor of the Configuration Management category. Yesterday I logged in, and started sorting the pending links. Many of them turned out to be off-topic or such that are already present. I accepted some of them in. Right now I'm left with 87 new links. (I started with 130 or so).

Other than that, I worked on Quad-Pres a bit. It is now in a state where it has a basic working functionality. I also came into an insight: I can release it in a form in which it does not have all the commands I want it to have - just a central installation and the old way of managing the source tree.

I messed a bit with VIPS and Nip which I spotted on Sweetcode. There's also something I did, which I forgot what it was by now. Oh well.

Reading

Still going on with the Camel book. Finished the chapter about IPC and am at the beginning of the one about threads.

Linux Meeting

Yesterday, I attended a meeting which was organized by several representatives of big Linux vendors and users in Israel. I was informed of the meeting by an E-mail message Moti Sadovsky, a Sun executive, which I decided to forward to the Linux-IL mailing list. Eventually, out of IGLU came Gilad Ben-Yossef, Shachar Shemesh, Doron Ofek and me.

The conference room was rather small, and there were quite a lot of people there and so it was settled that we will meet again at the Dan Panorama hotel sometimes around mid-January. We did settle that we did not want the forum to have a completely marketing orientation, albeit some marketing was also good. Other than that it was mentioned that a commercially-supported forum can do a great deal to advance Linux in Israel, and other stuff like that.

Hacktivity

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.

Reading

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

Hacktivity

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.

Reading

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.

Life

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.

Hacktivity

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.

Life

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.

Hacktivity

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.

Reading

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.

Life

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) »

Hacktivity

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.

Reading

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) »

Hacktivity

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.

117 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!