Learning how to knit on knitting machines