base
utop
base | utop | |
---|---|---|
5 | 6 | |
814 | 827 | |
1.4% | 0.7% | |
6.4 | 6.1 | |
8 days ago | 10 days ago | |
OCaml | OCaml | |
MIT License | GNU General Public License v3.0 or later |
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.
base
-
Jane Street is big. Like, big
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
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
-
My adventures in ML Land
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
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.
utop
-
Statically typed language where I can print anything easily?
You can also (and should!) familiarize yourself with utop. From utop, you can see the types of just about anything.
- utop: Universal toplevel for OCaml
- Best REPL for a language
-
#quit;; to quit is unintuitive, so it should be suggested if a user types quit
You should probably file a ticket on the utop repo rather than mentioning it here: https://github.com/ocaml-community/utop
-
My adventures in ML Land
To write OCaml code, I sat up Neovim by following this guide. For my repl needs, I used Utop. Whenever I needed to insert multiple lines, I used Utop's $editor integration which could be opened by C-x C-e.
-
Tips for CSci 2041
I'm going to leave this here. It's a great toplevel for OCaml.
What are some alternatives?
ocaml-containers - A lightweight, modular standard library extension, string library, and interfaces to various libraries (unix, threads, etc.) BSD license.
Pipefish - Source code for the Pipefish programming language
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)
CSharpRepl - A command line C# REPL with syntax highlighting – explore the language, libraries and nuget packages interactively.
ppx_deriving - Type-driven code generation for OCaml
sexp - S-expression swiss knife
Charm-MacOS - MacOS executable for Charm
LIPS - Scheme based powerful lisp interpreter in JavaScript
opam-monorepo - Assemble dune workspaces to build your project and its dependencies as a whole