19
Sep 08

Body Navigation – Play Pong, get Fit!

I’m a big fan of Processing, and who can complain about a project involving dancers, a choreographer, and a programmer? I love the pong part. I gotta defrost my projector sometime and see what I can do with it.


Body Navigation by Recoil Performance Group from ole kristensen on Vimeo.

13
Sep 08

That’s not XTC! iTunes Store Feature Suggestion

I use the iTunes Store as a way to find and preview music, and I’ve purchased quite a bit of music and TV shows through it. I’ve seen several cases where music has been mis-labeled or mis-categorized. For example, the last two albums on this page for the UK band XTC:

I’m not the only one who noticed this particular problem.
More…

08
Sep 08

Batch Compiling with Aquamacs Emacs

I needed to batch compile some files recently, and I had to lookup how to do this with Aquamacs. It’s pretty simple. If Aquamacs is at /Applications/Aquamacs, then this will work:

/Applications/Aquamacs\ Emacs.app/Contents/MacOS/Aquamacs\ Emacs -nw -batch -f batch-byte-compile /path/to/elisp-file.el

05
Sep 08

Confusion Over Triple Equals (===)

Doesn’t everyone have concepts that they can’t keep organized in their heads? I frequently get values for certain keys mixed up in my head, especially ones that I don’t use very often. At the Lone Star Ruby ConferenceGreg and I were talking about the triple equals operator in Ruby recently (===), and I confused my notion of it in Ruby with what I thought was its function in Perl. Obviously I don’t use it very much. Hopefully I can clear this up though.

In Perl, there is no triple equals operator, based on the perlop Perl operator documentation. I was really mixing things up there.

In PHP, the triple equals operator is used to test whether two things have the same value and type, according to the PHP Manual.

<?php
    $a = "1";
    $b = 1;

    if ($a == $b) {
      print "$a == $b";
    }

    if ($a === $b) {
      print "$a === $b";
    }

?>

This code prints

1 == 1

In Ruby, triple equals (Object#===) is, “effectively the same as calling #==, but typically overridden by descendants to provide meaningful semantics in case statements,” based on the Object class documentation. So, for classes like Array, #=== is effectively the same as #==. I say effectively since I haven’t actually perused the source of array.c, though you can see in object.c that rb_equal (===) calls == and then checks id_eq if that doesn’t return true. And in the case of your own objects, triple equals can be used to provide your own equality tests for case statements.

04
Sep 08

Emacs Lisp – Block Commenting Ruby Code

These days I’m working to become proficient in Emacs (I’ve recently switched from Vim, as Greg mentioned on his blog). With that comes all kinds of things like org-mode, yasnippet, and lots of keyboard combinations.

A part of this current effort I’m learning Emacs Lisp right now. There’s probably a better way to do block comment cycling in Ruby, but this was good practice on writing some simple elisp functions.

(defun ruby-comment-region ()
  "In Ruby, comment out the current region with =begin/=end statements."
  (interactive)
  (save-excursion
    (goto-char (point))
    (insert "=end")
    (goto-char (mark))
    (insert "=begin\n")))

(defun ruby-uncomment-region ()
  "In Ruby, uncomment the current region -- remove =begin/=end statements."
  (interactive)
  (save-excursion
    (if (re-search-backward "^=begin")
        (replace-match ""))
    (if (re-search-forward "^=end")
        (replace-match ""))))
03
Sep 08

Bomomo for a bit of fun

If you’re in need of some doodling, try out Bomomo. I like the mass transit map feel that some of the drawing tools have.

And you can save your drawings too.

28
Aug 08

A Little Cluetrain Reminder

I was in a local Target the other day and I saw this improvised product review:

Isn’t it fairly clear that the Cluetrain people have a point? People are going to talk about your products, your company, your reputation. Corporations can’t stop that, and technology further empowers these kinds of exchanges. Corporations should work to foster the conversations and to be a part of them.

21
Aug 08

Life Imitates Video Games?

As the recent conflict between Russia and Georgia has unfolded, faint but distinct memories of mine were triggered. Russia invades Georgia in 2008? Fighting in Tbilisi? Wait a minute—I know this!

Ghost Recon

(Image: shanewarne_60000)

It’s eerily (well, vaguely) close to the storyline of the original Ghost Recon, even the year.

20
Aug 08

VMware Fusion and Cisco VPN on Mac OS X – Fixing a Hiccup

I’m using a Cisco VPN Client (4.9.01) on Mac OS X Leopard (10.5.4). Yesterday I installed VMware Fusion (1.1.3), and today I noticed that my VPN wasn’t working anymore.

The error:

"Error 51: Unable to communicate with the VPN subsystem.
Please make sure that you have at least one network interface that is currently active and has an IP address and start this application again."

After some rooting around I suspected that Cisco was getting hung up on vmnet1 and vmnet8, VMware’s virtual network interfaces. My troubleshooting process pretty quickly landed on restarting the Cisco kernel extension, which fixed it. There are multiple ways to do this, but here’s the commands I used:

sudo /System/Library/StartupItems/CiscoVPN/CiscoVPN stop
sudo /System/Library/StartupItems/CiscoVPN/CiscoVPN start

That cleared up the problem.

Update: Also check out this article at Mac OS X Hints - A fix for ‘Error 51′ with the Cisco VPN Client.

19
Aug 08

Adobe Error Messages

I can identify with the conditions (complexity, time constraints, etc) that would give rise to these errors. But when you step back, it’s quite humorous. From an ideal perspective, messages like these shouldn’t really happen.


Copyright © 2010 ANDY PAYNE
Powered by WordPress and Theme Lab