Older blog entries for shlomif (starting at number 653)

Freecell Solver 3.10.0 was Released

Freecell Solver version 3.10.0 has been released. It is available in the form of a source tarball from the download page.

This release fixes two bugs - one with the --max-iters affecting only the last instance, and one with reading foundations with 0, and implements many small optimisations and cleanups. It also adds some experimental code with the so-called delta-states, where states are compactly encoded based on the original state. This functionality is not available in the main solver yet, but it powers the experimental on-disk-key/value-databases-based solver, which end up not scaling very well during testing.

Enjoy!

Syndicated 2012-01-15 19:46:00 from shlomif

Tel Aviv Perl Mongers Meeting on 28 December, 2011

(The Hebrew text will be followed by an English one).

שימו לב לשינוי במיקום! זהו הבניין שבו קיימנו את מפגשי שוחרי הפרל התל-אביביים בהתחלה, ולא זה ששימש עבור מספר פגישות לאחרונה.

ב-28 בדצמבר 2011 (יום רביעי) נערוך את מפגש הפרל החודשי שלנו, והפעם הוא יהיה מיוחד! אנו נפגשים ב-18:30 ומתחילים ב-19:00. כתובת: מכללת שנקר, בניין ראשי ברחוב אנה פרנק, רמת גן, חדר 300.

פרטים נוספים ניתן למצוא באתר של שוחרי הפרל של תל אביב.

במפגש זה יהיו ההרצאות הבאות:

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

  • צרור מודולים שהיה הגיוני לכתוב - סוויר אקס: אני הולך לסקור מספר מודולים לשימושי שכתבתי, מדוע הם נכתבו, ומתי הם שימושיים. בסוף תצטרכו לשפוט אם היה זה בכלל כדאי לכתוב אותם. יהיו גם קלפיות של הצבעה! (אנחנו נכסה את Algorithm::Diff::Callback, App::Genpass, Data::PowerSet::Hash ו-Module::Version.)

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

    לאור שיקול רציני זה, אנו הולכים, איש בתורו, לתקוע מקל אחד בשני, כשאנו חובשים כובעים מצחיקים, ולדון את הלא מאמינים והכופרים לגיהינום עד שידגלו בצד אחד: 5.6 או 5.14!

המפגש הוא חינמי וכולם מוזמנים. נתראה שם!

English Version

Please note the change of venue. This is the building where we started having TA.pm, and not the one which we used for some of the recent meetings.

On 28 December, 2011 (Wednesday), the Tel Aviv Perl Mongers will hold their monthly meetup, and this time it is going to be special. We meet at 18:30 and the talks begin at 19:00. The address is: Shenkar College, main building on Anna Frank street, Ramat Gan, Room 300.

One can find more details on the web-site of the Tel Aviv Perl mongers.

This meeting will hold the following talks:

  • Visualizing the brain of Vim by Ran Eilam - You loved him in "Game frameworks with SDL, Moose and Coro", you cried over his performance in the after-meeting get-togethers, and you will absolutely adore him in "Visualizing the brain of Vim". All-star legend Ran Eilam will talk to us (both beginners and experts) about Vim and how to fathom this incredible beast. I warn you, the first two lines in the audience will be damaged by Emacs flames.

  • A bunch of modules which made sense writing - by Sawyer X: I'm going to cover some utility modules I've written, why they were written and when they are useful. At the end, you'll have to judge whether they were worth writing at all. There will be voting booths available! (We'll cover Algorithm::Diff::Callback, App::Genpass, Data::PowerSet::Hash and Module::Version.)

  • To upgrade or not to upgrade, Perl 5.6 vs. Perl 5.14 - ik vs. Sawyer X: A source of great concern in the Perl users community is whether to use an up-to-date Perl and what version should be considered "too old". On one hand, we have the management that wants as little cost and changes as possible (sometimes along with systems administrators), and on the other hand, the developer who wants to use the latest technologies, and is often stuck on obsolete systems.

    In light of this serious consideration, we're going to take turns poking at each other with a stick, wearing funny hats, damning the unbelievers and heretics until they submit to one side: 5.6 or 5.14!

