OCaml is a beautiful language but I haven't seen any big non language projects written in OCaml. Does any one know why? OR do such projects exist and it is only that I am not aware of them?
The Fastest Fourier Transform in the West (FFTW) library is an example of a ubiquitous software product using OCaml. The FFTW library is a C library, but it is in large parts generated by an OCaml program, genfft (from the FAQ http://www.fftw.org/faq/section2.html#languages)
ReasonReact is a fantastic project that is written in OCaml (with Reason syntax). In addition to being a wonderful frontend framework, it's also a great introduction to the language.
This is OCaml's problem: it's a great language with no users. ReasonML is trying to solve this by making it more approachable, and they're making steady progress.
The OCaml language and toolchain is very powerful... and I do believe ReasonML makes it more approachable, at least for a wider audience of developers comfortable with JavaScript-style syntax.
OCaml is very good at symbolic computations, and not so good at floating point computations. Therefore it's a very good language for writing compilers etc.
Further than that, there are no more programs written in it for the same reason than there are no more programs written in any interesting languages, I guess; ie largely accidental.
What does this mean? I was under the impression the OCaml compiler did a decent number of floating point specific optimizations, like unboxed arrays and what not.
The Tezos blockchain / dapp platform is based on OCaml. This to me makes it really appealing, if I were to find some actual use case for a blockchain application :)
When you say non-language, do you mean unrelated to OCaml specifically or any language? Facebook implemented its infer linter for C, C++, Java, and Objective-C in OCaml: https://github.com/facebook/infer. When I worked at Bloomberg, they released BuckleScript for JS development. Not sure if that caught on though.
Bucklescript has caught on to some extent. Its sister syntax ReasonML is getting a little traction which means that Bucklescript is getting a little traction as they share the same build chain.
Wow Air were using it though one probably can't blame that for their collapse.
I guess that list doesn't include straight Bucklescript users either. There are definitely companies out there who use it outside of Reason so the OCaml, in general, is getting some use in industry which is nice.
I obviously don't t know your use case, but the more I look into multi-core code, the less impressed with it I am. I think you're almost always better with a tight loop and a good persistence strategy. If the thing you're doing really benefits trivially from easy paralellism, I'd lean on gpus anyways...
The tooling around libguestfs, a library for manipulating disk images that is typically used with KVM/Qemu based virtualization, is implemented in OCaml; the library itself is implemented in C.
> MetaOCaml has been successfully used for the most optimal stream fusion, specializing numeric and dynamic programming algorithms, building FFT kernels, compilers for an image processing and database query DSLs, OCaml server pages, generating families of specialized basic linear algebra and Gaussian Elimination routines, and high-performance stencil computations.
I’m a huge OCaml fan, but really it lacks a lot of things that you get out of the box with the runtimes of other languages. Multi core support is the most obvious one.
It’s definitely great for things like compilers, though. But I wouldn’t necessarily use it for a Web server.
We're working on it. You can install and play around with Multicore compiler today though the wider library ecosystem is yet to catch up. https://github.com/ocamllabs/ocaml-multicore
Multicore support is imho nowhere near OCaml's top problem :-) that would probably be a toolchain that lends itself to easy reproducible package management. But we're getting there.
Not everything needs to be usable for a Web server. I also wouldn't use C or C++ for anything directly plugged into the network. Morris worm proved what happens 30 years ago.
Besides, there are also multiple processes as possible solution.
- the syntax is not great. I've heard it's one of the reasons why F# was born
- not many people use Ocaml, which makes it hard to find help
- not many good resources. The official documentation is really hard to parse and there isn't much besides it and the reference book (which reads more like a book than a reference).
- no good ways to debug, print objects, test, etc.
- no one seems to agree on what is the standard library or the correct packages to import (for example there are several Option package)
I like the direction Shakti team is taking with the project, skilled personnel teasing practicality; Although I believe that the secure application project is intended for defence purposes.
Secure applications are pervasive. Think point of sale terminals, IoT devices and wearables handling personal information, all fly by wire systems, etc. Shakti is a whole family of processors from tiny microcontrollers to server class processors.
There is always a mention of F# whenever discussion on Ocaml arises. This time I wonder it is not discussed as much here because may be F# is clearly at disadvantage in RISC-V domain.
Malte here, I developed the bootcode.
While I agree with you, it's about the minimum you can do in C/ASM land before starting up OCaml.
The bootcode just initializes the registers to zero, setups a trap handler and the stack and heap. This is impossible to do from OCaml as it does not allow direct register/memory access as a language feature.
What is OCaml used for? https://www.quora.com/What-is-OCaml-used-for?share=1
Further infos:
awesome-ocaml - A curated collection of awesome OCaml tools, frameworks, libraries and articles: https://github.com/ocaml-community/awesome-ocaml
OCamlPro Research and Development: https://www.ocamlpro.com/research-and-development/
OCaml Weekly News (RSS): http://alan.petitepomme.net/cwn/cwn.rss
- A package manager like NPM, but for native code: https://github.com/esy/esy
- A fast Node version manager: https://github.com/Schniz/fnm
- A fast replacement for dotenv-cli: https://github.com/ulrikstrid/reenv
- A fast JS bundler: https://github.com/fastpack/fastpack
- A native language server: https://github.com/jaredly/reason-language-server
The OCaml language and toolchain is very powerful... and I do believe ReasonML makes it more approachable, at least for a wider audience of developers comfortable with JavaScript-style syntax.
My other post in this thread proves the opposite.
Further than that, there are no more programs written in it for the same reason than there are no more programs written in any interesting languages, I guess; ie largely accidental.
What does this mean? I was under the impression the OCaml compiler did a decent number of floating point specific optimizations, like unboxed arrays and what not.
I’ll also +1 the comments about ReasonML which is very promising.
Though I suppose these are both ”language” related — just not strictly the OCaml language.
Facebook Messenger is built using Reason. A few other smaller companies are using it too: https://reasonml.github.io/en/users-of-reason
Wow Air were using it though one probably can't blame that for their collapse.
I guess that list doesn't include straight Bucklescript users either. There are definitely companies out there who use it outside of Reason so the OCaml, in general, is getting some use in industry which is nice.
Coq proof assistant (https://coq.inria.fr). Well, you can say it is language-related, but it’s a lot more than that.
https://rwmj.wordpress.com/2017/06/04/new-in-libguestfs-rewr...
http://libguestfs.org/
http://okmij.org/ftp/ML/MetaOCaml.html
It’s definitely great for things like compilers, though. But I wouldn’t necessarily use it for a Web server.
Besides, there are also multiple processes as possible solution.
- the syntax is not great. I've heard it's one of the reasons why F# was born
- not many people use Ocaml, which makes it hard to find help
- not many good resources. The official documentation is really hard to parse and there isn't much besides it and the reference book (which reads more like a book than a reference).
- no good ways to debug, print objects, test, etc.
- no one seems to agree on what is the standard library or the correct packages to import (for example there are several Option package)
Not available on that site.