Linguine programming language by Jeffry Johnston (linguine@kidsquid.com) November 23, 2005 Introduction ------------ Linguine is designed as a successor to Spaghetti. The word linguine means flattened pasta or spaghetti. True to this definition, Linguine programs are much shorter and flatter compared to their long and skinny Spaghetti ancestors. However, both languages share the yummy feature that program lines may be arranged in any arbitrary order. Linguine adds multiple pointers and unlimited storage and cell sizes for Turing completeness (and that extra full quality). The command set is similar to Spaghetti, although AND has been replaced by the more capable (and delectable) NAND, and there is an additional integer output command. Try some Linguine to satisfy your saucy esoteric appetite... mmm carbs! Syntax ------ The program line format is: line[command]jump Each part is required, so there must be a line, left bracket, at least one command, a right bracket, and a jump. Line is a unique line number for this program line. Jump is the line number to jump to if all commands on this line have completed without jumping. Line and jump are integer values. Integers may be positive or negative and have no upper or lower bounds. However, line may not be 0, as this line number is reserved for jumping to line 0 to exit the program. There may be multiple commands per program line, separated by commas. Valid commands are: Command Meaning ------- ------- x=y Assignment (x=y) x+y Addition (x=x+y) x-y Subtraction (x=x-y) x|y NAND (x=x NAND y) x>y Bit shift (x=x>>y if y is positive, else x=x<' instruction. November 27, 2005 Added `^' instruction. Examples -------- 'Hello World in Linguine 'Programmed by Jeffry Johnston, 2005 1[0=72,0$,0+29,0$,0+7,0$,0$,0+3,0$,1=32,1$,0-24,0$,0+24,0$,0+3,0$,0-6,0$,0-8,0$,1+1,1$,1-23,1$]0 'Cat program in Linguine 'Programmed by Jeffry Johnston, 2005 1[0?,0$,0~10:0]1 'Fibonacci sequence calculator in Linguine 'Programmed by Jeffry Johnston, 2005 1[0=32,2=1,1#,0$,2#]2 2[1+*2,3=*1,1=*2,2=*3,0$,2#]2 '99 bottles of beer in Linguine 'Programmed by Jeffry Johnston, 2005 1[0=99,2=32,3=10,4=44,5=46]2 2[1=0]8 3[4$,3$,1=1]8 4[5$,3$,6=84,6$,6+13,6$,6+10,6$,6-6,6$,2$,6+10,6$,6-1,6$,6-9,6$,2$]5 5[6-1,6$,6+11,6$,6+8,6$,6-9,6$,4$,2$,6+2,6$,6-15,6$,6+18,6$,6$,2$]6 6[6-10,6$,6+11,6$,2$,6-19,6$,6+17,6$,6-3,6$,6+6,6$,6-7,6$,6-10,6$,4$,3$]7 7[0-1,1=2]8 8[0~0:9,0#]10 9[6=78,6$,6+33,6$]10 10[2$,6=98,6$,6+13,6$,6+5,6$,6$,6-8,6$,6-7,6$,0~1:11,6+14,6$]11 11[2$,6=111,6$,6-9,6$,2$,6-4,6$,6+3,6$,6$,6+13,6$,1~0:12,1~1:4]12 12[2$,6-3,6$,6-1,6$,2$,6+6,6$,6-12,6$,6-3,6$,2$]13 13[6+18,6$,6-22,6$,6+11,6$,6$,1~0:3,5$,3$,0~0:0,3$]2 'Digital root calculator in Linguine 'Programmed by Jeffry Johnston, 2005 1[1?,1~10:3,0+*1,0-49,0<9:2,0-9]2 2[0+1]1 3[0#,1$]0 'ROT13 in Linguine 'Programmed by Jeffry Johnston, 2005 1[-2?,-2~10:3,-2<65:2,-2<91:5,-2<97:2,-2<123:6]2 2[*-1=*-2,-1+1]1 3[*-3~0:4,*-3$,-3+1]3 4[-2$]0 5[-2+13,-2<91:2,-2-26]2 6[-2+13,-2<123:2,-2-26]2 'BF interpreter in Linguine (Turing completeness proof by implementation) 'Programmed by Jeffry Johnston, 2005 1[*-2?,*-2~33:2,-2+1]1 2[*-2=-1,-2+1]3 3[-3=**-1,-3~-1:0,-3~43:4,-3~44:6,-3~45:7,-3~46:9,-3~60:10,-3~62:11,-3~91:12,-3~93:14]15 4[*-2+1,*-2~256:5]15 '+ 5[*-2=0]15 6[*-2?,*-2~-1:5]15 ', 7[*-2-1,*-2~-1:8]15 '- 8[*-2=255]15 9[*-2$]15 '. 10[-2-1]15 '< 11[-2+1]15 '> 12[*-2~0:13]15 '[ 13[-3=1]16 14[-3=-1]16 '] 15[-1+1]3 16[-4=1]17 17[-1+*-3,*-1~91:18,*-1~93:19]20 18[-4+*-3]20 19[-4-*-3]20 20[-4~0:21]17 21[-3~1:15]3 'pi calculator in Linguine 'Programmed by Jeffry Johnston, 2005 1[0=1,1=0,2=1,3=1,4=46]2 2[5=*0,5+*0,5+*0,-2=*5,-2+*1,-3=*2,-1=3]16 3[6=*-2,-2=*5,-2+*0,-2+*1,-1=4]16 4[6~*-2:8,-3=*3,-3+*3,-3+1,-2=*2,-1=5]14 5[2=*-2,1+*0,1+*0,-2=*1,-1=6]14 6[1=*-2,-2=*0,-3=*3,-1=7]14 7[0=*-2,3+1]2 8[6#,4~46:9]10 9[4$,4=0]10 10[-2=*0,-3=10,-1=11]14 11[0=*-2,-2=*2,-3=*6,-1=12]14 12[1-*-2,-2=*1,-3=10,-1=13]14 13[1=*-2]2 14[-4=*-3,-5=*-2,-2=0]15 15[-4~0:*-1,-2+*-5,-4-1]15 16[-4=*-2,-2=0]17 17[-4<*-3:*-1,-4-*-3,-2+1]17