Older blog entries for asmodai (starting at number 64)

Unbound unable to read root zone

After upgrading various ports on my FreeBSD system and days later a full world and kernel, a reboot showed me that unbound didn’t start. The system reported that:

error: reading root hints
/usr/local/etc/unbound/named.cache 88: Empty line was returned

It turns out that from ldns 1.6.13 to 1.6.14 there is an API change that caused problems for unbound. After upgrading ldns you also need to recompile unbound to pick up on these changes. If you do not, you will run into the problem above.

Syndicated 2012-12-05 11:49:10 from In Nomine - The Lotus Land

FreeBSD and pkgng

I am really impressed with pkgng. On the mebsd website there’s a handy explanation and tutorial that’s really worth reading to get up to speed.

Syndicated 2012-11-20 08:47:34 from In Nomine - The Lotus Land

PS Vita and Near location

If you try to use the PS Vita’s Near funcitonality over WiFi and get “Location data cannot be obtained” constantly, try to turn off the Vita completely (hold the power button at the top for a few seconds) and then turn it on again. This at least solved it for my PS Vita.

Syndicated 2012-11-02 20:37:07 from In Nomine - The Lotus Land

FreeBSD, p0f, and USB pcap

If, like me, you had a working FreeBSD system with amavisd-new and p0f set up, you might find that p0f suddenly stopped working at some point. The cause for this is that it tries to use pcap on the USB bus, which it cannot do. The solution is to put hw.usb.no_pf=1 in your /boot/loader.conf.

Syndicated 2012-11-02 09:53:44 from In Nomine - The Lotus Land

The rendering equation

The rendering equation, the keystone of computer graphics rendering:

\(L_o(x, \vec w) = L_e(x, \vec w) + \int_\Omega f_r(x, \vec w’, \vec w) L_i(x, \vec w’) (\vec w’ \cdot \vec n) \mathrm{d}\vec w’\)

(This is at the same time also a test for MathJax support on my weblog in order to provide correct mathematical typesetting using proper typography instead of some lame pixelated image.)

Syndicated 2012-08-06 11:50:48 from In Nomine - The Lotus Land

Detecting keyboard layout used on Windows

//Pseudo C/C# code:

int localeId = GetKeyboardLayout(0);

// The low word contains a Language Identifier for the input language
// and the high word contains a device handle to the physical layout
// of the keyboard.
localeId &= 0xffff;    // mask off high word to get the locale
                       // identifier

switch (localeId) {
    0x040c:
    0x080c:
    0x1009:
        useAzertyMapping();
    default:
        useQwertyMapping();
}

Relevant links:
GetKeyboardLayout()
Default Input Locales
Locale IDs assigned by Microsoft

Syndicated 2012-08-06 11:11:55 from In Nomine - The Lotus Land

JetBrains IntelliJ IDEA and Monokai

I’m a fan of the Monokai colour scheme for my source code editing and thus set up it whenever I can in the IDEs I use.

For JetBrains’ IntelliJ IDEA I use Long Cao’s Monokai colour scheme. Grab the XML file and drop it, on Windows, in your %HOMEPATH%\.IntelliJIdea11\config\colors directory. Restart IDEA and the Monokai colour scheme ought to be present in the dropdown box under File » Settings » Editor » Colors & Fonts » Scheme Name.

Syndicated 2012-08-06 09:10:23 from In Nomine - The Lotus Land

Setting up Eclipse 4.2 as I like it

Download Eclipse 4.2 Classic 64-bits version from the Eclipse website. Extract the contents to a location, such as C:\Eclipse. Adjust the eclipse.ini in that directory according to my post in order to pin it to the taskbar.

Next, within Eclipse, go to Window » Preferences » Install/Update » Available Software Sites » Add... and add the following URL under something like “4.2-M builds”: http://download.eclipse.org/eclipse/updates/4.2-M-builds. After adding you can hit Reload to reload the information from the website. Exit all windows through pressing OK. Then follow up by going to Help » Check for Updates and you will most likely get an Eclipse SDK update right away. Accept the licensing terms and wait until it downloaded and installed everything and restart Eclipse.

Go to Help » Install New Software... » Work with, select the Juno entry and from the resulting list of software select General Purpose Tools » Marketplace Client followed by Next » Next, accept the license and Finish. Restart Eclipse when done. Now under Help is an entry called the Eclipse Marketplace.

Open the Eclipse Marketplace and search for and install the following: “code recommenders”, “MercurialEclipse”, “mylyn” (not selecting the Bugzilla connector). It might ask if it is OK to install unsigned content, acknowledge it.

Syndicated 2012-08-02 10:52:50 from In Nomine - The Lotus Land

Pinning Eclipse to the Windows taskbar

I pin programs that I use frequently to the taskbar of Windows. So I was a bit surprised to see that the newer version of Eclipse, Juno, doesn’t seem to support this by default. After some searching I find out that you can force this by adjusting the eclipse.ini by starting the file with something akin to:

-vm
C:\Program Files\Java\jdk1.7.0_05\bin

Then after starting Eclipse with this in place, you can, once fully loaded and past the splash screen, pin Eclipse to the taskbar.

Syndicated 2012-07-24 17:32:26 from In Nomine - The Lotus Land

Steam indefinite update paused

So recently I had an issue with Steam where the Witcher 2 update got stuck at 99% and the status “Update Paused”. No matter what I tried with the pause/resume button, I couldn’t get it to budge from this status and actually update.

After a while I grabbed Process Explorer from the Microsoft website and checked the files that were being opened when I toggled this state. I noticed a reference to Steam\steamapps\downloading\20920\CookedPC\pack0.dzip. Then I also noticed a file reference to Steam\steamapp\logs\content.log. Upon checking that file I found a notice that it was trying to preallocate about 11 GB for this pack0.dzip. Checking my drive status, I saw that this particular drive letter only had about 9 GB left. Freeing up some space allowed the update process to actually start and finish, after which I got even more space back, since it seems Steam downloads these files and then replaces them, deleting the temporary one. So I guess the lesson learnt is that you should always have enough disk space free as the single largest file in any of your games.

Syndicated 2012-05-14 08:12:32 from In Nomine - The Lotus Land

55 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!