
Caml Trading – Experiences with OCaml on Wall Street [video] - gnuvince
http://www.infoq.com/presentations/jane-street-caml-ocaml
======
saosebastiao
Quick question for the ocaml crowd: what keeps you with ocaml when you have a
very similar and more easily parallelized f# available? I ask as an outsider
to both, but a fan of ML-ish languages in general. Would Jane Street ever be
open to using F# or Haskell or Rust or Scala?

~~~
jordwalke
OCaml is not my primary programming language, but I have been looking at it
among many other options including all of the ones you mentioned.

The module system of OCaml is very powerful, and a similar module system is
not present in F#, or anything else besides some variants of StandardML as far
as I know. I was able to accomplish many things using Functors that I have not
been able to accomplish in any other languages.

Here's a link to one of my previous comments regarding some of OCaml's
compelling or unique features:
[https://news.ycombinator.com/item?id=7861033](https://news.ycombinator.com/item?id=7861033)

At the time of writing that, there were a couple of reasons why you still
might consider Haskell instead of OCaml (assuming you were willing to accept
complete purity and were willing to adapt to lazy evaluation). Those two
primary reasons were type classes and a multi-core runtime (where immutability
would really shine). I don't know much about Haskell, but this is what I've
heard from other well informed people. I'm sure there's many other great
reasons to use Haskell over OCaml, but these were the main ones from what I
could tell.

But since then, it looks like there's been great progress on an OCaml multi-
core runtime, and also something very similar to type classes (module
implicits). We'll have to see how those develop but it's definitely exciting.

Also since then, Jeffrey Scofield has accomplished a lot to get OCaml working
on modern iOS systems so you can build native iOS apps with OCaml:
[http://psellos.com/ocaml/compile-to-
iphone.html](http://psellos.com/ocaml/compile-to-iphone.html)

I've been building a small project in OCaml for a while now, and my experience
hasn't left me wanting any core language feature that some other language has,
aside from possibly a multi-core runtime (I haven't actually needed it yet,
but I will soon). Most of the things I wish were different are very
superficial syntactic gripes - but OCaml supports _arbitrary_ syntax via ppx
extensions so I can just stop complaining and build the syntax I want to
program in. (Haskell-inspired syntax? Swift-inspired syntax?).

The only other feature I'd like to see is a unification of the object system
and record system: You could describe that as "row polymorphism" built into
records (complete with pattern matching). No other major contenders support
this, so it doesn't effect my language decision, yet it would be a welcomed
feature.

~~~
frowaway001
> The module system of OCaml is very powerful, and a similar module system is
> not present in F#, or anything else besides some variants of StandardML as
> far as I know.

Scala's module system is very similar to ML's.

    
    
        Object        ≅ Structure
        Class         ≅ Functor
        Trait         ≅ Signature
        Abstract Type ≅ Abstract Type
        Refinement    ≅ Sharing Constraint

~~~
kvb
This is roughly correct, but see Andreas Rossberg's caveats here[1] for some
considerations that may be important depending on what you're trying to do.

[1]
[http://stackoverflow.com/a/23019436/82959](http://stackoverflow.com/a/23019436/82959)

~~~
jordwalke
Great point. And many of these distinguishing features mentioned in that post
are the ones that I used in order to accomplish some very powerful
abstractions that I couldn't have done in any other language that I've tried.
(Functors operating on types _and_ values).

------
DanielBMarkham
Very cool. I was very close to going all-in with OCaml a few years back when I
made the switch to FP. I still love their module system -- and am very
disappointed to see F# leaving its roots and becoming just another .NET
language (which has it's good parts and bad parts)

What swayed me at the time was the fact that you had to roll your own
libraries for so many things that you get out of the box with .NET. I
understand that's changing, but in my mind it's just not ready yet. Maybe in a
year or two. I'm still thinking of moving on to something else. It's either
going to be OCaml or Haskell.

Would love to see some folks doing this same kind of thing with F#, talking
about real-world production systems.

I've done some small app work with it, and blogged about it ( [http://tiny-
giant-books.com/blog/real-world-f-programming-pa...](http://tiny-giant-
books.com/blog/real-world-f-programming-part-1-structuring-your-solution/) ),
but what the F# community could use is some fans like OCaml has with Jane
Street.

~~~
logicchains
Out of interest, what were some of the major things you found missing from the
OCaml library ecosystem?

~~~
DanielBMarkham
Remember, it was 4-5 years ago, and OPAM didn't exist.

I remember thinking, "Wouldn't it be neat to scrape some web sites?" I
couldn't find anything in OCaml, but .NET had the HtmlAgilityPack written in
C# for Windows. Pop over to github, pull down the source, recompile? Badda
bing, badda boom, it's running in Linux. And I'm able to use it in F# without
really having to know C# (Even though that's not the case). I realized that I
could do that for literally thousands of different apps and utilities. So you
had this entire ecosystem of programmers making open source stuff for windows
that you could easily use in linux. That was the deal-closer.

Plus it looked like Mono had finished going through it's almost-ready-but-not-
quite stage. I would still love to be able to permanently load .NET apps in
Apache and call them a la fastCGI, but heck, even that might be a solved
problem by now.

Finally there was the F# community, which was basically a bunch of old OO MS
hacks like myself trying to find their way along mixed in with some really
nice academic types who were helpful. OCaml, sadly, did not have that kind of
feel. Instead there was a lot of French. And searching around the web for
answers to how to do really simple things, like get started, write a web app,
or cross-system develop.

The barrier to entry was just too high.

But, like I said, that's changing.

------
toolslive
He also persuaded the traders to use emacs.

------
ANTSANTS
I couldn't get the video or presentation to play, even in Chrome with Flash
enabled, without using a mobile user agent. And you can't download the audio
or slides without an account. Great web design.

[http://d1snlc0orfrhj.cloudfront.net/presentations/14-jun-
cam...](http://d1snlc0orfrhj.cloudfront.net/presentations/14-jun-
camltrading-2.mp4)

~~~
lukasm
Works for me. Have you tried in p0rn mode?

------
pokpokpok
My girlfriend found a jane street promo t-shirt in an Ithaca thrift shop - it
has a nice starry sky pattern and reads something like "A more elegant
language for a more civilized age". I'm enamored with the shirt! I don't know
much about performant FP financial wizardry but appreciate their design dept.

[https://www.janestreet.com/blog/what-we-
do/faqs/](https://www.janestreet.com/blog/what-we-do/faqs/) <-404's for me

~~~
azmenthe
Wow I would love a Jane Street shirt

~~~
pokpokpok
I know, right? It's one of those companies that depresses me because I think
I'd love working there but I don't consider myself a genius

~~~
mcguire
I don't believe you need to be a genius. Just willing to move to New York.
Give it a whack. How much can it hurt?

