manastech/crystal — pull request #128 by MrZYX (2014-05-05 15:27:11+00:00)
Title: 2048 sample

Not fully polished, PR to get some feedback.

The io/console implementation is very rough and doesn't even implement everything http://rxr.whitequark.org/mri/source/ext/io/console/console.c does, even not for the methods implemented. So this probably works only on Linux, if not only on Archlinux.

The added IO#read_nonblock differs from Rubys in that it returns `nil` when encountering `EWOULDBLOCK` or `EAGAIN` instead of raising these. Here's MRIs implementation: http://rxr.whitequark.org/mri/source/io.c#2541

I'm open for any suggestions.