ocaml ?

今現在は、
https://colab.research.google.com/github/akabe/ocaml-jupyter/blob/master/notebooks/install_ocaml_colab.ipynb#scrollTo=EIbwAQ2b55bR
これを、ポチ。

# 以下は、2年前のアーカイブ。


https://qiita-com.translate.goog/dauuricus/items/95bacf96c8169ce2b489?_x_tr_sl=ja&_x_tr_tl=en&_x_tr_hl=ja&_x_tr_pto=nui

jupyter notebook では ocaml をセットアップする方法がありそうなので、jupyter notebook が使えない場合に GoogleColaboratory で使えたらいいな。

## 材料

1)
>This notebook lets you install an ocaml kernel for colab. In order to get started:Click on "OPEN IN PLAYGROUND".
Run the cell below (this takes multiple minutes).Once the cell has run you can use some ocaml notebook on the same colab instance.
This works by this first installing the necessary apt packages, then installing opam (the ocaml package manager) and building the ocaml compiler, and finally building and installing the ocaml-jupyter kernel. 
Note that when the instance gets disconnected, it gets resetted so you have to re-install the kernel.


>You can use the use_cache field in the form below in order to store the various binaries on your google drive the first time you run this, then re-installing should be a lot faster (this will require some google drive authentication).


>If your colab instance ends up in a bad state, Runtime > Reset all runtimes... should reset it.

https://colab.research.google.com/github/akabe/ocaml-jupyter/blob/master/notebooks/install_ocaml_colab.ipynb?authuser=1#scrollTo=Q5Htcs1F8-DY

2)

https://colab.research.google.com/drive/107_RyCzQVL9gn7ZjeuUg5xMyT5xOK9em

---

1 についての説明。

https://github.com/akabe/ocaml-jupyter/issues/121

1 以前の概要。または、GoogleColaboratory で ocaml をセットするという一般的な概要。
>Do you know if and how one can use ocaml on colab? In principle there is support for the jupyter protocol…

https://discuss.ocaml.org/t/ocaml-in-jupyter-based-environments/6797

---

## 実践

### ウォーミングアップ
1) をポチり、ocaml カーネルはインストールできたが

![IMG_20211111_220138_203.jpg](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/225786/053fd7af-a85b-7152-8198-ce17941ff9a5.jpeg)

ocaml のように書いたらエラーになるので、Python のように書いたら、それは Python や。
や、だから。それだとなんなの、結構待ったよ、インストール済むまで。結構待ったよ。10 分。

ということは、**ocaml カーネルはインストールできたが、カーネルを切り替えれない**というかなしさがあるわけか。

それは、[前にも何度かトライ & エラーしたことがある。](https://qiita.com/dauuricus/items/0717c8a08aba7abc7575)これは、カーネルを選択する項目が、ipynb （ Google コラボのノートファイルの雛形）にデフォルトでは無いので、付け足すために、ノートファイルをいったんダウンロードして書き足して、アップロードする必要があるということ。Googleコラボの使用上の言葉に置き換えると、**ocaml-jupyter** というランタイムを選択できるようにすることだ。
ipynb のこの部分に相当する。きっと、たぶん。

```
 "kernelspec": {
      "display_name": "ocaml-jupyter",
      "name": "ocaml-jupyter"
    }
```

## 最短コース
2) の方は、カーネルは ocaml-jupyter を想定しているノートだけれども、カーネル（使用上はランタイムという呼称）はデフォルトの Python3 なので、つまり、上のように`"kernelspec": `は設定されている ipynb ファイルになってはいるが、エンジン == ocaml がない状態。
ということで、こちらのノートを使って、最初のセルに 1) のカーネルをインストールコードを貼りつけて実行する場合は、自分で ipynb ファイル自体を編集する必要はないかもしれない。
インストールコードは、この [bash](https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh) を読み込んできて実行するようになっている。


**2) をドライブにコピーするか、gist に保存してから、1)のセルのコードをコピーして gist から読み込んだ 2) のセルの中にペースとして、ポチ。**

*  見る用途

