Re: Ocaml applications

"Gabriel Scherer [email protected] [ocaml_beginners]" <[email protected]> Thu, 14 Apr 2016 10:24:26 -0400
Newsgroups gmane.comp.lang.ocaml.beginners
Message-ID <CAPFanBGKDRAcmTwf9JWFCNrv90KYv5MKkoe7j-kJMz2bp+cVOw@mail.gmail.com>
If you are familiar with the style of system programming used on Unix
systems using C, there is a  good online book about system programming in
OCaml that follows the same style:

  https://ocaml.github.io/ocamlunix/

The OCaml community has since developed other abstractions for system
programming, in particular the cooperative concurrency monads libraries
(Lwt or Async) to deal with asynchronicity, see the Lwt manual at
  https://ocsigen.org/lwt/manual/
but using the more low-level Unix approach (which also works on Windows if
you don't use fork() or the other few unsupported features) is also fine if
you are familiar with it.

> My view is if you are developing these kind of applications(non-web),
latency should be low and comparable with C++/Java.
> For example, imap server in Ocaml or text search library

That should be entirely within reach.

OCaml has been used for search engine technology at Mylife (
http://lambda-the-ultimate.org/node/3903 ) and for web scraping at Ahrefs (
https://github.com/ahrefs ), and you will fine plenty of system-level
programming in the MirageOS project ( https://mirage.io/ ), a library
operating system, for example they have a full-OCaml TCP/IP stack.

On Thu, Apr 14, 2016 at 6:54 AM, [email protected] [ocaml_beginners] <
[email protected]> wrote:

>
>
> Thanks a lot Herr.
> Yes, Ruby is popular. My view is if you are developing these kind of
> applications(non-web) , latency should be low and comparable with C++/Java.
>  for example, imap server in Ocaml or text search library.  i am not sure
> how is compared to Java-James  or Apache Lucene . or Erlang one.
>  Currently i am not working in the niche areas mentioned. Mainly text
> search.
> Thanks again for info.
>
> Regards
> Pd
>
>
>
> On Thursday, April 14, 2016 1:04 PM, "'Mr. Herr' [email protected]
> [ocaml_beginners]" <[email protected]> wrote:
>
>
>
> trying some answers, see inline
>
> On 14.04.2016 05:55, [email protected] [ocaml_beginners] wrote:
>
>
> Hello,
> I am new to Ocaml and thinking of learning.
>
> Congratulations. OCaml is one of the big sources for feature inspiration
> these times.
>
> What are typical use cases of Ocaml ? What kind of applications Ocaml fits
> in ?
>
> see http://ocaml.org/learn/success.html.
>
> To be honest OCaml is more a niche language, but with unique features, so
> it will be used in many kinds of applications, by people who have special
> knowlegde and expertise in informatics.
>
> It's origins are in mathematics and logic, so a big special application is
> computer aided correctness proofs (formal methods).
>
> I read that its quite fast(possibly as Java) .
>
> It has compact byte code, it can be run as a script, and it can be
> compiled to native code needing only the system libc.
>
> And yes, it can be fast. If being fast were the main consideration, Ruby
> would never have seen more than a bunch of users.
>
> Does it fit in developing network servers ? How matured  Ocaml libraries
> are in developing socket/network  based applications ?
>
> Read about https://mirage.io/ MirageOS: writing a minimal operating
> system running directly on Xen and hosting your application.
>
> May be foolish question- Does Ocaml make native C call  for writing to say
> Socket or File ?
>
> It uses libc which is recommended on *nix systems because it abstracts
> away many details of the binary API.
>
> To be precise "native C call" should rather be "native library call", unix
> .so libraries are compiled to machine code
> and can be called by any other machine code respecting the calling
> conventions.
>
> Other platforms: on MS Windows there is F#, which is a .NET offspring of
> OCaml.
>
> /Str.
>
>
>
>
> 
>