Software [Reset]
Next 10 (64)
Type Mess
Today I bumped into Haskell's "Monomorphism Restriction", which essentially requires that you provide explicit type information on parameters that are overloaded. It appears that GHC/i aggressively tries to avoid producing this error, which can lead to some strange behavior. For instance, f is a function to show and then print something:

f = putStrLn . show

Loaded into GHCi in a file by itself will produce the MR error. However:

f = putStrLn . show

f [1, 2]

Does not. If you query the type of f, it reports f :: [Integer] -> IO (). It's inferred that f takes a list of Integers from our function call, which is understandable but not quite as general as we'd intented f to be. If we add an another call to display a string:

f = putStrLn . show

f [1, 2]
f "ab"

We receive a unhelpful type error about the value of "1". I was scratching my head for awhile until I checked the type of my helper function.

The solution? Explicitly add the type signature:

f :: Show a => a -> IO ()

f = putStrLn . show
8/29/2009 9:26 PM
 
Un-Liking "Like" in Google Reader

Google Reader recently added a "Like" button to each entry that you see, to go along with the "Star" and "Share" features. Now, I do use "Star" to remind myself of things I'd like to come back to later (no YouTube at work). "Share" I use much less frequently to tip off the exactly two people that are in my GR people list.

What to do with "Like"? These options aren't orthogonal -- would you ever "Star" something you also "Liked"? "Staring" is already like "Sharing" with yourself and most of the time you're already "Liking" it. I suppose you could "Share" news of a tragedy, but being the bearer of bad news via an RSS entry is more than a little backhanded.

Making matters worse is that a count of the number of people "Like"ing an entry appears directly in line with its body, bloating something that's supposed to be stream-lining the gobs of content flowing into your brain. The count is a link to show you all the strangers who clicked the little smiley face, strangers like "BMac" and "Joe", who, when clicking their names reveals the items they've... "Shared".

The count tops off at 100, so in the Dilbert entry above you have a useless notification filling space and telling you the same thing in all the entries since the feature was rolled out.

Finally: You cannot turn "Like" off. So I am going to protest by "Liking" this entry.
7/17/2009 1:41 PM
 
Firefox Fail?
To solve the problem of the randomization, the NSS team came up with something clever, something so great, that no-one else had ever thought of that before: they decided to read the files in all possible temp folders on disk with multiple threads so these files can be used as seeds for the randomization. Brilliant.


Link
7/11/2009 10:32 AM
 
Acid3
acid3_spat

This put a smile on my face: Nerd fight!
3/26/2008 9:46 PM
 
Learning Flex
Here's a sample flex app that will test a string for palindromes:



Source Code
3/14/2008 10:28 AM
 
Re: The Blog
So, I spent 4 hours updating the blog software today. I added a nifty login system and the ability to save draft posts.

I'm a little conflicted about spending lots of time on these sorts of features, though, because they're invisible to everyone but me! I guess that's the ugly side of DIY.
2/23/2008 3:12 PM
 
More Backup-Related
Coding Horror has an article on backup strategies that's timely in the light of my current project. The comments are enlightening as usual; it sounds like I'm not the only one that's been bitten by a drive failure.

The comments about "house burning" makes me wonder if I should tote a drive full of data somewhere and periodically back up data there. It would likely be cheaper than online backup and much faster to restore if something goes wrong. Guess I should have ordered 3 drives...
1/30/2008 10:41 AM
 
Spiffy New Outfit!
Movable Type is Dead! I've written a new web application to serve up digital retrograde. It's a little rough around the edges functionally, but I think the look suits me a whole lot better. The added page width is like a breath of fresh air.

If you'll forgive a little navel-gazing, I started this site almost 4 years ago now using a much more primitive custom blog. It never worked properly, had next to no features, and was really, really ugly. I had no idea what I was doing. So, I installed "Movable Type" and it turned out to be just what I needed. Archive.org got a good snapshot of it.

The MT version of the page treated me well for a few years but had its own quirks; it was slow and had bad the tendencies to eat posts and accumulate masses of comment spam. I 'upgraded' to a newer version and promptly broke it beyond easy repair. Snips convinced me that I was ready to try my hand at blog software again, so here I am.

There are risks to doing this; I need to figure out a good way to forward all the old MT pages to their new addresses. I probably won't be on the first page of search results for Shamu much longer. I'll survive.

Technical: I used Yahoo's 'Grids' CSS for the layout and really appreciate how easy it made the styling. There's a dash of jQuery thrown in, but the bulk of the bit shuffling is done with ASP.NET and a MySQL backend.

If you have any ideas for future features or something isn't working, comments are accessible through the little chat bubble to the right.
1/22/2008 10:32 PM
 
Someone Found "Wiim" Useful
Almost a year ago I posted a prototype for a Wii Remote interface library for windows, "Wiim", that included a primitive "Lunar Lander" style game you play by tilting the remote. It's just been sitting ever since, though it generates the occasional question for my inbox from random developer passers-by.

Today I got another of these messages in mostly intelligible English -- mostly except for "I enjoyed your example, then I can show you some good children faces :-)" followed by a link to a YouTube video. With a small amount of trepidation I clicked.. and was pleasantly surprised:



From what I understand, this is footage of a French children's science fair. Skip ahead to :40 and 4:00 for the bits of kids playing "Lunar Lander". Cute!
12/4/2007 10:43 AM
 
Snips Update
The "Edit User" page on Snips is now functional, you can change your profile image and some other, mostly useless, profile data.
9/10/2007 12:11 PM
Next 10 (64)