https://carbon.now.sh/?bg=rgba%28171%2C+184%2C+195%2C+1%29&t=seti&wt=none&l=application%2Fjson&ds=false&dsyoff=20px&dsblur=68px&wc=true&wa=true&pv=56px&ph=56px&ln=false&fl=1&fm=Hack&fs=14px&lh=133%25&si=false&es=2x&wm=false&code=%257B%250A%2520%2520%2522nbformat%2522%253A%25204%252C%250A%2520%2520%2522nbformat_minor%2522%253A%25200%252C%250A%2520%2520%2522metadata%2522%253A%2520%257B%250A%2520%2520%2520%2520%2522colab%2522%253A%2520%257B%250A%2520%2520%2520%2520%2520%2520%2522name%2522%253A%2520%2522hello-ocaml.ipynb%2520%25E3%2581%25AE%25E3%2582%25B3%25E3%2583%2594%25E3%2583%25BC%2522%252C%250A%2520%2520%2520%2520%2520%2520%2522provenance%2522%253A%2520%255B%255D%252C%250A%2520%2520%2520%2520%2520%2520%2522collapsed_sections%2522%253A%2520%255B%255D%250A%2520%2520%2520%2520%257D%252C%250A%2520%2520%2520%2520%2522kernelspec%2522%253A%2520%257B%250A%2520%2520%2520%2520%2520%2520%2522display_name%2522%253A%2520%2522ocaml-jupyter%2522%252C%250A%2520%2520%2520%2520%2520%2520%2522name%2522%253A%2520%2522ocaml-jupyter%2522%250A%2520%2520%2520%2520%257D%250A%2520%2520%257D%252C%250A%2520%2520%2522cells%2522%253A%2520%255B%250A%2520%2520%2520%2520%257B%250A%2520%2520%2520%2520%2520%2520%2522cell_type%2522%253A%2520%2522code%2522%252C%250A%2520%2520%2520%2520%2520%2520%2522metadata%2522%253A%2520%257B%250A%2520%2520%2520%2520%2520%2520%2520%2520%2522cellView%2522%253A%2520%2522code%2522%252C%250A%2520%2520%2520%2520%2520%2520%2520%2520%2522colab%2522%253A%2520%257B%250A%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2522background_save%2522%253A%2520true%252C%250A%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2522base_uri%2522%253A%2520%2522https%253A%252F%252Flocalhost%253A8080%252F%2522%250A%2520%2520%2520%2520%2520%2520%2520%2520%257D%252C%250A%2520%2520%2520%2520%2520%2520%2520%2520%2522id%2522%253A%2520%2522yKAz5kiOMkH1%2522%252C%250A%2520%2520%2520%2520%2520%2520%2520%2520%2522outputId%2522%253A%2520%25223e097d00-acad-4f00-9e47-089aca63c86c%2522%250A%2520%2520%2520%2520%2520%2520%257D%252C%250A%2520%2520%2520%2520%2520%2520%2522source%2522%253A%2520%255B%250A%2520%2520%2520%2520%2520%2520%2520%2520%2522use_cache%2520%253D%2520%255C%2522none%255C%2522%2520%2523%2540param%2520%255B%255C%2522none%255C%2522%252C%2520%255C%2522opam-cache.tgz%255C%2522%255D%2520%257Ballow-input%253A%2520true%257D%255Cn%2522%252C%250A%2520%2520%2520%2520%2520%2520%2520%2520%2522additional_apt_packages%2520%253D%2520%255C%2522none%255C%2522%2520%2523%2540param%2520%255B%255C%2522none%255C%2522%255D%2520%257Ballow-input%253A%2520true%257D%255Cn%2522%252C%250A%2520%2520%2520%2520%2520%2520%2520%2520%2522additional_opam_packages%2520%253D%2520%255C%2522none%255C%2522%2520%2523%2540param%2520%255B%255C%2522none%255C%2522%255D%2520%257Ballow-input%253A%2520true%257D%255Cn%2522%252C%250A%2520%2520%2520%2520%2520%2520%2520%2520%2522%255Cn%2522%252C%250A%2520%2520%2520%2520%2520%2520%2520%2520%2522import%2520os%255Cn%2522%252C%250A%2520%2520%2520%2520%2520%2520%2520%2520%2522import%2520subprocess%255Cn%2522%252C%250A%2520%2520%2520%2520%2520%2520%2520%2520%2522%255Cn%2522%252C%250A%2520%2520%2520%2520%2520%2520%2520%2520%2522if%2520os.path.isdir%28%27%252Froot%252F.opam%27%29%253A%255Cn%2522%252C%250A%2520%2520%2520%2520%2520%2520%2520%2520%2522%2520%2520raise%2520ValueError%28%27opam%2520directory%2520already%2520exists%27%29%255Cn%2522%252C%250A%2520%2520%2520%2520%2520%2520%2520%2520%2522%255Cn%2522%252C%250A%2520%2520%2520%2520%2520%2520%2520%2520%2522def%2520run_script%28bash_script%29%253A%255Cn%2522%252C%250A%2520%2520%2520%2520%2520%2520%2520%2520%2522%2520%2520print%28%27Running%2520the%2520following%2520commands%253A%255C%255Cn%2525s%27%2520%2525%2520bash_script%29%255Cn%2522%252C%250A%2520%2520%2520%2520%2520%2520%2520%2520%2522%2520%2520env%2520%253D%2520dict%28os.environ%29%255Cn%2522%252C%250A%2520%2520%2520%2520%2520%2520%2520%2520%2522%2520%2520env%255B%27OCAML_INSTALL%27%255D%2520%253D%2520bash_script%255Cn%2522%252C%250A%2520%2520%2520%2520%2520%2520%2520%2520%2522%2520%2520process%2520%253D%2520subprocess.Popen%28%255Cn%2522%252C%250A%2520%2520%2520%2520%2520%2520%2520%2520%2522%2520%2520%2520%2520%27%252Fbin%252Fbash%2520-c%2520%255C%2522%2524OCAML_INSTALL%255C%2522%27%252C%255Cn%2522%252C%250A%2520%2520%2520%2520%2520%2520%2520%2520%2522%2520%2520%2520%2520shell%253DTrue%252C%255Cn%2522%252C%250A%2520%2520%2520%2520%2520%2520%2520%2520%2522%2520%2520%2520%2520stdout%253Dsubprocess.PIPE%252C%255Cn%2522%252C%250A%2520%2520%2520%2520%2520%2520%2520%2520%2522%2520%2520%2520%2520stderr%253Dsubprocess.PIPE%252C%255Cn%2522%252C%250A%2520%2520%2520%2520%2520%2520%2520%2520%2522%2520%2520%2520%2520env%253Denv%29%255Cn%2522%252C%250A%2520%2520%2520%2520%2520%2520%2520%2520%2522%2520%2520stdout%252C%2520stderr%2520%253D%2520process.communicate%28%29%255Cn%2522%252C%250A%2520%2520%2520%2520%2520%2520%2520%2520%2522%2520%2520if%2520stdout%253A%2520print%28stdout.decode%28%29%29%255Cn%2522%252C%250A%2520%2520%2520%2520%2520%2520%2520%2520%2522%2520%2520if%2520stderr%253A%2520print%28stderr.decode%28%29%29%255Cn%2522%252C%250A%2520%2520%2520%2520%2520%2520%2520%2520%2522%2520%2520return_code%2520%253D%2520process.wait%28%29%255Cn%2522%252C%250A%2520%2520%2520%2520%2520%2520%2520%2520%2522%2520%2520if%2520return_code%253A%255Cn%2522%252C%250A%2520%2520%2520%2520%2520%2520%2520%2520%2522%2520%2520%2520%2520raise%2520ValueError%28%27subprocess%2520failed%2520%2525d%27%2520%2525%2520return_code%29%255Cn%2522%252C%250A%2520%2520%2520%2520%2520%2520%2520%2520%2522%255Cn%2522%252C%250A%2520%2520%2520%2520%2520%2520%2520%2520%2522bash_script%2520%253D%2520%255B%255D%255Cn%2522%252C%250A%2520%2520%2520%2520%2520%2520%2520%2520%2522%255Cn%2522%252C%250A%2520%2520%2520%2520%2520%2520%2520%2520%2522apt_packages_%2520%253D%2520%255B%2520%27libffi-dev%27%252C%2520%27libgmp-dev%27%252C%2520%27m4%27%2520%255D%255Cn%2522%252C%250A%2520%2520%2520%2520%2520%2520%2520%2520%2522if%2520additional_apt_packages%2520%21%253D%2520%255C%2522none%255C%2522%253A%2520apt_packages_%2520%252B%253D%2520a

