[Haskell-cafe] [ANN] Haskell web server + wiki: salvia-0.0.4 + orchid-0.0.6

Sebastiaan Visser sfvisser at cs.uu.nl
Thu Jan 1 13:39:58 EST 2009

On Jan 1, 2009, at 7:15 PM, Gwern Branwen wrote:
> On Thu, Jan 1, 2009 at 9:04 AM, Sebastiaan Visser  wrote:
>> Happy new year, you all!
>> I'm pleased to announce three new packages on Hackage:
>> ...
> Miscellaneous comments:
> 1) You're right about cabal-install versus runhaskell etc. There seems
> to be a(nother) Control.Exception issue with cabal-install using
> base-4:
> src/Network/Orchid/Backend/DarcsBackend.hs:91:29:
>    Couldn't match expected type `IOException'
>           against inferred type `Exception'
>      Expected type: IO (Either IOException String)
>      Inferred type: IO (Either Exception String)
>    In the second argument of `()', namely
>        `(try (U.readFile (repo /+ file)) ::
>            IO (Either IOException String))'
>    In the expression:
>          eitherToMaybe
>          (try (U.readFile (repo /+ file)) :: IO (Either IOException  
> String))

I tried to enable building against both the old and the new Exception  
libraries by using some preprocessor statements. It seems this attempt  

> 2) Have you looked into integrating with Pandoc for generating TeX,
> PDFs, etc. (instead of rolling your own)? Seems to work fairly well
> for Gitit.

Nope haven't really looked into Pandoc, rolling my was just more fun.

> 3) Is it just me, or is the fancy AJAX interface - as nice as it is -
> rather slow?

No, it's not really the Ajax that is the performance bottleneck here.  
It is the slow machine the demo is running on currently, the LaTeX  
tools running in the background and the poor caching. When I would  
cache all the generated documents (and images) there will probably a  
big speedup. This is in my todo.

> 4) In orchid-demo, I notice it by default looks in /tmp for its
> datafiles. Is there some particular reason why a better default
> wouldn't be looking in ./? I was wondering how orchid-demo would do
> for a personal wiki, where it makes most sense to have a ~/wiki
> directory to keep all the files in.

The /tmp directory is just world writable by default, being a good  
candidate to get the demo running quick. The command line options  
allow you to have more control. The demo is only one single `Main.hs',  
so adapting it to your own needs is also possible.

> 5) Setting up orchid-demo is not all that clear; I figured out that
> you want to run 'orchid-demo --extract' to set up a stock
> configuration and repo, and then one can just run 'orchid-demo', but I
> think a better way would be to look in the default location for files
> and if orchid-demo doesn't find any, then fall back to --extract and
> look again.

A better way to roll your own wiki is:

$ echo "show signup" > user.db
$ echo "myusername mypassword loginfo show edit create signup" >>  
$ mkdir repo
$ cd repo
$ darcs init
$ orhid-demo --data-dir=. --user-db=../user.db

> - --
> gwern

Thanks for the feedback.


More information about the Haskell-Cafe mailing list