Talk:Quiney

Working on an interpreter.
Should be ready by the evening, there's some bugginess with loops. 50.161.94.113 17:08, 23 January 2016 (UTC)


 * ...Do not ever trust my time estimates. Here you go:

program=list(input("Quiney program:")+" ") instructions=[" ","[","+",".","}","{",",","-","]","*"] pc=-1;dp=0 while pc+1len(program): pc=100000000 print("end") break pc-=1 continue if program[pc]=="]": if not program[dp]==" ": nest=0 while not (nest==0 and program[pc]!="]"): if program[pc]=="[": nest+=1 if program[pc]=="]": nest-=1 pc-=1 if pc<-1: pc=100000000 #bad way of saying "shut up and terminate" print("end") break pc+=1 continue if program[pc]=="+": program[dp]=instructions[(instructions.index(program[dp])+1)%10] continue if program[pc]=="-": program[dp]=instructions[(instructions.index(program[dp])-1)%10] continue if program[pc]==".": print(program[dp],end="") if program[pc]==",": program[dp]=input("") if program[pc]=="{": dp-=1 if program[pc]=="}": dp+=1 if dp==-1: program.insert(0," ") dp+=1 pc+=1 if dp==len(program): program.append(" ") if program[pc]=="*": program[dp]=instructions[10-instructions.index(program[dp])%10] Run in python 3, then ...um 50.161.94.113 17:08, 23 January 2016 (UTC)
 * 1) Quiney interpreter By this person