というか、このファイル。

* ダウンロード用途

https://www.mediafire.com/file/gtoexp68twrqm6s/hello_ocaml_ipynb_のコピー.ipynb/file

ipynb のファイルは json としてマークダウンのこういうページに貼ると、とてもがんばってブラウザがおちるのでここに貼り付けられないが、見ないとわからないとおもう。

* 見る用途 / コピーする用途

https://goonlinetools.com/snapshot/code/#dhwi2ran7zvbjwjf9ogxb

このファイルを google colab で開くか、または、テキストエディタで開いてみて 1) ipynb ファイルもダウンロードして [diff](https://ja.m.wikipedia.org/wiki/Diff) で２つの差分を読んでみたら、何を説明しているのか理解できるかもしれない。`"kernelspec":`の項目がありや、なしやで google colab 上での挙動が違う。

**遠回り**
ポチ、ポチ、ポチでトライ&エラー無しでできることだが、それをどういうことか説明するには「[iRuby で selenium と chromium のセットアップからテストまで](https://qiita.com/dauuricus/items/0717c8a08aba7abc7575)」の箇所をまるごと引用。いや、この R 言語を google colab で使う解説がきれいに説明している。

https://htsuda.net/stats/colab.html#google-colaboratory-%E3%81%A7-r-%E3%82%92%E4%BD%BF%E3%81%88%E3%82%8B%E3%82%88%E3%81%86%E3%81%AB%E3%81%99%E3%82%8B

<details><summary>インストールされていく。</summary>
<div>

```

Running the following commands:
apt install libffi-dev libgmp-dev m4
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
  libgmpxx4ldbl libsigsegv2
Suggested packages:
  gmp-doc libgmp10-doc libmpfr-dev m4-doc
The following NEW packages will be installed:
  libffi-dev libgmp-dev libgmpxx4ldbl libsigsegv2 m4
0 upgraded, 5 newly installed, 0 to remove and 37 not upgraded.
Need to get 693 kB of archives.
After this operation, 2,428 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu bionic/main amd64 libgmpxx4ldbl amd64 2:6.1.2+dfsg-2 [8,964 B]
Get:2 http://archive.ubuntu.com/ubuntu bionic/main amd64 libgmp-dev amd64 2:6.1.2+dfsg-2 [316 kB]
Get:3 http://archive.ubuntu.com/ubuntu bionic/main amd64 libsigsegv2 amd64 2.12-1 [14.7 kB]
Get:4 http://archive.ubuntu.com/ubuntu bionic/main amd64 m4 amd64 1.4.18-1 [197 kB]
Get:5 http://archive.ubuntu.com/ubuntu bionic/main amd64 libffi-dev amd64 3.2.1-8 [156 kB]
Fetched 693 kB in 1s (1,090 kB/s)
Selecting previously unselected package libgmpxx4ldbl:amd64.
(Reading database ... 155219 files and directories currently installed.)
Preparing to unpack .../libgmpxx4ldbl_2%3a6.1.2+dfsg-2_amd64.deb ...
Unpacking libgmpxx4ldbl:amd64 (2:6.1.2+dfsg-2) ...
Selecting previously unselected package libgmp-dev:amd64.
Preparing to unpack .../libgmp-dev_2%3a6.1.2+dfsg-2_amd64.deb ...
Unpacking libgmp-dev:amd64 (2:6.1.2+dfsg-2) ...
Selecting previously unselected package libsigsegv2:amd64.
Preparing to unpack .../libsigsegv2_2.12-1_amd64.deb ...
Unpacking libsigsegv2:amd64 (2.12-1) ...
Selecting previously unselected package m4.
Preparing to unpack .../archives/m4_1.4.18-1_amd64.deb ...
Unpacking m4 (1.4.18-1) ...
Selecting previously unselected package libffi-dev:amd64.
Preparing to unpack .../libffi-dev_3.2.1-8_amd64.deb ...
Unpacking libffi-dev:amd64 (3.2.1-8) ...
Setting up libsigsegv2:amd64 (2.12-1) ...
Setting up libffi-dev:amd64 (3.2.1-8) ...
Setting up m4 (1.4.18-1) ...
Setting up libgmpxx4ldbl:amd64 (2:6.1.2+dfsg-2) ...
Setting up libgmp-dev:amd64 (2:6.1.2+dfsg-2) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for libc-bin (2.27-3ubuntu1.3) ...
/sbin/ldconfig.real: /usr/local/lib/python3.7/dist-packages/ideep4py/lib/libmkldnn.so.0 is not a symbolic link



WARNING: apt does not have a stable CLI interface. Use with caution in scripts.


Running the following commands:
(echo "" && yes Y) | (sh <(curl -sL https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh))
## Downloading opam 2.1.0 for linux on x86_64...
## Downloaded.
## Where should it be installed ? [/usr/local/bin] ## opam 2.1.0 installed to /usr/local/bin
## Run this script again with '--restore ' to revert.

Running the following commands:
echo N | opam init --disable-sandboxing --compiler=4.07.1
No configuration file found, using built-in defaults.
Checking for available remotes: rsync and local, git.
  - you won't be able to use mercurial repositories unless you install the hg command on your system.
  - you won't be able to use darcs repositories unless you install the darcs command on your system.


<><> Fetching repository information ><><><><><><><><><><><><><><><><><><><><><>
[default] Initialised

<><> Required setup - please read <><><><><><><><><><><><><><><><><><><><><><><>

  In normal operation, opam only alters files within ~/.opam.

  However, to best integrate with your system, some environment variables
  should be set. If you allow it to, this initialisation step will update
  your bash configuration by adding the following line to ~/.profile:

    test -r /root/.opam/opam-init/init.sh && . /root/.opam/opam-init/init.sh > /dev/null 2> /dev/null || true

  Otherwise, every time you want to access your opam installation, you will
  need to run:

    eval $(opam env)

  You can always re-run this setup with 'opam init' later.

Do you want opam to modify ~/.profile? [N/y/f]
(default is 'no', use 'f' to choose a different file) 
<><> Creating initial switch '4.07.1' (invariant ["ocaml-base-compiler" {= "4.07.1"} | "ocaml-system" {= "4.07.1"}]) 

<><> Installing new switch packages <><><><><><><><><><><><><><><><><><><><><><>
Switch invariant: ["ocaml-base-compiler" {= "4.07.1"} | "ocaml-system" {= "4.07.1"}]

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
∗ installed base-bigarray.base
∗ installed base-threads.base
∗ installed base-unix.base
⬇ retrieved ocaml-base-compiler.4.07.1  (https://opam.ocaml.org/cache)
∗ installed ocaml-base-compiler.4.07.1
∗ installed ocaml-config.1
∗ installed ocaml.4.07.1
Done.
# Run eval $(opam env --switch=4.07.1) to update the current shell environment

[WARNING] Running as root is not recommended

Running the following commands:
opam install -y base jupyter=2.7.2
The following actions will be performed:
  ∗ install seq                      base     [required by lwt]
  ∗ install conf-gmp                 3        [required by conf-gmp-powm-sec, zarith]
  ∗ install ocaml-secondary-compiler 4.08.1-1 [required by ocamlfind-secondary]
  ∗ install ocamlbuild               0.14.0   [required by logs, uuidm]
  ∗ install conf-pkg-config          2        [required by conf-zlib, conf-zmq]
  ∗ install ocamlfind                1.9.1    [required by logs, uuidm]
  ∗ install conf-gmp-powm-sec        3        [required by cryptokit]
  ∗ install conf-zmq                 0.1      [required by zmq]
  ∗ install conf-zlib                1        [required by cryptokit]
  ∗ install zarith                   1.12     [required by cryptokit]
  ∗ install topkg                    1.0.4    [required by logs, uuidm]
  ∗ install ocamlfind-secondary      1.9.1    [required by dune]
  ∗ install base-bytes               base     [required by ocplib-endian]
  ∗ install uuidm                    0.9.7    [required by jupyter]
  ∗ install dune                     2.9.1    [required by base, jupyter]
  ∗ install stdlib-shims             0.3.0    [required by ppxlib]
  ∗ install stdint                   0.7.0    [required by jupyter]
  ∗ install sexplib0                 v0.14.0  [required by base]
  ∗ install result                   1.5      [required by dune-configurator, ppx_deriving_yojson]
  ∗ install ppx_derivers             1.2.1    [required by ppxlib, ppx_deriving]
  ∗ install ocaml-syntax-shims       1.0.0    [required by lwt]
  ∗ install ocaml-compiler-libs      v0.12.4  [required by ppxlib]
  ∗ install mmap                     1.1.0    [required by lwt]
  ∗ install easy-format              1.3.2    [required by yojson]
  ∗ install csexp                    1.5.1    [required by dune-configurator]
  ∗ install cppo                     1.6.8    [required by ppx_deriving, lwt, yojson]
  ∗ install base64                   3.5.0    [required by jupyter]
  ∗ install ppxlib                   0.23.0   [required by lwt_ppx, ppx_deriving_yojson]
  ∗ install biniou                   1.2.1    [required by yojson]
  ∗ install dune-configurator        2.9.1    [required by base]
  ∗ install ocplib-endian            1.1      [required by lwt]
  ∗ install ppx_deriving             5.2.1    [required by ppx_deriving_yojson]
  ∗ install yojson                   1.7.0    [required by jupyter]
  ∗ install zmq                      5.1.4    [required by jupyter]
  ∗ install cryptokit                1.16.1   [required by jupyter]
  ∗ install base                     v0.14.0
  ∗ install lwt                      5.4.2    [required by jupyter]
  ∗ install ppx_deriving_yojson      3.6.1    [required by jupyter]
  ∗ install zmq-lwt                  5.1.4    [required by jupyter]
  ∗ install lwt_ppx                  2.0.2    [required by jupyter]
  ∗ install logs                     0.7.0    [required by jupyter]
  ∗ install jupyter                  2.7.2
===== ∗ 42 =====

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
⬇ retrieved base64.3.5.0  (https://opam.ocaml.org/cache)
⬇ retrieved biniou.1.2.1  (https://opam.ocaml.org/cache)
∗ installed conf-gmp.3
⬇ retrieved base.v0.14.0  (https://opam.ocaml.org/cache)
⬇ retrieved cppo.1.6.8  (https://opam.ocaml.org/cache)
⬇ retrieved cryptokit.1.16.1  (https://opam.ocaml.org/cache)
∗ installed conf-pkg-config.2
∗ installed conf-gmp-powm-sec.3
⬇ retrieved csexp.1.5.1  (https://opam.ocaml.org/cache)
∗ installed conf-zlib.1
⬇ retrieved easy-format.1.3.2  (https://opam.ocaml.org/cache)
∗ installed conf-zmq.0.1
⬇ retrieved jupyter.2.7.2  (https://opam.ocaml.org/cache)
⬇ retrieved logs.0.7.0  (https://opam.ocaml.org/cache)
⬇ retrieved lwt.5.4.2  (https://opam.ocaml.org/cache)
⬇ retrieved dune.2.9.1  (https://opam.ocaml.org/cache)
⬇ retrieved mmap.1.1.0  (https://opam.ocaml.org/cache)
⬇ retrieved lwt_ppx.2.0.2  (https://opam.ocaml.org/cache)
⬇ retrieved ocaml-compiler-libs.v0.12.4  (https://opam.ocaml.org/cache)
⬇ retrieved ocaml-syntax-shims.1.0.0  (https://opam.ocaml.org/cache)
⬇ retrieved ocamlbuild.0.14.0  (https://opam.ocaml.org/cache)
⬇ retrieved ocamlfind.1.9.1  (https://opam.ocaml.org/cache)
⬇ retrieved ocamlfind-secondary.1.9.1  (cached)
⬇ retrieved ocaml-secondary-compiler.4.08.1-1  (https://opam.ocaml.org/cache)
⬇ retrieved dune-configurator.2.9.1  (https://opam.ocaml.org/cache)
⬇ retrieved ppx_derivers.1.2.1  (https://opam.ocaml.org/cache)
⬇ retrieved ocplib-endian.1.1  (https://opam.ocaml.org/cache)
⬇ retrieved ppx_deriving.5.2.1  (https://opam.ocaml.org/cache)
⬇ retrieved ppx_deriving_yojson.3.6.1  (https://opam.ocaml.org/cache)
⬇ retrieved result.1.5  (https://opam.ocaml.org/cache)
⬇ retrieved ppxlib.0.23.0  (https://opam.ocaml.org/cache)
⬇ retrieved sexplib0.v0.14.0  (https://opam.ocaml.org/cache)
⬇ retrieved stdint.0.7.0  (https://opam.ocaml.org/cache)
⬇ retrieved stdlib-shims.0.3.0  (https://opam.ocaml.org/cache)
⬇ retrieved topkg.1.0.4  (https://opam.ocaml.org/cache)
⬇ retrieved uuidm.0.9.7  (https://opam.ocaml.org/cache)
⬇ retrieved yojson.1.7.0  (https://opam.ocaml.org/cache)
⬇ retrieved zarith.1.12  (https://opam.ocaml.org/cache)
⬇ retrieved zmq.5.1.4  (https://opam.ocaml.org/cache)
⬇ retrieved zmq-lwt.5.1.4  (https://opam.ocaml.org/cache)
∗ installed ocamlbuild.0.14.0
∗ installed ocaml-secondary-compiler.4.08.1-1
∗ installed ocamlfind.1.9.1
∗ installed base-bytes.base
∗ installed seq.base
∗ installed ocamlfind-secondary.1.9.1
∗ installed topkg.1.0.4
∗ installed dune.2.9.1
∗ installed uuidm.0.9.7
∗ installed base64.3.5.0
∗ installed cppo.1.6.8
∗ installed csexp.1.5.1
∗ installed easy-format.1.3.2
∗ installed mmap.1.1.0
∗ installed biniou.1.2.1
∗ installed ocaml-compiler-libs.v0.12.4
∗ installed ocaml-syntax-shims.1.0.0
∗ installed ocplib-endian.1.1
∗ installed ppx_derivers.1.2.1
∗ installed result.1.5
∗ installed sexplib0.v0.14.0
∗ installed dune-configurator.2.9.1
∗ installed stdint.0.7.0
∗ installed base.v0.14.0
∗ installed lwt.5.4.2
∗ installed stdlib-shims.0.3.0
∗ installed logs.0.7.0
∗ installed ppxlib.0.23.0
∗ installed yojson.1.7.0
∗ installed lwt_ppx.2.0.2
∗ installed ppx_deriving.5.2.1
∗ installed zarith.1.12
∗ installed ppx_deriving_yojson.3.6.1
∗ installed cryptokit.1.16.1
∗ installed zmq.5.1.4
∗ installed zmq-lwt.5.1.4
∗ installed jupyter.2.7.2
Done.

<><> jupyter.2.7.2 installed successfully <><><><><><><><><><><><><><><><><><><>
=> Please run for registration of ocaml-jupyter kernel:
=> 
=> $ ocaml-jupyter-opam-genspec
=> $ jupyter kernelspec install --name ocaml-jupyter \
=> /root/.opam/4.07.1/share/jupyter
# Run eval $(opam env) to update the current shell environment

[WARNING] Running as root is not recommended

Running the following commands:
echo '#use "topfind";;' >> /root/.ocamlinit
Running the following commands:
/root/.opam/4.07.1/.opam-switch/sources/jupyter.2.7.2/config/ocaml-jupyter-opam-genspec
Generated kernelspec at /root/.opam/4.07.1/share/jupyter/kernel.json

[WARNING] Running as root is not recommended
[WARNING] var was deprecated in version 2.1 of the opam CLI. Use opam var instead or set OPAMCLI environment variable to 2.0.
[WARNING] Running as root is not recommended
[WARNING] var was deprecated in version 2.1 of the opam CLI. Use opam var instead or set OPAMCLI environment variable to 2.0.
[WARNING] Running as root is not recommended
[WARNING] var was deprecated in version 2.1 of the opam CLI. Use opam var instead or set OPAMCLI environment variable to 2.0.

Running the following commands:
jupyter kernelspec install --name ocaml-jupyter /root/.opam/4.07.1/share/jupyter
[InstallKernelSpec] Installed kernelspec ocaml-jupyter in /usr/local/share/jupyter/kernels/ocaml-jupyter

```

10分くらい。
</div>
</details>

![IMG_20211111_225220_774.jpg](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/225786/d91137b4-42fa-e7c7-cd8b-d353fe97fda5.jpeg)

https://dev.realworldocaml.org/guided-tour.html#base-and-core

![IMG_20211111_231016_074.jpg](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/225786/6fa4a5e6-5afb-404f-0d4e-139d806c755f.jpeg)

---

https://str.i.kyushu-u.ac.jp/~bannai/ocaml-intro/intro.html

http://walk.northcol.org/sml/overview/

https://caml.inria.fr/pub/docs/fpcl/index.html

http://www.nct9.ne.jp/m_hiroi/func/ocaml01.html