ocaml-containers VS base

Compare ocaml-containers vs base and see what are their differences.

ocaml-containers

A lightweight, modular standard library extension, string library, and interfaces to various libraries (unix, threads, etc.) BSD license. (by c-cube)

base

Standard library for OCaml (by janestreet)
InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
ocaml-containers base
7 5
479 814
- 1.4%
8.5 6.4
14 days ago 7 days ago
OCaml OCaml
BSD 2-clause "Simplified" License MIT License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

ocaml-containers

Posts with mentions or reviews of ocaml-containers. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-10-10.
  • Decy vreau sa învăț și eu un limbaj
    2 projects | /r/programare | 10 Oct 2022
    YMMV. Există extensii: Base, Containers. Pentru I/O ai Lwt sau Async.
  • Is 'Real World OCaml' 1st ed worth bying for a beginner?
    2 projects | /r/ocaml | 20 May 2022
    It focuses on Jane Street's alternate standard library, Base, which means you're not quite learning OCaml, you're learning a distorted dialect of it that is mostly the same but with a lot of unique, opinionated design decisions chosen by Jane Street developers to suit their company's workflow. If you want to use Base you pretty much have to opt in to its way of doing things and pulling in a lot of extra code, so I think it's better to learn OCaml first, then learn Jane Street's way, especially since OCaml's stdlib has grown and improved a good bit since the time when Base was made and RWO originally written. Plus there's also containers now, which is a stdlib extension that lets you cherry-pick the things you want in a more self-contained way that builds on what OCaml provides instead of trying to replace it.
  • My adventures in ML Land
    5 projects | dev.to | 20 Mar 2022
    Fortunately, there is Containers which gets the argument ordering right.
  • I'm typecasting a lot, help
    2 projects | /r/ocaml | 10 Sep 2021
    Instead of either, you might be interested in Containers. It's more like an extension of the OCaml stdlib where you can cherry-pick what you want to use instead of having to go all-or-nothing. Adds a lot of useful things but not in the opinionated "let's make OCaml a different language" way that Base does.
  • OCaml over Scala
    2 projects | /r/ocaml | 16 Mar 2021
    Same can be said of containers, which extends the stdlib rather than replaces or changes it. It's not fragmentation, it's a "batteries included" utility library that works with the stdlib.
  • A Lisp REPL as my main shell (article)
    4 projects | /r/lisp | 7 Feb 2021
    I'm not a fan of some of the opinionated things it does and find it bloats the executables a bit much for my liking, but it is coherent and nicely made. I was looking into trying Batteries instead but someone suggested containers and it seems more modular and an extension of the stdlib rather than a replacement, which is more to my liking.
  • For an OCaml newbie, do you recommend using one of the alternative standard libraries?
    1 project | /r/ocaml | 4 Jan 2021
    For writing a self-contained library, people generally stick to stdlib (and occasionally some lightweight stdlib alternatives, e.g. containers - https://github.com/c-cube/ocaml-containers). Personally, I use containers a fair bit for libraries, but not as a full stdlib replacement.

base

Posts with mentions or reviews of base. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-05-02.
  • Jane Street is big. Like, big
    2 projects | news.ycombinator.com | 2 May 2024
    I'm very much not a serious OCaml:er but when I've dabbled some in it I got the impression that their "standard library" is kind of the de facto standard library.

    https://github.com/janestreet/base

  • My Thoughts on OCaml
    11 projects | news.ycombinator.com | 25 Apr 2023
    I don’t know OCaml, or really any language that would help me fully understand the code, but my exposure to OCaml is this stuff, and it looks pretty clean to me. https://github.com/janestreet/base

    Of course, I haven’t read every file, so maybe I got lucky with my random sampling.

  • Delimiter-First Code
    3 projects | news.ycombinator.com | 9 Dec 2022
  • My adventures in ML Land
    5 projects | dev.to | 20 Mar 2022
    Real World OCaml uses Base to replace OCaml's stdlib. I am not very fond of Base since it deviates from the standard convention of passing functions before values in HOC. To fix the ordering, one has to use labels:
  • I'm typecasting a lot, help
    2 projects | /r/ocaml | 10 Sep 2021
    As far as standard library usage goes, I highly recommend using Base. Instead of implementing list_of_string, you could use Base.String.to_list. Even if you don't end up using Base, you can get the same thing from the built in standard library by doing String.to_seq then List.of_seq.

What are some alternatives?

When comparing ocaml-containers and base you can also consider the following projects:

RecordStream - commandline tools for slicing and dicing JSON records.

utop - Universal toplevel for OCaml

book - V2 of Real World OCaml

opam-tools - opam plugin to initialise a local development environment for an OCaml project

einops - Flexible and powerful tensor operations for readable and reliable code (for pytorch, jax, TF and others)

opam-monorepo - Assemble dune workspaces to build your project and its dependencies as a whole

ppx_deriving - Type-driven code generation for OCaml

sihl - A modular functional web framework

sexp - S-expression swiss knife

preface - Preface is an opinionated library designed to facilitate the handling of recurring functional programming idioms in OCaml.

fish-shell - The user-friendly command line shell.