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

2009-01-01 Thread Gwern Branwen
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

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:
>
>  * salvia-0.0.4: A lightweight modular web server framework.
>
>  * orchid-0.0.6: A(nother) Wiki written in Haskell, currently using Darcs as
> a versioning back-end and Salvia as the application server.  Orchid ships as
> a library that can be installed as a server module for the Salvia framework.
>
>  * orchid-demo-0.0.4: A simple demo application using Salvia and Orchid to
> serve an example darcs repository.
>
> An online demo of the wiki can be found at [1]. The front-end is a typical
> Ajax application and heavily relies on the availability of JavaScript. A
> more plain (REST like) web interface to system can be found at [2]. You can
> signup, login and edit/create some pages. Feel free to play around, it's
> just a demo.
>
> Orchid has an abstract notion of a versioning back-end, theoretically
> allowing for multiple versioning systems. Currently only a Darcs back-end is
> available, but it shouldn't be too much work to implement a liaison for Git,
> Subversion, Mercurial etc.
>
> The Wiki uses its own experimental document system with printers to HTML,
> LaTeX, PDF via LaTeX and some others in the making. The system makes us of
> the UUAGC [3] attribute grammar system, but is not required in order to
> build the package. The document system is plug-in based allowing easy
> addition of new structures. There are currently plug-ins for inline LaTeX
> formulae, HSColour'ed Haskell code snippets and a table of contents. Some
> others in the making.
>
> Be aware, this is an early release to allow people the play around with the
> packages and enable me to see how this all behaves in the wild. The tools
> are not yet finished and I cannot guarantee any form of stability. But, in
> my experience, they seem to `just work'. Most of the time.
>
> I had some trouble getting all dependencies right on systems other than my
> own. Using `cabal install' seems to behave differently from `./Setup
> install' in the package directory, but this may vary from system to system.
> It is known to work at least on Macosx and Linux with GHC 6.8, 6.10 or even
> 6.11. Pdflatex is needed for PDF generation, dvipng for inline formulas.
>
> Have fun and best wishes for this new year!
>
>
> [1] http://funct.org/wiki/
> [2] http://funct.org/wiki/data/Index.html
> [3] http://www.cs.uu.nl/wiki/HUT/AttributeGrammarSystem

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))
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.
3) Is it just me, or is the fancy AJAX interface - as nice as it is -
rather slow?
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.
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.

- --
gwern
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEAREKAAYFAkldCEAACgkQvpDo5Pfl1oIsmQCdFjQ4Kr4Diocy1F1e1Pk1wies
kdUAn27z8lixH8t9POBDV0FbV4VeVyp7
=T6lQ
-END PGP SIGNATURE-
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


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

2009-01-01 Thread Sebastiaan Visser

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  
failed.



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" >>  
user.db

$ mkdir repo
$ cd repo
$ darcs init
$ orhid-demo --data-dir=. --user-db=../user.db


- --
gwern


Thanks for the feedback.

Sebastiaan

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


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

2009-01-01 Thread Gwern Branwen
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

On Thu, Jan 1, 2009 at 1:39 PM, Sebastiaan Visser  wrote:
> 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
> failed.
>
>> 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.

I am unsure that's the explanation. When I switched to look at the
simple non-AJAX view, it ran speedily enough; further, when I began
using AJAX locally, it felt as sluggish and slow as before, and I do
not consider my machine to be slow.

>> 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" >> user.db
> $ mkdir repo
> $ cd repo
> $ darcs init
> $ orhid-demo --data-dir=. --user-db=../user.db
>
>> - --
>> gwern
>
> Thanks for the feedback.
>
> Sebastiaan

I hadn't looked at the config before; I guess another suggestion would
be to hash the password!

- --
gwern
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEAREKAAYFAkldFNsACgkQvpDo5Pfl1oIAAwCeNe+3+oPsa1NIop+47yT3fk+R
yP4AnRwzWOlYft3Ne8aqgbuKI/AhzAhb
=P6q9
-END PGP SIGNATURE-
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


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

2009-01-01 Thread Judah Jacobson
On Thu, Jan 1, 2009 at 10:39 AM, Sebastiaan Visser  wrote:
> 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
> failed.

You may  find the extensible-exceptions package from Hackage to be
useful.  It provides the new Exeptions API on all versions of ghc
since 6.6 (and possibly earlier), so you don't have to deal with any
preprocessing or cabal-install issues.

-Judah
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


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

2009-01-01 Thread Henning Thielemann
Judah Jacobson schrieb:
> On Thu, Jan 1, 2009 at 10:39 AM, Sebastiaan Visser  wrote:
>> 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
>> failed.
> 
> You may  find the extensible-exceptions package from Hackage to be
> useful.  It provides the new Exeptions API on all versions of ghc
> since 6.6 (and possibly earlier), so you don't have to deal with any
> preprocessing or cabal-install issues.

Alternatively use the explicit-exception package, which works like IO
(Either ...), but is more clean.

Btw. although I have not looked into Pandoc, in general I find it more
attracting to re-use existing software. If you think, that your document
system is better than Pandoc, it would also be nice to have it as a
separate package.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


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

2009-01-01 Thread Henning Thielemann
Sebastiaan Visser schrieb:
> Happy new year, you all!
> 
> I'm pleased to announce three new packages on Hackage:
> 
>   * salvia-0.0.4: A lightweight modular web server framework.

Is it based on Simon Marlow's HWS, like mohws on Hackage? Does it
support HTTPS?

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


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

2009-01-03 Thread Gwern Branwen
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

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:

> I had some trouble getting all dependencies right on systems other than my
> own. Using `cabal install' seems to behave differently from `./Setup
> install' in the package directory, but this may vary from system to system.
> It is known to work at least on Macosx and Linux with GHC 6.8, 6.10 or even
> 6.11. Pdflatex is needed for PDF generation, dvipng for inline formulas.
>
> Have fun and best wishes for this new year!
>
>
> [1] http://funct.org/wiki/
> [2] http://funct.org/wiki/data/Index.html
> [3] http://www.cs.uu.nl/wiki/HUT/AttributeGrammarSystem

Sebastiaan: are there any public repos for these packages?

- --
gwern
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEAREKAAYFAklfryAACgkQvpDo5Pfl1oJuIACdHtzspXuAt3Bp4UXAubvT0UvD
RtkAn1PlqWYbAxLRG4WOqAmZw6Dd6f/1
=wwLT
-END PGP SIGNATURE-
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe