HTTP servers implemented using Clean

Antonio Eduardo Costa Pereira costa@ufu.br
Wed, 06 Sep 2000 12:00:41 -0300


Ana and Wellesley have created a page served in Clean.
Take a look. The address is 

palaia.ufu.br

This server was based on the Pliant-HTTP server, programmed
in Pliant by Hubert Tonneau.

hubert.tonneau@heliosam.fr

Hubert Tonneau is the creator of Pliant, a highly
efficient dialect of LISP. Pliant semantic is like on that of LISP.
The syntax, however, is like Clean's syntax (indentation instead
of semicolon). Pliant is very compact (the distribution has less
than 1 M), and very fast (it is as fast as 
optimized gcc; take a look at http://pliant.cx to understand why).
Thus, the Pliant HTTP server has less than 300 lines, if I am not 
mistaken. Then it is not very difficult to take a look at the
Pliant distribution, and write something simmilar for Clean. 
Since Pliant is a (highly) impure functional language, 
the translations of Hubert Tonneau's code to Clean
 is straightforward (not because Clean is impure, 
but because it is functional -:). You can also
use Hubert's code as inspiration for writing SMTP servers, POP3,
databases, secure channels, DNS clients, etc. Everything is
there (coded in Pliant),  and can be translated to
Clean in a very straightforward way. Since you write from
France, I am sure that you know Pliant quite well. In any case,
you will find the Pliant server running at palaia, port 8080
(the defaut port is reserved to Clean, since people 
around here show a strong preference for Clean). 
The address is:

http://www.palaia.ufu.br:8080

Pliant's official page is at the following address:

http://pliant.cx


By the way, Ana has a lot of tiny applications running in the Clean
server. One of them, for instance, runs a converter from Hejira to
Gregorian callendar. 

You may ask why use Clean, if everything is there, coded in Pliant.
I think that there is a clear advantage in using a pure functional
language. For instance, when translating Pliant code to Clean,
it became very clear that Pliant's cryptography system was not
as efficient as it could be. I wrote to Hubert, and I sent him
Wellesley's Clean code. On looking at the Clean code, he could
see how to change Pliant code to become one order of magnitude
faster. Not long ago, he wrote me that the last release of his
 code became slightly faster than code written with 
the C gmp library.


Another thing, paxmundipress is going to
publish a book on Clean quite soon. The book was written in
English by Wellesley. It contains a lot of examples of Internet
based applications.  You may find more by 
writting to paxmundipress:

paxmundi@paxmundi.com.br

By the way, paxmundipress usually publishes religious
 books on Kardecist spiritualism. However, this book on 
Clean seems to be an exception.

Eduardo Costa





06/09/00 04:22:42, Isabelle <isabelle.todescato@libertysurf.fr> 
wrote:

>Dear Clean users,
>
>I am lucky enough to work in a distributed computing environment, 
and am
>currently evaluating Clean for the new software projects of my 
company.
>
>As Clean is excellent at synthesizing - for instance 
HTML+JavaScript -
>code and is equipped in its IOObjectLibrary with a neat TCP 
interface, I
>am contemplating using Clean in order to experiment with the use 
of the
>http protocol to implement remote clients for some computation 
server.
>
>I would be very glad to know if someone is already experienced 
with that
>kind of things, and if such is the case, to be able to obtain some
>sample code.
> Thank you for dedicating some of your time reading and answering 
this.
>                                                                  
Fabien
>
>