« December 2010 | Main | February 2011 »

January 2011 Archives

January 3, 2011

How I made $38,778 in one week with Open Source ;)

I loves me my open source. I registered my bitbucket.org repository with ohloh.net. This analyzes the repository, creates some metrics and finally puts out a "project cost". I happen to know, that I started coding on 26.12 and my last commit was 2.1, so basically a week.

Well documented. Hehe, i think 95% of the comments are the GPL3 claimer and disclaimer notes.

Nice. Seems that my work for this year is done.

(You need Javascript enabled, to view this entry)

January 5, 2011

Some notes on installing Linux VMs on XenServer without XenCenter (on VMware)

I found and find XenServer quite perplexing. Because I did not install the Windows maintainance console, I am left with the XenServer Configuration console, which has a possibility to enter the command line shell. I currently believe there is no way to create a virtual machine with the XenServer Configuration console, which I find kinda idiotic...

XenServer Configuration Console

Important first steps, when the XenServer has booted up for the first time:

  1. Enter the shell
  2. Mount the support Linux Guest Support image: mkdir /tmp/xxx ; mount /dev/cdrom /tmp/xxx ; cd /tmp/xxx ; ./install.sh
  3. Check the templates installed with xe template-list, note the names.
  4. Install a VM with xe vm-install template-name="Debian Squeeze 6.0 (32-bit)" new-name-label="Debian Linux Test"
  5. exit back to the XenServer Configuration console
  6. Check Virtual Machines/All VMs that your VMware is there.

XenServer Configuration Console

Looks OK, but the VM won't start, most likely because I am testing this in VMware.

January 13, 2011

printf and numbered arguments: inherently impossible to implement, yet works

Kempe:~ nat$ cat foo.c
#include <stdio.h>

main()
{
   printf( "%4$*3$.*2$s\n", 1LL, 5, 3, "hahaha", 2LL);
}
Kempe:~ nat$ cc -o foo foo.c
foo.c: In function ‘main’:
foo.c:5: warning: format argument 1 unused before used argument 4 in $-style format
Kempe:~ nat$ ./foo
hahah
There is no way, you can write printf. That's because you can't determine the size of the first parameter, which you need to access the parameters coming up on the stack properly.

Yet, printf manages to do just fine on MacOSX and Linux ?

Continue reading "printf and numbered arguments: inherently impossible to implement, yet works" »

January 19, 2011

One of these WTF moments

GNU gdb 6.3.50-20050815 (Apple version gdb-1469) (Wed May  5 04:36:56 UTC 2010)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin".
(gdb) p 1234 % 2000
$1 = 234
(gdb) 1 % 10
Undefined command: "1".  Try "help".
(gdb) p 1 % 10
$2 = 1
(gdb) p 9 % 10
$3 = 9
(gdb) p 11 % 10
$4 = 1
(gdb) p 1234 % 1000
$5 = 234
(gdb) p 1234 % 2000
$6 = 1234
(gdb) p 1234 % 2000
$7 = 1234
Yes, totally non reproducable. No I didn't edit anything.

Posting this, although everbody will think, it's my fault :)

January 31, 2011

Memo to self, regarding packet loss

Do not let panic overwhelm you into buying a new network card if

sudo ping -f <some other mac os x box>

shows lots of packet loss.

It's quite normal.

Maybe start worrying, if the pinged server is linux.

You knew that already, and you forgot again.

About January 2011

This page contains all entries posted to Nat!'s Web Journal in January 2011. They are listed from oldest to newest.

December 2010 is the previous archive.

February 2011 is the next archive.

Many more can be found on the main index page or by looking through the archives.