[FortressDocumentation <fortress.bat hello.fss K:\mastri\fortress\ProjectFortress>java -cp "build;third_party/junit/junit.jar;t hird_party/xtc/xtc.jar;third_party/jsr166y/jsr166y.jar;third_party/plt/plt.jar" com.sun.fortress.interpreter.drivers.fs hello.fss Parsing hello.fss: 10716 milliseconds ... ... ... Hello, World! Program execution: 53896 milliseconds K:\mastri\fortress\ProjectFortress> }}} === Instruction for Linux === I followed these steps to checkout and build the Fortress project. 1. I created a Fortress directory to contain my Fortress code and the main project. 2. Use the subversion command shown above to checkout the entire project. A new directory named PFC is created under the current directory. 3. Use cd PFC/ProjectFortress to move to the primary directory. 4. Use ./ant to run a default compile on the entire source. The default ant installation on some Linux systems fail with the ant script delivered with Fortress; 64 bit Fedora-7 for example. Although there are complicated ways to avoid the issues, simply using ant rather than ./ant works as expected. Most problems while compiling the code are related to missing jar files, incorrect classpath, or missing optional ant tasks. For example, if only the JRE is installed rather than the SDK, tools.jar will be missing. The Fortress build.xml file uses the depend optional ant task. If the depend task is not available, the first part of the error message is similar to {{{ BUILD FAILED .../PFC/ProjectFortress/build.xml:259: Could not create task or type of type: depend. }}} The command "yum install ant-nodeps" installed the depend task problem. The command "sudo apt-get install ant-optional" worked on Ubuntu 7.10. Different distributions will obviously require different dependencies to be installed. Commands that can be used to compile, clean, and test Fortress are: {{{ ant clean ant compile ant test }}} Use "ant clean" to start completely fresh with the Fortress build process. Although this is not usually required, it is a good idea when a build fails. Use "ant compile" to build the Fortress system. Use "ant test" to run the test programs and verify that the system is working. Use "./test" to load the JUnit GUI and run the Fortress tests. Create the !HelloWorld program listed above. Use ./fortress to run the program. {{{ > ./fortress HelloWorld.fss Parsing HelloWorld.fss: 660 milliseconds Static checking: 54 milliseconds Read /andrew0/home/andy/Devsrc/Fortress/src_20070719/PFC/ProjectFortress/FortressLibrary.tfs: 466 milliseconds HelloWorld! finish runProgram Program execution: 1680 milliseconds }}} === Instruction for Solaris === NOTE: These instructions are for SXDE (aka Nevada). They have been tested on SXDE build 84 available from http://www.opensolaris.org {{{ $ mkdir ~/work $ cd ~/work $ svn checkout https://projectfortress.sun.com/svn/Community/trunk PFC $ cd PFC $ ant }}} For building tests, the bundled ant won't work as it's missing junit dependencies. The easiest way around it is to install ant from blastwave repository (http://www.blastwave.org). To install blastwave package manager, use: {{{ $ su # pkgadd -d http://www.blastwave.org/pkg_get.pkg }}} Then install ant and complete the tests using: {{{ $ su # pkg-get -i ant # ^D $ /opt/csw/bin/ant test }}} Then run the !HelloWorld.fss provided above: {{{ $ cd bin $ ./fortress ~/HelloWorld.fss guessing FORTRESS_HOME=./.. HelloWorld! }}} === Instruction for Mac OS X === First, enable Java SE 1.6 on your machine, as described [UsingJavaOnMac here]. Check out the repository as described above and follow the instructions in the `README`. Then run the !HelloWorld.fss file defined above. {{{ Macintosh-9:tmp ericeallen$ fortress HelloWorld.fss Hello, world! Macintosh-9:tmp ericeallen$ }}} == Fortress Basic Building Blocks == === Standard Library === The standard libraries can currently be found in the directory Library in the root directory of the repository. The file !FortressLibrary.fss contains most of the very basic traits, objects and operations including: * Arrays (1-dimensional, 2-dimensional and 3-dimensional * Vectors and Matrices * Generators * Basic operations on booleans, integers, reals and strings * Basic output functions === Arrays === Arrays can be created as literals {{{ #!fss x = [ 1 2 3] }}} or by calling one of the factory methods: {{{ #!fss A = array[\ZZ32\](7) }}} in this example '[\' and '\]' are oxford brackets, which contain the type that the array will contain, which in this case will be 32bit integers. Arrays have to be initialized before elements can be read from them. {{{ #!fss A.fill(0) }}} == Next Steps == * Read more about the language at [http://research.sun.com/projects/plrg/fortress.pdf The Fortress Language Specification] * See what is and is not yet implemented at ProjectStatus * TODO(create tutorials and link them here) ---- [FortressDocumentation <