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 RAA22170; Mon, 19 Jan 2004 17:10:14 +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 RAA22683 for ; Mon, 19 Jan 2004 17:10:13 +0100 (MET) Received: from aomori.annexia.org (annexia.force9.co.uk [212.56.101.183]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id i0JGABP00133; Mon, 19 Jan 2004 17:10:12 +0100 (MET) Received: from rich by aomori.annexia.org with local (Exim 3.36 #1 (Debian)) id 1Aibyd-0002z2-00; Mon, 19 Jan 2004 16:10:11 +0000 Date: Mon, 19 Jan 2004 16:10:11 +0000 To: Luc Maranget Cc: Ocaml Mailing List Subject: Re: [Caml-list] ANNOUNCE: mod_caml 1.0.6 - includes security patch Message-ID: <20040119161011.GA10845@redhat.com> References: <20040116093454.GA23909@redhat.com> <20040119111353.A31726@beaune.inria.fr> <20040119113637.GA30306@redhat.com> <20040119154333.A7394@beaune.inria.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040119154333.A7394@beaune.inria.fr> User-Agent: Mutt/1.5.4i From: Richard Jones X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 2004:99 regexps:01 extlib:01 usr:01 usr:01 cpan-like:01 freshmeat:01 type-safe:01 bin:01 bin:01 ltd:98 regexp:01 ocaml:01 ocaml:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Mon, Jan 19, 2004 at 03:43:33PM +0100, Luc Maranget wrote: > Of course all my nice reasoning fails when you consider ``scripting'', > but even then, the idea of putting regexps in strings leads to unncessary > complications (ie many backslashes). > A more convenient way would be by some regexp data type either > abstract or concrete. I think you hit the nail on the head there. The problem is indeed that much interesting programming these days is "scripting" - ie. lots of short single-purpose programs maintained in a collection of programs rather than an application. If you analyse what Perl has which other languages don't, it can be mostly reduced to these items: * Syntactic support for processing lines in a file, ie: while (<>) { ... } which is an astonishing piece of brevity. It reads all the command line arguments, opens the files specified and hands them line-at-a-time to the code inside the while loop. I think ExtLib has some functionality to do a small part of this. It should be included in the standard distribution. * Syntactic support for regular expression matching / substring extraction. (As discussed before.) * No (visible) compilation required. #!/usr/bin/perl Very useful. There was some discussion before about writing scripts starting with: #!/usr/bin/ocaml * Certain idiomatic forms, such as: statement if condition; and: statement unless condition; which reduce code size. * Absolutely huge library. I'm trying to do my bit here by writing libraries, and specifically with perl4caml which allows you to use Perl libraries with OCaml. A central CPAN-like resource would still be very useful. Rich. -- Richard Jones. http://www.annexia.org/ http://freshmeat.net/users/rwmj Merjis Ltd. http://www.merjis.com/ - improving website return on investment Perl4Caml lets you use any Perl library in your type-safe Objective CAML programs. http://www.merjis.com/developers/perl4caml/ ------------------- 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