Within a day, I got my own forum up and running, quick and dirty. But it took some effort drawing from multiple sources, so I thought I'd document the steps I took here, all in one place.
Setup a HostArc runs on top of MzScheme, which means you can't just run it on top of any old web host. Loosely following Liperati's tutorial on setting up a Scheme web server, I signed up for virtual hosting with Linode.
Once I signed up for Linode, I signed in and used their Linux Distribution Wizard to deploy a distribution. I chose Ubuntu 7.10 somewhat arbitrarily, but it saved a few steps installing MzScheme later. (You don't have to build it from source.)
Once my distro was deployed, which only took a few minutes, I booted my server and ssh-ed in. From there, I updated my system with
apt-get. (The -y option automatically accepts, so if you'd rather get prompted before installs, omit this option.)
I found out (the hard way) that the news app depends on openssl, so you might as well install it now.
apt-get -y update apt-get -y upgrade apt-get -y install openssl
Install MzSchemeAccording to the Arc install page, Arc requires MzScheme version 352. I'm not sure if this is completely up to date, as I've heard people successfully use version 360. But I don't want to have to deal with issues, so I just used 352.
See Steve Morin's Arc Installation for what that looks like. I accepted the defaults and installed system links.
wget http://download.plt-scheme.org/bundles/352/mz/mz-352-bin-i386-linux-ubuntu.sh chmod a+x mz-352-bin-i386-linux-ubuntu.sh ./mz-352-bin-i386-linux-ubuntu.sh
Install Arc ItselfIt turns out there are some bugs in the latest release of Arc (Arc2 as of this writing), and if you try to use it out of the box, you'll run in to a few problems. Instead, you'll want to download Anarki.
It's in a git repository, so you'll have to install git.
Run the following to actually get a working copy of Arc and the news app.
apt-get -y install git-core
There are some experimental (and unofficial) features of Arc in Anarki. I decided I wanted a stable version of Arc in the hopes that any code I add won't break in the next version. To use the stable branch,
git clone git://github.com/nex3/arc.git
cdinto the working directory and run the following commands.
cd arc git branch stable origin/stable git checkout stable
Run ArcTo run Arc, use the following command from the arc directory.
You should see the following with an Arc prompt.
mzscheme -m -f as.scm
Use (quit) to quit, (tl) to return here after an interrupt. arc>
Start the News AppTo run the news app, simply type
(nsv)at the Arc prompt. You'll see something like the following printed back to you.
You should now be able to visit your news app by going to "http://<your-host-ip>:8080/news".
load items: load users: ready to serve port 8080
However, if you want to be able to modify your code at the REPL while the web server is running, run the news app in a separate thread and bind it, like so:
The Arc prompt will come back to you, and you can simply re-bind symbols to modify them. Then, when you want to kill the app, use the following.
(= app (thread (nsv)))
At any time at the Arc REPL, you can type
(quit)to exit to your shell. You can also press Control-C to break into the Scheme REPL, where
(tl)returns to the Arc prompt.
While I was mucking with the source, I found Arcfn's index of Arc functions to be helpful. I have also been using
screento detach the process from the shell and allow the server to run continuously after logging out.
That's it. I hope someone finds this helpful.