Epilicious 0.9.2 is out
This fixes the problem I mentioned before.
[Edit Sat Jul 29 10:27:39 BST 2006]
I’ve just uploaded a Debian package of 0.9.2. Enjoy!
Incoherent mumblings
Archive for July 2006
This fixes the problem I mentioned before.
[Edit Sat Jul 29 10:27:39 BST 2006]
I’ve just uploaded a Debian package of 0.9.2. Enjoy!
I noticed yesterday that synching was failing due to some bug in pydelicious. That was the last straw and now pydelicious is being chucked out of epilicious. It is a module written by Frank Timmerman, and it can be found here (when it isn’t totally infested with Wiki spam anyway). I was happy to be able to use it for as long as I have since it allowed me to concentrate on other parts of epilicious. Now however epilicious is working fine but pydelicious isn’t. I am not interested in fixing pydelicious since I think it’s a bit of mess and it’d be difficult for me not to do a clean-up at the same time
That would most likely take more time than writing something custom made for epilicious.
I’ve written a minimal Python module that offers exactly as much of the del.icio.us API as epilicious needs. If someone’s interested in extending it into a more full-fledged del.icio.us module—be my guest. You can find it in the development BZR repo (libepilicious/delicious.py).
I’ll be making another release of epilicious ASAP.
Some kind soul sent me a Russian translation for epilicious… which I quickly lost. I guess I really should move mails to a rubbish bin rather than delete them completely.
Oh, I’d love to receive another email with that translation
Please!
The other day I had some problems early on when trying to compile from GNOME CVS using jhbuild. From a sudden surge in brain activity I got the idea to build a release of the development version of GNOME—the 1.15.x series—the lates one is 2.15.4.
I got some help from Elijah Newren’s post on compiling GNOME with jhbuild. Using the links from the release notice on FootNotes I got as far as
% jhbuild bootstrap
without problems. Then I got stuck:
% jhbuild -m \
> http://ftp.gnome.org/pub/GNOME/teams/releng/2.15.4/gnome-2.15.4.modules \
> build
jhbuild build: dependent module "libdaemon" not found
usage: jhbuild [ -f config ] command [ options ... ]
My first thought was that installing the Debian package libdaemon0 might solve it. Of course it didn’t. Then I remembered that during bootstrap Python 2.4.3 was downloaded and installed, despite being installed on my system already. Not too much of a surprise then that libdaemon0 didn’t do any good.
After looking at jhbuild modulesets for previous releases as well as the bleeding CVS moduleset I got an idea. I saved the 2.15.4 moduleset locally and modified freedesktop-2.15.4.modules to include the following lines:
<tarball id="libdaemon" version="0.10">
<source href="http://0pointer.de/lennart/projects/libdaemon/libdaemon-0.10.tar.gz" />
<branch checkoutdir="libdaemon" module="trunk" repo="libdaemon.0pointer.de"/>
</tarball>
It’s compiling rather happily at the moment so I’m optimistic… I’ll add a note if things go pear-shaped…
I’ve just added the plugin Ultimate Tag Warrior to my site. I’ve spent some time adding tags to posts, but I’m not done with it yet. The main reason for this exercise was that I really wanted a tag cloud
It just seems like a much better idea than using categories (I used them as tags anyway).
I’m pretty happy with the result. I just have to find the time to add tags to all posts so that the cloud really represents what I write about.
I stumbled on the function QueryWorkingSet today. It seems to be usable for solving a problem I have… What’s really amazing about this function is its totally braindead signature:
BOOL QueryWorkingSet(
HANDLE hProcess,
PVOID pv,
DWORD cb
);
Please look beyond the weird Microsoft-isms with type names and the idiotic Hungarian notation. What does it do? Basically it takes a buffer (pv) of a certain length (cb) and tries to stuff some information in it. So, how big do we have to make the buffer? Who knows?
Microsoft seems to have a desire to force programmers to make 2 calls to each function that returns data in a buffer. Functions don’t take an int as the bufffer’s length, instead they take int *. The first call would pass in 0 as length (or rather a pointer to a variable that’s set to 0). The call would fail, but the value of the variable would be set to the required size of the buffer for a successful call.
So, back to QueryWorkingSet. How does one find out the required size of the buffer pv? The only way seems to be repeated calls with progressively larger buffers. Brilliant API Microsoft!
Lately I’ve had use for sparse files to solve a problem. Simple, yes. Use lseek and write (or read). Even better, at least in this case, use pwrite and pread. Should be simple, right? Yes, should be.
I was banging my head against code equivalent to the following for quite a few hours:
#define _XOPEN_SOURCE 500
#define _FILE_OFFSET_BITS 64
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/stat.h>
char buf[1024];
int
main(int argc, char **argv)
{
int n;
off_t off;
for(n = 0; n < 1024; n++) {
buf[n] = 'a';
}
int fd1;
if(-1 == (fd1 = open("file1", O_WRONLY | O_CREAT, 0666)))
error(EXIT_FAILURE, errno, "open (test1)");
off = 0x80000000;
printf("size: %d\n", sizeof(off));
if(pwrite(fd1, buf, 1024, off) != 1024)
error(EXIT_FAILURE, errno, "pwrite (%lli)", off);
return(0);
}
Can you spot the problem?
Well, I can tell you it doesn’t work. off_t becomes 64-bit due to the #define _FILE_OFFSET_BITS 64 so the off variable isn’t negative in my code. Somehow however it becomes negative on the way into pwrite, and without a single compiler or linker error at that!
Have you spot the problem yet?
Here’s the correctly working code:
#define _XOPEN_SOURCE 500
#define _FILE_OFFSET_BITS 64
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <unistd.h>
char buf[1024];
int
main(int argc, char **argv)
{
int n;
off_t off;
for(n = 0; n < 1024; n++) {
buf[n] = 'a';
}
int fd1;
if(-1 == (fd1 = open("file1", O_WRONLY | O_CREAT, 0666)))
error(EXIT_FAILURE, errno, "open (test1)");
off = 0x80000000;
printf("size: %d\n", sizeof(off));
if(pwrite(fd1, buf, 1024, off) != 1024)
error(EXIT_FAILURE, errno, "pwrite (%lli)", off);
return(0);
}
Don’t see any difference? Look at the list of included files!
Let me just say the C and I aren’t on speaking terms at the moment!
There seems to be some intelligence in North America. In Canada to be more specific. This is only the last article of quite a few on Canadian artists worrying about copyright. This is a little old, but still hilarious. Go CEA!
Here’s an article on Britain’s anti-terrorism policy. It pretty much confirms the worries I’ve had but haven’t been able to put my finger on.
You can always trust El Reg to report on the silliest things ever. Here’s an article on a futurologist’s prediction that men will lose out to robots. This can be shot down on so many levels it isn’t even funny. Except it is
Ending with some funny stuff. A map of the Software Wars. I’ve recently discovered Humorix, this announcement on Microsoft’s plans for a DRM-oriented language had me laughing out loud.
Episode 45 of the Security Now! podcast mentions a sneaky use of the hosts file—ad blocking. By listing well-known adsites in hosts and forcing them to resolve to 127.0.0.1 (or 0.0.0.0) the irritating ads aren’t displayed. A quick search on Google and I found a site offering a list of adsites specifically for this use.
So far it works really well, despite the list not seeing any updates since 2004. I’ve added one single entry in the two weeks that I’ve used it. Fairly good I think. I’ve also noticed that a few commercial websites, that I used to visit earlier but stopped hitting due to irritating popup windows, have started behaving better
I’ve just released version 0.9 of epilicious. A package for Debian has of course also been uploaded to my personal APT repo. Have fun!
Oh yeah! Almost forgot. Translate it, please!