caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* OCaml / F# co-development
@ 2010-05-03 14:00 Benjamin Pierce
  2010-05-03 14:46 ` Sylvain Le Gall
  0 siblings, 1 reply; 3+ messages in thread
From: Benjamin Pierce @ 2010-05-03 14:00 UTC (permalink / raw)
  To: caml-list

Is anybody out there developing code in the common subset of OCaml and F# so that it works with both compilers / libraries?  I'd be very interested in hearing about the feasibility of this arrangement...

    - Benjamin


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

* Re: OCaml / F# co-development
  2010-05-03 14:00 OCaml / F# co-development Benjamin Pierce
@ 2010-05-03 14:46 ` Sylvain Le Gall
  2010-05-03 16:14   ` [Caml-list] " John Whitington
  0 siblings, 1 reply; 3+ messages in thread
From: Sylvain Le Gall @ 2010-05-03 14:46 UTC (permalink / raw)
  To: caml-list

On 03-05-2010, Benjamin Pierce <bcpierce@cis.upenn.edu> wrote:
> Is anybody out there developing code in the common subset of OCaml and
> F# so that it works with both compilers / libraries?  I'd be very
> interested in hearing about the feasibility of this arrangement...
>

There was a series of blog posts by CoherentPDF on
http://planet.ocamlcore.org 1 year ago.

Here is one of them:
http://coherentpdf.com/blog/?p=10

Browse their archives to have more:
http://www.coherentpdf.com/news-archive.html

Regards,
Sylvain Le Gall


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

* Re: [Caml-list] Re: OCaml / F# co-development
  2010-05-03 14:46 ` Sylvain Le Gall
@ 2010-05-03 16:14   ` John Whitington
  0 siblings, 0 replies; 3+ messages in thread
From: John Whitington @ 2010-05-03 16:14 UTC (permalink / raw)
  To: Sylvain Le Gall; +Cc: caml-list

Hi Benjamin,

On 03/05/2010 15:46, Sylvain Le Gall wrote:
> On 03-05-2010, Benjamin Pierce<bcpierce@cis.upenn.edu>  wrote:
>> Is anybody out there developing code in the common subset of OCaml and
>> F# so that it works with both compilers / libraries?  I'd be very
>> interested in hearing about the feasibility of this arrangement...
>>
>
> There was a series of blog posts by CoherentPDF on
> http://planet.ocamlcore.org 1 year ago.
>
> Here is one of them:
> http://coherentpdf.com/blog/?p=10
>
> Browse their archives to have more:
> http://www.coherentpdf.com/news-archive.html

The current release of CamlPDF does this, and it's about 15000 lines of 
Ocaml / F#.

http://www.coherentpdf.com/ocaml-libraries.html

You just have the occasional thing like this:

let digest =
   (*IF-OCAML*)
   Digest.string
   (*ENDIF-OCAML*)
   (*i*)(*F#
   function s ->
     let hasher = System.Security.Cryptography.MD5.Create () in
       string_of_int_array (intarray_of_bytearray (hasher.ComputeHash 
(bytearray_of_string s)))
   F#*)(*i*)

to account for the difference in standard libraries. And a little bit of 
messing around with the different syntax, for example writing

(!x).y

instead of !x.y

And you can't use labeled arguments or polymorphic variants.

But it's perfectly feasible. I converted said 15000 lines of code in a 
few days.

Cheers,

-- 
John Whitington
Director, Coherent Graphics Ltd
http://www.coherentpdf.com/


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

end of thread, other threads:[~2010-05-03 16:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-03 14:00 OCaml / F# co-development Benjamin Pierce
2010-05-03 14:46 ` Sylvain Le Gall
2010-05-03 16:14   ` [Caml-list] " John Whitington

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