Interpreters (computer languages)
Prognet(te) Ver 1
This interpreter is flexible and not much of Reverse Polish. Carrage returns are completely ignored; Prognet relies on you for the semicolons to terminate lines. Brackets are for bodies and indexes; braces are for lists; parentheses are for pairs, grouping and argument lists. There are also delimeters. (So without a semicolon, a line is connected to the next line.)
It allows you to think of variable names as data. Strings are a very different kind of an object.
Example of Prognet code:
define introduce() [
let (name ~ input("What's your name? ")) [
To try Prognet (or Prognette, if you prefer this feminine spelling), click here to get a zip file, then extract it to a directory.
- For a REPL where you can type in Prognet code and get a result, locate RunNorm.py and double-click it. (Pretty much like Liss, but you need to use a semicolon to terminate your line and you need = at the front to return the object.)
- If you have a saved document's worth of Prognet code, and you want to execute it, an easy way is to locate ExecProgram.py, double-click it, and enter the name of the document.
- Try not to mess with the other files; they help Prognet do what it wants to do.
Rejah(he) Ver 1
This interpreter is again Reverse Polish. However, it runs quite fast because its code is read as Rejah objects. Prefix an expression with ' to return it as the object the code is read as. There are other such characters (like `, :, #). But lists must be in brackets; parentheses are only for special cases.
This interpreter is so smart that it does not have to make a string of Python code and execute it under any purposes! Also, it supports macros (better than functions because special kinds of arguments are supported, such as names of variables). Can you guess what they look like? The function macro-ectn (macro execution) returns the body that is to be executed.
Scared of variable name capture? That's the purpose of the genvar (generate varname) function.
Rejah was a request from InterpreterAce, a sleepover camp held twice each summer, and it is in three parts:
- Rejah-ice cream (A screen of code persuading you to try the language. Do not call Rejah-ice cream ice cream!)
- Tutorial (So far, interactive help ([help]) is here to explain a lot.)
- Program idea (For those who love Rejah so much they are tempted to program in it, but can hardly decide what to program.)
Examples of Rejah code:
[define introduce [[name [input "What's your name? "]]]
"This function introduces the user to Rejah. name is a default argument"
`[Why hello there, :name ! I am so pleased to meet you !]]
[macro recurse [var val #body]
"A quite simple version. The name of the captured function is self"
`[letf [[self [:var] :#body]]
[recurse n 9
[if [iszero n]
[self [1- n]]]]
To try Rejah (or Rejahhe to be fancier), click here to get a zip file, then extract it to a directory.
Hope you enjoy this website! It might change some other time.
- For a REPL where you can type in Rejah code and get a result, locate RunNorm.py and double-click it. (Type an expression and it evaluates. Actually, the REPL input works just like the input function.)
- If you have a saved document's worth of Rejah code, and you want to execute it, an easy way is to locate ExecProgram.py, double-click it, and enter the name of the document.
- Try not to mess with the other files; they help Rejah do what it wants to do.
- The directory provides a text adventure called Niores Adventure, programmed in Rejah. To play it, use either ExecProgram.py, or go into the REPL and type [ex niores]. If there are any saved games or a score file, a directory niores will show up. If you delete it, all saved games will be lost! Also, a cheat file and a walkthrough are provided. Every once in a while, the walkthrough's okay, but the cheat file's worse! Any opinions? My email address is firstname.lastname@example.org