Re: [Caml-list] Improving OCaml's choice of type to display

2009-10-09 Thread Alp Mestan
Can't there be a trick by playing with, e.g, ocamlmktop, which could open
Core and its main submodules by default, like it's done with Pervasives and,
IIRC, Batteries ?

On Fri, Oct 9, 2009 at 11:58 AM, Yaron Minsky ymin...@gmail.com wrote:

 Well, if we're picking heuristics, the fewest number of characters wouldn't
 be crazy either.  Given the choice between Int.t and Int.comparable (which
 are aliases for the same type), I'd prefer to see Int.t.

 y


 On Fri, Oct 9, 2009 at 3:33 AM, Andrej Bauer andrej.ba...@andrej.comwrote:

 On Fri, Oct 9, 2009 at 3:40 AM, Yaron Minsky ymin...@gmail.com wrote:
  Choosing shorter names.

 By which you probably mean the fewest number of dots (module
 projections). It might be a bit annoying if the code that prints
 doesn't know what modules are open. What do the INRIA priests say?

 Andrej



 ___
 Caml-list mailing list. Subscription management:
 http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
 Archives: http://caml.inria.fr
 Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
 Bug reports: http://caml.inria.fr/bin/caml-bugs




-- 
Alp Mestan
http://alpmestan.wordpress.com/
http://alp.developpez.com/
___
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs


Re: [Caml-list] HLVM

2009-09-27 Thread Alp Mestan
On Sun, Sep 27, 2009 at 6:57 PM, David McClain d...@refined-audiometrics.com
 wrote:

 And forgive me for asking what may seem a question with an obvious
 answer... but now don't you also have to change the OCaml compiler back end
 to target the HLVM?


The current example provided with HLVM is a very minimal ML-style language
implementation. However, there was a Jane Street Summer Project proposal to
port OCaml's current compiler to HLVM/LLVM. It hasn't been accepted.

But if HLVM gets more complete and enhanced, yeah, it would require porting
the compiler to target HLVM/LLVM.

Regards.

-- 
Alp Mestan
http://blog.mestan.fr/
http://alp.developpez.com/
___
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs


Re: [Caml-list] Why don't you use batteries?

2009-09-03 Thread Alp Mestan
On Thu, Sep 3, 2009 at 5:00 PM, Ashish Agarwal agarwal1...@gmail.comwrote:

 - Core language features are altered. For example, the Batteries way is to
 use input's instead of in_channel's. Documentation explaining such changes
 would help. The API documentation is excellent, but what is missing is a
 book on An Introduction to OCaml with Batteries. Perhaps a well planned
 wiki would help get this started.


There's a French version : http://fr.wikibooks.org/wiki/Objective_Caml
for which a translation had been started :
http://en.wikibooks.org/wiki/Objective_Caml but it isn't up-to-date at all,
nor finished.

Still, the missing thing is time...


-- 
Alp Mestan
http://blog.mestan.fr/
http://alp.developpez.com/
___
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs


Re: [Caml-list] building Batteries Included under OS X?

2009-05-19 Thread Alp Mestan
There's a batteries-devel ML.
http://lists.forge.ocamlcore.org/cgi-bin/mailman/listinfo/batteries-devel

On Tue, May 19, 2009 at 2:46 PM, Alan Schmitt 
alan.schm...@polytechnique.org wrote:

 Hello,

 I'm trying to build Batteries Included and failing under OS X. The problem
 is that it's using cp -a, which is an option that is not present. (I'm
 building with godi, but looking at the source on git.ocamlcore.org, I see
 that the -a is already in Makefile.in there.)

 By the way, is this a good place to report these kinds of bugs?

 Thanks,

 Alan

 ___
 Caml-list mailing list. Subscription management:
 http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
 Archives: http://caml.inria.fr
 Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
 Bug reports: http://caml.inria.fr/bin/caml-bugs




-- 
Alp Mestan
In charge of the C++ section on Developpez.com.
___
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs


Re: [Caml-list] Strings

2009-04-05 Thread Alp Mestan
By the way, what would be the use case of lazy strings ?

-- 
Alp Mestan
___
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs


Re: [Caml-list] Fwd: User Group for functional programmers and scientific computing; Monday, April 6th

2009-04-04 Thread Alp Mestan
I guess nobody would be interested for doing so in South of France, right ?

On Sat, Apr 4, 2009 at 3:08 AM, Mike Lin mike...@mit.edu wrote:

 This might be of interest to anyone else in the Boston area.


 -- Forwarded message --
 From: Anne Hunter an...@eecs.mit.edu
 Date: Fri, Apr 3, 2009 at 7:40 PM
 Subject: User Group for functional programmers and scientific
 computing; Monday, April 6th
 To: jobsl...@altoids.mit.edu


 Rick, Michael, and I are kicking off a new user group that meets every
 first Monday night in Cambridge.

 The New England F# User Group's first meeting is this Monday, April 6.
 More info can be found online at http://fsug.org

 All levels are welcome from beginner to advanced.  Functional
 programming is becomming very popular for scientists, analysts,
 statistics experts, and the financial industry.  F# was born in
 Cambridge England (the other Cambridge) 5 years ago in a research lab
 and has more recently been made available to the public.

 Talbott Crowell
 talbott.crow...@thirdm.com
 Third Millennium, Inc.

 ___
 Caml-list mailing list. Subscription management:
 http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
 Archives: http://caml.inria.fr
 Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
 Bug reports: http://caml.inria.fr/bin/caml-bugs




-- 
Alp Mestan
In charge of the C++ section on Developpez.com.
___
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs


Re: [Caml-list] Strings

