My team and I have been able to create (and are continuing work on) completely rewritten versions of Grailsort for research, educational, and benchmarking purposes. Hopefully anyone who's confused by Andrey's original code can have a better shot at digesting the genius ideas behind this algorithm.
https://github.com/MusicTheorist/Rewritten-Grailsort