rizo/awesome-ocaml

Awesome OCaml

Everything you'll ever need on the road to mastering OCaml.

A curated list of references to awesome OCaml tools, frameworks, libraries and articles. Additionally there is a collection of freely available books, papers and presentations.

Your favorite package is not listed? Fork and create a Pull Request to add it! :octocat:

If you are beginner and want to learn the basics of OCaml programming here is the Beginner's guide to OCaml beginner's guides.

目录


Community

Algorithms and Data Structures

Application Libraries

  • Batteries Included – A community-maintained foundation library for your OCaml projects.
  • Cmdliner – Declarative definition of command line interfaces for OCaml.
  • Core – Jane Street Capital's standard library overlay.
  • React – React is an OCaml module for functional reactive programming (FRP). It provides support to program with time varying values: declarative events and signals.
  • ctypes – Library for binding to C libraries using pure OCaml.
  • easy-format – Pretty-printing library for OCaml.
  • ocaml-rpc – Light library to deal with RPCs in OCaml.
  • ocaml-containers – A small standard library extension, string library, and (in "misc") a bunch of random things of lower quality. BSD license.

Books

  • More OCaml: Algorithms, Methods, and Diversions – In More OCaml John Whitington takes a meandering tour of functional programming with OCaml, introducing various language features and describing some classic algorithms. The book ends with a large worked example dealing with the production of PDF files. There are questions for each chapter together with worked answers and hints.
  • How to Think Like a (Functional) Programmer by Allen Downey and Nicholas Monje – How to Think Like a Computer Scientist is an introductory programming textbook based on the OCaml language. It is a modified version of Think Python by Allen Downey. It is intended for newcomers to programming and also those who know some programming but want to learn programming in the function-oriented paradigm, or those who simply want to learn OCaml.
  • OCaml from the Very Beginning by J. Whitington - OCaml from the Very Beginning will appeal both to new programmers, and experienced programmers eager to explore functional languages such as OCaml.
  • Pearls of Functional Algorithm Design by Richard Bird - It summaries 30 hard algorithm problems in function programming world. Although it is for Haskell, the algorithm problems are very interesting and trying to solve them in OCaml also helps the thinking of functional programming. Partial solutions in OCaml are here.
  • Real World OCaml by Y. Minsky, A. Madhavapeddy and J. Hickey - Functional programming for the masses.
  • Unix System Programming in OCaml by X. Leroy and D. Rémy – Introduction to Unix system programming, with an emphasis on communications between processes.
  • Using, Understanding, and Unraveling OCaml – This book describes both the OCaml language and the theoretical grounds behind its powerful type system.
  • Purely Functional Data Structures - This is the first or only book focus on various data structures in FP world. A must-read one.

Code Analysis and Linters

  • Mascot - Mascot is a style-checker for OCaml sources
  • pfff – pfff is a set of tools and APIs to perform some static analysis, dynamic analysis, code visualizations, code navigations, or style-preserving source-to-source transformations such as refactorings on source code.

Compilers and Compiler Tools

Concurrency

Databases

  • Bindings
    • Dbm — A binding to the NDBM/GDBM Unix "databases".
    • Mongo.ml – An OCaml driver for Mongodb
    • PG'OCaml — PG'OCaml provides an interface to PostgreSQL databases for OCaml applications.
    • SQLite3 — OCaml bindings to the SQLite3 database.
  • New Implementations
    • Irmin — A distributed database that follows the same design principles as Git.
    • Obigstore — A database with BigTable-like data model atop LevelDB.
    • RunOrg - It is a WIP database server written in OCaml.
  • Overlays
    • Macaque — Macaque is a library for safe and flexible database queries using comprehensions on top of PG'OCaml.
    • ORM — ORM for SQLite.
  • Articles:

Developer Tools

  • Try OCaml – Try OCaml in your web browser.
  • iocaml – An OCaml kernel for the IPython notebook.
  • utop – Universal toplevel for OCaml with support of multiline edition, history, real-time and context sensitive completion, colors, and more.
  • ocp-browser — Small ncurses-based API and documentation browser. Provided with ocp-index.
  • ocamlbrowser — A source and compiled interface browser, written using LablTk. Included in the standard distribution for ocaml <= 4.01 and with labltk for ocaml >= 4.02.
  • ghim – A command-line tool to manage Github Issues.
  • Foreign Function Interface:
  • Editor Plugins:

Exercises

Formal Software Verification

  • Coq – Coq is a formal proof management system. It provides a formal language to write mathematical definitions, executable algorithms and theorems together with an environment for semi-interactive development of machine-checked proofs.
  • Why3 – Why3 is a platform for deductive program verification. It provides a rich language for specification and programming, called WhyML, and relies on external theorem provers, both automated and interactive, to discharge verification conditions.
  • Alt-Ergo – Alt-Ergo is an open-source SMT solver dedicated to the proof of mathematical formulas generated in the context of program verification.

General

