Getting Started with Siren

Depending on what your background, you may take any one of several paths to get started with Siren.

If you're impatient to see what Siren can do, jump ahead to the demo script near the end of this outline.

If you're an experienced Smalltalk developer, I encourage you to read through the rest of this document, and use the in-line code examples as starting points to explore the implementation classes. Use the pop-up menu item "debug it" to get right into the code.

If you're a literate programmer, but unfamiliar with the Smalltalk language or environment, skip ahead to the short introduction to reading the Smalltalk language at the end of this document.

Executing code: do-it and print-it

As a very simple introduction, look at the following line of code
3 + 4
this is a perfectly well-formed Smalltalk program. To execute it, you simply have to select toe text, and then use the pop-up contextual menu to compile and run it; we call this "do-it" in the menu. Try selecting the above line and selecting the menu item "do-it."

You might notice that nothing visible happened. The system compiled and executed the program, but the threw away the result. To print the result object from an expression, use the menu item "print-it." Try this again with the above example code. this should now have printed the string "7" at the end of the text you selected.

To make text selection easier in this outline, I generally enclose text that's intended as a code example in square brackets (to make selecting the code easier -- you simply need to click on the opening or closing brackets). In many cases, I also place a "d,", "p," "i," or "db" after the text to give you a hint as to whether to do-it, print-it, inspect-it, or debug-it. Try this on the examples below.

[ 3 + 4 ] d
[ 3 + 4 ] p

[ 100 factorial ] p
[ 100 factorial ] db