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  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 wrote:
>
>> On Fri, Oct 9, 2009 at 3:40 AM, Yaron Minsky  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  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 wrote:

> - 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] [ANN]Amthing - a multi-threaded GUI library

2009-04-14 Thread Alp Mestan
On Tue, Apr 14, 2009 at 12:29 PM, Satoshi Ogasawara wrote:

>
> On 2009/04/14, at 18:11, Alp Mestan wrote:
> > Have you planned to write a little introductory tutorial so that we could
> do some tests and give feedback about Amthing ?
>
>
> Thank you for your help.
> We plan for write some webpages including build sequence, tutorial and API
> document
> in a month.
>

Great. Keep us updated :-)


-- 
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] [ANN]Amthing - a multi-threaded GUI library

2009-04-14 Thread Alp Mestan
Have you planned to write a little introductory tutorial so that we could do
some tests and give feedback about Amthing ?

Thanks.

On Tue, Apr 14, 2009 at 10:54 AM, Satoshi Ogasawara wrote:

> Hello,
>
> On 2009/04/14, at 16:58, David MENTRE wrote:
> > 1. Are there any screenshots?
>
> I've just take it.
> http://www.itpl.co.jp/amthing/concurrent_example.png
>
> > 2. Is there a widget system like in GTK/Qt?
>
> Widgets are under developing. We will support button, label, textbox,
> checkbox, radio button, tab, listbox, tree, grid,..etc. We already supports
> Pango and XIM for textbox.
>
> > 3. What is the domain space covered by this library? Was it made for
> > a specific purpose? IT Planning, Inc. is apparently a Japanese company
> > using OCaml but the main software is using Java Swing GUI.
>
> The main purpose is to develop an ordinary desktop application covered
> by GTK/Qt. In addition, Amthing is applicable to rich client which access
> to internet services. Animation makes application rich. Concurrent
> environment
> helps us to write asynchronous communications.
>
> best regards,
> ---
>  Ogasawara Satoshi
>| - Email:  ogasaw...@itpl.co.jp
>
> ___
> 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] 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] 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  wrote:

> This might be of interest to anyone else in the Boston area.
>
>
> -- Forwarded message --
> From: Anne Hunter 
> 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] Re: LLC book [was: Questions]

2009-04-02 Thread Alp Mestan
On Thu, Apr 2, 2009 at 8:39 PM, Richard Jones  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] Re: LLC book [was: Questions]

2009-04-02 Thread Alp Mestan
Indeed, as I said above, a book on "today's OCaml" should cover a wide
variety of topics (syntax extensions with camlp4/5, general purpose
libraries, specific libraries like ocamlnet, GTK+ and OpenGL binding, etc).
To write such a book, there would be the need for many authors with time and
knowledge to produce a good learning and practice material for OCaml !

I think many of us would enjoy writing some paragraphs for such a project...
But would there be enough people to achieve the writing of an entire (and
good) book ?

On Thu, Apr 2, 2009 at 3:37 PM, Jon Harrop  wrote:

> On Thursday 02 April 2009 13:41:01 Ed Keith wrote:
> > Having said that, I currently have some free time time and would be
> willing
> > to offer my assistance to this project. It would give me the opportunity
> to
> > hone my writing and ocaml skills, and I believe as an experienced
> > professional programmer (I have worked in government, military, finance,
> > medicine, aviation, and research) and ocaml newbie I could bring a useful
> > perspective to the project.
> >
> > I hope I can be of service,
>
> I think the existing books cover the core parts of the language well so
> there
> is no need for further work in that area but I would like to see books
> covering the following topics:
>
> . Batteries (!).
>
> . Libraries, e.g. LablGTK.
>
> . Post 3.10 camlp4.
>
> . Other tools, e.g. menhir, dpygen, bitstrings, micmatch.
>
> There are also some areas where I think today's OCaml software could be
> improved:
>
> . Automatic FFI stub JIT compilation using LLVM.
>
> . OpenGL 3 bindings.
>
> . GUI libraries.
>
> . IDEs (probably depends upon GUI libraries).
>
> --
> Dr Jon Harrop, Flying Frog Consultancy Ltd.
> http://www.ffconsultancy.com/?e
>
> ___
> 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] Re: LLC book [was: Questions]

2009-04-02 Thread Alp Mestan
On Thu, Apr 2, 2009 at 10:06 AM, Xavier Leroy  wrote:

> It could be nice to translate it in English, at least to have a
>>>  larger base of readers, and adapt the examples from Caml Light to
>>>  Objective Caml (I don't know how much the syntaxes differ though)
>>>
>>
>> The syntax is very close for the subset of Caml used in the book.
>>
>
> Right.  Parts of the standard library changed, though.
>
>  However, judging from the lack of availability of this book even in
>> French, there might an issue in the agreement between the authors
>> (Leroy & Weis) and the publisher. I'm suspecting the authors are
>> unable to re-publish the book elsewhere.
>>
>
> The publisher (Dunod) holds all rights except for an English
> translation (Pierre Weis and I reserved those rights).  There is a
> procedure to ask the publisher to relinquish its rights if it decides
> not to print the book again, but that procedure can take up to 1 year (!).
>
> All in all, I'm not sure it's worth the effort to resurrect this old
> text, but if a group of motivated volunteers arise, let's discuss it
> privately.
>
> - Xavier Leroy
>

I think it would be a better effort to start a new work, even if harder.
OCaml's has known some evolutions, there are many key projects (Extlib,
Core, Batteries, ...) so it would be nice to throw most of today's OCaml in
an entirely new book. Moreover, there wouldn't be any problem with the
publisher of LLC.

But for such a project there would be the need for a great team of very
motivated people.
___
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] qt / windows gui

2009-03-25 Thread Alp Mestan
You should take a look at QtCaml :
http://qt-caml.crapulion.org/trac

But people prefer using lablgtk2 when they need GUI in OCaml.

On Wed, Mar 25, 2009 at 3:00 PM, Joel Reymont  wrote:

> Are there OCaml bindings for QT?
>
> Would OCaml + QT be a good option for a Windows app?
>
> I don't want to go with F# and do want to keep development on the Mac.
>
>Thanks, Joel
>
> ---
> http://linkedin.com/in/joelreymont
>
>
>
> ___
> 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] 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 wrote:

> 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 '/' 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 / is used to uniquely identify identifiers. In this example :
>
> let x = 1 in let x = 2 in x
>
> The / 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 '/' 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  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