* options to write a cross-platform interacting program in OCaml
@ 2009-03-10 16:28 Alan Schmitt
2009-03-10 17:19 ` [Caml-list] " Richard Jones
2009-03-10 19:53 ` Stéphane Glondu
0 siblings, 2 replies; 6+ messages in thread
From: Alan Schmitt @ 2009-03-10 16:28 UTC (permalink / raw)
To: caml-list
[-- Attachment #1: Type: text/plain, Size: 907 bytes --]
Hello,
I am looking at what options there are to rewrite camlgrenouille, a
small client for www.grenouille.com that I wrote a while ago, to make
it more modular (to allow an external UI to the core program) and
cross-platform (Unix and Windows).
In a nutshell, this program periodically runs some tests. Right now
its interaction with the outside is fairly limited: the only thing one
can do is ask it to quit (by doing a ctrl-c which is caught so as to
clean up before actually quitting). I would like to be able to send it
more complex commands, which would be driven by a UI separate from the
program.
The simplest approach seems to be using a socket and a select call
(with a timeout corresponding to the delay until the next test), but I
was wondering if there were other options based on threads. For
instance, could I use lwt under Windows?
Thanks for any suggestion,
Alan
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Caml-list] options to write a cross-platform interacting program in OCaml
2009-03-10 16:28 options to write a cross-platform interacting program in OCaml Alan Schmitt
@ 2009-03-10 17:19 ` Richard Jones
2009-03-10 19:53 ` Stéphane Glondu
1 sibling, 0 replies; 6+ messages in thread
From: Richard Jones @ 2009-03-10 17:19 UTC (permalink / raw)
To: Alan Schmitt; +Cc: caml-list
On Tue, Mar 10, 2009 at 05:28:11PM +0100, Alan Schmitt wrote:
> I am looking at what options there are to rewrite camlgrenouille, a
> small client for www.grenouille.com that I wrote a while ago, to make
> it more modular (to allow an external UI to the core program) and
> cross-platform (Unix and Windows).
>
> In a nutshell, this program periodically runs some tests. Right now
> its interaction with the outside is fairly limited: the only thing one
> can do is ask it to quit (by doing a ctrl-c which is caught so as to
> clean up before actually quitting). I would like to be able to send it
> more complex commands, which would be driven by a UI separate from the
> program.
>
> The simplest approach seems to be using a socket and a select call
> (with a timeout corresponding to the delay until the next test), but I
> was wondering if there were other options based on threads. For
> instance, could I use lwt under Windows?
For such a simple model I'm pretty certain that using select is going
to be the easiest way.
For the cross-platform bit, don't forget to take a look at the Fedora-
MinGW project.
Rich.
--
Richard Jones
Red Hat
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Caml-list] options to write a cross-platform interacting program in OCaml
2009-03-10 16:28 options to write a cross-platform interacting program in OCaml Alan Schmitt
2009-03-10 17:19 ` [Caml-list] " Richard Jones
@ 2009-03-10 19:53 ` Stéphane Glondu
2009-03-20 14:38 ` Compiling ocaml-ssl under windows (mingw) Alan Schmitt
1 sibling, 1 reply; 6+ messages in thread
From: Stéphane Glondu @ 2009-03-10 19:53 UTC (permalink / raw)
To: Alan Schmitt; +Cc: caml-list
Alan Schmitt a écrit :
> [...] For instance, could I use lwt under Windows?
FYI, Unison uses lwt and works under Windows.
Cheers,
--
Stéphane
^ permalink raw reply [flat|nested] 6+ messages in thread
* Compiling ocaml-ssl under windows (mingw)
2009-03-10 19:53 ` Stéphane Glondu
@ 2009-03-20 14:38 ` Alan Schmitt
2009-03-20 15:25 ` [Caml-list] " Jerome Vouillon
0 siblings, 1 reply; 6+ messages in thread
From: Alan Schmitt @ 2009-03-20 14:38 UTC (permalink / raw)
To: caml-list
[-- Attachment #1: Type: text/plain, Size: 758 bytes --]
On 10 mars 09, at 20:53, Stéphane Glondu wrote:
> Alan Schmitt a écrit :
>> [...] For instance, could I use lwt under Windows?
>
> FYI, Unison uses lwt and works under Windows.
Hello,
I am trying to use lwt under windows (using mingw), and I cannot get
it to compile, because I cannot compile the required ocaml-ssl. One
first problem I had was finding a mingw compatible version of openssl
(as lwt seems to require ocaml-ssl), but I finally found it. Now
compiling ocaml-ssl fails with the following:
ocamlmklib -o ssl_stubs ssl_stubs.o -lcrypto -lssl
make[11]: ocamlmklib: Command not found
I checked, and my godi installation of ocaml does not provide
ocamlmklib.
Is there a way around this?
Thanks a lot,
Alan
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Caml-list] Compiling ocaml-ssl under windows (mingw)
2009-03-20 14:38 ` Compiling ocaml-ssl under windows (mingw) Alan Schmitt
@ 2009-03-20 15:25 ` Jerome Vouillon
2009-03-20 16:14 ` Alan Schmitt
0 siblings, 1 reply; 6+ messages in thread
From: Jerome Vouillon @ 2009-03-20 15:25 UTC (permalink / raw)
To: Alan Schmitt; +Cc: caml-list
Hi Alan,
On Fri, Mar 20, 2009 at 03:38:22PM +0100, Alan Schmitt wrote:
> I am trying to use lwt under windows (using mingw), and I cannot get it
> to compile, because I cannot compile the required ocaml-ssl.
I believe you can compile Lwt without the ocaml-ssl library by just
removing file src/lwt_ssl.mllib
In file src/lwt_unix.ml, you should also change the line:
let windows_hack = Sys.os_type <> "Unix"
into
let windows_hack = false
This was a hack to make Unison work properly under Windows even though
"select" did not support pipes. As the implementation of "select" has
been improved in Ocaml 3.11, it should no longer be necessary.
-- Jerome
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Caml-list] Compiling ocaml-ssl under windows (mingw)
2009-03-20 15:25 ` [Caml-list] " Jerome Vouillon
@ 2009-03-20 16:14 ` Alan Schmitt
0 siblings, 0 replies; 6+ messages in thread
From: Alan Schmitt @ 2009-03-20 16:14 UTC (permalink / raw)
To: Jerome Vouillon; +Cc: caml-list
[-- Attachment #1: Type: text/plain, Size: 956 bytes --]
On 20 mars 09, at 16:25, Jerome Vouillon wrote:
> Hi Alan,
>
> On Fri, Mar 20, 2009 at 03:38:22PM +0100, Alan Schmitt wrote:
>> I am trying to use lwt under windows (using mingw), and I cannot
>> get it
>> to compile, because I cannot compile the required ocaml-ssl.
>
> I believe you can compile Lwt without the ocaml-ssl library by just
> removing file src/lwt_ssl.mllib
OK. I wanted to install it through godi, but I guess it will be
simpler to compile it directly. (The ideal would be a configuration
option to have ssl as optional.)
> In file src/lwt_unix.ml, you should also change the line:
> let windows_hack = Sys.os_type <> "Unix"
> into
> let windows_hack = false
> This was a hack to make Unison work properly under Windows even though
> "select" did not support pipes. As the implementation of "select" has
> been improved in Ocaml 3.11, it should no longer be necessary.
Very interesting, I was not aware of this.
Thanks,
Alan
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-03-20 16:14 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-10 16:28 options to write a cross-platform interacting program in OCaml Alan Schmitt
2009-03-10 17:19 ` [Caml-list] " Richard Jones
2009-03-10 19:53 ` Stéphane Glondu
2009-03-20 14:38 ` Compiling ocaml-ssl under windows (mingw) Alan Schmitt
2009-03-20 15:25 ` [Caml-list] " Jerome Vouillon
2009-03-20 16:14 ` Alan Schmitt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox