Skip to content
プロジェクト

janestreet/learn-ocaml-workshop

GitHubで見る

概要

Jane StreetのOCaml Workshop向けの演習とプロジェクトです。

学習・教育

この数値の測り方

計測したスター増加

24時間
+1
7日間
+2
15日間
+6
1か月
履歴を収集中

期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。

Jane Street OCaml Workshop

This repo contains exercises and build instructions to help you get started developing in OCaml.

Installing build tools and libraries

See README.org in install-ocaml for instructions.

Exercises

The exercises directory contains a number of exercises to get you started with OCaml. Each one has some expect-tests embedded in it. The workflow is:

cd 02-exercises/$problem_dir

dune runtest # builds and runs inline tests
# Look at test output and compiler errors, edit problem.ml, rerun:
dune runtest

Snake, Lumines, and Frogger

Once you’re done with the exercises, you can also implement simplified clones of the following arcade games:

  • snake (runs on your computer)
  • lumines (runs on your computer)
  • frogger (runs in a web browser)

Async

The OCaml standard library has various low-level calls for working with sockets in the Unix module and Jane Street’s Core library wraps all of those. But, if you want your program to be able to wait for multiple events at the same time, you likely want to be able to program concurrently.

One library for writing code in this style is Async. Async provides Reader and Writer abstractions for I/O which, paired with the Tcp module should have most of what you need for either of the projects below.

Before proceeding, it would probably be a good idea to read Chapter 18 of Real World OCaml. There is some example code in the next section which should set you on your way.

Bigger projects

Once you’ve made it to this point, there are a few possible paths laid out for you:

  • You can work on writing a bot for a chat protocol called IRC. See the irc-bot README to get started!
  • You can work on writing your very own version of fzf in OCaml. See the fuzzy-finder README to get started!
  • Or, if you want, you can continue making improvements and extensions to your version of Frogger (see the frogger README for some ideas).

Documentation and resources

OCaml

Jane Street libraries and tools

dune

関連プロジェクトを探す

読み込み中…