The entrance to the meeting is free-of-charge, and everyone are welcome to attend. See you there!

Syndicated 2011-12-24 16:52:40 from shlomif

Tech Tip: Removing Bash’s Command Completions

The normal way to remove a completion for a Bash command (say “mv”) is to do “complete -r mv”. However, with the bash-completion package installed on Mageia Linux Cauldron, this is not enough because it also adds a default completion for every invoked command. So in order to override this behaviour, type “complete -r -D” and then you can remove the commands’ completions permanently, using “complete -r mv” or whatever.

Syndicated 2011-12-13 10:44:54 from shlomif

Interesting Thought + Music Recommendation

I noticed that if I say to myself “Now I’m self-aware.” a few times and try to follow this advice, I acheive a certain state of self-awareness. Eventually, I get distracted, but while I do, it’s interesting. Try it, if you didn’t already.

And for the music recommendations: Green Sun music is an Israeli producer and composer who produces nice chill-out, new age electronic music. The first three albums are available for free download, and I also bought the mp3 version of his Dream Elements album, and can recommend it.

After I bought it, I mentioned Green Sun to my friend (on IM), and he said that his friend had a band and that they released audio files on their site and eventually got a record deal. I asked him for their site and he referred me to Machinae Supremacy. My friend thought I wouldn’t like them, but apparently I did - it’s a Metalish-music mixing many genres, with a rich sound, which I found likable (even if sometimes it’s a bit weird.). There are many free downloads there, but the site does not look properly with JavaScript disabled.

Syndicated 2011-11-24 10:41:26 from shlomif

Joke: The Believer Rabbi

This is a joke my father told us the other day:

A Rabbi lived in a remote shack, and the weather forecast said there will be a large flood. So two people arrived there in a Jeep and told the Rabbi: “Rabbi, there will be a flood, come with us so you'll be saved.” and the Rabbi said: “No, that's OK - God will save me.”.

And indeed it started to rain, and there was a lot of water, and so a boat arrived at the Rabbi's house and the people there told the Rabbi: “Rabbi, there's a flood, come with us and you'll be saved.” and the Rabbi told them: “No, that's OK - God will save me.” and he remained there.

And it continued to rain, and the water level went up and the Rabbi had to climb to the roof of his shack. A helicopter arrived at his shack, and the people inside told the Rabbi: “Rabbi, there's a big flood. Come with us to safety.”, and the Rabbi said: “No, that's OK - God will save me.”. And the Helicopter left.

The water levels rose even more, and the Rabbi drowned, and his soul went to heaven. There he confronted God and asked him: “Dear God, why didn't you save me?”, and God replied “Well, I tried. I sent you a Jeep, a boat - even a helicopter - but you wouldn't accept any of them. What more could I have done?”


The moral of this story is: God helps them that help God help them.

Syndicated 2011-11-06 18:53:41 from shlomif

Yom Kippur 2011 Summary

This Yom Kippur, I again went over my blogs from the last year. I mostly blogged in my technical blog about tips and events and stuff like that. I did not mention some of the significant good and bad things that happened to me on my blogs, but I guess I have a right for privacy and/or they were of no interest to the world at large.

The past year was good for me, but could have been better, and I drew some conclusions from looking back.

Syndicated 2011-10-10 15:39:56 from shlomif

New Computer

First of all, happy new Jewish Year.

