/images/bio-photo-small.jpg

Shallow and Pedantic

A person/tech/code blog of a coder/techie/person. Like calculus in a kiddie pool, the author of this blog is known to be quite shallow and pedantic.

On Threading vs. Processing

Writing multi-threaded applications in Python is often a headache because of the Global Interpreter Lock - only one Python thread can run at any given moment, which makes multi-threading useful only in the case where all modules but one actually run C code. However, thanks to the impressive new Python Magazine, I’ve stumbled across a package called processing, paraphrasing python’s built-in threading package. Essentially, the package provides an API identical to Python’s threading, but uses processes and pipes (or other mechanisms on non-posix operating systems) instead. What the magazine does not cover is the fact that this can also benefit GUI applications; updating a progressbar in the application doesn’t need to slow down heavy computations being done in a separate thread. To show how easy the integration is, take the following example which shows usage of either threads or processes at the user’s choice:

Tough Question

My girlfriend just asked me what just might be the hardest question I’ve heard all semester; What do I like better, The Simpsons or beer?

Really liking this git thing

I’ve been a very big proponent of Subversion so far, especially as a tool for collaborating on coding homework. However, I’ve recently been trying out Linus’s git. It’s very nice so far, and really seems to be catching on. Some good points:

  • Fast as all hell (much faster than Bazaar, although I haven’t given that the proper attention)
  • No need for a central server; hell, no need for an internet connection at all, everything can be done over USB keys or whatnot
  • No real need to configure any special server; just install git on it
  • Very nice alternative to configuring write-control for all of the users
  • Very easy branching and merging, finally! SVN really shows its weakness here

One thing I couldn’t find out how to do is limiting read-access to git repositories without special server configuration. It would be nice if git had support for .htpasswd-compatible authentication, those are pretty easy to use.

Two reasons Apple suck

First of all, new iPods won’t work on Linux. Now, while it’s very obvious that the idea is to block competition against other music vendors, that makes it even less legitimate. Good thing we’re starting to see some very nice cheap players out there - I’ve been rather impressed with the Meizu M6 MiniPlayer.

Secondly, they didn’t think of this: Indexed search within the “Open” dialog. It’s in Ubuntu Gutsy, and really makes desktop search (implemented with Tracker in gutsy) worthwhile. Especially when attaching files in GMail :)

NaNuchKa

Despite having a critical midterm Sunday, as well as being sick, I could not, and should not have, give up on the NaNuchKa show. Some of the best music I’ve ever heard, no doubt, and with the unexpectedly intimate setting, I had the opportunity to get to know the truly incredible Yula after the show. They’re playing in Tel-Aviv today, at the Koltura, where I was supposed to… Fantastic music, at any rate. Keep your ears open!