Graphics

  • 2D
    • archimedes — 2D plotting library.
    • cairo2 — Binding to Cairo, a 2D Vector Graphics Library. Integrates well with lablgtk.
    • Vg – Declarative 2D vector graphics for OCaml.
  • 3D
    • glMLite — OpenGL bindings for OCaml. Provides an (experimental) functional API.
    • lablgl — Interface to OpenGL. Integrates well with lablgtk.
    • tgls — Thin bindings OpenGL 3.{2,3},4.{0,1,2,3,4} and OpenGL ES {2,3}.
  • GUI
    • lablgtk — GTK2 bindings for OCaml with various higher-level facilities to define GUIs.
    • lablqt – Qt5 bindings for OCaml.
    • labltk — Interface to the Tcl/Tk GUI framework. In the standard distribution for ocaml <= 4.01.
    • TSDL – Tsdl is an OCaml module providing thin bindings to the cross-platform SDL library.

Logging

  • dolog – A dumb OCaml logger.
  • Volt – A variant of Bolt OCaml logging tool.

Metaprogramming

Mobile Applications

Networking

  • HTTP Tools:
    • ocaml-cohttp – Very lightweight HTTP server using Lwt or Async.
    • ocurl – OCaml bindings to libcurl.
  • ZeroMQ Bindings:
    • ocaml-zmq – ZeroMQ bindings for OCaml.
    • async-zmq – Async wrapper around ocaml-zmq.
    • lwt-zmq – Lwt-friendly interface to ZeroMQ for OCaml.
  • ocaml-dns – A pure OCaml implementation of the DNS protocol.

Online Courses

Package Management

  • Distribution:

    • OPAM – A flexible Git-friendly package manager with multiple compiler support.
    • ocamlfind — Local OCaml library manager. Used by most of the OCaml ecosystem.
    • WODI for Windows - A package manager for Windows.
  • Build Tools:

    • Oasis - A tool to integrate a configure, build and install system in your OCaml project. It helps to create standard entry points in your build system and allows external tools to analyse your project easily.
      • oasis2opam — Tool to convert OASIS metadata to OPAM package descriptions.
    • obuild – Simple package build system for ocaml.
    • jenga – Monadic build system from Jane Street.
    • ocamlbuild — Build system provided with the compiler.
    • ocaml-makefile — Easy to use Makefile for small to medium-sized OCaml-projects.
    • topkg — OPAM-aware packaging system using ocamlbuild.

Parallelism

(Note: Sorted from the easier to use to the more flexible.)

  • Libraries:

    • Parmap — Provides easy-to-use parallel map and fold functions.
    • ForkWork — A simple library for forking child processes to perform work on multiple cores.
    • Functory — A distributed computing library which facilitates distributed execution of parallelizable computations in a seamless fashion.
    • Async.Parallel — A library for spawning processes on a cluster of machines, and passing typed messages between them.
    • Ocamlnet — An enhanced system platform library. Contains the netmulticore library to compute tasks on as many cores of the machine as needed.
    • Nproc – Process pool implementation for OCaml.
  • Articles:

Questions

Science and Technical Computing

Security

Semantic Technology

  • OCaml-RDF – OCaml library to manipulate RDF graphs and execute Sparql queries.

Serialization

  • bencode — Bencode (.torrent file format) reader/writer.
  • biniou – Extensible binary data format, like JSON but faster.
  • jsonm — Non-blocking streaming JSON codec for OCaml.
  • xmlm — A streaming codec to decode and encode the XML data format.
  • yojson — An optimized parsing and printing library for the JSON format.

System Programming

  • Mirage OS – Mirage is a programming framework for constructing secure, high-performance network applications across a variety of cloud computing and mobile platforms.
  • ocaml-fat – Read and write FAT format filesystems from OCaml.
  • ocaml-git – Pure OCaml low-level git bindings.
  • ocaml-vchan – Pure OCaml implementation of the "vchan" shared-memory communication protocol.

Testing

  • Alcotest – A lightweight and colourful test framework.
  • OUnit – OUnit is a unit test framework for OCaml. It allows one to easily create unit-tests for OCaml code. It is based on HUnit, a unit testing framework for Haskell.
  • QCheck — QCheck is a property testing library inspired from Haskell's QuickCheck

Web Development

  • Frameworks:

    • Opium – Sinatra like web toolkit for OCaml.
    • Eliom – Eliom is a framework for programming web sites and client/server web applications. It uses very new concepts making programming very different from all other web programming tools, and allowing to write a complex web site in very few lines of code.
    • Ohm - Ohm was an open source web framework for the OCaml language which is now dead.
  • Tools:

    • COW – Caml on the Web (COW) is a set of parsers and syntax extensions to let you manipulate HTML, CSS, XML, JSON and Markdown directly from OCaml code.
    • tyxml — Library to build valid (according to the W3C spec) Html and Svg trees.
    • js_of_ocaml – Js_of_ocaml is a compiler of OCaml bytecode to Javascript. It makes it possible to run Ocaml programs in a Web browser.
    • ocaml-uri – RFC3986 URI parsing library.
    • Goji – An OCaml bindings generator for JavaScript libraries.
    • Syndic – RSS and Atom feed parsing
    • ocaml-mustache – mustache.js logic-less templates in OCaml.
  • Open Source Projects:

    • Cumulus – Hacker news like website with the OCaml framework Ocsigen

Inspired by awesome projects line. Discover more awesomeness :sparkles:.

results matching ""

    No results matching ""