{"id":13726853,"url":"https://github.com/effect-handlers/effects-rosetta-stone","last_synced_at":"2025-05-07T22:30:35.727Z","repository":{"id":128551506,"uuid":"130719745","full_name":"effect-handlers/effects-rosetta-stone","owner":"effect-handlers","description":"A comparison of how computational effects and handlers are implemented in various programming languages.","archived":false,"fork":false,"pushed_at":"2019-03-29T02:38:37.000Z","size":65,"stargazers_count":132,"open_issues_count":3,"forks_count":9,"subscribers_count":22,"default_branch":"master","last_synced_at":"2024-11-14T17:47:36.455Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/effect-handlers.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-04-23T15:41:03.000Z","updated_at":"2024-09-20T11:39:26.000Z","dependencies_parsed_at":"2023-03-22T00:23:16.119Z","dependency_job_id":null,"html_url":"https://github.com/effect-handlers/effects-rosetta-stone","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/effect-handlers%2Feffects-rosetta-stone","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/effect-handlers%2Feffects-rosetta-stone/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/effect-handlers%2Feffects-rosetta-stone/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/effect-handlers%2Feffects-rosetta-stone/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/effect-handlers","download_url":"https://codeload.github.com/effect-handlers/effects-rosetta-stone/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252965087,"owners_count":21832819,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T01:03:27.521Z","updated_at":"2025-05-07T22:30:35.312Z","avatar_url":"https://github.com/effect-handlers.png","language":"Shell","funding_links":[],"categories":["Shell"],"sub_categories":[],"readme":"# Effects and handlers Rosetta stone\n\nA collection of examples demonstrating programming with effects and handlers in\nvarious programming languages.\n\n[![Build Status](https://travis-ci.org/effect-handlers/effects-rosetta-stone.svg?branch=master)](https://travis-ci.org/effect-handlers/effects-rosetta-stone)\n\n## How to contribute\n\n### General guidelines\n\n1. Each example instance should be self-contained.\n\n2. Each example should demonstrate *one* aspect of effectful programming.\n   This does not mean it has to be simple.\n\n3. In the naming of making comparisons possible, different implementations of a\n   single example should do *the same thing* as far as that is possible. For\n   instance, if there are *two* ways to implement an effect, e.g., state using\n   the usual monad and state using parametrized effects, then there should be\n   *two* examples which are identical, except for the implementation. If you\n   feel that the implementation is unnatural, please comment on this, but still\n   do it.\n\n4. Do *not* print things out in examples that do not call for printing. Instead,\n   just compute whatever needs to be computed and store the results in top-level\n   values. Many languages will show the values anyhow, and that is as good as\n   printing.\n\n5. All folder names are in lower case, with words separated by dashes, e.g.,\n   `cooperative-threads`, `multicore-ocaml`, `algol-68`.\n\n### Repository structure\n\nThe repository contains examples in the `examples` folder, with a subfolder\n`examples/example-x` for each *\"Example X\"*, and further containing:\n\n* `README.md` contains a general description of the example\n* `language-y` contains the example implemented in *\"Language Y\"*, which further\n   contains:\n\n   * an optional `README.md` contains further comments on the language\n     implementation of the example,\n   * a `Makefile` whose target `all` runs all the source code\n   * self-contained source code, following the established standards for the\n     programming language\n\n### How to contribute a new programming language\n\nTo add a new programming language *My Language*, follow these steps:\n\n1. Pick a lower-case name for the folders which contain examples written in My\n   Language, e.g., `my-language`.\n2. Describe the language in the section *Languages* below. Use `my-language` as\n   the section name. Please provide links to the language home page and\n   installation instructions.\n3. Implement at least one [example\n   instance](#how-to-contribute-an-example-instance) in your language.\n\n### How to contribute a new example\n\nTo add a completely new example, follow these steps:\n\n1. Pick a lower case folder name for the example, e.g., `example-x`.\n2. Create a lower-case folder `examples/example-x` that will contain the example\n   and put in it `README.md` with a general description of the example. Please\n   follow the format of existing example descriptions.\n3. Implement at least one [example\n   instance](#how-to-contribute-an-example-instance) so that it is clear what\n   needs to be implemented.\n\n### How to contribute an example instance\n\nTo implement an example instance of `example-x` in `language-y`, create\n`examples/example-x/language-y` and populate it, following the [repository\nstructure](#repository-structure) guidelines.\n\nYou may show several variants of the example. We recommend that you put them in\nseparate files, comment on them on the `README.md` file, and clearly mark one of\nthe examples as the *main* one. The main example is the one that people should\nlook at first.\n\n### How to contribute an example non-instance\n\nIf something cannot be naturally implemented in your language, we want to know\nabout it! Create the folder `examples/example-x/language-y` and put in it\n`README.md` which explains what the problem is.\n\nYou may add a *partial*, *simplified*, or *modified* implementation, in which\ncase you should explicitly describe the changes you made in `README.md`.\n\n### May I improve other people's code?\n\nYes, we strongly encourage sharing and cooperation.\n\n## Languages\n\nAn alphabetically ordered list of the languages used in the examples. The\nsection name must match the folder name used for that language.\n\n### `eff`\n\nThe [Eff](http://www.eff-lang.org/) programming language can be installed\n[through OPAM](https://github.com/matijapretnar/eff/#installing-with-opam),\ncompiled from [source code](https://github.com/matijapretnar/eff/), or [run in a\nbrowser](http://www.eff-lang.org/try/).\n\nTo run Eff code contained in a file `example.eff`, run from the command line:\n\n```bash\neff example.eff\n```\n\nYou can also run `make` in the example directory and it will run all examples for you.\n\n### `frank`\n\nInstall Frank from the [Frank GitHub repository](https://github.com/frank-lang/frank). To run\na Frank program contained in a file `example.fk`, run from the command line:\n\n```bash\nfrank example.fk\n```\n\n\n### `koka`\n\u003cimg align=\"right\" width=\"75px\" height=\"75px\" src=\"https://github.com/koka-lang/koka/raw/master/doc/koka-logo-200.png\"\u003e\n\n[Koka](https://github.com/koka-lang/koka) (meaning \"effective\" in Japanese) can be installed from the [Koka Github repository](https://github.com/koka-lang/koka). It is best to clone the repository next to the\nrosetta repository as the make files assume the Koka binary is located there, e.g.\nfrom the same directory do:\n```\n\u003e git clone https://github.com/effect-handlers/effects-rosetta-stone.git\n\u003e git clone https://github.com/koka-lang/koka.git\n```\n\n### `multicore-ocaml`\n\n[Multicore OCaml](https://github.com/ocamllabs/ocaml-multicore) can be installed\nthrough [OPAM](https://opam.ocaml.org):\n\n```bash\n$ opam remote add multicore https://github.com/ocamllabs/multicore-opam.git\n$ opam switch 4.06.1+multicore\n```\n\n## About the repository\n\nThe participants of Dagstuhl seminar [Algebraic effect handlers go\nmainstream](https://www.dagstuhl.de/en/program/calendar/semhp/?semnr=18172) have\ninitiated this repository of examples that show how to program with algebraic\neffects and handlers in various languages.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feffect-handlers%2Feffects-rosetta-stone","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feffect-handlers%2Feffects-rosetta-stone","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feffect-handlers%2Feffects-rosetta-stone/lists"}