Speechify
1v$ Thu Jan 1 0:00:00 GMT 1970
For those that don’t know, this Saturday I’ll be finally getting married to my long time (and long suffering) fiancée Andrea.
As joyous an occasion as this Saturday will be, there is one problem. I have to give a speech.
I’m not unaccustomed to public speaking, having given a few techy talks here and there, and during uni, but this…well..this is different.
Giving my speech as the groom of the day will involve standing up in front of a room filled with friends, family, and family-to-be.
As my manager said the other day, this is actually the one time in which your audience is more on your side than any other audience you’ll ever speak before, and yet it’s still as frightening as all hell.
As for how my speech is going, I’ve written over half of it, but I’m now considering re-writing what I’ve got as I’m just not sure if it’s the way I want to go.
Jonty has suggested I write a bunch, plus a markov chaining tool, and generate a speech. Of course he also suggested I include lyrics from The Fresh Prince Of Bel-Air.
Whatever I come up with in the end, I’m sure it’ll be fine, as long as I thank the right people and hit the right sentiments.
Now, this is a story all about how
My life got flipped-turned upside down
And I’d like to take a minute
Just sit right there…
Edit
Fixed textitle usage in atom feed
1v$ Fri Mar 10 12:31:54 GMT 0349
I’ve started using Textile) for markup in my posts, but it wasn’t getting parsed in my Atom feed..now fixed!
Edit
Extending PHP5.3 objects at runtime with lambda functions
1v$ Thu Jan 1 0:00:00 GMT 1970
PHP 5.3 will include lambda functions and closures.
One interesting thing that will come from this will be the ability to dynamically add a method onto a class at runtime, by combining lambas with the magic __call method..well, at least a hack to make something like this.
Effectively this is similar to traits/grafts, except you don’t have to define anything in a new class, you just extend the object itself when you come to use it.
You could also use a singleton within the Extensible class that keeps track of any added methods and propagates them to any other existing or new instances.
<?php
class Extensible {
var $_methods=array();function __call($name, $args) {
if (array_key_exists($this->_methods, $name)) {
call_user_func_array(array($this, $name), $args);
} else {
throw new Exception(‘Unknown dynamic method ‘ . $name . ‘ called in class ‘ . get_class($this));
}
}function __set($name, $value) {
if (is_callable($value)) {
$this->_methods[$name] = $value;
}
}
}class MyClass extends Extensible {
function test() {
echo ‘Non-dynamic method’;
}
}$object = new MyClass();
$object->test2 = function () {
echo ‘Dynamic method’;
};// test() is defined within the static class definition
$object->test();
// test2() was created dynamically at runtime, but you call it just as
// if it had been in the class definition
$object->test2();
?>
EDIT:
Incidentally this my first proper post sent via email. w00t.
Edit
Dynamic PHP requires/includes, APC and Habari
1v$ Thu Jan 1 0:00:00 GMT 1970
This topic has been talked about across teh interwebs quite a bit already, but I’m putting it here for potential googlers to come across it when looking for Habari related posts.
Like a lot of blogging/CMS software, Habari uses PHP dynamic includes and requires for pulling in user-selected themes and plug-ins. This might cause some problems for you if you use the opcode caching extension APC (or one of the other alternatives like Xcache) to speed up PHP apps on your server (by caching the compiled opcode data, so the Zend engine doesn’t have to compile this everytime the script is executed).
Normally opcode caches check to see if the file has been modified, but because dynamic includes/requires use runtime variables to define where a file is pulled from, the caches can become a bit screwed up if you move any files around.
2 ways to solve this are to 1) flush the cache (you can find more about this in your opcode caches documentation, I for one used the default apc.php admin script that comes with APC to log in and flush the data), or 2) update the mtime on the file that’s throwing a fatal error to tell the cache to update for this file.
Edit
No xmlrpc to Habari from G1
1v$ Thu Jan 1 0:00:00 GMT 1970
The Android Market place doesn’t have any xmlrpc apps to work with Habari, just one that should work but doesn’t as it’s doing something only Wordpress seems to understand. FAIL.
Edit
A Happy New Year..and A Happy New Blog
1v$ Thu Jan 1 0:00:00 GMT 1970
Hi all,
I’m finally getting round to shaking this place up, after procrastinating with my node-based CMS, I’ve decided to just use Habari for a while (it suits my needs, and I like their coding philosophy), however I’ll continue to work on my CMS too.
Hopefully with the new blog I’m going to get back into coding and cultural write-ups, as well as some personal entries and reviews.
Hellooooooooooo 2009!
Edit:
As an aside, all my old content is still available, and I’ve setup 301 redirects to the old stuff in order to maintain some Google mojo. Hopefully in the future I’ll import all the old content into the new system.
Edit