• Stars
    star
    423
  • Rank 102,544 (Top 3 %)
  • Language
    OCaml
  • License
    ISC License
  • Created over 9 years ago
  • Updated 6 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Examples to illustrate the use of algebraic effects in Multicore OCaml

OCaml effects examples

Build Status

Examples to illustrate the use of algebraic effects in OCaml. See

Examples

The original implementation of Multicore OCaml allowed a user to Obj.clone_continuation. This has been removed, the examples that used this are in the multishot directory. See this conversation about the removal of this feature. They now use the ocaml-multicont library.

Running the examples

To run the examples with Multicore OCaml, be sure to install Opam with these instructions. If your version of Opam (opam --version) is greater than or equal to 2.1 then the following instructions will work:

# After cloning this repository, create a 5.0.0 switch
opam update
# Add the alpha repository to get unreleased 5.0.0 compatible libraries
opam switch create 5.0.0+trunk --repo=default,alpha=git+https://github.com/kit-ty-kate/opam-alpha-repository.git
opam install . --deps-only

If your version of Opam is less than 2.1, then you will also need to add the beta repository when creating the switch. All of the other commands remain the same.

opam switch create 5.0.0+trunk --repo=default,beta=git+https://github.com/ocaml/ocaml-beta-repository.git,alpha=git+https://github.com/kit-ty-kate/opam-alpha-repository.git

Running make will build all of the examples. If you want to run a single executable that is built with dune you can run:

$ dune exec -- ./<executable_name>.exe

External examples

These are other examples that utilise OCaml effect handlers that are not in this repo:

Citation

If you are citing this work in an academic paper, please cite the PLDI 2021 paper "Retrofitting Effect Handlers onto OCaml": https://dl.acm.org/doi/10.1145/3453483.3454039.

More Repositories

1

ocaml-multicore

Multicore OCaml
OCaml
763
star
2

ocaml-effects-tutorial

Concurrent Programming with Effect Handlers
OCaml
660
star
3

eio

Effects-based direct-style IO for multicore OCaml
OCaml
555
star
4

parallel-programming-in-multicore-ocaml

Tutorial on Multicore OCaml parallel programming with domainslib
OCaml
283
star
5

ocaml5-tutorial

A hands-on tutorial on the new parallelism features in OCaml 5
OCaml
200
star
6

saturn

Lock-free data structures for multicore OCaml
OCaml
197
star
7

domainslib

Parallel Programming over Domains
OCaml
171
star
8

awesome-multicore-ocaml

A collection of libraries, experiments and ideas relating to OCaml 5 (multicore + effects)
147
star
9

reagents

Reagents for multicore OCaml
OCaml
126
star
10

kcas

Software Transactional Memory for OCaml
OCaml
107
star
11

picos

Interoperable effects based concurrency
OCaml
86
star
12

meio

Monitor Eio programs
OCaml
78
star
13

ocaml-uring

Bindings to io_uring for OCaml
OCaml
62
star
14

multicore-opam

OPAM repo for OCaml multicore development
53
star
15

multicoretests

PBT testsuite and libraries for testing multicore OCaml
OCaml
37
star
16

lwt_eio

Use Lwt libraries from within Eio
OCaml
34
star
17

dscheck

Experimental model checker for testing concurrent algorithms
OCaml
33
star
18

eventlog-tools

Tools for the runtime tracing in OCaml 4.11.0 and higher
OCaml
31
star
19

multicore-talks

Repository containing slides and examples from the 2020 OCaml Workshop talk on "Parallelising your OCaml code with Multicore OCaml"
TeX
30
star
20

ocaml-iomux

Io multiplexers bindings for ocaml (poll/kqueue/epoll and so on)
OCaml
28
star
21

retro-httpaf-bench

Benchmarking environment for http servers
Jupyter Notebook
21
star
22

icfp-2023-eio-tutorial

Lwt to Eio tutorial
OCaml
20
star
23

ocaml-tsan

Race detection in OCaml using the ThreadSanitizer runtime analysis.
OCaml
20
star
24

par_incr

Parallel version of incremental library
OCaml
19
star
25

ocaml-iocp

OCaml bindings to Windows' IOCP API
OCaml
17
star
26

uring-trace

Visualization tool for your IO-uring workload
C
14
star
27

hdr_histogram_ocaml

C
12
star
28

tezos

Tezos running on Multicore OCaml
OCaml
12
star
29

multicore-magic

Low-level multicore utilities for OCaml
OCaml
12
star
30

domain-local-await

A scheduler independent blocking mechanism
OCaml
12
star
31

multicore-ocaml-verify

Verifying bits of Multicore OCaml implementation
Makefile
11
star
32

eio-trace

Trace visualisation tool for Eio programs
OCaml
11
star
33

parafuzz

Property-based grey-box fuzzing for Multicore OCaml
OCaml
9
star
34

backoff

Exponential backoff mechanism
OCaml
9
star
35

eio_js

Eio for JavaScript environments
OCaml
8
star
36

multicore-bench

Framework for benchmarking on multiple cores on current-bench
OCaml
8
star
37

docs

Docs
5
star
38

thread-table

A lock-free thread-safe integer keyed hash table
OCaml
5
star
39

domain-local-timeout

A scheduler independent timeout mechanism
OCaml
4
star
40

fun-ocaml-workshop

Fun OCaml workshop
OCaml
4
star
41

dwarf_validator

Tool for validating wellformedness of DWARF unwind information
Python
3
star
42

eio_browser

Eio backend for the browser
OCaml
3
star
43

single-use-event

A scheduler agnostic blocking mechanism
OCaml
1
star