[work on tutorial text
thomashartman1@gmail.com**20080619190937] hunk ./templates/header.st 17
- |About
- |FAQ
-
- |Contact
+
hunk ./templates/home.st 1
-
Haskell is a great way to program.
+Haskell is a great way to program.
hunk ./templates/home.st 16
+Prerequisites
addfile ./templates/prerequisites.st
hunk ./templates/prerequisites.st 1
-
+Prerequisites
+
+For best results with this tutorial, you hopefully have the following.
+
+
+ - Basic knowledge of haskell and html.
+ - A somewhat modern computer. I have a PIII laptop with 512M of ram.
+ - A modern operating system. You should be able to develop haskell applications using windows, mac, or linux. For the record, I work with the latest ubuntu linux distribution, which is currently hardy heron.
+ - If you want to create a public web site based on the materials here, I recommend getting either a private server (more expensive) or a virtual private server (less expensive) which gives you admin priviliges to install the packages and software you need. I use the cheapest virtual private server plan at linode to host this tutorial publicly. I wouldn't try hosting a HappS project publicly using a shared hoster like dreamhost that doesn't give you root powers to administer your server. (Dreamhost is great for other things, like cheap storage for online images.)
+ - More requirements are described in the instructions for
+ installing and running this tutorial locally.
+ However, if you have the basics ingredients above you should be okay.
+
+ - Please let me know -- or patch the tutorial -- if I forgot something. I hate getting stuck on some finicky aspect of installation when I am trying to learn something.
+
+
+Get started!
+
+
+
+
+
addfile ./templates/run-tutorial-locally.st
hunk ./templates/run-tutorial-locally.st 1
+Run This Tutorial Locally
+
+ Before going further, you may want to inform yourself about the basic prerequisites, both knowledge and equipment, you need to make the best use of this tutorial
+
+Assuming the basics are in place, you can install and run this tutorial locally as follows
+
+
+
+ - Install Darcs: a version control tool you need to check out this source. I installed this with sudo apt-get install darcs
+ - Haskell: You need at least ghc 6.8.2 to install HAppS. I installed this with with apt-get install haskell, and then upgraded to ghc 6.8.3 as this is supposed to have fixed some bugs.
+ - Dependency chasing haskell package installers: you should have the latest versions of cabal and cabal install from hackage. These are already included in the latest version of ghc, or they will be soon.. another reason to upgrade to the latest ghc.
+ - HAppS: Once you have cabal install working, you should be able to install the HAppS packages in one shot, with all dependencies getting chased down automatically, without any babysitting. On ubuntu, I did this with
  time sudo cabal-install HAppS-Server
This takes a while, which is why I like to install with the time command as above -- when it's done it tells me how long the whole process has taken. Lately, running this command has been taking up to an hour, so I recommend brewing some tea or going for a walk or something. By the way, the fact that installing HAppS takes this long is arguably a bug. Hopefully this situation will be remedied as HAppS matures and, eventually, has an official release.
+
+ - Get the source for this tutorial: darcs get http://code.haskell.org/happs-examples
+ - Run the tutorial server locally
  cd happs-examples; ./runServer.sh
+ - You should now be able to brows this tutorial locally by opening a browser and going to http://localhost:5001/tutorial/home
+
+
+
+
+
+
+
hunk ./templates/start-tutorial.st 1
-Starting the tutorial...
+Get Started Learning HAppS
hunk ./templates/start-tutorial.st 3
-Prerequisites
+The best way to learn how to use use HAppS with this tutorial is to actually install and run it in a local environment where you have control over it. Then, when you are done learning, you can use the tutorial code as a template for your own HAppS applications.
+
+Install and run this tutorial locally
+
+Getting on with the tutorial proper, our first lesson explains how to do basic url handling.
+
+
+
hunk ./templates/start-tutorial.st 12
-
- - Hardware Prerequisites -- somewhat modern computer.
hunk ./templates/start-tutorial.st 13
- - Knowledge Prerequisites -- Basic HTML and haskell.
hunk ./templates/start-tutorial.st 14
- - Software Prerequisites
-
- - I work with the latest ubuntu distribution
- - ghc 6.8.2 (6.8.3 recommended, as this is supposed to have fixed some bugs)
- - HAppS (installation described )
-
-
hunk ./templates/start-tutorial.st 15
- Get the source for this tutorial (darcs get http://code.haskell.org/happs-examples)
hunk ./templates/start-tutorial.st 18
- install happs (time sudo cabal install HAppS-Server. This may take a while, but it should not require any babysitting. But you should probably go get a cup of coffee or go for a walk or something. Note: the time command will tell you how long installation takes. For me it has taken over an hour. (I think the long installation time has been noted as a bug somewhere, and I hope this will get better with time.))
hunk ./templates/start-tutorial.st 19
- run it. ./runServer.sh. You should now be able to view the tutorial on your local computer: http:localhost:5000/tutorial/home