In the process of doing some windows customization, Chuck shot his Windows dead. Hence, we needed a USB stick to boot Grml. It's quite easy to make a USB stick bootable in Windows, and here's the short version: I will assume that your USB stick is drive U:. Use the command-line tool diskpart and use the command list disk to find your USB stick (check the size). Then, enter:
select disk <usb stick number>
clean
create partition primary
select partition=1
active
format fs=ntfs quick label=”overdrive”
assign
and exit the diskpart utility. Finally, use
bootsect /nt60 U:
xcopy <image>:\*.* U:\*.* /S /E /F
to first make the stick bootable and then copy all data to the stick, where image is a directory where the files from your ISO reside. If you do not have the bootsect utility for some reason, grab it from a friend who has Windows 7.


After a couple of tests, it turns out that the very simple
#include <limits.h>

inline void memzap(void *dest, unsigned long count) {
    asm( "cld"
#   if ULONG_MAX == 0xffffffff
    "\n" "andl $3, %%ecx"
    "\n" "rep  stosb"
    "\n" "movl %%ebx, %%ecx"
    "\n" "shrl $2, %%ecx"
    "\n" "rep  stosl"
#   else
    "\n" "andq $7, %%rcx"
    "\n" "rep  stosb"
    "\n" "movq %%rbx, %%rcx"
    "\n" "shrq $3, %%rcx"
    "\n" "rep  stosq"
#   endif
      : "=c" (count), "=D" (dest), "=b" (count)
      :  "c" (count),  "D" (dest),  "b" (count), "a" (0)
    );
}
is the fastest way to zero out a large block of memory, which is not very surprising. It is about 4 to 5 times faster than memset and about as fast as new [], if I can trust @tobi on that matter. I tried using MMX registers, but anything that involves actually looping over the memory region will be about as fast as memset. The only way to get a bit of speed is using the rep opcode. Tiny Edit: The above code is much more safe to compile on both 64 and 32 bit computers.


TrueCrypt is the tool of choice to encrypt your computer hard drives, and under windows it offers the option to encrypt the system drive on the fly, which is very comfortable. As you might guess, this could also go terribly wrong, which is why TrueCrypt forces you to create a rescue disk ISO, which has saved me a lot of trouble in the past. However, by default, TrueCrypt does not let you encrypt your system drive before you have actually burned that image to a real CD, and that, on the other hand, is quite annoying in a day and age where many notebooks no longer have an optical drive. What few people know - this check can be turned off by executing
"TrueCrypt Format.exe" /noisocheck
If you don't believe me, try it yourself or check out their documentation.


For reasons I have not yet been able to figure out, @tobi is making me implement a couple of very rudimentary routines in x86 GCC inline assembler because he wants them faster than possible for mere mortal C. The first was a routine to calculate $\lfloor\log_2(n)\rfloor$ for $n\in\mathbb{N}$ and the second one was to zero out a large block of memory. For instance,
unsigned inline log2int(unsigned x) {
    unsigned l;
    asm("bsrl %1, %0" : "=r" (l) : "r" (x));
    return ( 1 << l == x ) ? l : l + 1;
}
is about 50 times faster than the C-native Version
unsigned inline log2int(unsigned x) {
   unsigned l = 0;
   while(x > (1<<l)) l++;
   return l;
}
even after optimization. For some reason, I found it tricky to google up the official intel x86 opcode reference ((Opcode Reference Part 1)) ((Opcode Reference Part 2)), so I am linking these here.


I am writing this blag post from the second annual meeting of the DFG priority programme SPP1489 (algorithmic and experimental methods in algebra, geometry and number theory). Apart from having a lot of fun, I am catching up on the recent developments in open-source computer algebra software. Do you want to know more?


Just a quick note to everybody that wants to copy a file from (an old) hard drive and keeps getting a "Data error (cyclic redundancy check)" (either in the explorer and in a shell using various commands to copy): Download and use PC Inspector File Recovery (execute it with admin privileges).


I handed in my diplom thesis today. I'm fairly proud of it, and I am also quite fond of the layout. So, if anyone finds it quite appealing, I am gladly willing to share the LaTeX. Note that although it has (to have) a German introduction, it is written in English.


The term *ramification* was the one that had befuddled me longer than most others, in my studies of algebraic geometry. Let's take a morphism $\pi:Y\to X$ of schemes, and let us assume that it is finite and surjective. We will call a morphism of this kind a **covering** and although I am not sure whether this terminology is standard, I think it's very appropriate. Here, I document some notes I took to connect the various results from several books I know. It helped me to get a better idea and better tools to work with coverings. Do you want to know more?


Since a while now, Opera features an intelligent feature to detect logos in websites to use as thumbnails in your speed dial. If you are contempt, don't bother reading. If it annoys you, type about:config, search for Thumbnail Logo Score Threshold and set that value to 1000, say.


I should really have known better than to plug a drive with one single TrueCrypt'ed partition into a PC prior to installing Windows 2k8 Server R2. What will happen is that the installer might randomly decide to place the MBR on that disk, overwriting the TrueCrypt header. I realized this after 5 hours of nursing the box to being completely patched, when I wanted to mount the drive with all my data. So. What can you do in this kind of scenario? You can read this post.


So you want to compile your latex to PDF, eh? And you want to use hyperref, eh? Since I am a 0-Warning(s)-kinda guy, let me help you become one, too. Do you want to know more?


In retrospective, I don't even know why I am still using [nomenclature](http://ctan.org/tex-archive/macros/latex/contrib/nomencl), but with my current fixes it seems to work just fine. Do you want to know more?


I found a site full of examples to create knots in latex and it's quite a pain to paint them. They look nice, though. You basically paint them via xy and then place *"holes"* in the parts where you want to make a crossing. Here is an example:
\xy
 (-3.5,3.5)*{}="LEFTTOP";
 (3.5,-3.5)*{}="RIGHTBOTTOM";
 (3.5,3.5)*{}="RIGHTTOP";
 (-3.5,-3.5)*{}="LEFTBOTTOM";
 "LEFTTOP";"RIGHTBOTTOM" **\dir{-}; \POS?(.5)*{\hole}="HOLE";
 "RIGHTTOP";"HOLE" **\dir{-};
 "HOLE";"LEFTBOTTOM" **\dir{-};
 (0,0)*[gray]\xycircle(5,5){-};
\endxy