We’d curious to hear from people who use some subset of the Jane Street suite of libraries. I don’t mean things like Dune (which was initially written by us, but is more of a communal open source project at this point), but instead the libraries that are cut from our internal release, like: Base, Core, Async, Incremental, Hardcaml, Bonsai, Sexplib, Bin_prot, ppx_fields, ppx_let_syntax, etc.
We do know some of the users:
Facebook (for Pyre. Not sure if there are others.)
But that’s all from randomly observing here and there, so I expect it’s far from complete.
So, if you’re up for it, and you use our stack, post a reply to this thread and tell us a bit more about what you use it for. We’d be interested in pretty much any kind of use, be it personal, academic, industrial, or just part of an open-source project.
I used Core in the past, as the extended standard library for a structural bioinformatics software:
The software is described here:
I did this to have a taste of Core in a project.
I did not stick with Core for other projects though, for several reasons.
My main reason is that I want to write scientific software prototypes fast. I don’t write
“armored software that must never crash and runs forever”.
We at Routine use Base as our standard library. We mostly use Comparable, Either, Int*, List, Map, Monad, Option, Result, Sequence, Set and String. We also use Incremental to compute minimum required changes on configuration modification.
We use Lwt rather than Async because of its integration with Js_of_ocaml - and out of habit, to be honest.
I can give more detail about Arena. We use Base in everything, and Core/Async whenever those libraries are relevant. We also use a lot of the stuff in ppx_jane (ppx_inline_test, ppx_assert, ppx_let, ppx_compare, and various sexp ppx’s). We use Delimited_parsing to read CSV’s, although we occasionally use other libraries because we need lower-level handling.
We also use Textutils.Ascii_table and patdiff for debug output / tests / general utility usage.
I have been using (in personal projects) base, parsexp (for config parsing), ppx_jane;
in terms of feedback from a newcomer:
Really appreciated Base, because it allowed me to find some familiarity from other languages in the OCaml ecosystem (as in: API that is written similarly to what I might be familiar, including t-first)
ppx_jane - comparisons, sexp ppxs, logging with [%sexp ] - I can’t imagine writing OCaml without s-expression serialization and deserialization with ppxes
documentation has been better than other libraries in the ecosystem, but:
checking types and not leaving the editor is a mixed experience, for example awhile ago I was searching how to take a part of a string; something I perceive as basic took me awhile to find - is it slice or substring or something else entirely? searching the string docs doesn’t help answer how such a function might be called: String (base.Base.String) , even finding the function sub does not give any information about what it is doing, what are the input args and etc., instead there is a cryptic message (string, string) Blit.sub
(I found reading docs and types in OCaml in general too difficult/time-consuming compared to other languages How do you stay productive in OCaml? and wasn’t sure if it is an ecosystem thing or a difference in the expectations I’ve had from other languages)
tried to use Async, but found the documentation of Lwt more readable, with more examples, making it easier to start; (and there were also more libraries that support Lwt, having both Lwt and Async in such a small ecosystem is kind of a pain point)
thanks once again for open sourcing them, I am fairly certain I would not have spent this much time in poking OCaml if it weren’t for these libraries
O(1) Labs uses many of the Jane Street libraries: Core, Async, Sexplib, Bin_prot, ppx_bin_prot, ppx_let_syntax, ppx_fields, and some others, I’m sure, with forks of Async_kernel, Rpc_parallel, and ppx_optcomp. All those are used to build Mina, a proof-of-stake cryptocurrency based on zk-SNARKs.
Infer uses Core as a Stdlib replacement; Hack opens Core_kernel in many modules; SLEdge and Flow selectively use bits of Base, Core_kernel, and Core (e.g. data structures like Fheap and Hash_queue, plus Command). There is also significant, but not uniform, use of Sexplib and much of the ppx infrastructure such as ppx_type_conv for ppx_compare, ppx_hash, ppx_variants, etc.
I use Base/Core as my default Stdlib now. Only time I don’t is when I’m trying to make a more general opam package. I also use some of the extra libraries like Bin_prot, Bonsai, Incremental, ppx_expect, fields, jane, show, variants, RPC_parallel, and I’ve played around with vcaml, and the pythonlib. Mostly for personal projects. The Core and Async libraries are comprehensive and there’s rarely data structures I’ve needed that are missing (one case was R-Trees and B-Trees). The standardized conventions make it easy to understand any library from Jane Street, e.g. _exn for exception functions length is always the “size” of a data structure, the t type is first with labels for the rest of the arguments to support both pipeline and non-pipeline styles. type t is always the main type for a module, etc. A big thank you to Jane Street!
Edit: Oh yeah and Shexp is great for shell scripting, I use that quite regularly.
Was considering bonsai for a personal project but it seems much more complicated compared to, say, rescript. Could you share your general opinion about bonsai? Would you choose it again if you started afresh? Thanks!