Older blog entries for shlomif (starting at number 347)

Unattainable Goals that are Still Worth Pursuing

One thought that occurred to me lately was the fact that there are some goals in life that can never be fully attained, but are nevertheless worth pursuing and getting nearer and nearer to them. Like an asymptotic function in mathematics if you may.

One example that I thought for it is the case of objectivity. Human beings are subjective by nature and so can never be completely objective. However, it doesn't mean that we shouldn't try to be as objective as possible, or completely give up on being objective. (And by being objective I don't mean having a neutral Point-of-View). Other people can disagree with me that objectivity is a virtue but it's besides the point.

Now a co-worker of mine is a Hasidic Jew, and when I told him that I'm an Objectivist, he said that one cannot be completely Objective. He then gave the fact that the Bible says that God brought the great drought because "Yetzer Lev ha'adam Ra' Mine'urav" (= the desire of the Human's heart is bad from his youth.), and later on decided not to do it again for a similar reason. He brought that as an indication that the Bible indicated that a man is not Objective by nature.

I thought about it for a moment and understood that the same can be said about honesty (or "righteousness" in a more religious language). We can never be completely honest and never lie or do the right thing everytime. But that doesn't mean we shouldn't constantly try to be as honest as possible, or worse succumb to complete dishonesty.

(I was told Immanuel Kant said something along the lines that if one wished, for example, to be sincere, he must not lie even if threatened by death. However, this is silly, because ethical and moral ideals are supposed to help you lead a happier life (as identified by Aristotle in the first book of "Nicomachean Ethics"), not to terminate them prematurely under someone who employs force or threat of force against you, when you otherwise did not do anything wrong.)

After I told it to my co-worker in an MSN Messenger conversation he agreed with me that I was right on both the honesty aspect and, in accordance with the principle, also the Objectivity one.

This concept can be applied to many other values or capabilities we desire. For example, one can always improve as a programmer, which is evident by the fact that most good programmers who take a look at their old code are unhappy with it. But it doesn't mean we shouldn't try to always improve as programmers.

Likewise, if a particular computing technology is large (e.g: Perl, Java, PHP, .NET) and also has possibly spanned a large number of halo technologies (e.g: CPAN, Apache Jakarta, etc.), then mastering the core language would be hard, and time consuming. In the Perl world we constantly say that "no one knows all of Perl, not even Larry Wall". But it doesn't mean you shouldn't do your best to master as much as you can out of it, or need to.

One example that I'm especially sensitive about is politics in a software project (possibly an open-source one ). Obviously, there can never be zero politics, but the project leaders and members should always try to reduce its amount, because not keeping it at bay is a recipe for disaster. I constantly hear about important features that are not implemented or even bugs that are left unfixed in open-source projects due to political reasons.

I can give Subversion and to a lesser extent the perl5-core development tools as good examples of projects with very little politics and a value-maximising attitude.

One can think of many other examples.

My point is that while it is true that we are humans and can never be perfect, we should always aim for perfection in some aspects. And given enough willingness and by learning from our mistakes, we can remain close to perfection in those respects all the time.

Syndicated 2008-04-28 07:46:54 from shlomif

Park, Hebrew drugs-related essay, and more

The documentation for the Park Lisp dialect has been added into the open-source section:

Why am I doing it? For several reasons:

  1. Because it's fun. This is by itself a good reason.
  2. Because I found that designing your own language is one of the best ways to learn more about the original languages it is based on. When I designed the Perl dialect "Rindolf", I learned that some features I suggested for it were already doable in Perl 5.

Added the Hebrew translation of the "Case for Drug Legalisation" essay:

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

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

The second revision of "Thoughts about the Best Introductory Language" is now available with many corrections and clarifications.

A Linux Kernel Patch to enhance the search dialog of the GUI configuration applet is now available there, as it has not been integrated into the mainline yet.

New fortune cookies have been added</a>.

Added a note to the linking policy about requesting to remove mis-appropriate links.

KFlickr and the Firefox Uppity extension were added to the favourite open software page.

A "Bookmark me" button was added to the bottom of the main text of all the pages to facilitate bookmarking using online bookmarking and news services. Below it there are now some more text ads, which shouldn't be too intrusive. Finally, a JavaScript script that adds self-referential links to headings with anchors was added, which makes use of the jQuery library.

Syndicated 2008-04-25 04:37:10 from shlomif

jQuery Tip: Adding Self-Links to Headings

On my homepage, I have many <h2>, <h3>, etc. tags with id attributes in them so one can link directly to the middle of the page. I have written a Website Meta Language API that allows one to generate a table of contents for the page based on them. However, recently I also looked for a way to have a link to their anchors somewhere close to them.

I eventually decided to try doing it using JavaScript and jQuery. It took me a bit of documentation lookup, trial and error and consulting people on IRC, but I ended up with:

<script type="text/javascript">
<!--
$("h1[id],h2[id],h3[id],h4[id],h5[id],h6[id]").each(
function(i){
$(this).append( ' <span class="selfl">[<a href="#' + 
this.id + '">link</a>]</span>' )
})
-->
</script>

Now for some explanations:

  1. The $("h1[id]...") construct selects all the headings with id's. There may be a shorter way to do it (comments are welcome).
  2. The each method iterates over all of them and calls the closure inside. The closure sets the "this" variable to the current element, and accepts its index there (the "i" variable). In our case, we're not making use of the index.
  3. $(this) constructs a jQuery object from "this".
  4. .append() appends an expression to the inner HTML of the element. I add a little HTML there. this.id may result in an XSS attack if you have a really funky (and probably invalid) ID, but since I have control over my ID's it's OK.

You can see the result, in the headings of the presentations' page (for example), as long as you don't have JavaScript turned off. jQuery seems very nice, and I'm looking forward to making even more use of it where appropriate.

Syndicated 2008-04-24 16:36:14 from shlomif

"Free" and "Freedom" in Hebrew (and English)

By inspiration from Passover, which celebrates the end of the Egyptian Jewish slavery, and by some inspiration from what David A. Wheeler wrote about the meanings of free in English, I present to you some non-professional philological study of the meanings of "Free" and "Freedom" in Hebrew and English.

First of all, there are two ways to say "freedom" in Hebrew: "Hhofesh" (חופש) and "Hherouth" (חרות). The double-h is my way of indicating a "Hheth", which is similar to the "kh" in "Khan" or the Spanish "j", but even more throaty when pronounced correctly.

Now, "Hhofesh" means Freedom, while "Hherouth" is even stronger, and means something closer to "liberty" in English, but probably not exactly the same. A free person (or a thing) is "Hhofshi" (in Singular Masculine form, other forms differ slightly), while I didn't hear the word "Herouthi" used often. Instead one can say that someone is a "Ben-Horin" (i.e: "son [or belongs to a people of] of free people."), which is probably the etymology for "Ben-Hur".

While "Herouth" is mostly limited to the liberty of a people or inidividuals, and is considered high language, "Hhofshi" is more disputed. It can naturally mean "libre" or free-from-oppression. But "Hhofesh" or "Hhufshah" also means vacation in Hebrew (like "Hahhofesh hagadol" (the big "Hhofseh") - which is the Hebrew name for the Summer vacation.) And so Hhofshi is sometimes applied to a person who is relieved of work, education or other responsibilities (such as that of a spouse), even though it is understood that it is not an exact meaning.

More recently, "Hhofshi" also started to be applied to "gratis", "costless" or "on-the-house" commodities similar to the "free-as-in-free-beer" distinction. For example, in Falafel stands, one often hears that the extras are "Hhufshi" meaning one can take as much as they want to put in his Pitah-bread. This may have been an influence from English, but as I noted, "Hhofesh" in Hebrew has not been restricted to mean freedom from oppression ("free-as-in-free-speech") either.

One doesn't often hear people using "Hhofshi" for "lacking" as in "Caffeine-free", although that may also have become a bit more common lately. "Caffeine-free" is "Netol-caffeine" ("נטול-קפאין") in Hebrew, and one can also say "lelo kaffeine" ("ללא קפאין" without Caffeine) or "She'eyn bo kaffeine" ("שאין בו קפאין" "which doesn't have Caffeine" more or else) in certain contexts.

And I'd also like to stress the fact that "free" in English even in its more "libre" meaning, can be used either for freedom-from-oppression or freedom-from-responsibilities. If you value liberalism, you should try to use it only in the freedom-from-oppression sense.

Happy Passover (a.k.a the Festival of Liberty in Hebrew) everyone!

Syndicated 2008-04-21 19:36:15 from shlomif

Boring Personal Update

First of all happy Passover everyone! This year I'm getting this Sunday off, but not the rest of week (though some of my co-workers have taken a leave of absence).

I've been a bit stressed lately, probably due to work issue, but I think I'm happier and more focused now, and feel better. I went to bike today and took my usual To-Park-Hayarkon-and-Back route. It was not too hot and not too cold, and I enjoyed my ride, although felt I kinda drifted away in my thoughts, and didn't pay a lot of attention to my surroundings.

For a tech update: I've continuted to work on my homesite, on Perl Begin and on other projects, such as the Rethinking-CPAN effort. I was also able to overcome some GNU Autohell problems in Website Meta Language, in order to get some pending patches applied there. This is a temporary solution until I finish working on the more robust CMake-based configuration system, which would take a lot of time. I wasn't able to upload the archive yet, due to connectivity problems and some Berlios.de bugs, but I hope to resolve them soon enough.

I have several ideas for essays or mini-essays I'd like to work on - mostly technical. And I accumulated a backlog of 415 (now 387) entries on my web feed aggregator.

In any case, I hope you all are doing well. I have a few blog entries in the queue, and if all goes well, I'll post them soon. Bye!

Syndicated 2008-04-18 19:21:30 from shlomif

Handling Repetitive Questions Once and for All

Back when I worked on Freecell Solver , I used to prepare binary distributions of the command line solver. Now it acted as a filter, and when invoked without arguments it just waited for standard input. As a result, when the Windows users double-clicked the fc-solve.exe executable, it just popped an empty console, which they couldn't understand what to do. And a lot of them sent me a "How do I use this" program email with the exact description.

Since I became annoyed of it, I decided to output the following to the standard error by default:

Reading the board from the standard input.
Type "fc-solve --help" for more usage information.
To cancel this message set the FREECELL_SOLVER_QUIET environment variable.

After the poor Winnies read it, it probably made them decide the program was not for them and to look for an alternative, but at least most of the emails I received about it stopped.

A year ago, Joel on Software published an article about having remarkable customer services, in which he said that one needs to fix everything two ways: first by helping the user, and then by making sure other users don't encounter and complain about the problem again by tweaking the behaviour. As one can see, what I did for Freecell Solver was essentially what Joel advised to do. (Albeit much later than I incorporated the fix.).

More recently, I started the Better SCM site, which compares and advocates several version control systems. However, git has been absent due to the fact a suitable maintainer did not come forward. And as a result, I received many emails asking "Where's git?". A few days ago I decided to add a Frequently Asked Questions (F.A.Q.) to the site where I answered this and other questions. However, today I received another email with "Git?" in the subject about that.

Another thing Joel had said is that "People Don't Read" or at least read very selectively. So I added a placeholder page about git with explanation why it is absent and a call for help, and added it to the comparison with the text "Unknown. Due to a lack of a maintainer for this system." with a link to the F.A.Q..

This should be enough to get rid of that particularly repetitive stream of emails, and hopefully will also yield me a contributor to add a better solution. Often designing web-sites and doing "customer service" (or feedback) requires designing the site properly based on the feedback one gets.

I didn't particularly think of what Joel said when I decided to do what I did with the F.A.Q. and the placeholders, but now that I think of it, I guess he was right.

Syndicated 2008-04-08 18:43:49 from shlomif

Eclipse Tip: Debugging Using a Remote GDB Session (gdbserver)

In this tip, I'll explain how to debug C/C++ programs in Eclipse using a remote GDB session (gdbserver). To do this:

  1. Install CDT - The Eclipse C/C++ Development Tooling.
  2. Set up a C/C++ project so it will build and compile.
  3. Install gdb and gdbserver. The latter does not seem to be available in any Mandriva package and had to be compiled from the gdb source, where it is built by default.
  4. Run gdbserver on the generated executable using a command like gdbserver localhost:10900 ./my-exe
  5. In Eclipse go to Run → "Open Run Dialog...", and go to the upper debugger tab and select gdbserver Debugger in the Debugger drop-down. Afterwards, go to the "Connection" tab under Debugger Options and configure your connection. For my demonstration I've chosen "Type: TCP" "Host: localhost" and "Port number: 10900".
  6. Select the Run → Debug in Eclipse option and start debugging the application.

The reason I needed it was that I wanted to use "remote" debugging so I can debug a C++ program that must be ran as root, and would rather not run Eclipse itself as root. I'm still not sure it can serve as a good debugger front-end, but I became very annoyed with ddd and plain gdb start to seem to be inadequate on visualising the rest of the source code. So I looked for an alternative and thought Eclipse might be OK.

Syndicated 2008-04-04 08:19:23 from shlomif

Vim Tip: Windows Management Commands

Windows are one of Vim's most convenient features, and learning some commands could prove to be useful. Some of the commands are available from the "Window" menu in gvim, or using the mouse, but using them from the keyboard is often more convenient.

To split a viewport in two, use Ctrl+W,S for a horizontal split or Ctrl+W,V for a vertical split. To move between windows use Ctrl+W followed by the arrow keys or h,j,k,l (but see this previous tip). To close a viewport use Ctrl+W,C.

Ctrl+W,r rotates the windows, and Ctrl+W, shift+R rotates them in the opposite direction. Finally, Ctrl+W,+ and Ctrl+W,- increase and decrease the height of the viewport by one line (in case you are mouse-deprived). If that's too little you can do something like 10,Ctrl+W,+ to increase the height by 10 lines.

Syndicated 2008-03-31 19:21:07 from shlomif

A Guide to Israeli FOSS Resources and Other Improvements

A guide to Israeli Free and Open Source Software Resources on the Internet was added to the site. Please let me know if you have any additions to it.

New fortune cookies have been added to the "shlomif", "shlomif-fav" and "joel-on-software" collections:

I have always wished that my computer would be as easy to use as my telephone. My wish has come true - I no longer know how to use my telephone.

Bjarne Stroustrup quoted in http://xrl.us/bgzi4

New affiliations have been added to my contact page.

The HTML markup of some of the pages was cleaned up, and several bandwidth optimisations were made, so it should load a little faster.

New links were added to many pages.

The breadcrumbs trails in several pages were fixed.

Syndicated 2008-03-29 10:23:36 from shlomif

Firefox Compatibility Rave: Pandas.co.il

Recently, I wanted to buy a USB Disk-on-a-key to replace my old 32 MB one. I went to Zap and compared the prices. The cheapest offer was from the Pandas.co.il shop, so I went to buy it there. The site appears to be written in PHP and I was able to fully operate it using the KDE Konqueror browser, and to complete the buying. I assume the Firefox browser will also work nicely there.

The 8 GB disk-on-a-key arrived a few days ago, and it works great. So I'd like to thank Pandas.co.il for making their site compatible with non-MSIE browsers, and I'll consider them for my future computer parts orders.

Syndicated 2008-03-28 15:23:10 from shlomif

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