Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Anyone who's interested in X11 (the protocol) and the Ruby language should have a look at Mathieu Bouchard's incredible implementation [1]

There's some quite beautiful Ruby code in there, e.g.:

  module X11
    k = Keysymdef = {}
    c = Cursorfont = {}
    [k,c].each {|x| x.extend X11::MAssignForHash }
    k[%w| space exclam quotedbl numbersign dollar percent ampersand |]=32..38
    k[%w| quoteright parenleft parenright asterisk plus comma minus |]=39..45
    [...]
[1] http://artengine.ca/matju/RubyX11/


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: