Bar feeder applies torque to compensate bending of workpiece during machining