Index of /~pls/repos/panic
      Name                    Last modified       Size  Description

[DIR] Parent Directory 04-Nov-2009 14:46 - [   ] AUTHORS 05-Jun-2005 17:33 1k [   ] CONTRIBUTORS 18-Jun-2005 20:00 1k [   ] LICENSE 13-Jun-2005 01:00 1k [   ] Panic.cabal 01-Jun-2008 16:00 1k [TXT] Setup.hs 01-Jun-2008 16:00 1k [   ] TODO 18-Jun-2005 20:00 1k [DIR] _darcs/ 04-Nov-2009 14:46 - [DIR] bin/ 04-Nov-2009 14:46 - [   ] configure 01-Jun-2008 16:00 1k [   ] configure.lib 01-Jun-2008 16:00 5k [DIR] samples/ 04-Nov-2009 14:46 - [DIR] src/ 04-Nov-2009 14:46 -

		    Panic (Pan Interactive Client)

The Pan Interactive Client (Panic) is used to load, view and interact
with images and animations written in the embedded domain specific
language (EDSL), Pan, created by Conal Elliott.  

The language is well described in:

[1] Conal Elliott. Functional Image Synthesis. In Proceedings Bridges
2001, Mathematical Connections in Art, Music, and Science, 2001.



Panic requires that wxWidgets include unicode and OpenGL support. If
you build this from source you can do this with

% ./configure --enable-unicode --with-opengl

Haskell dependencies:

* HOpenGL >= 2.0 (in GHC source tree)
* hs-plugins, from darcs, which in turn is depedent on:
  * HSX
* wxHaskell >= 0.10.3 (must be built with OpenGL support)
* Pan >= 0.1

See "Getting the dependencies" below.


At its simplest:

$ runhaskell Setup.hs configure
$ runhaskell Setup.hs build
$ runhaskell Setup.hs install

However, it may be necessary to pass options such as
`--with-compiler=/path/to/ghc-6.4.1' and
`--with-hc-pkg=/path/to/ghc-pkg-6.4.1' to the configuration step.

For example:

$ runhaskell Setup.hs configure --with-compiler=/usr/local/bin/ghc-6.4.1 \

Mac OS X Installation:

On Mac OS X it is necessary to create a bundle called in
order to run the application. Fortunately I have created a script to
do this for you.  This must be done *after* the installation steps above.

$ bin/install-macosx-Panic <directory>


$ bin/install-macosx-Panic ~/Applications

will install ~/Applications/  You can run this from the
command line using:

$ open

from the ~/Applications directory.

Other issues with Mac OS X:

Under the environment Panic is run it's possible that hs-plugins won't
know the location of GHC. This is because the environment inside the
terminal is not the same environment in which Panic will be run.  

If you do not pass the `--with-ghc' to the configure script when
building hs-plugins it will probably simply use the value `ghc' as its
path to GHC. Since the PATH when running in the terminal may differ to
that in which Panic is run hs-plugins may not be able to find `ghc'.

There are two possible fixes to this.

1. Edit ~/.MacOSX/environment.plist and add the following:


If the file doesn't exist then create it with the following:

<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "
<plist version="1.0">

2. Build hs-plugins again but this time pass the path of GHC
   explicitly to `configure' using the `--with-ghc' flag.

Getting the dependencies:

Author: Sven Panne

Must be built with GHC. Not all binary distributions of GHC are built
with this by default.

Author: Don Stewart and others

You must download hs-plugins 0.9.10 or greater. A snapshot linked to
from the above address.

Author: Niklas Broberg 

The best way to get this is also with darcs.

$ darcs get

Author: Daan Leijen

Download version 0.9.4 or higher from the URL above.

IMPORTANT: This *must* be built with OpenGL support. This is done by passing
option `--with-opengl' to the configure script. However, this will only
work if the wxWidgets library was also built with OpenGL support.

Author: Sean Seefried

You can get this from the URL above or, you guessed it, using
darcs. Make sure you don't leave off the `--set-scripts-executable'

$ darcs get --set-scripts-executable \

Running on Windows:

Temporary files generated when effects are compiled are placed in a
temporary directory. You may want to define one of the following
enrivonment variables which are searched for in order. The first one
that exists is used: TMP, TEMP, USERPROFILE

A note on configuration:

A file called PanicConf.hs will be installed in $prefix/lib/Panic-0.1.
This can be freely modified to change some of the behaviour of
Panic. It is pretty self-explanatory. You may want to change the
`extraGhcFlags' field so that, say, `-fvia-C' is changed to `-f-asm'
which is faster on Mac OS X. I've kept it as it is for compatability


Panic would not be half the application it is without the hs-plugins
library. Thanks are in order to Don Stewart for writing it in the
first place and his willingness to expand the functionality when
pressed to do so.


I'd like to personally thank Conal Elliott, firstly for creating Pan,
but also for the willingness he has shown to discuss the ideas behind
the language.  Along with Paul Hudak, his work has been one of the
principle reasons behind my choice to learn about functional
programming and language design in general.