2009-04-04 Thread Alp Mestan
On Sat, Apr 4, 2009 at 11:14 AM, David Rajchenbach-Teller 
david.tel...@ens-lyon.org wrote:

 I personally can't remember the last time I've needed mutable strings in
 OCaml.


Neither do I.


 On the other hand, I can remember a handful of times where, to
 return a constant string, I had to make a function that would rebuild
 the string at every call. Which is both needlessly slow and awkward for
 what looks like a constant.


I think providing both capabilities is the best solution.
However, let's study Haskell's strings.
They simply are a list of characters. This let the ability to use heavily
list-related functions (take, takeWhile, drop, dropWhile, map, etc.). On the
other hand, OCaml's standard library lacks of many functions for strings ! I
think this is too much imperative oriented. Maybe we could try to implement
(for Batteries or in a separate project) string lists and then use the power
of Batteries' list module with many (really many... that's a real pleasure
to read its documentation) functions to work with. I think with a bit of
internal laziness, we could get a great immutable string type with many
functions to manipulate it.

But I guess there are many cons to do so, otherwise it would have been
standardized.


-- 
Alp Mestan
___
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs


Re: [Caml-list] Re: LLC book [was: Questions]

2009-04-02 Thread Alp Mestan
On Thu, Apr 2, 2009 at 8:39 PM, Richard Jones r...@annexia.org wrote:


 It doesn't take a huge amount to set this up (encouraging people to
 write the words is quite another matter).

 Source control: http://git.ocamlcore.org/ - check

 Decide on a format: http://en.wikipedia.org/wiki/DocBook - check

 License: http://creativecommons.org/ CC-BY-SA - check

 Mailing list for editorial review of submissions:
  http://ocamlcore.org/ - check

 Outline and subject areas:
  - Introduction to the language
  - Language core
  - Libraries
  - Camlp4
  - ...

 Decide who will be in charge of each area ...


And even more important, who would like to participate to this project ? ;-)

-- 
Alp Mestan
___
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs


Re: [Caml-list] Question about the -dlambda option of ocamlc/ocamlopt

2009-03-25 Thread Alp Mestan
Thanks Romain !

On Wed, Mar 25, 2009 at 10:02 AM, Romain Bardou romain.bar...@lri.frwrote:

 Alp Mestan a écrit :

  Hi,

 I'm currently studying the lambda code generation phase of the standard
 OCaml compiler.

 You can take a look at this for an example :
 http://blog.mestan.fr/2009/03/22/ocaml-and-dlambda-1/

 I'm wondering what is 'makeblock' for ?
 And why is there '/a number' after every variable/function name ? Isn't
 the name sufficient for identifying variables ?

 Thanks !


 If I recall correctly, makeblock is for block allocation and is used to
 make empty blocks for everything that does not fit in just one integer.

 The /a number is used to uniquely identify identifiers. In this example :

 let x = 1 in let x = 2 in x

 The /a number allows you to know which let variable is represented by
 the x at the end.

 --
 Romain Bardou




-- 
Alp Mestan
In charge of the C++ section on Developpez.com.
___
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs


[Caml-list] Question about the -dlambda option of ocamlc/ocamlopt

2009-03-24 Thread Alp Mestan
Hi,

I'm currently studying the lambda code generation phase of the standard
OCaml compiler.

You can take a look at this for an example :
http://blog.mestan.fr/2009/03/22/ocaml-and-dlambda-1/

I'm wondering what is 'makeblock' for ?
And why is there '/a number' after every variable/function name ? Isn't
the name sufficient for identifying variables ?

Thanks !

-- 
Alp Mestan
___
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs


Re: [Caml-list] Cannot safely evaluate the definition of the recursively-defined module

2009-03-18 Thread Alp Mestan
Hi,

replacing :
module rec A1 : AA
= struct
type q = ASet.t
type t = string

with :
module rec A1 : AA with type q = ASet.t, type t = string

should be okay. Shouldn't it ?

On Wed, Mar 18, 2009 at 1:08 PM, Hugo Ferreira h...@inescporto.pt wrote:

 Hello,

 I hope this is not a beginners questions.
 I am trying to reuse code via functors,
 however I am getting the following error:

 Cannot safely evaluate the definition of the recursively-defined module
 (refers to AA.empty when implemented as a constant value)

 I circumvented the problem by not using a
 constant value but a function instead. As I
 understand it this may cause run-time errors.
 My question is: is their any way to make the
 following example work.

 Specifically, for the example below is their
 any way of indicating to the compiler that
 AA.q = ASet.t ?

 TIA,
 Hugo F.

 module type AA =
  sig
type q
type t = string

val compare: t - t - int
val add: t - q - q
val empty: unit - q
  end

 module rec A1 : AA
 = struct
 type q = ASet.t
 type t = string

 let compare s1 s2 = Pervasives.compare s1 s2
 let add e s = ASet.add e s
 let empty _ = ASet.empty
   end
and ASet : Set.S with type elt = A1.t
 = Set.Make(A1)

 module type Wrap_A =
  sig
type t
type q

val init: q
val add: t - q - q
  end

 module Make_A (An_A : AA) : Wrap_A
  =
  struct
type t = An_A.t
type q = An_A.q

(*let init = ASet.empty*)
let init = An_A.empty ()
let add t q = An_A.add t q
 end

 module Wrap_A1 = Make_A( A1 )

 ___
 Caml-list mailing list. Subscription management:
 http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
 Archives: http://caml.inria.fr
 Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
 Bug reports: http://caml.inria.fr/bin/caml-bugs




-- 
Alp Mestan
In charge of the C++ section on Developpez.com.
___
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs