* Urgent need for solution: guile to serve the web (+ python?)
@ 2005-04-02 12:59 Roland Orre
2005-04-02 14:52 ` Andreas Rottmann
2005-04-02 18:32 ` Thien-Thi Nguyen
0 siblings, 2 replies; 7+ messages in thread
From: Roland Orre @ 2005-04-02 12:59 UTC (permalink / raw)
My problem: I have invested a lot of development using the guile API
and am now in urgent need to interface my software with the web.
In python I can easily define a web server to serve my needs
(simple GET and POST including cookie handling and file transfers).
I've set up such a server using examples I found in half an hour.
The easiest now would be to make such a server in guile, but I have
searched for such a server but haven't found anything, does anyone
have any hint about such a solution?
Is there any other way? Like including guile in the apache server.
What is essential is that the guile process with its memory
resident data bases and such is active all the time. I don't
know how to do such a thing with apache though (hints?)
I also need an XML parser, the python xml.sax worked very smoothly
but I guess I may be able to do the same using the SSAX module,
even though there exists no books like "O'Reilly Python & XML"...
which made me implement the XML-processor very quick, but here
I guess I can find examples on the web.
The ideal solution as I see it, would be to include guile as a
module to python, so I can do something like
import guile
guile.load("myfile")
guile.eval("(use-modules (bcpnn))")
guile.repl()
etc...
Any hints? If someone has a working webserver in guile serving
GET, POST, cookies, and file transfers, and want to share that
I would become tremendously happy.
I have worked with scheme programming for 14 years (scm + guile)
but consider python to be the ideal scripting language, on the
other hand I love the scheme style (and I have a lot of C-code
written using guile API).
Ideally python and guile would share the internal data structures
as they fundamentally are using similar type systems, so it shouldn't
be that much of a problem. Anyone having ideas in this direction?
Best regards
Roland
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Urgent need for solution: guile to serve the web (+ python?)
2005-04-02 12:59 Urgent need for solution: guile to serve the web (+ python?) Roland Orre
@ 2005-04-02 14:52 ` Andreas Rottmann
2005-04-02 17:36 ` Julian Graham
2005-04-02 18:32 ` Thien-Thi Nguyen
1 sibling, 1 reply; 7+ messages in thread
From: Andreas Rottmann @ 2005-04-02 14:52 UTC (permalink / raw)
Roland Orre <roland.orre@neurologic.se> writes:
> My problem: I have invested a lot of development using the guile API
> and am now in urgent need to interface my software with the web.
>
> In python I can easily define a web server to serve my needs
> (simple GET and POST including cookie handling and file transfers).
> I've set up such a server using examples I found in half an hour.
>
> The easiest now would be to make such a server in guile, but I have
> searched for such a server but haven't found anything, does anyone
> have any hint about such a solution?
>
> Is there any other way? Like including guile in the apache server.
> What is essential is that the guile process with its memory
> resident data bases and such is active all the time. I don't
> know how to do such a thing with apache though (hints?)
>
Maybe implement SCGI[0] for Guile?
[0] http://www.mems-exchange.org/software/scgi/
Rotty
--
Andreas Rottmann | Rotty@ICQ | 118634484@ICQ | a.rottmann@gmx.at
http://yi.org/rotty | GnuPG Key: http://yi.org/rotty/gpg.asc
Fingerprint | DFB4 4EB4 78A4 5EEE 6219 F228 F92F CFC5 01FD 5B62
v2sw7MYChw5pr5OFma7u7Lw2m5g/l7Di6e6t5BSb7en6g3/5HZa2Xs6MSr1/2p7 hackerkey.com
Any technology not indistinguishable from magic is insufficiently advanced.
-- Terry Pratchett
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Urgent need for solution: guile to serve the web (+ python?)
2005-04-02 14:52 ` Andreas Rottmann
@ 2005-04-02 17:36 ` Julian Graham
0 siblings, 0 replies; 7+ messages in thread
From: Julian Graham @ 2005-04-02 17:36 UTC (permalink / raw)
Cc: guile-user
Also, if you need anything over and above a SAX API, you might want to
check out my Scheme DOM implementation, SDOM
(http://www.nongnu.org/sdom/). It's currently far from being done,
but most of the important stuff is there.
Cheers,
Julian
On Apr 2, 2005 9:52 AM, Andreas Rottmann <a.rottmann@gmx.at> wrote:
> Roland Orre <roland.orre@neurologic.se> writes:
>
> > My problem: I have invested a lot of development using the guile API
> > and am now in urgent need to interface my software with the web.
> >
> > In python I can easily define a web server to serve my needs
> > (simple GET and POST including cookie handling and file transfers).
> > I've set up such a server using examples I found in half an hour.
> >
> > The easiest now would be to make such a server in guile, but I have
> > searched for such a server but haven't found anything, does anyone
> > have any hint about such a solution?
> >
> > Is there any other way? Like including guile in the apache server.
> > What is essential is that the guile process with its memory
> > resident data bases and such is active all the time. I don't
> > know how to do such a thing with apache though (hints?)
> >
> Maybe implement SCGI[0] for Guile?
>
> [0] http://www.mems-exchange.org/software/scgi/
>
> Rotty
> --
> Andreas Rottmann | Rotty@ICQ | 118634484@ICQ | a.rottmann@gmx.at
> http://yi.org/rotty | GnuPG Key: http://yi.org/rotty/gpg.asc
> Fingerprint | DFB4 4EB4 78A4 5EEE 6219 F228 F92F CFC5 01FD 5B62
> v2sw7MYChw5pr5OFma7u7Lw2m5g/l7Di6e6t5BSb7en6g3/5HZa2Xs6MSr1/2p7 hackerkey.com
>
> Any technology not indistinguishable from magic is insufficiently advanced.
> -- Terry Pratchett
>
>
> _______________________________________________
> Guile-user mailing list
> Guile-user@gnu.org
> http://lists.gnu.org/mailman/listinfo/guile-user
>
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Urgent need for solution: guile to serve the web (+ python?)
[not found] <200504021331.j32DViTI020852@conch.msen.com>
@ 2005-04-02 17:47 ` Alan Grover
0 siblings, 0 replies; 7+ messages in thread
From: Alan Grover @ 2005-04-02 17:47 UTC (permalink / raw)
Roland Orre <roland.orre@neurologic.se> wrote
> In python I can easily define a web server to serve my needs
> (simple GET and POST including cookie handling and file transfers).
> I've set up such a server using examples I found in half an hour.
>
> The easiest now would be to make such a server in guile, but I have
> searched for such a server but haven't found anything, does anyone
> have any hint about such a solution?
I've found a number of scheme web-frameworks. Unfortunately, many seem
tied to a particular scheme (e.g. PLT). I haven't yet attempted to see
if they'd run under guile.
A thread
http://list.cs.brown.edu/pipermail/plt-scheme/2004-May/005617.html
Out of date faq:
http://www.schemers.org/Documents/FAQ/#id2515233
Servers:
Sunet (scsh, but guile tries to be compatible with scsh)
http://www.scsh.net/resources/sunet.html
WebIt (PLT?)
http://celtic.benderweb.net/webit/
http://schemecookbook.org/Cookbook/WebIt
PLT (DrScheme?) has a built in web-server
Continuation based, not production level (?) (chicken)
http://www.double.co.nz/scheme/modal-web-server.html
SISC (java based)
http://www.lisperati.com/quick.html
http://www.pyro.net/~crayc/code/recluse/
Serveez ....?
guile-www ...?
Recluse (guile)
http://www.advogato.org/proj/recluse/
Cgi applications:
http://okmij.org/ftp/Scheme/web.html#search-mslib
http://www.glug.org/people/ttn/software/wikid/
I've found very little on templating approaches in scheme. Though some
of the above include it. I've written one, but it's not ready for the
public yet.
SpeakHtml
http://faith.eu.org/programs.html#Speakhtml
Bunch of pieces, including xml stuff;
http://okmij.org/ftp/Scheme/web.html
Illustrative (implements a wiki), PLT:
http://schematics.sourceforge.net/moshimoshi.html
Just cookies (PLT):
http://www.cs.utah.edu/plt/develop/plt-install.html
ftp://wish.com.mx/pub/scheme/v103/cookie.plt
An example that handles the user uploading a file (PLT):
http://schemecookbook.org/Cookbook/WebFileUpload
An outline of cgi's for mzscheme:
http://www.htus.org/Book/2001-11-13/howto-Z-H-17.html#%_part_VI%3E
Pieces and servers (Chicken)
http://www.call-with-current-continuation.org/eggs/#web-and-xml
HTML, and XML, as s-expressions:
http://www.cs.auc.dk/~normark/laml/
Parsing HTML (permissive!)
http://www.neilvandyke.org/htmlprag/
CGI lib:
http://higgs.djpig.de/ubuntu/www/hoary/web/guile-www
NB: query-string parsing is buggy.
You may want to google for "continuation" and cgi/web.
e.g.
http://www.double.co.nz/scheme/modal-web-server.html
http://www.double.co.nz/scheme/partial-continuations/partial-continuations.html
http://dresese.thehyatts.net/archives/000253.html
http://www.double.co.nz/pdf/continuations.pdf
http://library.readscheme.org/pagexml.html
relevant thread
http://lists.gnu.org/archive/html/guile-user/2004-03/msg00066.html
> Is there any other way? Like including guile in the apache server.
> What is essential is that the guile process with its memory
> resident data bases and such is active all the time. I don't
> know how to do such a thing with apache though (hints?)
I'm also looking for such a solution.
With Apache, the two most popular approaches are FastCGI and
mod_yourLanguage. The implementations for guile/scheme seem to be awol.
If you find one, please email me!
There is a fastcgi for common lisp. It's on my list to do a port to r5rs
(well, guile first).
There is a fastcgi proxy thing for scheme/guile.
https://www.metnet.navy.mil/~latendre/metcast.html
Or, you could run a guile web-server (i.e. handle http requests
yourself). In conjunction with some Apache rules to forward appropriate
requests.... Some of the above links talk about implementing a
web-server in scheme/guile.
Also, see the literature and implementations on continuations for
web-applications.
http://www.double.co.nz/scheme/modal-web-server.html
> I also need an XML parser, the python xml.sax worked very smoothly
> but I guess I may be able to do the same using the SSAX module,
SSAX seems like the solution to start with.
http://okmij.org/ftp/Scheme/xml.html
> Any hints? If someone has a working webserver in guile serving
> GET, POST, cookies, and file transfers, and want to share that
> I would become tremendously happy.
See some of the links above. I've a web-app framework (not persistent
threads/processes!). Not ready for the public (that's next on the list:
publish it).
> Ideally python and guile would share the internal data structures
> as they fundamentally are using similar type systems, so it shouldn't
> be that much of a problem. Anyone having ideas in this direction?
Parrot (the perl6 VM) seems like a place to look. I haven't stumbled
across discussions of inter-language calls. I'm sure somebody is talking
about it, I just haven't researched/looked for it. Tell us what you find.
I haven't noticed anything about scheme on parrot either.
> Best regards
> Roland
And, free advice: MVC. Use a templating system (cf. Smarty). Then tell
use what you used.
--
Alan Grover
awgrover@mail.msen.com
+1.734.476.0969
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Urgent need for solution: guile to serve the web (+ python?)
2005-04-02 12:59 Urgent need for solution: guile to serve the web (+ python?) Roland Orre
2005-04-02 14:52 ` Andreas Rottmann
@ 2005-04-02 18:32 ` Thien-Thi Nguyen
2005-04-02 20:06 ` Roland Orre
1 sibling, 1 reply; 7+ messages in thread
From: Thien-Thi Nguyen @ 2005-04-02 18:32 UTC (permalink / raw)
Cc: guile-user
From: Roland Orre <roland.orre@neurologic.se>
Date: Sat, 02 Apr 2005 14:59:48 +0200
server in guile
http://www.glug.org/people/ttn/software/ttn-do/dist/sizzweb.scm
http://www.glug.org/people/ttn/software/ttn-do/dist/grumi.scm
http://www.glug.org/people/ttn/software/guile-www/
XML parser
http://www/glug.org/people/ttn/software/ps/dist/ttn/mixp.scm
a lot of this stuff has been around for a while. if you were not able
to find them that probably means your search methods could be improved.
thi
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Urgent need for solution: guile to serve the web (+ python?)
2005-04-02 18:32 ` Thien-Thi Nguyen
@ 2005-04-02 20:06 ` Roland Orre
2005-04-02 23:35 ` Thien-Thi Nguyen
0 siblings, 1 reply; 7+ messages in thread
From: Roland Orre @ 2005-04-02 20:06 UTC (permalink / raw)
Cc: guile-user
On Sat, 2005-04-02 at 20:32, Thien-Thi Nguyen wrote:
> From: Roland Orre <roland.orre@neurologic.se>
<snip>
> a lot of this stuff has been around for a while. if you were not able
> to find them that probably means your search methods could be improved.
>
Great!, it seems to contain exactly what I need. In fact i think my
search methods worked very well... :)
OK, when I searched for e.g. "web server guile" in google a glug
site was listed on second place, www.glug.org/projects/list.htm
but there the hit words were ... "guile" ... Apache "web server"
and when I looked up that site earlier it listed a lot of projects
but nothing about a web server in guile. I scanned through a lot
of documents from google hits, several were mentioning the old
server, which doesn't manage POST.
I also tried with mamma.com but nothing useful.
It seems as you may need to advertise your site better. OK, soon
these mails will be searched by google, then it will be :)
Best regards
Roland
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Urgent need for solution: guile to serve the web (+ python?)
2005-04-02 20:06 ` Roland Orre
@ 2005-04-02 23:35 ` Thien-Thi Nguyen
0 siblings, 0 replies; 7+ messages in thread
From: Thien-Thi Nguyen @ 2005-04-02 23:35 UTC (permalink / raw)
Cc: guile-user
From: Roland Orre <roland.orre@neurologic.se>
Date: Sat, 02 Apr 2005 22:06:38 +0200
Great!, it seems to contain exactly what I need. In fact i think my
search methods worked very well... :)
indeed (if you want the beans spilt, just touch the crackpot :-).
however, before you give up the search...
[no POST support]
support for POST in Guile-WWW could definitely be improved (the servers
i mentioned by way of example all use GET). in particular, i'm thinking
of this fragment from `make-big-dishing-loop':
(case method
((GET) (GET M upath h p))
(else (UNK M method upath)))
which shows that there is no support for POST at all (in that module).
on the other hand, module (www cgi) handles POST requests, and module
(www http) can generate POST requests, so the situation may not be
entirely bleak. and, of course, you have the source (small patches
welcome).
It seems as you may need to advertise your site better. OK, soon
these mails will be searched by google, then it will be :)
in that case, there is no need for anything more than open discussion on
what works, what doesn't, and the process for moving from the latter to
the former. which is what we can do w/ calling in the marketing folks.
which is nice.
thi
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2005-04-02 23:35 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-02 12:59 Urgent need for solution: guile to serve the web (+ python?) Roland Orre
2005-04-02 14:52 ` Andreas Rottmann
2005-04-02 17:36 ` Julian Graham
2005-04-02 18:32 ` Thien-Thi Nguyen
2005-04-02 20:06 ` Roland Orre
2005-04-02 23:35 ` Thien-Thi Nguyen
[not found] <200504021331.j32DViTI020852@conch.msen.com>
2005-04-02 17:47 ` Alan Grover
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).