News for hackers. Stuff that matters.
Re:Functional Thinking after OO by silentbicycle on Tuesday March 15, 2011 @04:02PM (#2329122)
There's nothing specific to Lisp in that, though. I did something similar with my Lua redis client, sidereal (http://github.com/silentbicycle/sidereal/blob/master/siderea...):

    ---R: Return the string value of the key
    function Sidereal:get(key) end
    cmd("GET", "k")
    
    ---R: Set a key to a string returning the old value of the key
    function Sidereal:getset(key, value) end
    cmd("GETSET", "kv")
    
    ---R: Multi-get, return the strings values of the keys
    function Sidereal:mget(key_list) end
    cmd("MGET", "K")
(The comment and function lines are only there for luadoc; it could just be the cmd lines.)

FWIW, I need to update it - antirez changed the protocol in a recent version, and I haven't gotten back to it yet. It should remove a good portion of the code, though - he switched everything to using the bulk form.

There are no comments on this comment yet.