How to compile the examples in ocaml-core/base/async/examples ?
Francois Berenger
francois.berenger.working at gmail.com
Wed Nov 14 03:58:27 GMT 2012
On Tuesday, November 13, 2012 12:29:23 PM UTC+9, Dominick LoBraico wrote:
>
> The fact that has probably blocked that is the general vastness of Core.
> There is an example file for the Command module included with Core I
> believe (command-line parsing module). If there are specific areas that you
> would like to see some clarity on I could write up some simple examples for
> you/the community.
>
I gave it some thorough thought, that's why I did not reply right away.
1) definitively target the community, not just me, whatever I ask. I may be
a marginal user of both core and OCaml (I'm in academia in structural
biology / computer aided drug design, definitively not the mainstream
typical OCaml user).
2) I think some code example (compiling and working) using the error monad
would
be nice. I would like more of my complex code to not be cluttered with
error-
handling so that it is easier to reason about (and write).
3) Anything that's very different from what is in the OCaml std library
might
be worth some code example, for example core's hash tables.
I know sometime there is some "bla bla" in wikis / text files, but
working and
compiling code examples are invaluable.
If you read a lot of UNIX manpages, you will understand this in your
guts:
no matter the amount of "bla bla", no matter who wrote it,
no matter how well it is written,
examples are _always_ invaluable (yes, some people will only read
and use the examples and nothing from the documentation,
but that's the problem of this kind of user).
Best regards,
Francois.
> On Monday, November 12, 2012 7:02:51 PM UTC-6, Francois Berenger wrote:
>>
>> Thanks for the command.
>>
>> In fact, it would be quite useful to have example programs for core too.
>> I think I saw just one, while async has many.
>>
>> On Tuesday, November 13, 2012 5:20:43 AM UTC+9, Dominick LoBraico wrote:
>>>
>>> Francois,
>>>
>>> If you have ocamlfind install, this should work (for example):
>>>
>>> $ ocamlfind ocamlc -thread -package async -linkpkg hello.ml -o hello.exe
>>>
>>>
>>> On Thursday, November 8, 2012 7:01:50 PM UTC-6, Francois Berenger wrote:
>>>>
>>>> By the way, how do I compile them?
>>>> It was my initial question. ;)
>>>>
>>>> On Fri, Nov 9, 2012 at 10:00 AM, Francois Berenger
>>>> <francois.ber... at gmail.com> wrote:
>>>> > $ cd ~/.opam/system/build/async.108.07.01/examples
>>>> > $ grep -ri jane.std *
>>>> > bin_prot_test.ml:open Jane.Std
>>>> > cat.ml:open Jane.Std
>>>> > countdown.ml:open Jane.Std
>>>> > finalizer.ml:open Jane.Std
>>>> > monitors.ml:open Jane.Std
>>>> > process.ml:open Jane.Std
>>>> > process_stream.ml:open Jane.Std
>>>> > server.ml:open Jane.Std
>>>> > signals.ml:open Jane.Std
>>>> > sigpipe.ml:open Jane.Std
>>>> > socket.ml:open Jane.Std
>>>> > sound.ml:open Jane.Std
>>>> > write_forever.ml:open Jane.Std
>>>> >
>>>> > On Fri, Nov 9, 2012 at 2:02 AM, Stephen Weeks <swe... at janestreet.com>
>>>> wrote:
>>>> >>> Jane.Std is some internal stuff that is not exported. We should
>>>> fix
>>>> >>> that example not to use it. Which specific example is it?
>>>> >>
>>>> >> Many of the examples in base/async/examples unnecessarily refer to
>>>> >> Jane.Std. I pushed a fix internally to change them all to Core.Std.
>>>>
>>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ocaml.org/pipermail/core/attachments/20121113/35d2bba6/attachment-0001.html>
More information about the core
mailing list