Click here to start CodeSimian immediately in a Java-Applet (in this web browser window)
|
Java Programming |
Artificial Intelligence |
Art and Music |
HELP!!! |
This code finds and uses JDK to create a Java class that returns 7 + x*y + z.
The 0 is replaced by a new command with 3 parameters.
If any part of input code cant be converted to Java code, it becomes parameter:
javaOutSimple( 0 +(7 *(x y) z) ) To get the source-code, download CodeSimian.jar and rename it to sourceCode.zip codesimian.sourceforge.net Free, Open-Source: any GNU GPL 2+ license (this is version 3, you may like 2 better). Core Design: CodeSimian has 1 main Java class: CS, which most other classes descend from, including classes generated at runtime. Every CS is a list of other CS, and the list has a minimum and maximum size specific to each class type. Numbers are a list size 0. MP3s are a list size 1 - 3. The first thing in an MP3 is the filename or URL. The second thing is optional: the position (any number). The third thing is also optional: megabyte limit of decompressed data. The purpose of CS is to set, get, insert, or delete any range in the list as any Java type. For example, get indexs 3 - 7 as a double[] array or String. The doubles would have the same values as the chars in the String. CodeSimian's windows are made of these objects recursively. For example, this code opens a window with a button that starts a sound when you click the "start" button and the audio frequency changes when you move the slidebar, which starts at position 70%. window(horizontal( slidebar#s(.7) button#start(sound(sine(*(s count))) ))) To get a list of commands, for example, start the Jar file like this or type something similar: java -jar CodeSimian.jar show me a list of commands Or try typing something like this: java -jar CodeSimian.jar play a sound that uses the microphone Click here to go to CodeSimian's previous website, which is much bigger than this one. |
CodeSimian.jar creates more Jar files similar to itself. Just change some text and click Save. This code creates a modified Jar that says 'Hello' when it starts: do( setInnerFile('cs/start.cs' 'ask(\'Hello\')') saveUpdatedSelf('C:\\file.jar') ) Talk to CodeSimian. The window that appears in the front has a chatbot at the top. It writes sentences by the letter instead of using sentence templates, so if you say "what are you" CodeSimian might respond "ha at are you". It usually tries to rephrase what you say to it, but can have simple conversations. You should copy/paste the text of any website into CodeSimian and press enter, then have a conversation about that website. There is also a chatbot that puts sentences together as words (instead of letters). It is smarter but does not understand typos. Click Intelligent_Chatbots then word_level_chatbot to talk to it. Dont be confused by the strange way of typing. You type into the top, click the button, and text appears in the bottom. Then you erase what you typed in the top, type something else, and click the button again... CodeSimian also includes bayesian and neural networks and simple evolution, but those things are not well connected to the rest of the software. For example, the learnSelfDFromSelfListD(inputs...) command. Click here to go to CodeSimian's previous website, which is much bigger than this one. |
To play an MP3 backwards at double speed, use this code: sound(mp3("C:\\music\\xx.mp3" *(-2 count)))
Or replace "C:\\music\\xx.mp3" with 1 of these recordings of CodeSimian...
Draw a musical instrument in any paint program while you play it with the mouse.
Or move the mouse over any picture.
Click the "sound of your computers screen pixels around your mouse" button.
The sound is literally the brightness of the screen pixels in a rectangle around your mouse,
from left to right then top to bottom like you would read a book.
If pixel brightness is height of a record surface, its like a record needle scraping over your pixels.
|
When you see the 3 windows, click the LOAD_AND_SAVE button and a window with some filenames opens.
Click a filename to load it, then click either "compile" button and it does what the code() says.
You can replace the filename at the top of the second window to search for files.
You will need to know how to copy and paste text. To "copy" text, select it with the mouse, hold the ctrl button, and push C. You dont see anything change, but if you "paste" after that, the text appears where you pasted. To "paste" text, hold the ctrl button and push V. To save the changes you make to CodeSimian (as a new Jar file), click Self_Modifying_Jar_File then click save_new_unique_CodeSimian.jar. If you made Java changes, you will need to click "CodeSimian Java Compiles itself". Click here to go to CodeSimian's previous website, which is much bigger than this one. |