December 21, 2009
Today I stumpled upon this excellent presentation by David Beazley about Python’s global interpreter lock (GIL).
I knew about this lock already, and I knew that it prevents parallel execution of threads in Python. What I didn’t know is that performance actually suffers on multicore systems!
Of course there’s a logical explanation for this, and David took the time to dig into the code and find out what is going on. And he does a great job of explaining it to the rest of us.
Highly recommended if you want to know more about Python threading and signal handling.
December 19, 2009
Today I took another step towards Emacs adulthood: I disabled transient-mark-mode.
Big deal, you say? Well, I vividly remember the relief I felt when I found out how to enable it as a novice Emacs user two years ago. Not having a visible selection was just too wierd.
But now I’m ready to change that habit as well. I enjoy the reduced visual clutter, and ironically, I find it easier than before to quickly extend the region to the part of the buffer I want. A frequent annoyance with transient-mark-mode enabled was that I often highlighted text by accident.
However, I’m a bit annoyed that some commands don’t behave the way they used to. For example, comment-dwim (which I use a lot) needs transient-mark-mode to be enabled on the region to (un-)commet. I know that I can temporarily enable transient-mark-mode by doing two C-SPCs instead of one, so I guess it is a small price to pay. But I don’t understand why it can’t just work on the region.
I’m not sure why I suddenly decided to ditch transient-mark-mode. Maybe I accidentally highlighted a region one time too many. But it got me thinking, yet again, about the way I use Emacs. I’ve used it for a few years now, and I think I know and use the most important productivity tricks. But obviously I know that there’s so much still to learn. And now that I feel comfortable, moderately productive and (most importantly) almost never annoyed at anything, I don’t learn as much as I should. I still customize stuff at least few times a week, but I don’t learn significant new features, modes etc. very often.
I want to change that. I really want to be an Emacs wizard, not just an experienced user.
So where should I find inspiration to learn new stuff? The hard part is that I don’t know what I’m missing anymore. As a novice user, I knew what Emacs could do, but not how. Now I need to find out what else Emacs can do. Apart from the plentitude of Emacs-related blogs out there, I’ve found a really good source of inspiration. At VMware, we have a “Tips & tricks” mailing list to which I’m subscribed. Often, useful Emacs, Vim, Sed, Awk etc. tips are posted on that list. I just need to pay attention, which can be hard when you receive hundreds of emails every day.
So let that be the tip of the day. If you work with other Emacs users, learn from them. Create a forum on which you can exchange tips and tricks, be it a mailing list, wiki page or whatever.
And be sure to forward a copy of each tip to me😉
Wow, that entry ended up way too chatty.
December 16, 2009
Rich Hickey has done a pretty amazing job, mostly single-handed, of creating Clojure. Aside from the popularity of the language itself, Clojure seems to have inspired even more people to start talking about functional programming.
However, Rich is going to need funding to continue developing the language next year.
In his own words:
As should be obvious, Clojure is a labor of love on my part. Started
as a self-funded sabbatical project, Clojure has come to occupy me far
more than full-time. However, Clojure does not have institutional or
corporate sponsorship, and was not, and is not, the by-product of
another profitable endeavor. I have borne the costs of developing
Clojure myself, but 2009 is the last year I, or my family, can bear
The above is an exerpt from a long post by Rich on the Clojure Google Group.
On a personal note, I am surprised that Rich explicitly states that people who are just “evaluating Clojure” should not feel obliged to pay anything.
This is a really nice attitude, but also very ineffective. By far most of us use Clojure only for playing around and maybe solving the occasional Project Euler problem. Does that amount to more than just evaluating the language? Most would probably say no, especially when the suggested donation for “real users” is $100/year.
Instead, if all us casual users donate just a little bit, for example $10, it will amount to quite a substantial amount of money. My guess would be a lot more than the $100/year paid by the relatively few commercial users.
So if you want Clojure to stay alive, chip in! $10 is not a lot of money.
December 14, 2009
It has been a long while now since I ran Windows on hardware. However, I need to use it for a lot of things at work, so I have several Windows VMs running on ESX hosts and I just RDP to them.
Most of the time, this works really well. I have always been pretty impressed with the RDP protocol (not so much after trying NX, but it’s still decent). However, one huge annoyance is the Command Prompt, cmd.exe. Whenever large amounts of text scroll by (verbose logging, for example), my RDP session simply hangs. There’s nothing I can do to break the output. Ctrl-C can take ages to get though and I usually end up killing the RDP client.
So I recently decided to find an alternative, and that turned out to be pretty easy: Console.
It is by no means perfect, in fact it is pretty rough around the edges. But scrolling works much better than with cmd.exe, and there are a few other improvements as well. For example, it is possible to resize the window without entering numbers in a dialog box
Copying and pasting works a bit differently, so that took a few days of getting used to. But the good thing is that I no longer pause a running process accidentally by selecting a character of text (grr…).