From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id KAA31465; Thu, 12 Dec 2002 10:14:46 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id KAA31317 for ; Thu, 12 Dec 2002 10:14:45 +0100 (MET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id gBC9EiX27251 for ; Thu, 12 Dec 2002 10:14:45 +0100 (MET) Received: from tintin.inria.fr (tintin.inria.fr [128.93.24.126]) by pauillac.inria.fr (8.7.6/8.7.3) with SMTP id KAA29387 for ; Thu, 12 Dec 2002 10:14:44 +0100 (MET) Date: Thu, 12 Dec 2002 10:14:44 +0100 From: Maxence Guesdon To: caml-announce@inria.fr Subject: [Caml-list] mod_ocaml Message-Id: <20021212101444.44faf508.maxence.guesdon@inria.fr> Organization: INRIA X-Mailer: Sylpheed version 0.8.6claws (GTK+ 1.2.10; ) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hello, I've been told about a mod_ocaml for apache, available at http://www.slacky.de/docs/projects/mod_ocaml/ I have not tested it, but I thought a lot of people might be interested. If some of you try it, can you tell us if it works ? Thanks, -- Maxence Guesdon ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id KAA32286; Thu, 12 Dec 2002 10:32:11 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id KAA32254 for ; Thu, 12 Dec 2002 10:32:10 +0100 (MET) Received: from swordfish ([216.241.35.41]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id gBC9W9125742 for ; Thu, 12 Dec 2002 10:32:09 +0100 (MET) Received: from matt by swordfish with local (Exim 3.35 #1 (Debian)) id 18MPhL-0000lK-00 for ; Thu, 12 Dec 2002 02:32:03 -0700 Date: Thu, 12 Dec 2002 02:32:03 -0700 From: Matt Gushee To: caml-list@inria.fr Subject: Re: [Caml-list] mod_ocaml Message-ID: <20021212093203.GA2894@swordfish> Reply-To: Matt Gushee Mail-Followup-To: caml-list@inria.fr References: <20021212101444.44faf508.maxence.guesdon@inria.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20021212101444.44faf508.maxence.guesdon@inria.fr> User-Agent: Mutt/1.3.27i Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Thu, Dec 12, 2002 at 10:14:44AM +0100, Maxence Guesdon wrote: > > I've been told about a mod_ocaml for apache, available at > http://www.slacky.de/docs/projects/mod_ocaml/ > > I have not tested it, but I thought a lot of people might be interested. > If some of you try it, can you tell us if it works ? Well, I haven't built a real application with it, but I have produced a few simple pages, and it worked fine for that. I was a little disappointed because I was hoping for something that allowed using arbitrary OCaml code; mod_ocaml only supports an embedding scripting model: do_stuff () ;; ?> but it looks like a good tool for quick-and-dirty dynamic Web sites. -- Matt Gushee When a nation follows the Way, Englewood, Colorado, USA Horses bear manure through mgushee@havenrock.com its fields; http://www.havenrock.com/ When a nation ignores the Way, Horses bear soldiers through its streets. --Lao Tzu (Peter Merel, trans.) ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id UAA16275; Thu, 12 Dec 2002 20:10:59 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id UAA16381; Thu, 12 Dec 2002 20:10:56 +0100 (MET) Received: from www.aarg.net (www.aarg.net [69.9.134.82]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id gBCJAoX27357; Thu, 12 Dec 2002 20:10:50 +0100 (MET) Received: from sif.musiciansfriend.com (developer.musiciansfriend.com [208.137.126.53] (may be forged)) by www.aarg.net (8.12.3/8.12.3) with ESMTP id gBCJAlZg012959 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Thu, 12 Dec 2002 11:10:48 -0800 Received: from sif.musiciansfriend.com.musiciansfriend.com (localhost.localdomain [127.0.0.1]) by sif.musiciansfriend.com (8.12.1/8.12.1) with ESMTP id gBCJAiAM010451; Thu, 12 Dec 2002 11:10:46 -0800 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15864.57140.849677.64996@sif.musiciansfriend.com> Date: Thu, 12 Dec 2002 11:10:44 -0800 To: Maxence Guesdon Cc: caml-announce@inria.fr Subject: Re: [Caml-list] mod_ocaml In-Reply-To: <20021212101444.44faf508.maxence.guesdon@inria.fr> References: <20021212101444.44faf508.maxence.guesdon@inria.fr> X-Mailer: VM 7.07 under 21.4 (patch 9) "Informed Management" XEmacs Lucid X-URL: http://erik.arneson.org/ X-Face: 5_=s:O!=v$d64f}!bkKG~I3TB?8xnS%=x9WPXwW$G"zjU`(~/6A.#kQGHpso+TSdE;!7,JB Cztd=sU94WyvY|6R7[Bkz6*SESO<(0@Sed\s,O#YgTL&\)00mz`:w!M!f_CQ7R/{<{W2A[kHv[a+TN HOb=|rH+"8Kp7N]EEK-YpD"M7H+mrA(_e~ Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On 12 December 2002, Maxence Guesdon wrote: > I've been told about a mod_ocaml for apache, available at > http://www.slacky.de/docs/projects/mod_ocaml/ > > I have not tested it, but I thought a lot of people might be interested. > If some of you try it, can you tell us if it works ? It works just fine! It is a nice module for quick dynamic web pages, like Mr Gushee pointed out, but I think there are a few changes that could be made to make it safer and more robust for bigger applications. First, it would be neat if there were a safer way to grab and validate the query string. A string replacement just doesn't work very well, and it prints out an error if certain query string arguments aren't found, so there's no easy way to just search for their existence. There are some OCaml modules out there to handle this, though, and I believe the QUERY_STRING environment variable is still available for parsing. Second, the OCaml interpreter is called every hit, which probably isn't very scalable. It would be really neat if the embedded OCaml page were compiled to byte code and stored in memory somehow, so perhaps the OCaml bytecode interpreter could only be called once. Mod_perl does something like this, and it seems to work very well. The latter is a pretty big project, though. I would have no idea where to start, and I think mod_ocaml is a pretty neat beginning in any case! -- ;; Erik Arneson AARG Net ;; ;; GPG Key ID: 2048R/8B4CBC9C ;; ;; "Resistance to tyrants is obedience to God!" - Thomas Jefferson ;; ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id AAA22238; Fri, 13 Dec 2002 00:42:26 +0100 (MET) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id AAA23178; Fri, 13 Dec 2002 00:42:24 +0100 (MET) X-SPAM-Warning: Sending machine is listed in blackholes.five-ten-sg.com Received: from www.duonix.com ([210.113.163.221]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id gBCNgL115233; Fri, 13 Dec 2002 00:42:22 +0100 (MET) Received: from hama ([192.168.0.254]) by www.duonix.com (8.12.5/8.11.6) with SMTP id gBCNimwM092502; Fri, 13 Dec 2002 08:44:48 +0900 (KST) (envelope-from shoh@duonix.com) X-Authentication-Warning: www.duonix.com: Host [192.168.0.254] claimed to be hama Message-ID: <000b01c2a238$9c49dd70$fe00a8c0@hama> From: "SooHyoung Oh" To: "Maxence Guesdon" , "Erik Arneson" Cc: References: <20021212101444.44faf508.maxence.guesdon@inria.fr> <15864.57140.849677.64996@sif.musiciansfriend.com> Subject: Re: [Caml-list] mod_ocaml Date: Fri, 13 Dec 2002 08:45:53 +0900 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Ocaml Server Pages seems to have some of your reqirments. First, it receives and parses the query string. Second, it compiles the ocaml script and execute the binary. If someone has time to combine these two tools, it'll be great, isn't it? ps: You can download osp from http://www.rogare.com/index.php?inc=downloads/ocaml/ocaml, and you can download some fixes and view examples from http://www.taglib.co.kr/ocaml/index.html --- SooHyoung Oh http://www.taglib.co.kr/shoh.html ----- Original Message ----- From: "Erik Arneson" To: "Maxence Guesdon" Cc: Sent: Friday, December 13, 2002 4:10 AM Subject: Re: [Caml-list] mod_ocaml > On 12 December 2002, Maxence Guesdon wrote: > > I've been told about a mod_ocaml for apache, available at > > http://www.slacky.de/docs/projects/mod_ocaml/ > > > > I have not tested it, but I thought a lot of people might be interested. > > If some of you try it, can you tell us if it works ? > > It works just fine! It is a nice module for quick dynamic web pages, > like Mr Gushee pointed out, but I think there are a few changes that > could be made to make it safer and more robust for bigger applications. > > First, it would be neat if there were a safer way to grab and validate > the query string. A string replacement just doesn't work very well, and > it prints out an error if certain query string arguments aren't found, > so there's no easy way to just search for their existence. There are > some OCaml modules out there to handle this, though, and I believe the > QUERY_STRING environment variable is still available for parsing. > > Second, the OCaml interpreter is called every hit, which probably isn't > very scalable. It would be really neat if the embedded OCaml page were > compiled to byte code and stored in memory somehow, so perhaps the OCaml > bytecode interpreter could only be called once. Mod_perl does something > like this, and it seems to work very well. > > The latter is a pretty big project, though. I would have no idea where > to start, and I think mod_ocaml is a pretty neat beginning in any case! > > -- > ;; Erik Arneson AARG Net ;; > ;; GPG Key ID: 2048R/8B4CBC9C ;; > ;; "Resistance to tyrants is obedience to God!" - Thomas Jefferson ;; > > > ------------------- > To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr > Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id NAA04592; Fri, 13 Dec 2002 13:20:36 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id NAA04588 for ; Fri, 13 Dec 2002 13:20:34 +0100 (MET) Received: from post.kis.ru (post.kis.ru [195.98.32.206]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id gBDCKXj04607 for ; Fri, 13 Dec 2002 13:20:34 +0100 (MET) Received: from [195.98.54.162] (HELO heaven) by post.kis.ru (CommuniGate Pro SMTP 4.0.2) with ESMTP id 1181647 for caml-list@inria.fr; Fri, 13 Dec 2002 15:20:32 +0300 From: "MikhailFedotov" To: Subject: RE: [Caml-list] mod_ocaml Date: Fri, 13 Dec 2002 15:20:32 +0300 Message-ID: <000001c2a2a2$087a7540$a917a8c0@heaven> X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.4024 In-Reply-To: <20021212093203.GA2894@swordfish> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > > I've been told about a mod_ocaml for apache, available at > > http://www.slacky.de/docs/projects/mod_ocaml/ > > > > I have not tested it, but I thought a lot of people might be > > interested. If some of you try it, can you tell us if it works ? > > Well, I haven't built a real application with it, but I have > produced a few simple pages, and it worked fine for that. > > I was a little disappointed because I was hoping for > something that allowed using arbitrary OCaml code; mod_ocaml > only supports an embedding scripting model: > > do_stuff () ;; ?> > > but it looks like a good tool for quick-and-dirty dynamic Web sites. It seems that mod_ocaml strips last line of source if there is no newline symbol at the end. I.e. if all your html file is in one line, it disappears... Mikhail ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id TAA14740; Fri, 13 Dec 2002 19:00:52 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id TAA14736 for ; Fri, 13 Dec 2002 19:00:51 +0100 (MET) Received: from post.kis.ru (post.kis.ru [195.98.32.206]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id gBDI0o905380 for ; Fri, 13 Dec 2002 19:00:51 +0100 (MET) Received: from [195.98.54.162] (HELO heaven) by post.kis.ru (CommuniGate Pro SMTP 4.0.2) with ESMTP id 1182372 for caml-list@inria.fr; Fri, 13 Dec 2002 21:00:49 +0300 From: "MikhailFedotov" To: Subject: RE: [Caml-list] mod_ocaml Date: Fri, 13 Dec 2002 21:00:49 +0300 Message-ID: <001001c2a2d1$91a83620$a917a8c0@heaven> X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.4024 In-Reply-To: <000001c2a2a2$087a7540$a917a8c0@heaven> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > > > > I was a little disappointed because I was hoping for something that > > allowed using arbitrary OCaml code; mod_ocaml only supports an > > embedding scripting model: > > > > do_stuff () ;; ?> > > > > but it looks like a good tool for quick-and-dirty dynamic Web sites. > > It seems that mod_ocaml strips last line of source if there > is no newline symbol at the end. I.e. if all your html file > is in one line, it disappears... BTW, I've looked into the code. I may be wrong, but it seems that there are problems with memory management. Authors think that in C "sizeof(char*)" gives maximum length of string or something like that, so they allocate memory like this: this_arg = (char *) ap_pcalloc(r->pool, sizeof(char *)); Another interesting example that I would not comment: p->key = (char**)ap_pcalloc(r->pool, sizeof (char **) * 255); Nice tool anyway. :-) Mikhail ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners