Quantum state discrimination is a fundamental primitive in quantum statistics where one has to correctly identify the state of a system that is in one of two possible known states. A programmable discrimination machine performs this task when the pair of possible states is not a priori known but instead the two possible states are provided through two respective program ports. We study optimal programmable discrimination machines for general qubit states when several copies of states are available in the data or program ports. Two scenarios are considered: One in which the purity of the possible states is a priori known, and the fully universal one where the machine operates over generic mixed states of unknown purity. Also, the local implementation of a programmable machine is studied as a two-step measure and discriminate procedure. We find that optimal unrestricted programmable machines do not require quantum memory in some special cases.