5 ms·
Congratulations to the team and hope ML family languages become popular and mainstream. Rust compiler front-end was initially written in OCaml and later moved
by dragonsh 7y ago
Congratulations to the team and hope ML family languages become popular and mainstream.
Rust compiler front-end was initially written in OCaml and later moved to rust and dependent on LLVM written in C++. Still Rust became more popular by following a simple imperative style of programming with some incremental improvements over C/C++.
OCaml is confined mostly within Facebook with some use by Bloomberg and in Xen development. I hope functional programming languages become popular and also used for systems programming. OCaml indeed is used for system programming, like Mirage unikernel OS is written in it.
Although OCaml can offer whatever is offered by Rust I believe Rust being imperative language along the lines of C++ will be more popular.
- smabie 7y agoOCaml is also used by Jane Street and they are probably the biggest corporate users of it.
- Kalooo2020 7y agoSame name every OCAML or F# post.
- exdsq 7y agoThey are very involved with the ecosystem. They sponser a lot of the events, conferences, etc. In fact I'm attending OPLSS this year and even that is sponsered by them. I even saw someone compare OCaml build methods as 'Jane Street Way' vs 'Other Ways'. It's hard to ignore such an influential company like that when the question about who uses them comes up!
- badfrog 7y agoWhat's wrong with that?
- rwmj 7y agoUsed by Red Hat for miscellaneous virt tools.
- kryptiskt 7y agoFacebook uses it, as ReasonML and also in Infer (a static analyzer https://fbinfer.com https://fbinfer.com).
- exdsq 7y agoI believe OCaml is the main language in Jane Streets tech stack rather than just being used for dev tools like Infer. I saw they were hiring compiler engineers recently so, assuming this is for OCaml, they are pretty deep into the language.
- melling 7y agoYes, they make billions of dollars of trades daily using OCaml. https://www.janestreet.com/programming/ https://www.janestreet.com/programming/ Yaron Minsky introduced OCaml into Jane Street almost 20 years ago: https://blog.janestreet.com/author/yminsky/ https://blog.janestreet.com/author/yminsky/ He’s working on a new version of his book: http://dev.realworldocaml.org/ http://dev.realworldocaml.org/
- Yoric 7y agoHaving coded a lot in both OCaml (I used to lead OCaml Batteries Included) and Rust (I'm a contributor to the Rust compiler and stdlib), I believe that they have very different targets. Rust is really, really good at systems-level programming, it has great concurrency, but closures are more restricted than OCaml and it doesn't have general garbage-collection. OCaml shines to implement really complicated algorithms. Anything that requires symbolic manipulation/pattern-matching, for instance, or manipulating large graphs, or maintaining extremely complex invariants. Garbage-collection that just works is invaluable but it doesn't play nicely with multicore yet. In other words, I believe that there's room for both in our world! I could see myself developing applications in which some components are implemented in Rust and others in OCaml.
- giornogiovanna 7y agoBesides GC and the lightweight syntax (relative to Rust), what is it about OCaml that makes it so wonderful for implementing complicated algorithms?
- pjmlp 7y agoExactly that, lock-free algorithms are specially hard to get a correct implementation without tracing GC support.
- terminaljunkid 7y agoWhy?
- pjmlp 7y agoHere is an overview, read also the comments. https://concurrencyfreaks.blogspot.com/2017/08/why-is-memory-reclamation-so-important.html?m=1 https://concurrencyfreaks.blogspot.com/2017/08/why-is-memory...
- Yoric 7y agoWell, the big one is GC. Here are a few others: - both polymorphic variants and GADTs are extremely powerful mechanisms to let you keep track of invariants, in a manner that cannot be replicated readably in Rust so far; - OCaml's pattern-matching is a bit more flexible than Rust's ; - (thanks to the GC) OCaml's closures are much more flexible than Rust closures; - I guess OCaml's blindingly fast exceptions can be useful for some algorithms, although I haven't really experienced the need for them myself. Again, that's not to say that Rust doesn't have great stuff for it (affine types 4eva!) or that OCaml doesn't have its own limitations – Rust is currently my main language and I do not regret it. But there are some algorithms that I really don't want to write in Rust. Recently, for instance, I stumbled upon this: http://weblog.jamisbuck.org/2010/12/29/maze-generation-eller-s-algorithm http://weblog.jamisbuck.org/2010/12/29/maze-generation-eller... . Trivial algorithm, trivial to write in OCaml, feasible but much less straightforward in Rust.
- paulddraper 7y ago> I hope functional programming languages become popular and also used for systems programming My absolute favorite OCaml program is Unison [1], which is a cross-platform performant file watcher and sync tool. It's essential to a good VM or remote development experience, and the the principal technology behind docker-sync. (Mac users will thank me.) [1] https://github.com/bcpierce00/unison https://github.com/bcpierce00/unison [2] http://docker-sync.io/ http://docker-sync.io/
- rvz 7y agoJane Street also is a regular contributor and a heavily uses OCaml for their infrastructure and trading systems too. They have very technical blogs about how they use OCaml which is very interesting. [0] [0] https://blog.janestreet.com/ https://blog.janestreet.com/
- jfkebwjsbx 7y ago[replied to the wrong comment]
- thosakwe 7y agoI think you might have misinterpreted the previous comment, because it wasn't implying that any one paradigm is better/worse.
- deleted 7y ago[deleted]
- jfkebwjsbx 7y ago> ...dependent on LLVM written in C++. Still Rust became more popular... "Still", as if non-pure functional languages are not worth it or "bad", even if just depending on a project that uses them. Sorry, but that gatekeeping attitude among functional languages proponents is very tiring.
- eru 7y agoOCaml is impure and pragmatic. They even have for and while loops.
- uryga 7y agohow on earth is this gatekeeping? GP said nothing like "imperative programming isn't true programming and deserves to be looked down upon" or w/e, they just expressed a personal preference for FP. ("I hope functional programming languages become popular and also used for systems programming.")
- xvilka 7y agoNot only these, but I also recently noticed OCaml-written parts of Moby[1]. Another significant example is Tezos[2]. So far, OCaml became much more modern and usable in the last couple of years. The biggest missing parts are multicore[3] and solving the metaprogramming issues[4]. Both are being worked on, and, hopefully, will be ready in a couple years. [1] https://github.com/moby?utf8=%E2%9C%93&q=&type=&language=ocaml https://github.com/moby?utf8=%E2%9C%93&q=&type=&language=oca... [2] https://tezos.com/ https://tezos.com/ [3] https://discuss.ocaml.org/t/multicore-ocaml-january-2020-update/5090 https://discuss.ocaml.org/t/multicore-ocaml-january-2020-upd... [4] https://discuss.ocaml.org/t/the-future-of-ppx/3766 https://discuss.ocaml.org/t/the-future-of-ppx/3766
- noir_lord 7y agoJanestreet are incredibly heavy users of ocaml in production. They have some awesome talks on YouTube as well.
- 7thaccount 7y agoYou're forgetting that apparently almost everything at Jane Street is done in OCaml including some FPGA compiler work iirc.