Thursday, May 24, 2012

apple in my eye

[UPDATE 2013-04-06]

I should have started this list ages ago.

Yes, you are so sleek, ouch you cost so much money, wow Facetime, but really, you can't copy an audio CD, or even a data CD for that matter, without jumping through hoops? Oh don't worry, apple's infinitely better by 50MMM in profits lossless format, which is only 50MB per song, so much smaller than the raw format, is what I should rip all of my music to so I can have like 6 songs on my, oh only works on Ipod or Ipad, Ihole. Point is, I have to go through 3 ridiculous steps to do something that should only take one step.

Number #1: Can't duplicate an audio CD.

P.S. It goes without saying that of course Ubuntu flavored Linux does this piece of cake - all I had to do was put it in my machine and Ubuntu asks, "Want to copy CD? Play it? Want a martini?" Why yes and all of the above, and yet you do this with zero profit? How so? I will love Linux til the day I die.

Brasero is the Linux app that does this, thanks to the thankless folks at GNOME.

P.P.S. Download Burn. It works. Now I'm lovin it.

Sunday, May 20, 2012

Precise pangolin updates

Something wicked was screwing up Ubuntu updates recently. Almost made me go back to apt. Just make sure you update your catalogue bwfore downloading and installing new udates. I know with apt this is a no-brainer, but I always assumed that update manager handled that automatically. First one update crashed on restart, the threw a bunch of errors. Then, updates would say there was a bad connection. Finally I had the sense to click check, and found more updates. That did the trick.

Saturday, May 19, 2012

spyderlib 2.1.9 on Python 2.7.3

[UPDATE 2013-06-15] This post is obsolete. Please see the spyderlib split, and download spyderlib-2.2. note on Ubuntu 13.04, spyderlib-2.1.13.1 is still available from software center.

Change isdir = os.path.isdir to a function, so it can be called with zero args.
def isdir
    return is.path.isdir(self)

msysgit bash for XP64

Ironically SysWoW64 is for x86 applications while system32 us for x64. You need to change the registry keys to use wscript from the windows/syswow64 folder.

Monday, May 7, 2012

virtualenvwrapper msys home

[UPDATED 2013-0207]

An indispensable piece of good Samaritan code is virtualenvwrapper by Doug Hellmann. It has some basic support for windows users using MSYS. In order to make it work though, you need to add an environmental variable to your ~/.bachrc file telling it where your MSYS files are located. If you're using msysgit, it's /c/Program\ Files/Git and user_scripts will append the "bin". And yes you will need mktemp, which you can acquire from MinGW* but you will need xz to unzip it and a compiler to build it. It is almost easier to download and install the mingw-get installer and then just add it to your mingw/msys folder by running the MinGW-MSYS bash and typing mingw-get install mktemp. Then I made a symbolic link, which in Windows looks like a copy, but is actually the same file, in my /home/bin folder which is always first in the bash $PATH.

*Since most MS Windows users have migrated to Win7 x64, I recommend using MSYS compiled by MinGW-w64 from their External binary packages (Win64 hosted) folder on SourceForge. You can simply unzip this either straight into your C:\ folder if you have admin rights, or the new and improved local virtual store which is at C:\Users\<username>\AppData\Local\VirtualStore\Program Files (x86) since MSYS is a 32-bit application. This will give you the POSIX environment and some of the MSYS GNU tools like mktemp, make and fmt, but you may need to copy over a few dll's too. The MSYS-dll is the same as msysgit's so, that's no issue. In particular make requires iconv and intl libraries.

Also you need a few other binaries to run the latest version of virtualenvwrapper. Namely make and fmt, make and the intl and iconv libraries as I said above.

Sunday, May 6, 2012

Update is checkout

I've got to find a git:hg conversion key.

Python flavored regex

Don't expect all flavors of regular expressions to be the same. For example, one difference between Java and Python, Java allows "unions" of character class by nesting.

    [0-4[6-8]]

is the same as

    [0-46-8]

but Python's re module will only interpret the latter.

There is an alternative module on pypi called regex that may replace re, which handles nested sets.

Fork me on GitHub