My old Pentium 4 2.4 GHz computer (here's the blog entry where I blogged about getting it back in 22-September-2003) has served me mostly well for 8 years, but recently exhibited many signs of dying and had problems booting a lot of the partitions there. As a result, we bought a new computer to replace it: a Core i3 machine with 8 GB of RAM, a 2 TB hard-disk, and an Intel HD Graphics adapter. I've installed Mageia 1 on it and set it up, and it is now working mostly nicely.

I've ran into a few problems with it. From the 1280*1024 screen resolution not working (which required adding a mode line), to packets being dropped by the network interface (which I found a fix for on a Red Hat bug), to the fact that transparency is not working properly when running remote X apps (which is not resolved yet.), but as a general rule - I'm happy.

The new computer is much faster than the old one, which wasn't too slow running Linux either.

Syndicated 2011-09-29 08:23:24 from shlomif

Recommendation and Tip: The QUnit JavaScript Automated Tests Library

I've begun working on a JavaScript port of some algorithmic perl code, to allow it to run inside a browser. As a result, I had to find a good JavaScript automated tests library to allow me to write automated tests for the code. I first looked at Test.More and Test.Harness from JSAN (the JavaScript Archive Network) but as it turned out, JSAN was defunct, and no one had time to mark it as such. Then I asked the “Test.Run” developer (another thing I had found on jsan) to instruct me how to get it up and running, and he gave me a link to its archive, which was 1.5 mb compressed (!), and so was not acceptable.

I looked at the Wikipedia list of unit testing frameworks, but there were too many. at least I understood that jsUnit was no longer actively maintained. I looked at Jasmine, which is a bdd framework for JS, but its syntax seemed too horrid and unnatural.

Eventually, I decided to ask for recommendation on Stack Overflow and, as after I wrote my title, I found a a previous question, where there was a recommendation of QUnit, which I noticed was developed by the jQuery people, and as I'm fond of jQuery, I decided to look deeper into it.

I wasn't disappointed by QUnit - it does what it does well, and I was able to write my test suite using it, so I can recommend it as well. It has primitives that are very similar to perl's Test::More, and it can even assert that the number of assertions ran within a test are right (like Test::More can).

So here's a tip for it: if you're writing your testing code in a different file, and you wish to check that no compile-time or run-time exception was thrown (which will cause qunit to report a success with zero assertions) you should wrap the testing code in a try { .. } catch block and in the catch block, run ok(false...).

Here's an example from my code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
                    "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>ABCPath Test</title>
<script src="jquery-latest.js"></script>
<link rel="stylesheet" href="qunit.css" type="text/css" media="screen" />
<script type="text/javascript" src="qunit.js"></script>
<script type="text/javascript" src="joose.mini.js"></script>
<script type="text/javascript" src="abc-path.js"></script>
<script type="text/javascript" src="abc-path-test.js"></script>

  <script type="text/javascript">
      $(document).ready(function () { 
          try {
              test_abc_path();
          }
          catch (err) {
            module("Meta");
            test("global_failure", function() {
                ok (false, 'test_abc_path() has thrown an exception or is invalid.');
            });
          }
          // Hide passed tests by default.
          $('#qunit-tests').addClass('hidepass');
      });
  </script>
  
</head>
<body>
  <h1 id="qunit-header">QUnit example</h1>
 <h2 id="qunit-banner"></h2>
 <div id="qunit-testrunner-toolbar"></div>
 <h2 id="qunit-userAgent"></h2>
 <ol id="qunit-tests"></ol>
 <div id="qunit-fixture">test markup, will be hidden</div>
</body>
</html>

Enjoy.

Syndicated 2011-09-05 13:57:54 from shlomif

Tel Aviv Perl Mongers Meeting on 31 August, 2011

(The Hebrew text will be followed by an English one).

ב-31 באוגוסט 2011 (יום רביעי) נערוך את מפגש הפרל החודשי שלנו! אנו נפגשים ב-18:30 ומתחילים ב19:00. כתובת: מכללת שנקר, בניין מיטשל, רמת גן, חדר 2106. (שימו לב לשינוי בכתובת מפעמים קודמות.). במפגש זה נשמע הרצאות אודות מערכת ניהול הגרסאות git.

פרטים נוספים ניתן למצוא באתר של שוחרי הפרל של תל אביב

במפגש זה יהיו ההרצאות הבאות:

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

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

המפגש הוא חינמי וכולם מוזמנים. נתראה שם!

English Version

Please note the change of venue. We're moving to the next adjacent building to where we were. You can use the original entrance or use the listed address.

On 31 August, 2011 (Wednesday), the Tel Aviv Perl Mongers will hold their monthly meetup. We meet at 18:30 and start at 19:00. The address is: Shenkar College, Mitchel building, Yeda Am 8, Ramat Gan, Room 2106. The theme of this meeting will be the git version control system.

One can find more details in the web-site of the Tel Aviv Perl mongers.

This meeting will hold the following talks:

  • Git - Git is a decentralized code revision management system. It's becoming a valuable tool for developers (whether programmers, designers, or other) and is spreading like fire due to its useful nature, being used in the Linux Kernel development, many free software libraries and programs and many organizations alike. I intend to teach it to you. (Sawyer - 40 minutes).

  • Gitflow - Gitflow is a useful wrapper tool to allow you to set a more streamlined development process, taking into account features, releases, hot fixes and more. It's very useful when using multiple developers with an integrator, a QA, a dev team, and so on. I intend to showcase it as well! (Sawyer - 40 minutes.)

The entrance to the meeting is free-of-charge and everyone are welcome to attend. See you there!

Syndicated 2011-08-29 10:18:22 from shlomif

Recommendation and Tip: The QUnit JavaScript Automated Tests Library

I've begun working on a JavaScript port of some algorithmic Perl code, to allow it to run inside a browser. As a result, I had to find a good JavaScript automated tests library to allow me to write automated tests for the code. I first looked at Test.More and Test.Harness from JSAN (the JavaScript Archive Network) but as it turned out, JSAN was defunct, and no one had time to mark it as such. Then I asked the “Test.Run” developer (another thing I had found on JSAN) to instruct me how to get it up and running, and he gave me a link to its archive, which was 1.5 MB compressed (!), and so was not acceptable.

I looked at the wikipedia list of unit testing frameworks, but there were too many. At least I understood that JSUnit was no longer actively maintained. I looked at Jasmine, which is a BDD framework for JS, but its syntax seemed too horrid and unnatural.

Eventually, I decided to ask for recommendation on Stack Overflow and, as after I wrote my title, I found a a previous question, where there was a recommendation of QUnit, which I noticed was developed by the jQuery people, and as I'm fond of jQuery, I decided to look deeper into it.

I wasn't disappointed by QUnit - it does what it does well, and I was able to write my test suite using it, so I can recommend it as well. It has primitives that are very similar to Perl's Test::More, and it can even assert that the number of assertions ran within a test are right (like Test::More can).

So here's a tip for it: if you're writing your testing code in a different file, and you wish to check that no compile-time or run-time exception was thrown (which will cause QUnit to report a success with zero assertions) you should wrap the testing code in a try { .. } catch block and in the catch block, run ok(false...).

Here's an example from my code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
                    "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>ABCPath Test</title>
<script src="jquery-latest.js"></script>
<link rel="stylesheet" href="qunit.css" type="text/css" media="screen" />
<script type="text/javascript" src="qunit.js"></script>
<script type="text/javascript" src="joose.mini.js"></script>
<script type="text/javascript" src="abc-path.js"></script>
<script type="text/javascript" src="abc-path-test.js"></script>

  <script type="text/javascript">
      $(document).ready(function () { 
          try {
              test_abc_path();
          }
          catch (err) {
            module("Meta");
            test("global_failure", function() {
                ok (false, 'test_abc_path() has thrown an exception or is invalid.');
            });
          }
          // Hide passed tests by default.
          $('#qunit-tests').addClass('hidepass');
      });
  </script>
  
</head>
<body>
  <h1 id="qunit-header">QUnit example</h1>
 <h2 id="qunit-banner"></h2>
 <div id="qunit-testrunner-toolbar"></div>
 <h2 id="qunit-userAgent"></h2>
 <ol id="qunit-tests"></ol>
 <div id="qunit-fixture">test markup, will be hidden</div>
</body>
</html>

Enjoy.

Syndicated 2011-08-11 16:33:14 from shlomif

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