Older blog entries for fallenlord (starting at number 64)

RVM and OSX's dynamic library loader

The usual way that users of RVM would fix dynamic library loading issues like this:

/Users/pfalcone/.rvm/gems/ruby-1.9.3-p125/gems/mysql2-0.3.11/lib/mysql2.rb:9:in `require': dlopen(/Users/pfalcone/.rvm/gems/ruby-1.9.3-p125/gems/mysql2-0.3.11/lib/mysql2/mysql2.bundle, 9): Library not loaded: libmysqlclient.18.dylib (LoadError)

is to fire up the install_name_tool utility to manually point the linker to use a specific version of the dynamic library to be loaded:

sudo install_name_tool -change libmysqlclient.18.dylib /usr/local/mysql/lib/libmysqlclient.18.dylib /Users/pfalcone/.rvm/gems/ruby-1.9.3-p125/gems/mysql2-0.3.11/lib/mysql2/mysql2.bundle

Doing this, however, becomes tedious over time, whenever one upgrades the Ruby versions, or use different gemsets for different projects. Also, the loader will fail if that specific version of the library gets upgraded (for example, libmysqlclient.18.dylib gets upgraded to libmysqlclient.20.dylib), necessitating the reuse of the install_name_tool utility all over again.

One solution to avoid doing this over and over again is to use the DYLD_FALLBACK_LIBRARY_PATH environment in Mac OSX inside the .rvmrc file:

if [ `uname` == 'Darwin' ]
rvm use ruby-1.9.3-p125

Unlike the use of DYLD_LIBRARY_PATH or the traditional LD_LIBRARY_PATH as found in most Unix implementations, DYLD_FALLBACK_LIBRARY_PATH does not override the default paths used by the dynamic loader to look for shared objects: instead, the loader attempts to find first the libraries it needs in the standard locations first (like /usr/lib and /usr/local/lib) before it attempts to check the fallback paths.

Syndicated 2012-03-29 04:31:00 (Updated 2012-03-29 04:31:45) from Paolo Alexis Falcone

7 Sep 2011 (updated 3 Mar 2012 at 03:10 UTC) »

Working with git and Subversion

One of the daily challenges I have in my job as the build configuration engineer in ITRS is to work with the existing Subversion repository. With the memories of surviving three years of pain, misery and suffering of merges with its precursor CVS and enduring equally horrific merges with Subversion in my former jobs, I simply cannot bear using Subversion again.

Enter git. Git for a very long time has been used as a Subversion client, often subversively in the early days. Thanks to the git-svn conduit, it has become very routine for many people to use git as a Subversion client while maintaining git's advantages when it comes to merges. Armed with this knowledge, I now have an incentive to level up my git prowess to keep the use of Subversion at bay. 

So far here's a listing of how I have been using git within a Subversion workflow.

Importing modules from Subversion

As git requires the entire history of the repository, you cannot use an existing working copy of Subversion modules that you have checked out using the Subversion client. You will need to perform a clone of the Subversion module into a local git repository as follows:
$ git svn init svn://svn.example.com/awesome_product/trunk
$ git svn fetch -r15110
This creates a git repository contained in the trunk directory that contains the said module/folder in Subversion by checking out from the remote repository at revision 15110, and assigns a unique git-svn-commit ID per commit in Subversion.
Here is a more-thorough, but slower to resolve one-liner that will clone the repository:
$ git svn clone svn://svn.example.com/awesome_product/trunk
Unfortunately, pulling modules from Subversion branches has also the same cost as pulling from any other branches (e.g. trunk) and that you will still need to do the cloning of the repository as prevously described.

Pulling the latest stuff from Subversion

As Subversion only allows a linear history (as opposed to git that can allows branched history tracking), pushing to the remote Subversion server requires pulling first the latest code present in Subversion then putting your changes on top of it. This you can do via the rebase operation, like this:
git svn rebase
NOTE: It is preferred that you perform the rebase operation on the master branch if you are performing all feature development in their distinct branches, like how normal git users would do.

Pushing code to the Subversion repository

Pushing your commits to the Subversion server can be done by issuing a dcommit:
git svn dcommit
This pushes all your commits in one pass: making a Subversion commit for each commit performed in git, and rewrites each commit in git to add a git-svn-commit ID.

Working with Subversion Branches

Oftentimes there'll be a need to merge your work from the trunk Subversion branch (which would usually be the master branch in your git repository) to another feature branch in Subversion (e.g. RELEASE-201109A) Git makes it easy to merge commits with the benefit of merge tracking and the ability to cherry-pick commits that you wish to port.
There is no need to to create a new checkout of the codebase: instead you'll need to fetch all the objects from the release branch. If you open up the .git/config file in your git repository, you may see something like this:
  [svn-remote "svn"]    
  url = svn+ssh://svn://svn.example.com/awesome_product/trunk
  fetch = :refs/remotes/git-svn
You will need to declare a new remote branch similar to your existing remote repository, but this time, referencing the release branch:
  [svn-remote "release201109A"]    
  url = svn+ssh://svn://svn.example.com/awesome_product/RELEASE-201109A
  fetch = :refs/remotes/git-svn-release201109A
To pull all objects from that remote branch from revisions 49110 to the latest, say 15110, for example, you can do:
$ git-svn fetch release201109A -r 49110:15110
If you will check the list of all local and remote branches (via git branch -a), you will see a new remote branch named git-svn-release201109A. To create a local branch that would contain the contents of the remote branch, you will have to check it out just like a remote git branch:
$ git checkout git-svn-release201109A
$ git checkout -b release201109A
Now we've got a new release201109A branch that can be used for git svn rebase and git svn dcommit just as your old master could (assuming you have enough privileges). From here, cherry-pick the patches you want to port from your master branch to your own copy of the feature branch, and if you have enough permissions, commit it to the Subversion repository via git svn dcommit.

Cherry-picking commits from one branch to another

Using the git-cherry-pick operation, you can port changes from one branch and port these to another branch. An example follows:
You were asked to merge commits that correspond to Bug 666 and port these to the branch release201109A which represents the Subversion branch RELEASE-201109A. Using git log, you found the following corresponding commits: 5e2a80cbb2d452d515a59d5ae7498df615a24d5f and 52ac80e1c627ae86ebd81581ce25a2e32a142241.
To proceed in merging these two commits from your git repository's master branch to the release201109A branch, just do the following:
$ git checkout release201109A
$ git cherry-pick 5e2a80cbb2d452d515a59d5ae7498df615a24d5f 52ac80e1c627ae86ebd81581ce25a2e32a142241
The git-cherry-pick operation merges those changes to the release201109A branch even if you're offline (which you can't do with Subversion). Then do a git svn dcommit after the merges are done.

Re-enable Subversion tracking

Normally what you or your team members will do is to clone from a git repository from someone else who has performed the initial checkout via git svn clone. Your git repository then wouldn't have the references to the Subversion repository as compared to guy who made the original checkout from the Subversion service. That also means that your git repository cannot push to the Subversion server, nor can query the state of the Subversion service like the source git repository.

In order to let your git repository work again with the origin Subversion repository, you will have to add tracking to the Subversion server:

[svn-remote "svn"]    
url = svn+ssh://svn://svn.example.com/awesome_product/trunk 
fetch = :refs/remotes/git-svn

Once done, you will then have to let git update the references mapping the existing objects in your git repository to the Subversion repository by issuing:

$ git update-ref refs/remotes/git-svn refs/remotes/origin/master
This command will take quite a few minutes to resolve but afterwards you can already perform the basic git svn  set of commands.

Syndicated 2011-09-07 18:57:00 (Updated 2012-03-03 02:50:38) from Paolo Alexis Falcone

Going Back to Manila

After 4 weeks of staying and enduring a cold summer here in London, I am finally leaving London in the next two days. It has been fun, eventful to a certain degree in imparting what I know to my UK-based colleagues. And from what I know I'd be back here a few weeks from now. 

Hoping that sunny weather will greet me when I get back to Manila this Sunday. This Saturday is going to be the longest Saturday of my lifetime (after enduring the longest Sunday in my life 4 weeks ago).

See you again soon, London!

Syndicated 2011-08-25 20:40:00 (Updated 2011-08-25 20:40:06) from Paolo Alexis Falcone

21 Aug 2011 (updated 25 Aug 2011 at 22:07 UTC) »

The long wait for a new Thinkpad is finally over.

It has been six years since I last had a Thinkpad mobile workstation. My previous blog post essentially was a pipe dream, considering the price range for these machines are in the USD $2000+ range and will never be approved by my wife. Not to mention that when I bought my T42p, the machine was already a year old, the T43p was the new hotness in the mobile workstation world, and it never got past the 1GB RAM that I bought it with (it can handle 2GB but I was never able to buy those DIMMs due to the prohibitive prices). 

All that changed though when I was asked by my employer what machine should they give for me. Initially I was offered a Thinkpad T520 with 8GB of RAM, a docking station, and a messenger bag. Knowing my role, I asked for something way cooler: the mid-level Thinkpad W520. The more surprising part though, is that my employer just said OK” and gave me a very powerful machine.

Specifications are as follows:
  • quad-core Intel Core i7-2630QM at 2.0GHz
  • 1600x900 screen resolution
  • Intel HD 3000 and Nvidia Quadro 1000M switchable graphics
  • 16 GB RAM, expandable to 32GB of RAM
  • 500GB 7200RPM SATA hard disk
  • onboard HSPA WWAN modem
  • 9 cell battery
  • 3 year warranty
Launching new virtual machines and compiling a lot of code all at the same time has never been this easy. Sure it has a UK English keyboard layout (which I am having a tough time adjusting to for the past three weeks) and runs on Windows 7 but it sure does the job great! 

Syndicated 2011-08-21 20:45:00 (Updated 2011-08-25 20:45:59) from Paolo Alexis Falcone

21 Aug 2011 (updated 7 Sep 2011 at 18:10 UTC) »

Observations on Sunday Liturgies in Three Rites

For the past three Sundays I have been visiting a couple of churches to experience for myself the different rites of the Catholic Church. Having been exposed to the new order of the Roman Rite for almost all my life being a Filipino, being in the United Kingdom offered me a unique opportunity to witness the diversity of expression of worship in the universal Church and yet express one doctrine.

First Taste of Eastern Liturgy: Maronite Qurbono

The first I attended was the Maronite Qurbono celebrated in the Our Lady of Lebanon Shrine. As this was the first Eastern rite that I attended ever in my life, I expected that the signum crucis would be reverse of what Roman Catholics do, and the form of liturgy would conform to the ancient form wherein everyone faces to the east, and clergy would sport beards (really). I didn't really expect that the Latinization of the Maronite rite has gone real deep that my expectations were the reverse of what truly happened: the sign of the cross is the same, the priest faced the congregation most of the time like the new order of the Roman Mass, the liturgy done in Arabic (though the canon is still done in Aramaic), people knelt during the consecration, and the priests were clean-shaven (except for a monk dressed in a black habit who wore a stole while distributing Communion).

Other than those, it was extensively a sung liturgy that has parallels with the order of the Roman Mass, with the priest and congregation chanting in Aramaic, though the creed and the Pater Noster were recited instead of sung. Despite the total absence of Arabic in my vocabulary, and my Aramaic being as good as rust, I've been able to recognize a lot of the words: Abba (father), Qurbono (sacred offering), Qadisha (holy). Another distinct feature would probably be the kiss of peace after the reception of gifts, and how after the kiss of peace was passed by clasping both hands as in prayer from the priest to the rest of the congregation. There was emphasis on the sacrificial nature of the Qurbono: from the repeated appeals of divine mercy, intercession and usage of Kyrie Eleison, frequent mentions of the word Qurbono and Qadisha, to the total lack of applause and surprisingly solemn behavior of the congregation. 

Familiar yet not so familiar: Tridentine Mass

The following Sunday, I attended a Roman Mass in the extraordinary form in St. James Cathedral, as that Sunday was the Solemnity of the Assumption of Mary. As this was a low Mass, Latin was the liturgical language, no chanting occurred, and silence ruled throughout the entire course of the liturgy. I can clearly tell I am the odd man as I am used to standing during the Pater Noster, and recite the suscipiat response after the priest's Oratre fratres, while everyone else were eerily silent and kneeling. Seems that the tradition in the UK for low Mass is silence contrasting to a dialogue form as practiced in Manila.

This made me reflect a lot on the state of the traditional Mass - I now actually think that I'm already very lucky that I can attend missa cantata every Sunday, as such is very rare in the United Kingdom. The Latin Mass Society is clearly very active in the UK though, and has subscribed a handful of places across the country that regularly celebrate the old form. Contrast this to the treatment the traditional Latin Mass movement has in the Philippines, wherein bishops actually suppress its expression... I am already blessed I am still able to attend regularly in my lifetime, much more just having it within 5 miles from my house.

So what they were saying about the Byzantine Divine Liturgy was true...

Lastly, I attended the Divine Liturgy of the Ukrainian Catholic Church held at the Cathedral of the Holy Family in Exile. Here, my initial assumptions on what happens in the Byzantine Rite were valid (to an extent): the signum crucis is the reverse, the priest and the congregation faced east, though I could say that I didn't expect the kneeling during the consecration and clean-shaven priests. Like the Maronite liturgy, the congregation sang all throughout; and like the traditional Roman liturgy, I never heard the canon spoken loudly like the new Roman Mass.

The liturgy, for the lack of a better term, was incredibly beautiful. The polyphony the priest, deacon and the entire congregation made (while I didn't understand one bit due to my lack of comprehension of Ukrainian, ) for the entire duration of the liturgy, is what I can say superior to the Roman Rite's Gregorian Chant. The iconostasis, the altar, icons, the vessels and vestments used by the clergy, combined with the use of incense, solemn behavior, high language and very good singing, gives the sensation of being able to see, smell, hear and touch a foretaste of things to come. And all these realizations from a guy who wasn't able to understand a single word of what was going on - that is a testament to the beauty of what transpired for just one hour. It just boggles me why there are no Easter Catholic Churches in the Philippines that offer the Divine Liturgy: instead there are Roman Masses that nearly approximate a Protestant song, dance, and preach number. I would gladly attend this liturgy if it were only an option in Manila.


In retrospect, the Divine Liturgy is supposed to be the highest form of worship accorded by a creature to the Creator. As such, this has to edify and uplift towards a higher plane, rather than be downward trodden and upbeat to the world.  The extraordinary form of the Roman Mass, the Byzantine Divine Liturgy, and the Maronite Qurbono as properly done satisfies the edification that the liturgy should do. Having experienced some of the Eastern Rite liturgies opened my eyes on the need to do the reform of the reform. Honestly, these traditions (the use of sacred language, good polyphony, silence in the canon, the solemn kiss of peace) are really lacking in practice in the current Roman Mass as practiced in many parts of the world, and a return to these traditions will make celebration of the liturgy more profound and spiritually enriching. 

Syndicated 2011-08-21 17:03:00 (Updated 2011-09-07 17:47:51) from Living Core Dumps

20 Aug 2011 (updated 25 Aug 2011 at 22:07 UTC) »

Upgrading RVM'd Ruby on OSX Lion

I found out the hard way that upgrading my RVM-managed Ruby 1.9.2 install to the latest patch level upstream isn't as straightforward if you had that Ruby version installed prior to an upgrade to OSX Lion. Given that OSX Lion is fully 64-bit, all libraries will have to be recompiled to 64-bit: a fact that bit me hard as all those libraries that I have installed via MacPorts and Homebrew will have to be recompiled before I can even dare upgrade Ruby.

What I did is a bit drastic, but worked for me. Any suggestions to do this better will be most welcome:

  1. Upgrade to the latest MacPorts (2.0.1 as of this writing) that is compatible with OSX Lion.
  2. Upgrade the following libraries in MacPorts or Homebrew: libiconv, libxml2, libxslt, readline, openssl, zlib. You may have to uninstall these libraries first if the compile bails out due to linkage errors between 32-bit and 64-bit libraries.
  3. Install the latest Ruby via RVM, e.g. rvm install 1.9.2-p290 --with-readline-dir=/opt/local --with-openssl-dir=/opt/local --with-iconv-dir=/opt/local --with-zlib-dir=/opt/local.

This should produce a working Ruby interpreter. Any gems previously installed though will also have to be recompiled if these are relying on a C/C++ library (e.g. Nokogiri, etc).

Syndicated 2011-08-20 21:46:00 (Updated 2011-08-25 20:47:14) from Living Core Dumps

20 Aug 2011 (updated 25 Aug 2011 at 22:07 UTC) »

Blogging Again!

Hello blog, we meet again...

After a long hiatus (and having to export my blogs out of the defunct Friendster blogs), I am back to using blogs to record and dump whatever's on my mind. Hence the aptly-named "Living Core Dumps" title of my blog.

A quick round of about:me so far would be as follows:

  1. I now work at ITRS Group PLC as the build configuration engineer. Now exercising all the chops I have learned over the years (*nix, C++, Java, Ruby, BDD, automation... bring it on!)
  2. I have served as Software Architect at Friendster for roughly 8 months before joining ITRS. It's not anymore a generic social networking site but now a growing social gaming site!
  3. I am on my last week (hopefully!) here in London. Everything is just expensive here.
Hopefully this time I'd keep up on blogging. It's just a shame that I've lost so many good ideas just because I never get to write them down before my memory leaks, that I'm just not going to let that happen anymore.

Syndicated 2011-08-20 19:36:00 (Updated 2011-08-25 20:44:16) from Living Core Dumps

20 Aug 2011 (updated 21 Aug 2011 at 21:08 UTC) »

O come, O come Emmanuel

The song "O Come, Oh Come Emmanuel" is a convenient summary of Isaiah's prophecies about the Messiah: divine Wisdom (Sapientia), the Lord (Adonai), the stump of Jesse's family (Radix Jesse), the key of David's kingdom (Clavis David), the rising sun (Oriens), the king of the Gentiles (Rex Gentium), and the presence of God (Emmanuel). Spelled backwards, the first letter of each titular prophecy connotes doubly the upcoming celebration of Christmas, as well as the eventuality of the final Judgment (ERO CRAS, meaning Tomorrow I will come).

The song was originally composed in French sometime in the 12th century, with the Latin lyrics done sometime in the 18th century.

Veni, veni, Emmanuel
captivum solve Israel,
qui gemit in exsilio,
privatus Dei Filio.

Gaude! Gaude! Emmanuel,
nascetur pro te Israel!

Veni, O Sapientia,
quae hic disponis omnia,
veni, viam prudentiae
ut doceas et gloriae.

Veni, veni, Adonai,
qui populo in Sinai
legem dedisti vertice
in maiestate gloriae.

Veni, O Iesse virgula,
ex hostis tuos ungula,
de spectu tuos tartari
educ et antro barathri.

Veni, Clavis Davidica,
regna reclude caelica,
fac iter tutum superum,
et claude vias inferum.

Veni, veni O Oriens,
solare nos adveniens,
noctis depelle nebulas,
dirasque mortis tenebras.

Veni, veni, Rex Gentium,
veni, Redemptor omnium,
ut salvas tuos famulos
peccati sibi conscios.

Syndicated 2009-12-24 00:37:00 (Updated 2011-08-20 17:30:59) from Living Core Dumps

20 Aug 2011 (updated 21 Aug 2011 at 21:08 UTC) »

Christmas and the Last Judgment

Two thousand years ago, a supposed madman from the wilderness preached about the coming of the terrible judge. He wore camel cloth with a leather belt on his waste, ate locusts and wild honey, and kept saying that all men must prepare for the coming of the judge, that they make the crooked roads straight, filling up voids in vallies, and level hills and mounts.

For the past two thousand years the Church has repeated this uncomfortable teaching, especially during the weeks before Christmas. That all stay sober and be ready for the Judgment. In fact, the traditional readings of Advent reflect this alignment towards preparing men for the End of Age rather than the merry commemoration of the birth of the Christ. The scriptural readings even call for fasting, for keeping sober, for making amends for sins rather than wine, partying, and shopping for gifts and decors - an absolute rejection of what the world holds as the "meaning of the season".

In the rejection of the uncomfortable message, the supposed madman, John the Baptist, was beheaded and had his head served on a silver platter. Alas, two thousand years after, the world's answer to the voice howling in the wilderness is still utter rejection. The world refuses to accept the same message, and as such, many elect to drunken stupor, binge eating, and even secularizing the season in order to rub out any references to the coming of the Judge. This same world jeers at the Church and those who heed her - calling them outmoded and medieval.

Come to think about it, Christmas is a one-time event in history that will never happen again. The feast of Christmas is what it is - a commemoration of the coming of Jesus as a historical event. Thus the Church elects instead to prepare humankind for the return of Christ at the end of history and time. It is no accident that Christmas is celebrated at the end of the secular year - wherein people assess and make judgment to the year that has passed. More than just a reclaiming of an old pagan practice and Christianizing it, Christmas is a prefiguration that Christ will come again to judge the living and the dead. We in turn even profess this uncomfortable truth everytime we recite the Creed.

This coming Christmas, are we heeding to the uncomfortable message? Or do we elect the wisdom and judgment of the world?

Syndicated 2009-12-20 20:34:00 (Updated 2011-08-20 17:30:59) from Living Core Dumps

20 Aug 2011 (updated 21 Aug 2011 at 21:08 UTC) »

Dealing with Insomnia

Welcome to day 4 of unwanted, uncontrolled sleep deprivation via insomnia.

While I can, in theory, do more work, or do more stuff (like learning new programming languages, techniques and patterns, or read news and novels, or just bum around), I am aware that prolonged cases of these sleepless episodes will take a toll on my health. Getting myself tired doesn't make me any more sleepier - and getting less than 5 hours of sleep is sure to make my thinking brain go fried at work later.

Any suggestions how do I get my regular sleep pattern back?

Syndicated 2009-10-07 02:21:00 (Updated 2011-08-20 17:30:59) from Living Core Dumps

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