caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] generic programming
@ 2002-07-03  2:49 Oleg
  2002-07-03  8:37 ` [Caml-list] " Ketanu
                   ` (2 more replies)
  0 siblings, 3 replies; 39+ messages in thread
From: Oleg @ 2002-07-03  2:49 UTC (permalink / raw)
  To: caml-list

Hi

Is generic programming possible with O'Caml? Suppose I want to find the 
Pearson correlation between two sets of real numbers represented as sets, 
arrays, big_arrays, maps, stacks, queues or lists. Is it possible to have one 
piece of code that handles all of these containers, a generic function of 
some sort? (Iteration is all that is necessary in the Pearson correlation 
example)

Thanks
Oleg

-------------------
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


^ permalink raw reply	[flat|nested] 39+ messages in thread
* Streams
@ 2006-08-10 10:51 Error404
  2006-08-10 11:40 ` [Caml-list] Streams Jonathan Roewen
                   ` (2 more replies)
  0 siblings, 3 replies; 39+ messages in thread
From: Error404 @ 2006-08-10 10:51 UTC (permalink / raw)
  To: caml-list

Hi,

I'm looking for some streams related tutorial or any other info. 
By stream i mean something like this (I don't know exact definition):

open Lazy;;
type 'a stream = Nil | Cons of 'a Lazy.t * 'a stream Lazy.t;;

(* For example stream of 'integers from x' would look like this: *)

let rec intsfrom x =
  Cons(lazy x,lazy (intsfrom (x+1)));;

If you know any www/book or anything on this kind of streams please mail me (error92@tlen.pl).
Many thanks.


^ permalink raw reply	[flat|nested] 39+ messages in thread
[parent not found: <F241eHu7RVLCMUWktUq0000fbc1@hotmail.com>]
* Re: [Caml-list] Caml Development Kit
@ 2001-03-27  2:12 Patrick M Doane
  2001-03-27  3:15 ` Brian Rogoff
  0 siblings, 1 reply; 39+ messages in thread
From: Patrick M Doane @ 2001-03-27  2:12 UTC (permalink / raw)
  To: Fabrice Le Fessant; +Cc: caml-list

This is excellent news! I'm looking forward to helping with this effort.

I have quite a bit of code lying around on my machine for working with
e-mail protocols (such as POP, SMTP, NNTP, IMAP, etc) and associated data. 
I recently created a Sourceforge project to try to organize an effort to
making high-quality Ocaml modules for these types of modules.  For those
interested, it is located at: 

  http://sourceforge.net/projects/ocamlnet/

I have placed a project goals document but not much source code yet for a
reason that this CDK project might be able to resolve: 

As much as I love Caml as a language, I have to admit that I've been less
than pleased with the standard infrastructure for string manipulation. 
First a summary of approaches that I'm aware of: 

  1) Manipulate the string manually with functions like String.index and
maintain position variables.  I find this to be pretty error-prone and
hard to read.

  2) Use the stream parsers.  I hesitate to use them because of their
status as "experimental" and that be removed at any time. I also have
heard claims that their performance is not too good compared with other
techniques.  Does anyone know if this true? 

  3) Use ocamllex.  This would be the most natural approach to me but
their utility is hampered by not being able to pass additional parameters
to the rules.  I understand that there is patch available that adds this
functionality, but it's part of the standard distribution.

  4) Use a regular expression matching library.  The builtin Str is
not thread-safe which is problematic. PCRE and xstr provide good
alternatives. Too many choices here though.

  5) Write another custom module for string manipulation!

Since I wasn't happy with the builtin functions and didn't want to rely on
a third party distribution, I opted for option 5 while writing a good bit
of the code.  But then I think, does the world really need another string
manipulation library? 

If we can converge on a small set of good workable solutions, then it'll
make it much easier to produce a large set of modules for protocols and
parsing.

Any thoughts?
Patrick

On Mon, 26 Mar 2001, Fabrice Le Fessant wrote:

> 
> A few weeks ago, we started a project called "Caml Development Kit" or
> CDK, which would gather in one big tarball or RPM several tools and
> libraries, useful for Ocaml programming. 
> 
> For example, the CDK will include Ocaml, Camlp4, ledit, and many
> user-contributed libraries. A new CDK will be released at each Ocaml
> release (and probably more often from CVS sources), removing the need
> to update, compile and install many different packages everytime to
> have a coherent development envirronment.
> 
> If you are interested in contributing to this project, you can either
> send me your code, or an URL where we can download your contribution.
> 
> We are particularly interested in general modules, providing useful
> data structures, network(urlget,http_server,etc)/ crypto(des)/
> multimedia(images) functions, or bindings to C libraries. 
> 
> The package includes a simple tool to generate HTML from .mli files.
> Thus, contributions must provide .mli files for all interesting
> modules, and these .mli files must be correctly documented.
> 
> Have a look at the just created web site:
> 
> http://pauillac.inria.fr/cdk
> 
> - Fabrice
> 
> -------------------
> To unsubscribe, mail caml-list-request@inria.fr.  Archives: http://caml.inria.fr
> 

-------------------
To unsubscribe, mail caml-list-request@inria.fr.  Archives: http://caml.inria.fr


^ permalink raw reply	[flat|nested] 39+ messages in thread

end of thread, other threads:[~2006-08-11  0:01 UTC | newest]

Thread overview: 39+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-03  2:49 [Caml-list] generic programming Oleg
2002-07-03  8:37 ` [Caml-list] " Ketanu
2002-07-03 17:29   ` Chris Hecker
2002-07-03 20:07     ` Oleg
2002-07-03 20:34       ` Alessandro Baretta
2002-07-04 15:33         ` John Max Skaller
     [not found]           ` <3D249B27.5080807@baretta.com>
     [not found]             ` <3D25D27B.2020005@ozemail.com.au>
2002-07-07 20:42               ` Alessandro Baretta
2002-07-08  0:59                 ` John Max Skaller
2002-07-08  7:29                   ` Alessandro Baretta
2002-10-15  0:10         ` Eray Ozkural
2002-07-03 21:55     ` Peter Wood
2002-07-04  2:02       ` james woodyatt
2002-07-04 15:18     ` John Max Skaller
2002-07-05  8:42       ` Francois Pottier
2002-07-05  9:25         ` Xavier Leroy
2002-07-05  9:57           ` Chris Hecker
2002-07-05 13:54             ` Xavier Leroy
2002-07-05 17:59               ` Chris Hecker
2002-07-05 20:31                 ` John Max Skaller
2002-07-05 19:33               ` John Max Skaller
2002-07-05 19:31             ` John Max Skaller
2002-07-05  8:33     ` Francois Pottier
2002-07-05 23:05       ` Dave Berry
2002-07-08  9:54         ` Francois Pottier
2002-07-08 15:49           ` John Max Skaller
2002-08-02 14:49         ` [Caml-list] Streams Diego Olivier Fernandez Pons
2002-08-02 15:29           ` Alain Frisch
2002-08-03 14:19             ` Diego Olivier Fernandez Pons
2002-07-03  8:42 ` [Caml-list] generic programming Johan Baltié
     [not found]   ` <002301c22270$fb4ca160$2be213c3@youngkouzdra>
     [not found]     ` <20020703092753.M39371@wanadoo.fr>
2002-07-05 10:38       ` Anton Moscal
2002-07-03  9:10 ` Jun P.FURUSE
  -- strict thread matches above, loose matches on Subject: below --
2006-08-10 10:51 Streams Error404
2006-08-10 11:40 ` [Caml-list] Streams Jonathan Roewen
2006-08-10 19:02   ` Chris King
2006-08-10 18:32 ` Martin Jambon
2006-08-11  0:00 ` Jon Harrop
     [not found] <F241eHu7RVLCMUWktUq0000fbc1@hotmail.com>
2002-04-09 18:09 ` [Caml-list] Cannot find Stream Parser Documentation Wolfram Kahl
2002-04-10 11:03   ` [Caml-list] Streams Daniel de Rauglaudre
2002-04-11 14:35     ` Wolfram Kahl
2001-03-27  2:12 [Caml-list] Caml Development Kit Patrick M Doane
2001-03-27  3:15 ` Brian Rogoff
2001-03-27  6:48   ` [Caml-list] Streams Daniel de Rauglaudre
     [not found]     ` <3AC04E85.EE51D597@univ-savoie.fr>
2001-03-27  8:37       ` Daniel de Rauglaudre

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 NNTP newsgroup(s).