Older blog entries for shlomif (starting at number 657)

Tech Tip: Getting hgsubversion to Work with subversion-1.7.x

Apache Subversion version 1.7.x broke some backwards compatible and some stuff got broken, including hgsubversion, which provides a way to use subversion remotes with Mercurial.

In order to fix it, just install subvertpy, which provides alternative python bindings for subversion, which hgsubversion prefers by default, and with which it works fine under subversion-1.7.x.

I discovered all that after I attempted to fix it the hard way by installing subversion-1.6.x under /opt/svn-1.6.x, which required building an old version of SWIG, and then setting PATH, LD_LIBRARY_PATH, and PYTHONPATH and then having to remove the global python-svn bindings from under /usr/lib (as root!) because hgsubversion did not like them, a process which took me an entire evening and was frustrating and was ridden with a lot of trial and error, so I would not recommend it.

Hope it helps. Also see this hgsubversion bug report.

Syndicated 2012-03-09 19:04:46 from shlomif

Fifth Part of Perl for Perl Newbies and New Humour Items

Here are the recent updates for Shlomi Fish’s Homepage. I know I have not posted an update to this blog in a while, and in part it’s due to the fact that I have not done as much work on the site as I have before the previous update. But there is still some new things to look forward to.

There are some new items on the original aphorisms page:

Sophie: I’m hungry today.
Jack: well, wait until tomorrow - maybe this feeling will pass.

I’m now mirroring the “English is a Crazy Language” bit I found somewhere.

The fifth installment in the Perl for Perl Newbies series of presentations is now available online. This part covers good programming practices such as using a version control system, writing automated tests, and using accessors for objects. As with the previous parts, this talk is licensed under the Public Domain/CC-Zero.

There are new factoids in the factoids collection:

Larry Wall can make shit up, and the computer will understand what he means.

There are also many new UNIX-like fortune cookies:

  • buu: PKRUMINS
  • rindolf: pKrumins
  • pkrumins: BYY
  • rindolf: pkrumins: BUU
  • rindolf: pkrumins: buu is back.
  • pkrumins: rindolf: i know
  • rindolf: pkrumins: he said he was close to disappearing.
  • pkrumins: WHAT
  • pkrumins: buu, is that true
  • rindolf: pkrumins: he was sick.
  • pkrumins: HE WASNT
  • buu: =[
  • buu: I was
  • pkrumins: HOW
  • buu: Genetic defects!
  • pkrumins: OH NO
  • pkrumins: OH NO NO NO
  • mauke: substance abuuse
  • buu: Owch
  • buu: That joke almost qualifies as abuse
  • mauke: now that I've hurt mst and buu, my work for today is done
  • pkrumins: you still havent hurt me
  • rindolf: mauke: hold on! You haven't hurt me yet.
  • buu: haha
  • * rindolf is hurt that mauke didn't hurt him.
  • rindolf: Oh wait.
  • mauke: just as keikaku.
  • rindolf: mauke: OK, now your work for today is done.
  • pkrumins: NO

I have added a review of Kent Beck’s Test Driven Development: By Example to the recommended books page.

The ABC Path game's generator module is now being mentioned in the Games ABC Path page, and the solver and generator were also ported to JavaScript.

More prominent editors and IDEs were added to the editors and IDEs page.

And as usual, there are many additional links on various pages of the site.

Syndicated 2012-02-19 17:49:20 from shlomif

Vim Tips: scp URLs, "set tabpagemax" and fixing C indentation

Here are some Vim tips I ran into recently. First of all, when opening scp:// URLs, one should use two slashes after the hostname instead of 1, like scp://hostname//home/myuser/foo.txt instead of scp://hostname/home/myuser/foo.txt. I don’t know why that is the case, but it does not work properly without it. It also seems that netrw is buggy as it displays an irritating grey line on the cursor, the syntax highlighting tends to be off and saving a file displays several lines at the bottom.

Another tip is that gvim limits the number of tabs it opens when doing gvim -p [file1] [file2] [file3]. As a result, it is possible that not all files will be opened. If you want to change it you can set set tabpagemax in your .vimrc.

Finally, I noticed that Vim c-indentation tends to indent parameters to functions on subsequent lines using 8 spaces instead of 4 by default. I was able to change it to 4, which is my preference by adding set cinoptions+='(0,W4' to my .vimrc. There is plenty of other nifty stuff available in the cinoptions parameter.

Enjoy!

Syndicated 2012-02-18 16:24:14 from shlomif

git tip: adding remotes to .git/config

When working with the git version control system and editing .git/config to add a new remote, some people may be tempted to copy and change the origin remote that reads something like:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:shlomif/perl.git

However, note that origin also appears at the fetch = and needs to be changed there as well, or else all the branches will be placed in remotes/origin. Maybe there's a better way to add a new remote using the git config commands.

Otherwise, I should note that there doesn't seem to be a consensus among git users whether git pull --rebase is better than a simple git pull: the perl people told me to use --rebase and the Amarok people and someone on Freenode's ##programming told me not to use it. Now I'm just confused.

Syndicated 2012-01-22 16:33:04 from shlomif

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

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