August 9, 2009
If you ever looked for song lyrics online, you know how most lyrics sites are. Plenty of ads, popups, silly scrolling flash gadgets, bad punctuation, and no easy way to send in corrections. Why not apply to lyrics the same community-driven editing model that has made Wikipedia so successful?
LyricWiki.org has done exactly that, and more. They have provided an API, making it easy for media players to query the database and fetch the lyrics for a specific song. To get an idea of this project’s success, check out these stats. At the time of this writing, LyricWiki is the fifth largest MediaWiki in existence, and the largest wiki that is not a Wikipedia or Wiktionary. What an inspiring example of a community built around the ideals of improving content and making information available. What could go wrong?
Read the rest of this entry »
June 14, 2008
Recently I got my hands on a DVD which I couldn’t get to mount. The message that appeared consistently in dmesg was:
UDF-fs: No fileset found
Searching the forums I found out that this is a widespread problem. Vista uses some kind of non-standard UDF which only Windows can read. I was very tempted to run to the Windows PC in the other room and let it eat the disc, but I was curious if there was any other solution.
Many suggested mounting manually with -t udf, but that didn’t work. Another suggestion was patching and recompiling the kernel. I was obviously NOT in the mood to do that. Digging a bit deeper I found that there is actually a less greasy solution. The two relevant links are one and two. I will describe now the exact procedure I used to get my Linux box to recognize the Vista-burnt DVD. Note that, because of the rapidly changing environment, this will probably NOT work on anything OTHER than *Ubuntu Hardy with kernel version 2.6.24.
Read the rest of this entry »
May 7, 2008
Sorry about the mess I currently made of this blog. I updated the Code section (aka. Magic) and had to create a separate post for every config file that was listed there. The news here is:
- I’ve become maintainer of the KCharSelect widget/utility app in KDE. I haven’t done much besides bragging yet, but I have some bug fixes (before 4.1) and features in mind.
- With a little luck (and a lot of free time if I find it), I will begin porting Filelight to KDE 4.
In other weakly related news:
- Theme change. Opinions?
- Blogroll updated. Forget common sense.
- I won’t be home until Monday. I’m going to make an ass of myself again in front of the unbeatable Romanian contestants at the .Campion final round
- I’ve been pondering whether I should finally get my own domain + paid hosting soon. I decided that it’s not yet the time, since except for a few gotchas (can only upload certain file types, can’t change CSS), I’ve been really happy with the WordPress.com service.
Now, if this post is not random, than I don’t know what is!
April 22, 2008
(because Moldova is probably the last country where programming competitions are still held on Windows)
The long long data type has been introduced in C as part of the C99 standard. On 32-bit machines it is a 64-bit signed integer data type. The printf/scanf formatting string for this type is %lld.
Using Dev-C++ and the MinGW port of the GNU C Compiler on Windows, one would expect programs to run the same way they do with GCC on Linux. But no! Apparently MinGW calls the Windows libraries, so every time you call printf or scanf you’ll end up using Microsoft’s version of the functions!
And of course Microsoft cares about backwards compatibility, so when C99 was published they didn’t switch to the standard, keeping their non-standard %I64d formatting string instead!
[subsides into an angry stream of unintelligible muttering]
April 3, 2008
I’m not the Python genius I want to be, so here’s this, for future reference:
How to subtract one date from another, and get the result in days:
from datetime import date
(date(2008, 3, 31) - date(2005, 2, 1)).days
A simple application:
party = date(2008, 6, 1)
(party - date.today()).days