### 1. DEATHBUNNY (Designed with EuphoriA TecHnology and Built by

- Posted by Jossarian <darkspace at HOTMAIL.COM> Dec 22, 1995
- 2735 views
- Last edited Dec 23, 1995

Another crazy idea just got spawned by me, and this time it's DEATHBUNNY, the programming language. It is currently being developed by me (darkspace at hotmail.com) and MikPos/Mike Burrell (mikpos at softhome.net) I am currently mostly designing the language, and Mike is programming, so send mail to me if you have ideas for the lang, and mail Mike if you want to help him with the programming. Questions? Mail me (Any help would be appreciated) Here are the ALPHA specs for DEATHBUNNY: ALPHA specs for DEATHBUNNY (Designed with EuphoriA TecHnology and Built by UNknowN Youngsters) Needed: --More variable handling --A way to print special chars like !",.-+ etc and numbers --Looping constructs? (Arrrrr, we don' need no steenkin loops! :) --COME FROM? =) --ETC The DEATHBUNNY programming language is intended to be a parody. If you think it's crazy, sick, twisted and hard to use, you're right. But if you think that nothing can be accomplished with the language, you're very wrong. When finished, DEATHBUNNY will be a full-fledged programming language that can be used to do everything the user wants (if the user is up to it, that is ;) --PREPARE TO BE DAZZLED, PUZZLED, FRIGHTENED, ANGRIED AND VERY POSSIBLY COMMITTED TO A MENTAL HOSPITAL-- If a function has "param" in it, it means that the parameter can be a variable or a "normal" number. "variable" means that it has to be a variable (but not matrix) "value" means that the parameter has to be a number "matrix" means that the parameter HAS to be a matrix, nothing else There could be 7 registers, from A to G and a special register called a flag register that can't be written to by the programmer. The regs are 32bit. The registers HAVE to be binary instead of trinary etc, otherwise we'll have a hard time figuring out the math required to do a multiply or divide in trinary without actually having the commands in the language =) It's damn easy to do a divide by 2 or multiply by 2 in binary, u just shift the bits left or right 1 step. (I haven't the slightest clue on multiplying with something else than 3, though =) The selected register always "rotates" after an operation. So, if you do a reg_chg/100|\ in the beginning of your program, it would change the A register and then move on to B. The next operation you do will be done on reg B. Here are some example functions: reg_chg/param1|\ would replace the current register's contents with param1 (param1 is a bin8 or bin16 variable, or a binary number) reg_add/param1|\ adds param1 to the current register reg_sub/param1|\ duh.. reg_shift_r/param1|\ shifts the bits of the register right, param1 steps. Bits get clipped at the "edge" reg_shift_l/param1|\ duhduh :) reg_xor/param1|param2|\ XORs the bits in registers param1 and param2 with each other reg_reverse/param1|param2|\ Reverses the bits between param1 and param2 in the current register (does a NOT on them?) param1 and 2 are NOT included in the operation reg_dump/variable1|variable2|\ Dumps the first 16 bits of the currently selected reg to bin16 variable1 (variable types explained below), and the last 16 bits to bin16 variable2 reg_slice/param1|param2|variable1|\ Takes a slice beginning from param1 and ending to param2, and then dumps the slice to a bin variable1 (The first bit is the rightmost.) The slice includes the parameters, so if u do a slice from the 1st to the 3rd, the slice would have the first and the third bit in it. MAKE SURE THE SLICE IS THE RIGHT SIZE FOR THE VARIABLE! reg_selected/|\ No parameters. Puts the currently selected register into the STATUS flags in the flag register (STATUS flags are the last 3 bits of the flag register) so, if the selected register was now 7, and you run reg_selected/|\, then the flags register would be 11100000000000000000000000000000 (assuming that it hasn't already been modified by DEATHBUNNY) THIS COMMAND DOESN'T ROTATE THE REGISTERS -----------------------------NEW STUFF============ pr/param1|param2|\ The strange rotate-print function. Imagine a wheel that has all the letters written on it's outer edge. If you want to print a letter, you rotate the wheel. Simple :) Param1 is a matrix or a double_matrix containing the values, and param2 is the number of letters to print. The print function works like this: If euphoria had a pr function, and you wanted to print ABCD on the screen, you would do something like this: pr({0,1,1,1}) Because the "letter wheel" always starts at A, the first parameter is 0 (prints the currently selected char,) then it moves the wheel 1 step and prints the char (B) and does it again two times. Simple :) If you want lowercase letters, you use 100 + value (in base-10 that is, base-7 is a bit more complicated ;) So, if I want to print abcd on the screen, I would do a pr({100,101,101,101}) bconv/param1|param2|\ Converts the bin8/16 variable param1 to pair/quad param2. DO NOT try to convert a bin8/16 variable that is larger than 66 or 6666 base-7, or 48/2400 base-10 Some operators and such: comments are done by putting a ++ at the START of a line. The WHOLE line will get ignored. declare !name as type, example: declare !test as pair ++ declares the variable !test as a pair -- "Normal" variable operations -- <[param1|variable1|] assignment. For example, ding = 5 would be <[5|!ding] +[param1|variable1|etc|] add -[param1|variable1|etc|] substract *[param1|variable1|etc] multiply /[param1|variable1|etc] divide %[param1|matrix|] adds param1 to matrix. If data is a bin8/16 variable, it is converted to base-7. -- Matrix operations -- &-[matrix1|matrix2|etc|] substracts variable1 from variable2 and so on &+[matrix1|matrix2|etc|] add &*[matrix1|matrix2|etc|] multiply &/[matrix1|matrix2|etc|] divide &>[param1|param2|matrix1|] "extract" element defined by param1 and 2 to variable1 &?[param1|param2|matrix1|] partially ignore matrix1 so that only the elements from param1 to param2 may be used. Any operation on the ignored elements will be gleefully ignored. (param1 and 2 are included in the ignore) &![param1|param2|matrix1|] un-ignore elements param1 to param2 from matrix1 (param1 and 2 included in un-ignore.) Trying to un-ignore already un-ignored elements has no effect. pair, quad, string, bin16, bin8, matrix, double_matrix pair = max 66 (in base-7) quad = max 6666 (base-7) string = used in I/O operations? bin16 = 16-bit binary variable. the last (leftmost) bit indicates the sign of the variable, and if set to 1, then the variable is negative bin8 = 8-bit binary variable. Last bit indicablahblah u know :) matrix = 5x5 matrix, that makes 25 signed quads double_matrix = 10x10 matrix, 100 signed quads EXAMPLE program that prints "DEATHBUNNY" (It could be made shorter with looping constructs, but we don't have them yet ;) declare !textdata as matrix declare !temp as bin8 reg_chg/100|\ ++ Now reg A is 100 (4 in base-10) reg_chg/1100|\ ++ Reg B is 1100 (12) reg_chg/110|\ ++ C is 110 (6) reg_chg/111|\ ++ D is 111 (7) reg_chg/111|\ ++ "Joke" operation to cycle regs made in reg E reg_chg/111|\ ++ Ditto, but now in F reg_chg/111|\ ++ And now in G reg_add/10000000|\ ++ Making reg A a negative number reg_add/10000000|\ ++ and B reg_add/10000000|\ ++ C reg_add/10000000|\ ++ D reg_chg/111|\ ++ But not E, just doing a joke op reg_chg/111|\ ++ F too reg_chg/111|\ ++ G %[3|!textdata|] %[1|!textdata|] reg_slice/1|11|!temp|\ ++ putting our negative number from reg A to !temp %[!temp|!textdata|] ++ and add the data to the matrix %[25|!textdata|] reg_slice/1|11|!temp|\ ++ putting our negative number from B to !temp %[!temp|!textdata|] ++ and add the data to the matrix reg_slice/1|11|!temp|\ ++ putting our negative number from C to !temp %[!temp|!textdata|] ++ and add the data to the matrix %[25|!textdata|] reg_slice/1|11|!temp|\ ++ putting our negative number from D to !temp %[!temp|!textdata|] ++ and add the data to the matrix %[0|!textdata|] %[14|!textdata|] pr/!textdata|13|\ ++This makes a whopping 31 commands just to print out 10 letters ;) ++They took about 15-20 minutes to write, because I had to do all the number ++conversion, think about the registers (I took out the pair_sig to make ++life harder :) and everything ++(Comments not included in the line count)