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

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

9 Likes