GithubHelp home page GithubHelp logo

ocaml-multicore / effects-examples Goto Github PK

View Code? Open in Web Editor NEW
405.0 405.0 35.0 166 KB

Examples to illustrate the use of algebraic effects in Multicore OCaml

License: ISC License

Makefile 1.80% OCaml 95.41% Haskell 2.08% C 0.71%

effects-examples's Introduction

๐Ÿ“ข Note ๐Ÿ“ข

Multicore OCaml project has now been merged into OCaml ๐ŸŽ‰. This repository is no longer developed or maintained. Please follow the updates at the OCaml Github repository.

Citation

If you are citing this work in an academic paper, please cite the ICFP 2020 paper "Retrofitting Parallelism onto OCaml": https://dl.acm.org/doi/10.1145/3408995


Branch trunk Branch 4.14 Branch 4.13 Branch 4.12

Github CI Build Status (trunk branch) Github CI Hygiene Status (trunk branch) AppVeyor Build Status (trunk branch)

Github CI Build Status (4.14 branch) AppVeyor Build Status (4.14 branch)

TravisCI Build Status (4.13 branch) AppVeyor Build Status (4.13 branch)

TravisCI Build Status (4.12 branch) AppVeyor Build Status (4.12 branch)

README

Overview

OCaml is a functional, statically-typed programming language from the ML family, offering a powerful module system extending that of Standard ML and a feature-rich, class-based object system.

OCaml comprises two compilers. One generates bytecode which is then interpreted by a C program. This compiler runs quickly, generates compact code with moderate memory requirements, and is portable to many 32 or 64 bit platforms. Performance of generated programs is quite good for a bytecoded implementation. This compiler can be used either as a standalone, batch-oriented compiler that produces standalone programs, or as an interactive REPL system.

The other compiler generates high-performance native code for a number of processors. Compilation takes longer and generates bigger code, but the generated programs deliver excellent performance, while retaining the moderate memory requirements of the bytecode compiler. The native-code compiler currently runs on the following platforms:

Tier 1 (actively maintained) Tier 2 (maintained when possible)

x86 64 bits

Linux, macOS, Windows, FreeBSD

NetBSD, OpenBSD

x86 32 bits

Linux, Windows

FreeBSD, NetBSD, OpenBSD

ARM 64 bits

Linux, macOS

FreeBSD

ARM 32 bits

Linux

FreeBSD, NetBSD, OpenBSD

Power 64 bits

Linux

Power 32 bits

Linux

RISC-V 64 bits

Linux

IBM Z (s390x)

Linux

Other operating systems for the processors above have not been tested, but the compiler may work under other operating systems with little work.

All files marked "Copyright INRIA" in this distribution are Copyright ยฉ 1996-2021 Institut National de Recherche en Informatique et en Automatique (INRIA) and distributed under the conditions stated in file LICENSE.

Installation

See the file INSTALL.adoc for installation instructions on machines running Unix, Linux, macOS, WSL and Cygwin. For native Microsoft Windows, see README.win32.adoc.

Documentation

The OCaml manual is distributed in HTML, PDF, and Emacs Info files. It is available at

Availability

The complete OCaml distribution can be accessed at

Keeping in Touch with the Caml Community

There is an active and friendly discussion forum at

The OCaml mailing list is the longest-running forum for OCaml users. You can email it at

You can subscribe and access list archives via the Web interface at

An alternative archive of the mailing list is also available at

There also exist other mailing lists, chat channels, and various other forums around the internet for getting in touch with the OCaml and ML family language community. These can be accessed at

In particular, the IRC channel #ocaml on Libera has a long history and welcomes questions.

Bug Reports and User Feedback

Please report bugs using the issue tracker at https://github.com/ocaml/ocaml/issues

To be effective, bug reports should include a complete program (preferably small) that exhibits the unexpected behavior, and the configuration you are using (machine type, etc).

For information on contributing to OCaml, see HACKING.adoc and CONTRIBUTING.md.

Separately maintained components

Some libraries and tools which used to be part of the OCaml distribution are now maintained separately. Please use the issue trackers at their respective new homes:

effects-examples's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

effects-examples's Issues

Add travis-ci support

Building the examples may break due to upstream changes as seen in #14. So add support for travis-ci to test for these breakages automatically. It appears that the popular way to test OCaml projects is to use ocaml-ci-scripts. The scripts need to be updated to work with the Multicore OCaml compiler.

Migrate the build scripts to dune

Currently we use OCamlbuild. We should port the build system to dune.

Is the secondary compiler necessary now since systhreads work with multicore?

Errors in building effects-examples

I installed the 5.0.0 today (29 June 2023)

Error 1
Did a make: File "aio/dune", line 3, characters 12-16:
3 | (libraries unix)
^^^^
Error: Library "unix" in /home/doug/.opam/5.0.0/lib/ocaml is hidden
*** fix
In .opam/5.0.0/lib/ocaml
I did: cp unix/unix* .
which fixed this problem

Error 2
Did a make: File "mvar/dune", line 3, characters 24-32:
3 | (libraries threads lwt lwt.unix)
^^^^^^^^
Error: Library "lwt.unix" not found.
*** fix
opam install conduit-lwt-unix

Testing of `promises.ml` seems incomplete

Dear effects examples maintainers,

thanks for the very nice examples on OCaml effects, they are very helpful!

@bhaktishh and I were looking into the promises.ml example, however we have noticed that the way the test are written, it seems that we never call the Wait effect, as all the promises are resolved immediately.

It seems to us that having a more complete test could be useful, what do you think?

We have a few ideas on how to solve this, let us know what do you think?

I guess the first to try would be to decouple promise creation from resolution, but we'd like to hear your opinion before trying to do a pull request.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.