Static linking is preferred for some cases although it has its own various problems. Static building/linking is not always possible for some languages on some platform. For OCaml, the answer to this question is yes. In this post, we will introduce 2 methods to statically linking OCaml: static linking with runtime glibc required and static
Read more
Tag: opam
Where is the .mli files for Core
Posted onWhere is the .mli files for Core installed by opam. It is under ~/.opam/4.00.1/lib/core where 4.00.1 is the version of OCaml used. For example, date.mli is under ~/.opam/4.00.1/lib/core/date.mli.
Add the jane street opam repository
Posted onHow to add the jane street opam repository is introduced here. Here, we assume the branch to add is core-branch. You may need to replace the core-branch with the branch you need. $ git clone -b core-branch https://github.com/janestreet/opam-repository.git $ opam repo add js opam-repository Or, directly add the remote branch as an opam repository. $
Read more
Good tools to manage OCaml packages
Posted onWhich tools to mange OCaml packages in my system (Linux)? I use OPAM to manage OCaml packages: http://opam.ocamlpro.com/index.html To install it: $ wget https://raw.githubusercontent.com/ocaml/opam/master/shell/opam_installer.sh $ sh ./opam_installer.sh /usr/local/bin More options are available here. To make opam settings take effect, append this to ~/.bashrc: eval `opam config env` Some frequent usages: opam list # List all
Read more
Add readline features in OCaml toplevel
Posted onIt is painful for a Linux user to use the OCaml toplevel without the readline features. Is there a method to enable/add these kinds of features in readline to the OCaml toplevel? I find 2 options that work very well for me: utop provides a beautiful interface and supports completion, colors, parenthesis matching, etc. It
Read more
Auto Indenting for OCaml Code in Vim with ocp-indent
Posted onThe built-in indenting in Vim for OCaml seems not very good. How to set up auto indenting for OCaml code in Vim? ocp-indent works very well for me. This posts introduces how to configure Vim to use ocp-indent to automatically indent/format OCaml code. First, install ocp-indent after installing opam: $ opam install ocp-indent Second, configure
Read more
How To Mount Google Drive on Linux
Posted onGoogle Drive is nice cloud storage which provide document editing features. However, it does not yet provide a Linux client. I find a good third party tool that works with Google Drive on Linux very well: google-drive-ocamlfuse. The website of google-drive-ocamlfuse provides easy to follow instructions to install it. In this tutorial, we show a
Read more