Skip to content
프로젝트

janestreet/learn-ocaml-workshop

GitHub에서 보기

소개

Jane Street의 OCaml Workshop을 위한 연습 과제와 프로젝트입니다.

학습 및 교육

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
+1
in 7 days
+2
in 15 days
+6
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

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

관련 프로젝트 살펴보기

불러오는 중…