Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
* ocaml needs users: native code for windows?
@ 1997-05-12  0:01 Lyn A Headley
  1997-05-12 17:19 ` Xavier Leroy
  0 siblings, 1 reply; 6+ messages in thread
From: Lyn A Headley @ 1997-05-12  0:01 UTC (permalink / raw)
  To: caml-list

hi,

I think it would be nice if more programmers used ocaml, and if more
companies could view the language as a serious vehicle for application
development.  Given those goals, it seems that one step in the right
direction would involve porting ocamlopt to Intel Win32 and binding
the frightful but popular Windows API to it, thus allowing people to
produce Windows binaries without leaving the comforts of ocaml.  Have
any steps been taken in this direction?  Does anyone else think this
is a goal worth pursuing?


Lyn





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

* Re: ocaml needs users: native code for windows?
  1997-05-12  0:01 ocaml needs users: native code for windows? Lyn A Headley
@ 1997-05-12 17:19 ` Xavier Leroy
  0 siblings, 0 replies; 6+ messages in thread
From: Xavier Leroy @ 1997-05-12 17:19 UTC (permalink / raw)
  To: Lyn A Headley; +Cc: caml-list

> I think it would be nice if more programmers used ocaml, and if more
> companies could view the language as a serious vehicle for application
> development.  Given those goals, it seems that one step in the right
> direction would involve porting ocamlopt to Intel Win32 and binding
> the frightful but popular Windows API to it

The ocamlopt native-code compiler is already available for Win32. You
need MASM and MSVC++ to use it, though. But you're correct that there
is no interface for the Win32 API.

We don't have the manpower to invest in a full Win32 port. The
majority of our serious users works under Unix, anyway. If you feel
like doing the Win32 port, we'll support your efforts, of course.

Regards,

- Xavier Leroy





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

* Re: ocaml needs users: native code for windows?
@ 1997-05-12 19:28 Andrew Conway
  0 siblings, 0 replies; 6+ messages in thread
From: Andrew Conway @ 1997-05-12 19:28 UTC (permalink / raw)
  To: clasohm, laheadle; +Cc: caml-list

> You still can't ship a plain binary, can you?  Do you rely on your
> users installing ocaml, or do you package up the distribution and send
> it with your product?

I can't see any problem shipping a plain binary. Indeed I have successfully
offered precompiled versions of some ocaml programs under various
flavours of Unix. (These are ocamlopt compiled things, but I presume
one can do the same with the -custom option to ocamlc).

Regards,

Andrew.

[ On peut envoyer un fichier seul pour un logiciel : On n'a pa besoin
  de tout de ocaml quand on veut donner quelqu'un un logiciel ocaml ]





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

* RE: ocaml needs users: native code for windows?
  1997-05-12  8:20 Carsten Clasohm
  1997-05-12 15:34 ` Lyn A Headley
@ 1997-05-12 18:46 ` Kevin Esler
  1 sibling, 0 replies; 6+ messages in thread
From: Kevin Esler @ 1997-05-12 18:46 UTC (permalink / raw)
  To: Carsten Clasohm; +Cc: 'Lyn A Headley', caml-list

Carsten Clasohm writes:
  > Porting the MFC might be worth it. But then, it's a lot of work
  > and I don't think it would generate enough benefits.

Last time I looked, the Python implementation for Win32 contained a
full-featured version of the MFC, written in Python, so it may be less
work that one would think.  At least the source code to MFC is
available to anybody who buys VC++, os it is just a simple (!) matter
of trascribing it from C++ to OCaml, right ?
-- 
Kevin Esler                 Pure Atria
                            20 Maguire Road
Tel: (617) 676-2626         Lexington, MA 02173-3104
Fax: (617) 676-2600
mailto:esler@PureAtria.com  WWW: http://www.PureAtria.com/





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

* Re: ocaml needs users: native code for windows?
  1997-05-12  8:20 Carsten Clasohm
@ 1997-05-12 15:34 ` Lyn A Headley
  1997-05-12 18:46 ` Kevin Esler
  1 sibling, 0 replies; 6+ messages in thread
From: Lyn A Headley @ 1997-05-12 15:34 UTC (permalink / raw)
  To: Carsten Clasohm; +Cc: 'Lyn A Headley', caml-list


    Carsten> I use OCaml for a commercial Win32 project and am quite
    Carsten> happy with the current integration of C(++) and
    Carsten> OCaml. The GUI tasks in the program are carried out by
    Carsten> C++ classes, while the 'real' computations are done by
    Carsten> OCaml code.

You still can't ship a plain binary, can you?  Do you rely on your
users installing ocaml, or do you package up the distribution and send
it with your product?




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

* RE: ocaml needs users: native code for windows?
@ 1997-05-12  8:20 Carsten Clasohm
  1997-05-12 15:34 ` Lyn A Headley
  1997-05-12 18:46 ` Kevin Esler
  0 siblings, 2 replies; 6+ messages in thread
From: Carsten Clasohm @ 1997-05-12  8:20 UTC (permalink / raw)
  To: 'Lyn A Headley', caml-list

> Given those goals, it seems that one step in the right
> direction would involve porting ocamlopt to Intel Win32 and binding
> the frightful but popular Windows API to it, thus allowing people to
> produce Windows binaries without leaving the comforts of ocaml.

I use OCaml for a commercial Win32 project and am quite happy with the
current integration of C(++) and OCaml. The GUI tasks in the program are
carried out by C++ classes, while the 'real' computations are done by
OCaml code.

IMHO it's best to implement the GUI part with C++ and the Microsoft
Foundation Classes (MFC). That's because

1. Microsoft VisualC++ offers a useable set of tools for designing the
GUI and linking code to it.
2. The Win32 API is encapsulated by an extensive class hierarchy (the
MFC) that offers a good representation of the GUI.
3. The GUI code's complexity is relatively low, i.e. I'm comfortable
doing it using C++.
4. Interfacing C++ and OCaml is quite easy if one uses C++ classes that
encapsulate the OCaml values and functions.


> Does anyone else think this is a goal worth pursuing?

Porting the MFC might be worth it. But then, it's a lot of work and I
don't think it would generate enough benefits.


Carsten







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

end of thread, other threads:[~1997-05-13  8:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-05-12  0:01 ocaml needs users: native code for windows? Lyn A Headley
1997-05-12 17:19 ` Xavier Leroy
1997-05-12  8:20 Carsten Clasohm
1997-05-12 15:34 ` Lyn A Headley
1997-05-12 18:46 ` Kevin Esler
1997-05-12 19:28 Andrew Conway

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox