Do you use Core (or other Jane Street libs)? Tell us how!

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.)
  • BAP (Binary Analysis Platform)
  • The Frenetic SDN controller platform.
  • Arena.io uses Core for some of their libraries.

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.

Thanks in advance!
y

9 Likes

While we’re moving away from OCaml, the current version of Dark uses a bunch of Jane St stuff.

Dark is a PaaS with it’s own language, written in OCaml. We open Core at the top of every file.

The code is here, if you want to check it out: GitHub - darklang/dark: Client, backend, and services for Dark: https://darklang.com

Off the top of my head:

  • Base/Core as our standard library. Mostly using List/Map/Set/Hashtbl, some Unix stuff, some File IO stuff.
  • Bin_prot for serializing our language to the DB (for speed and size, yojson was too slow)

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”.

IoTSec system of Tencent uses Base/Core and ppx_jane in the firmware unpacking module. See small description of the system (a bit outdated and in Chinese language).

Instead of Async we use Lwt.

We use Core, Async, ppx_jane and bonsai heavily at work, also we use binprot for serialization.

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.

Can you say where that is?

Not really speaking to the question of which you should use, but there is support for using Async in js_of_ocaml, even if it doesn’t ship with js_of_ocaml.

y

1 Like

Good to know, thanks. Then we use Lwt mostly out of habit :slight_smile:

1 Like

not allowed to name the company, but we are in gambling industry

1 Like

ahrefs is using base/core_kernel a tiny bit, re2, ppx_let, ppx_enumerate

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.

1 Like

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
  • a few months ago wanted to try Bonsai, but it wasn’t straightforward to get started and simply went with react (js) (javascript)
  • 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 still find documentations in other languages like HashMap in std::collections - Rust or Map - JavaScript | MDN so much better - they contain examples, rationale, pretty much everything that you need to be productive. (I found even F#'s docs like this one more readable: Map (FSharp.Core) )

    • (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

8 Likes

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.

1 Like

I use Core in a FCGI web application (not publicly released) that runs student’s code and provide some feedback.

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.

1 Like

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.

2 Likes

I’m using Base and Core for a personal webservice project that’s currently on ice as I’m also struggling with the same situation called out by @mudrz in How do you stay productive in OCaml?

2 Likes

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!

What is SLedge @jjb? Could not find much documentation on the Web.
I see mentions of LLAIR but again no much google results.