read code from file or stdin, add samples dir