Live data from Hacker News

Real World OCaml

realworldocaml.org

21–30 of 83 posts

Re: Real World OCaml

#21
post #4

Earlier quoted context omitted.

It is not available on all arches though. Although in practices the arches that lack a native OCaml compiler don't matter. In RHEL we ship OCaml natively for everything except S/390 and AArch64. AArch64 will be important, but since hardware doesn't exist in a form you can buy for servers, we're happy to wait for upstream to implement this. We'll probably help them out with hardware too. Edit: We maintain our own PPC6…

We actively use/used OCaml in production on SPARC/Solaris, POWER/AIX, HP-UX/IA64. (The optimized compiler wouldn't build on AIX.)

There's an AIX port of 3.12.1

http://ocaml-ports.geschenker.net/ocaml-aix.html

Re: Real World OCaml

#22
post #11

Here is a description of OCaml usage at Jane Street : https://queue.acm.org/detail.cfm?id=2038036 ocaml.org have a list of users: http://ocaml.org/companies.html Some "big" companies in the list: Facebook, Citrix, Dassault Système.

Another cool one from CUFP this year is how Facebook is using OCaml to add incremental type inference to their vast PHP code base. There's (slightly hard to see video) here, but I'm sure Facebook will publicize it more widely when they're ready.

http://www.youtube.com/watch?v=gKWNjFagR9k

Re: Real World OCaml

#23
post #7

Where is OCaml's place in the current world? I find it interesting as it seems to generate little "buzz", but has two new books this year, and is a pre-cursor to another functional language that itself seems to be gaining traction, and is yet produced my Microsoft: F# My observational / untested impression is OCaml seems to be more practical, and maybe a little easier to transition to for someone like me who uses mos…

Jane Street gets mentioned a lot but Facebook is also a user. See the recent video from CUFP.

http://www.youtube.com/watch?v=gKWNjFagR9k

Re: Real World OCaml

#24
post #7

Where is OCaml's place in the current world? I find it interesting as it seems to generate little "buzz", but has two new books this year, and is a pre-cursor to another functional language that itself seems to be gaining traction, and is yet produced my Microsoft: F# My observational / untested impression is OCaml seems to be more practical, and maybe a little easier to transition to for someone like me who uses mos…

A major limiting factor is that OCaml has no support for parallelism, and due to it's use of a global interpreter lock for GC it can't run multiple threads.

That said it's great to program in (like Haskell with convenient IO and semicolons) and it compiles to blazing fast executables.

Re: Real World OCaml

#25
post #4

Earlier quoted context omitted.

It is not available on all arches though. Although in practices the arches that lack a native OCaml compiler don't matter. In RHEL we ship OCaml natively for everything except S/390 and AArch64. AArch64 will be important, but since hardware doesn't exist in a form you can buy for servers, we're happy to wait for upstream to implement this. We'll probably help them out with hardware too. Edit: We maintain our own PPC6…

We actively use/used OCaml in production on SPARC/Solaris, POWER/AIX, HP-UX/IA64. (The optimized compiler wouldn't build on AIX.)

Various backends for less used architectures are maintained out of tree, eg here:

https://github.com/retired-camels/ocaml

Re: Real World OCaml

#26
post #7

Where is OCaml's place in the current world? I find it interesting as it seems to generate little "buzz", but has two new books this year, and is a pre-cursor to another functional language that itself seems to be gaining traction, and is yet produced my Microsoft: F# My observational / untested impression is OCaml seems to be more practical, and maybe a little easier to transition to for someone like me who uses mos…

A major limiting factor is that OCaml has no support for parallelism, and due to it's use of a global interpreter lock for GC it can't run multiple threads. That said it's great to program in (like Haskell with convenient IO and semicolons) and it compiles to blazing fast executables.

This is by choice, because single thread performance matters more, and you can use fork or MPI to scale across NUMA nodes and clusters much more scalably and safely.

Re: Real World OCaml

#27
post #26

Earlier quoted context omitted.

A major limiting factor is that OCaml has no support for parallelism, and due to it's use of a global interpreter lock for GC it can't run multiple threads. That said it's great to program in (like Haskell with convenient IO and semicolons) and it compiles to blazing fast executables.

This is by choice, because single thread performance matters more, and you can use fork or MPI to scale across NUMA nodes and clusters much more scalably and safely.

Having used fork/join to parallelize an OCaml genetic algorithm, I can say from experience it is neither safe nor practical.

Edit: Intentionally only supporting single-threaded processes is a perfectly fine design decision, however I haven't seen this argument made for OCaml, rather I've seen "multi-threading our GC would be hard" as the justification for the single-thread limitation. Admittedly it was 3-4 years ago when I last had to deal with this.

Re: Real World OCaml

#28
post #7

Where is OCaml's place in the current world? I find it interesting as it seems to generate little "buzz", but has two new books this year, and is a pre-cursor to another functional language that itself seems to be gaining traction, and is yet produced my Microsoft: F# My observational / untested impression is OCaml seems to be more practical, and maybe a little easier to transition to for someone like me who uses mos…

I think people are starting to see the value, or at least popularity, of functional languages (Haskell/Scala/F#), and some of those are picking up OCaml as a language that fits into their workflow better - one that compiles to native binaries, without the extreme functional purity of Haskell.

Re: Real World OCaml

#29
post #17

In my progression of Haskell-OCaml-Common Lisp-Clojure-Scala, I remember OCaml having odd edge cases, modules of functors or some such that didn't really help me in solving real world problems (this was 2007-2008 so my memory could be off). I'm currently a fan of Scala, which has all the functional and Algebraic Data Type goodness I remember from OCaml but is more "practical", more companies and projects are using it…

Marius Eriksen (who leads a lot of the Scala work at Twitter) gave us a great quote for the back of the book that says it best.

    Programmers are digital choreographers, carefully 
    balancing correctness, modularity, concurrency, 
    and performance. Real World OCaml teaches you how 
    to perform this balancing act in simple, elegant ways.
OCaml's the simplest systems language I've ever used with a decent static type system to prevent common errors from creeping into your code (most other systems languages sacrifice modularity in favour of even more simplicity, but OCaml strikes a balance).

Re: Real World OCaml

#30
post #17

In my progression of Haskell-OCaml-Common Lisp-Clojure-Scala, I remember OCaml having odd edge cases, modules of functors or some such that didn't really help me in solving real world problems (this was 2007-2008 so my memory could be off). I'm currently a fan of Scala, which has all the functional and Algebraic Data Type goodness I remember from OCaml but is more "practical", more companies and projects are using it…

For me, OCaml is just easier on the eyes. For example, compare ADT declaration in OCaml vs. Scala case classes.
Post reply on HN