
HashValue: an object for holding MD5 and SHA hashes - twampss
http://cocoawithlove.com/2009/07/hashvalue-object-for-holding-md5-and.html
======
trezor
Wow. A wrapper class for MD5 and SHA functions? A non-standard library for a
standard library? That's it?

I realize this is Objective-C and hence it even works on the iPhone which
gives it some sort of pseudo-cool alibi and blah blah, but are we seriously
having this kind of über-basic stuff on the HN frontpage?

~~~
delano
Ya, I agree. There's a lot of cool stuff you can do with hashes. I started
working on a library for Ruby a couple weeks ago for creating hashes and
tracking history of objects.

    
    
        "kimmy".gibbler              # => c8027100ecc54945ab15ddac529230e38b1ba6a1
        :kimmy.gibbler               # => 52be7494a602d85ff5d8a8ab4ffe7f1b171587df
    
        a = { :magic => :original }     
        a.gibbler_commit             # => d7049916ddb25e6cc438b1028fb957e5139f9910
        
        a[:magic] = :updated           
        a.gibbler_commit             # => b668098e16d08898532bf3aa33ce2253a3a4150e
        
        a[:magic] = :changed 
        a.gibbler_commit             # => 0b11c377fccd44554a601e5d2b135c46dc1c4cb1
        
        a.gibbler_history            # => d7049916, b668098e, 0b11c377
        
        a.gibbler_revert 'd7049916'  # Return to a specific commit
        a.gibbler                    # => d7049916ddb25e6cc438b1028fb957e5139f9910
        a                            # => { :magic => :original }

~~~
ivey
You seem to have a serious Full House problem, but an awesome library coming
along. I'd expect gibbler_revert to be gibbler_revert!, plus a non-destructive
version to fetch a specific commit. If I get some time, I may fork/hack a
little.

(For the Google impaired: <http://github.com/delano/gibbler/tree/master>)

~~~
delano
Haha, it's true. I do have a serious FH problem.

I also needed an obscure but familiar keyword so the method could be included
in any object with low risk of collision. There is currently near-zero usage
of the keyword "gibbler" in any project (Ruby or otherwise).

And thanks for the ! correction. I've updated the repo and docs.

~~~
paulgb
When you say Full House problem, are you referring to collision of names? (All
Google comes up with is info on the 90s TV show)

~~~
sho
Gibbler was a character on the show. Seems the name was chosen because it's
apparently unique in the ruby ecosystem.

I know this only because I was in love with her at the time .. guh

