Loading ...
Sorry, an error occurred while loading the content.
 

Starting with Ocamlnet

Expand Messages
  • Jeff Massung
    So, I ve been learning Ocaml just fine and am loving it. However, for the life of my I can t find any documentation on how to use Ocamlnet. I m using Ubuntu
    Message 1 of 3 , May 2, 2011
      So, I've been learning Ocaml just fine and am loving it. However, for the
      life of my I can't find any documentation on how to use Ocamlnet. I'm using
      Ubuntu (Maverick) and do the following:

      $ sudo apt-get install libocamlnet-ocaml-dev

      Okay, I have it now and can see a package like netclient in /usr/lib/ocaml,
      and it has http_client, etc. However, doing an "open Http_client" always
      fails. I don't know if I have to #load something first to get it to work?

      Sorry if this is super simple and I'm just not seeing it. I can't find any
      tutorials on getting Ocamlnet up and running, though, which tells me it has
      to be very obvious and staring me in the face. :-(

      Thanks!

      Jeff M.


      [Non-text portions of this message have been removed]
    • Sebastien Mondet
      ... Yes you need to #load something :) But generally we use findlib which makes this much simpler (findlib should be installed in any debian/ubuntu system
      Message 2 of 3 , May 2, 2011
        On Mon, May 2, 2011 at 18:01, Jeff Massung <massung@...> wrote:

        > So, I've been learning Ocaml just fine and am loving it. However, for the
        > life of my I can't find any documentation on how to use Ocamlnet. I'm using
        > Ubuntu (Maverick) and do the following:
        >
        > $ sudo apt-get install libocamlnet-ocaml-dev
        >
        > Okay, I have it now and can see a package like netclient in /usr/lib/ocaml,
        > and it has http_client, etc. However, doing an "open Http_client" always
        > fails. I don't know if I have to #load something first to get it to work?
        >
        >
        Yes you need to #load something :)

        But generally we use "findlib" which makes this much simpler (findlib should
        be installed in any debian/ubuntu system with ocaml packages)

        To load findlib in the top level call:

        #use "topfind";;

        This should give you a help message.

        (I guess then you need

        #require "netclient";;

        to use the Http_client module)





        > Sorry if this is super simple and I'm just not seeing it. I can't find any
        > tutorials on getting Ocamlnet up and running, though, which tells me it has
        > to be very obvious and staring me in the face. :-(
        >
        > Thanks!
        >
        > Jeff M.
        >
        >
        > [Non-text portions of this message have been removed]
        >
        >
        >
        > ------------------------------------
        >
        > Archives up to December 31, 2010 are also downloadable at
        > http://www.connettivo.net/cntprojects/ocaml_beginners
        > The archives of the very official ocaml list (the seniors' one) can be
        > found at http://caml.inria.fr
        > Attachments are banned and you're asked to be polite, avoid flames
        > etc.Yahoo! Groups Links
        >
        >
        >
        >


        [Non-text portions of this message have been removed]
      • Jeff Massung
        Thanks! Worked like a charm! Jeff M. On Mon, May 2, 2011 at 10:16 AM, Sebastien Mondet
        Message 3 of 3 , May 2, 2011
          Thanks! Worked like a charm!

          Jeff M.

          On Mon, May 2, 2011 at 10:16 AM, Sebastien Mondet <
          sebastien.mondet@...> wrote:

          >
          > To load findlib in the top level call:
          >
          > #use "topfind";;
          >
          > #require "netclient";;
          >


          [Non-text portions of this message have been removed]
        Your message has been successfully submitted and would be delivered to recipients shortly.