Thursday, December 04, 2008

Fix for the ClearType pixel junk in GVIM

Update: This doesn't work for fonts that use the right-most column. In fact the issue seems to be cleartype writing outside the leftmost pixel in the bounding box. :-(


Here's a fix for this super-annoying bug (Lucida Console 11, insert spaces before the C to leave a trail of cleartype pixels).

===================================================================
--- gui_w32.c   (revision 1289)
+++ gui_w32.c   (working copy)
@@ -2234,6 +2234,8 @@
         * Note: FillRect() excludes right and bottom of rectangle.
         */
        rc.left = FILL_X(col);
+       if (rc.left > 0)
+           --rc.left;
        rc.top = FILL_Y(row);
 #ifdef FEAT_MBYTE
        if (has_mbyte)

Monday, September 01, 2008

Querying Wow64 registry keys from a 64-bit Python

KEY_WOW64_32KEY gets the job done
import _winreg

key = None
KEY_WOW64_32KEY = 0x0200

try:
  key = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, \
    r"SOFTWARE\Microsoft\VisualStudio\9.0", 0, \
    _winreg.KEY_READ | KEY_WOW64_32KEY)
  val, type = _winreg.QueryValueEx(key, "InstallDir")
  print val
except EnvironmentError, ex:
  print ex
finally:
  if key:
    _winreg.CloseKey(key)

Saturday, February 16, 2008

Hardware Inventory

Turning the basement upside down yielded
  • 2 Commodore 64s (old style breadbox, one white and one brown)
  • 2 1541 old-school drives (brown enclosure)
  • A Commodore 128
  • A 1541-II drive
  • An Amiga 500 w/ old-school slow 512 kb expansion memory
  • TrumpCard SCSI sidecar enclosure for A500
  • External memory expansion (2 MB) for A500
  • Power adapters for most of above
  • Extra floppy drives for Amigas
  • An Amiga 1200 vanilla
  • A HP-UX workstation box of unknown origin
  • A 680x0-based SUN box
  • Two SGI Octanes
  • External CD-ROM SCSI enclosures for the SGIs
  • And a shitload of cables and PSUs
Continuing upstairs:
  • One dual Opteron server (disconnected)
  • One Athlon-based generic Linux box (serving)
  • One desktop box
  • Another desktop box from el cheapo gear (dell)
  • A laptop
  • A fanless mini-server
Update: New addition: Amiga 1200 w/ 060 and an 14" CRT.