-this is a coding language I made. The code here is for a small neural network learning xor. I eventually want to use it to make a self-modifying AI. -click space to run the code. -Use turbowarp for much higher speeds (5-10x speed). https://turbowarp.org/1367333549?turbo -for the AI, the output is o1. the final result should be close to 1. - to learn how to make your own language, go here: https://scratch.mit.edu/projects/1366812130/ Opal is a line based programming language. Syntax: The syntax of opal is always command operand_1 operand_2 … separated by spaces. Variables: Variables can be defined: -set variable 5 -change variable 1 -set variable ‘ hello there bob “ (notice that quotes open with ' and close with ") -set variable + 2 5 And read: -variable (reads value of variable) You can also reference other variables: Ex.: set var h set h 4 var (returns h) eval var (returns 4) Lists: Lists work a lot like variables: -set list ‘ 1 2 3 “ But you can change them like this: -set list replace 2 list 5 (list would then be 1 5 3) -set list insert 5 2 list (list=1 2 5 3) -set list add 5 list (list= 1 2 3 5) -set list del 2 list (list=1 3) And you can read them: -list (returns 1 2 3) -item 1 list (returns 1) -length list (returns 3) Operators: Operators are prefix expressions: + a b...................addition - a b....................subtraction * a b....................multiplication / a b....................division abs a..................absolute value > a b...................greater than < a b...................less than = a b...................equality and a b...............logical AND or a b..................logical OR not a...................logical NOT join a b................join values as text random a b.........random value between bounds Control flow: Loops: -repeat times lines_in_body Ex: repeat 3 2 set var + a 1 set a var (repeats those 2 lines of code 3 times) -repeatuntil condition lines_in_body If then: -if condition lines_in_body Procedures: define name … end (creates a procedure) -call name (runs a procedure) Ex: define add set var + var 1 end set var 3 call add Code editing: Opal has the ability to edit code. -code line (returns line of code) -replacecode line what_to_replace_with (replaces line of code with what_to_replace_with) Ex: set var 2 seplacecode 1 ‘ set var 5 “ (returns new code: set var 5 replacecode 1 replace 3 code 1 5 ) Ex: set var 2 replacecode 1 replace 3 code 1 5 (returns new code: set var 5 replacecode 1 replace 3 code 1 5 ) -deletecode line (deletes line of code) -insertcode what_to_replace_with line -addcode what_to_replace_with -lengthcode (returns length of code)