I remember hearing about this on the podcast roguelike radio a long time ago - truly a brilliant little hack.
Here's the link for anyone interested: http://www.roguelikeradio.com/2016/06/episode-122-nethack-to...
A very niche topic on an already niche podcast, but probably will get some decent overlap on HN.
(Also I'm assuming this is the same team? It's hard to tell.)