Overooped

More of a programming nerd than is strictly healthy. See also {nevyn.nu, thirdcog.eu, twitter}

Projects

Sun Jan 24
2010

University of Oxford just released the source code for their PTAMM library, the most amazing Augmented Reality library I’ve seen. It does simultaneous localization and mapping (SLAM) very very accurately, with no markers or tags, and copes very well with changes in scale and perspective. If you are a programmer and at *all* into AR, you MUST check out this library.

I’ve been working all weekend so I haven’t had a chance to check it out myself yet :( I’ve been watching their youtube videos for the past year though, and been amazed with every video. I really really wish I had the time to check it out properly.

Wed Jan 6
2010
Sun Jan 3
2010
lucius:

Brock Davis: “6/3/09: road rage”

lucius:

Brock Davis: “6/3/09: road rage”

Wed Dec 30
2009

Filtering a UITableView, and keyboard wonkiness

Hey, another bug that took half a day to fix. That always deserves a blog entry.

So I have a UITableView, and on it I have a tableHeaderView containing a UISearchBar. The UISearchBar filters the contents of the UITableView, and thus at every key press I have to reloadData (or more specifically, I -[UITableView reloadSections:withRowAnimation:]). For some reason, this calls setUserInteractionEnabled:NO on the UITableView, which in turn makes the UISearchBar’s UIFieldEditor resignFirstResponder, which makes the keyboard collapse. After the reload, user interaction is restored, UISearchBar gets focus, and the keyboard comes up.

This is rather embarrassing: I even subclassed UITableView, disabling setUserInteractionEnabled, before I realized that right there, before my eyes, is a UISearchBar delegate method called -[UISearchBarDelegate searchBarShouldEndEditing:]. Just add a bool ivar to the view controller saying whether the search bar may be resign key, set it to false before refreshing, refresh, and set it to true, and in the above delegate, return the ivar bool. Done, no more disappearing and reappearing keyboards.

Oh, and the code:


- (void)searchBar:(UISearchBar *)searchBar textDidChange:(NSString *)searchText {
	_searchBarMayResign = NO;
	[self.tableView reloadData]; // or equivalent
	_searchBarMayResign = YES;
}
- (BOOL)searchBarShouldEndEditing:(UISearchBar *)searchBar;
{
	return _searchBarMayResign;
}
Sat Dec 26
2009
[Flash 9 is required to listen to audio.]

lucius:

An 8-Bit Chiptune version of Toccata by J.S. Bach. BWV 565. Made by yours truly, with LSDJ, a Game Boy, and some reverb.

Man! Didn’t know you were that kickass. This song is seriously awesome, I feel like making a Castlevania remake just to have some interactive visuals to this song.

(Played 68 times)

thedailywhat:

Stop What You’re Doing And Watch The Hell Out Of This of the Day: The Internet’s resident aural-pleasure-purveyor Pogo does Pixar’s Up.

[via.]

Sat Dec 19
2009
Exercise 4-12. Adapt the ideas of Cthulhu() to write a recursive version of the Forbidden Song of Hali; that is, to unravel the fibres of reality and allow the icy liquid darkness of Carcosa to devour your mind. The C Programming Language: 4.10
Tue Dec 15
2009
Oh, why this place’s gone so quiet? I’ve got a job ;D

Oh, why this place’s gone so quiet? I’ve got a job ;D

Wed Nov 4
2009
GPYOW: Inverted Halo Edition. Because I’ve always wanted to do a GPYOW.

GPYOW: Inverted Halo Edition. Because I’ve always wanted to do a GPYOW.

Fork me on GitHub