17 March, 2010

sed oddities under OSX

instead of "sed -i 's/from/to/g' file" as before
use

sed -i "" -e 's/from/to/g' file

04 March, 2010

Crouching Python Hidden Matlab

Slowly creeping towards toward the inevitable public option - however as one user put it (on one of the innumerable online discussion boards, beating this topic to death) - Matlab is annoyingly powerful. And as another user rightly noted - the only way to really get a measure of how good one is versus the other is to try them both out.
There are many important considerations ranging from readability to universality, from availability of libraries and toolboxes to performance.
Concerning the latter aspect, it appears (I might be wrong) that most of speed comparisons are performed on Matlab that uses just in time acceleration (JIT) vs Python that uses something experimental or not at all. There seem to be several ongoing efforts to speed things up: Google is working or something called "Unladen Swallow" in hopes of accelerating most python codes five-fold. There is also Psyco, whom google searches related to python acceleration bring up most of the time. Some are skeptical that Psyco will work with NumPy. Then there is Cython (formerly known as Pyrex) which [seamlessly] fuses C++ with Pyhon, thereby drastically accelerating the slow bits. Not having tried any of these out I am leaning toward Cython. Of course there is also PyCuda, that brings GPU's powers into play and supposedly does wonders to otherwise sluggish codes (which however may be mostly pertinent to problems involving ginormous matrices).
For a summary of sorts scroll look here.

03 March, 2010

nice programs for OSX

  • Apparently you don't have to run the CPU-hogging Activity Monitor in order to keep an eye on system activity in OSX. I just installed istatMenu from iSlayer and iLove it. They have a couple of other goodies there. Comely and and free.

  • SweetFM - a prettier and much more functional alternative to the native Last.FM client. Most important qualities that set it apart from the rest - global shortcuts allow pausing/unpausing/skipping forward etc the songs, "loving" and "banning" them, without having to bring up the interface. And it's much less cumbersome than the native.