1. SSHKeychain on Snow Leopard

    I am an avid user of MacPorts, but it seems some things are broken with Snow Leopard. In particular it seems one cannot build SSHKeychain:

    [~]% sudo port install SSHKeychain
    --->  Computing dependencies for SSHKeychain
    --->  Fetching SSHKeychain
    --->  Verifying checksum(s) for SSHKeychain
    --->  Extracting SSHKeychain
    --->  Applying patches to SSHKeychain
    --->  Configuring SSHKeychain
    --->  Building SSHKeychain
    Error: Target org.macports.build returned: shell command "cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_aqua_SSHKeychain/work/0.8.2" && xcodebuild  -target "SSHKeychain" -configuration Deployment build OBJROOT=build/ SYMROOT=build/ MACOSX_DEPLOYMENT_TARGET=10.6 ARCHS=x86_64 SDKROOT= ARCHS=i386" returned error 1
    Command output: 
    === BUILD NATIVE TARGET TunnelRunner OF PROJECT SSHKeychain WITH CONFIGURATION Deployment ===
    Check dependencies
    GCC 4.2 is not compatible with the Mac OS X 10.4 SDK (file TunnelRunner.c)
    GCC 4.2 is not compatible with the Mac OS X 10.4 SDK (file TunnelRunner.c)
    ** BUILD FAILED **
    
    
    Error: Status 1 encountered during processing.
    Before reporting a bug, first run the command again with the -d flag to get complete output.
    

    To fix this, I simply changed “10.4u” and “10.4” on lines 922 and 924 to “10.5” in the xcodeproj file:

    /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_aqua_SSHKeychain/work/0.8.2/SSHKeychain.xcodeproj/project.pbxproj
    
    	  	CC39D6380921118A00FE3BC5 /* Development */ = {
                            isa = XCBuildConfiguration;
    	           	buildSettings = {
    				ARCHS = (
                                    	ppc,
    		                        i386,
    		                );
    		                MACOSX_DEPLOYMENT_TARGET_i386 = 10.5;
    		                MACOSX_DEPLOYMENT_TARGET_ppc = 10.3;
    		                SDKROOT_i386 = /Developer/SDKs/MacOSX10.5.sdk;
    		                SDKROOT_ppc = /Developer/SDKs/MacOSX10.3.9.sdk;
    		        };
    		        name = Development;
    		};
    

    Also further down on lines 936 and 938:

    /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_aqua_SSHKeychain/work/0.8.2/SSHKeychain.xcodeproj/project.pbxproj
    
    		CC39D6390921118A00FE3BC5 /* Deployment */ = {
    		        isa = XCBuildConfiguration;
    		        buildSettings = {
    		                ARCHS = (
                                            ppc,
                                            i386,
    				);
                                    MACOSX_DEPLOYMENT_TARGET_i386 = 10.5;
    				MACOSX_DEPLOYMENT_TARGET_ppc = 10.3;
    				SDKROOT_i386 = /Developer/SDKs/MacOSX10.5.sdk;
    				SDKROOT_ppc = /Developer/SDKs/MacOSX10.3.9.sdk;
    			};
                            name = Deployment;
    		};
    

    …and then…

    [~]% sudo port install SSHKeychain
    --->  Computing dependencies for SSHKeychain
    --->  Building SSHKeychain
    --->  Staging SSHKeychain into destroot
    --->  Installing SSHKeychain @0.8.2_0
    --->  Activating SSHKeychain @0.8.2_0
    --->  Cleaning SSHKeychain
    

    Alternatively, if you wish to just download it, it is available at http://fs.maz.nu/sshkeychain-0.8.2-sl.app.zip.

    0 notes
    Comments (View)
  2. Compression Algorithms: an argument for energy efficiency

    There’s been a lot of talk both recently and in years passed about LZMA compression. With any compression algorithm come benchmarks and these are often in the form of compression-rate, decompression-rate and compression-ratio:

    compression rate
    Basically this is “less time spent waiting for the compressed output to be generated”. Where data must be sent real-time, or where the compression process adds latency or reduces the bandwidth of transmitting data, a higher compression rate is desired.
    decompression rate
    Having received a copy of the compressed data, a higher decompression rate is “less time spent waiting for the original output to be generated”. This can be important where mobile devices are decompressing data (e.g. streamed video) so that less CPU power is used.
    compression ratio
    How much smaller is the compressed file? The higher the ratio the “better” the algorithm, but not all algorithms perform equally on all sorts of data. Specialist algorithms tailored to the kinds of data being crunched are common (for example, lossless audio compression algorithms tend to outperform general compression algorithms in their niche).

    I remember the gradual change from gzip compression to bzip2 which started to happen at the end of the 1990s and continued at the start of the 2000s. Back then I had a Pentium-II 333MHz as my main workstation and a 10Mbit university-provided Internet connection. Sometimes it would be quicker to download a larger gzip file than wait for the much slower bzip2 algorithm to complete its decompression. Today things are much the same: running Faelix means I have much more Internet bandwidth at my disposal than I could need for getting files, but CPU speeds are that much quicker that I’d now consider the bzip2 file over the gzip.

    However, my position as a content provider (the owner of an ISP) and the asymmetric nature of the CPU costs of LZMA have changed my thinking on this subject. LZMA achieves better compression, typically, than bzip2 or gzip but is much slower to compress data than either of them. However, LZMA might be very slow to compress but it is much faster than bzip2 when decompressing data. This leads to the question, “Why do we compress data?”

    • smaller storage requirements
    • smaller transport requirements

    The benefits this brings:

    • lower cost of storage
    • possibly leads to lower energy consumption for storage
    • lower cost of transport
    • transport of data across communications links will take less time
    • better use of capacity of existing communications links (more customers served)
    • possibly leads to lower energy consumption for transmission of data

    An algorithm with better compression will have lower transport/storage costs. Assuming that an algorithm which is fast under decompression uses fewer instructions per bit of decompressed data output, a faster decompression is also more “ecologically sound”. This is a bit of a hand-waving argument now, but I’m curious enough that I may experiment and confirm this hypothesis with actual data. In the use case of one large, pre-compressed file being made available to a large number of users, LZMA would appear to be a strong contender to replace bzip2 or gzip when ranked with a benchmark of “energy efficiency”:

    • compression, though slow (therefore assumed to be energy-costly), is a one-time operation
    • transmission is smaller, and is a per-user operation
    • depression is fast (therefore assumed to be more energy-efficient), and is a per-user operation

    Research to follow, I think…

    Notes
    Comments (View)
  3. Acquia-Drupal-1.2.11.4997 and Upgrade to Drupal-6.13

    The error:

    Fatal error: Only variables can be passed by reference in .../modules/acquia/admin_menu/admin_menu.inc on line 536

    The fix:

        default:
          // Flush all caches; no need to re-implement this.
          module_load_include('inc', 'system', 'system.admin');
          $form_state = array();
          $null = NULL;
          system_clear_cache_submit($form_state, $null);
          break;
    

    Alternatively get admin_menu-6.x-3.0-alpha1 or apply this patch.

    Notes
    Comments (View)
  4. Numbers Station
    • Choose how you want to call the Numbers Station:
      • Dial +44-1234817666 from any telephone in the world, or 01234817666 if you’re in the UK.
      • Dial +1-253-7531856 from any telephone in the world, or (253) 753-1856 if you’re in the USA.
    • After the beep type some numbers. * will be replaced by space; waiting a short while or dialling # will end your message.
    • After the second beep the digits you dialled with be posted to the Twitter feed at http://twitter.com/441234817666.
    • The call will then end.

    This is possibly the least pointful service in Web 2.0. It was inspired by numbers stations. Coded up hastily one lunch-time.

    Technical Details

    Notes
    Comments (View)
  5. Schematic Diagram of Marek

    Schematic Diagram of Marek

    Notes
    Comments (View)
  6. The weekend of February 14th is going to be our tentative target for release.
    0 notes
    Comments (View)
  7. Bed

    Finally I got the GrandStream 486 talking through the Orange Livebox to the Faelix Asterisk VoIP exchanges in Manchester. In the end it involved setting the DMZ of the Livebox to point to the GrandStream. Now a Manchester-prefix number from SIPgate calls straight through into La Troïka! Calls from the Faelix office are, of course, free — it’s just an extension, after all!

    Five hours till I get up…

    Notes
    Comments (View)
  8. Universal IE Hack

    Via heather-rivers:

    The Universal IE Hack:

    <!--[if IE]>
    <style>
    html, body, * {display: none;}
    </style>
    <![endif]-->
    

    This supersedes all documented IE hacks to date. Enjoy.

    16 notes
    Comments (View)
  9. Somehow this seems apt given my recent experiences with The Beast of Redmond&#8230;

    Somehow this seems apt given my recent experiences with The Beast of Redmond…

    Notes
    Comments (View)
  10. Windows 7 Beta

    I wasn’t expecting much, but Microsoft delivered a wonderful first experience of their beta. See screenshots 1, 2, 3, 4, 5 and 6.

    Time I beta-tested some interesting new hardware!

    Notes
    Comments (View)