Getting Started Paul Johnson University of Kansas Swarmfest 2005 Torino, Italy 2005/6/1 Basic Facts Free & Open Source Software Library Library: routines you can use GNU software framework & tools gcc : GNU compiler collection Make & related tools Compile a program: use “make” command to trigger process that translates *.h and *.m into *.o, executable program Where do you stand? Novice Programmer? Swarm's a good way to learn Get a good book on C: Kochan, Programming in ANSI C Kernighan & Richie: The C Programming Language Work hard on 1st part of Swarm Tutorial Intermediate: learn ideas of Object-Oriented Programming Java users: still need to master Obj-C Swarm Motivate Yourself by Example Programs Find working / published examples Dedicate yourself to understanding (& fixing ! ) them Read every line of code Explore variations First, you must install Swarm libraries Building requires installation of many programs you might not have Easier to install a “pre-built” binary package for your operating system Linux With the RPM package manager, install hdf5 blt swarm jdk-1.4.2 (from Sun javasoft) swarm-jdk (optional) swarm-debuginfo (optional) swarm-static (optional) Windows Download setup.exe Run setup.exe, choose “download packages” browse through selected packages do not de-select any! add some, such as “wget” or “vim” Run setup.exe again, choose “install from local directory” Choose target directory WITH NO SPACES, such as c:\cygwin OK to update Cygwin against other repositories Gathering Tools Make sure you have a good editor: Emacs gdb : The GNU debugger Web sites to remember Swarm Development Group: http://www.swarm.org (old) http://wiki.swarm.org (new) My Swarm HQ: http://lark.cc.ku.edu/~pauljohn/Swarm Swarm packages for Linux users Links to many resources (discussed next) Wiki has potential as “clearinghouse” for Swarm info (but requires user effort) Gather Manuals Put copies in ~/swarm/docs The “Objective-C” book in pdf form The reference guide for Swarm Don't take the source code for the guide Look for a bland name like “set-html-2.2.tar.gz” Swarm User Guide A [immodesty alert] pretty good discussion of Swarm in Objective-C Look for it in html or postscript or pdf format SwarmOnlineFaq Keep a copy of the Swarm Source code, even if you don't compile Swarm Join Email Lists swarm-support and swarm-modelling (via www.swarm.org) Swarmapps Swarmapps-objc is a tar.gz file containing the Swarm Tutorial as well as other demonstration programs. Most recent official release: swarmapps-objc.2.2-2.tar.gz Read through the Swarm Tutorial Steps from elementary C to the design of Swarm models. Recently added elements “batch” processing of simulations parameter classes & command line arguments data collection Shop for working programs Swarm changes, programs change, not all work all of the time Get programs from authors or on the web Swarm ftp site has apps/objc/sdg apps/objc/contrib apps/java/sdg apps/java/contrib Make sure a program compiles & runs before you exert any effort on it. If you find a program is out of date, contact the author directly. Don't be bashful. Small Working Examples Marcus Daniels (SDG) wrote many small programs that illustrate usage of specific Swarm elements. Best way to learn “how to” use a particular thing. Best way to get help and report bugs These and others are collected in the WorkingExampleCode directory referred to in SwarmFAQ