3 ms·
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 b
by rikkus 10y ago
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/ http://artengine.ca/matju/RubyX11/