On Thu, 26 Aug 1999, Erik Meijer wrote:
> > Has anyone implemented an HTTP client library that works with Hugs & GHC
> > on both windows and unix?
>
> I know that Sigbjorn has a binding for the W3C libraries, but I think that only
>works for GHC.
There is that consistent FFI problem again. I guess we wait for Hugs to
synch w/ GHC....
> > I suppose, if the haskell->jni stuff is done, that would count, but I am
> > not sure of its status.
>
> That (Lambada) is being worked on.
From the below, it sounds like Lambada (great name!) is for Java calling
Haskell. I want Haskell to call Java. That is what he and I had been
talking about in the backchannel with Sigbjorn.
> > PS. I am really tired of using PHP for web development, and am looking for
> > some light on the horizon
>
> * you could use Haskell to do old-fashioned CGI scripting (probably too slow)
Too slow both because hugs startup overhead is very high and because CGI
scripting is ugly.
> * you could use HaskellScript embedded in ASP (works with IIS, I have not tried
>ChiliSoft, which claims to have a full implementation of ASP and COM for Unix that
>runs under Apache)
Hmm. I was not aware of the chilisoft. It looks interesting, but does
not run on linux and freebsd which are our primary platforms.
> * when Lambada is debugged you can use Java servlets calling Haskell (easy)
> * use Java Server Pages calling Haskell
That would be great but I am really looking to go the other way; Haskell
calling Java.
> * use mod-Haskell under Apache
A useful start. But I would really like something more like
Professional Haskell Pages. The system would execute the following page:
<html>
<! Code inside haskell tags are haskell declarations. !>
<haskell>
import module1
import module2
--a preprocessor is used to automagically import types from other systems
#import http://dtdlocation.com/dtd1.dtd -- use Malcolm Wallace stuff here
#import java java.net.HTTP -- use Lambada?
--define some functions
fun1 x = x*x
bob = Person "bob" "27" -- Person is defined in the xmldtd above
var2 = "3"
</haskell>
<body>
This is some page content but now I want to use Haskell....
<? haskell
--everything in these PI's is interpreted to be part of the
--IO monad and executed at this point in the rendering of the page
--assignment of Environment variables and cookies is hidden and automatic
bobName <- name bob
putStr "in a scripting environment it would also be nice if the parser would
1. allow line breaks in strings and
2. allow use of variables in strings without closing quotes and
using ++. That means allowing things like:
'$(name bob) has $var2 kids' to evaluate to
'bob has 3 kids'
and requiring $ not followed by a number to be escaped."
?>
An HTTP+Parser or SQL library would allow us to look up information about
bob in a database. The actual implementation of the libary could be in
Haskell, C, Java, or whatever.
</body>
</html>
-Alex-
___________________________________________________________________
S. Alexander Jacobson Shop.Com
1-212-697-0184 voice The Easiest Way To Shop