{"id":19572641,"url":"https://github.com/parapluu/encore","last_synced_at":"2025-09-01T03:37:14.729Z","repository":{"id":16010265,"uuid":"18753720","full_name":"parapluu/encore","owner":"parapluu","description":"The Encore compiler.","archived":false,"fork":false,"pushed_at":"2020-01-29T20:21:11.000Z","size":21387,"stargazers_count":44,"open_issues_count":68,"forks_count":26,"subscribers_count":13,"default_branch":"development","last_synced_at":"2025-04-27T04:33:10.480Z","etag":null,"topics":["compiler","encore","programming-language"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/parapluu.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-04-14T08:35:33.000Z","updated_at":"2025-03-19T05:32:06.000Z","dependencies_parsed_at":"2022-09-01T12:41:57.829Z","dependency_job_id":null,"html_url":"https://github.com/parapluu/encore","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/parapluu/encore","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parapluu%2Fencore","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parapluu%2Fencore/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parapluu%2Fencore/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parapluu%2Fencore/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/parapluu","download_url":"https://codeload.github.com/parapluu/encore/tar.gz/refs/heads/development","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parapluu%2Fencore/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273069947,"owners_count":25040165,"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","status":"online","status_checked_at":"2025-09-01T02:00:09.058Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["compiler","encore","programming-language"],"created_at":"2024-11-11T06:27:47.575Z","updated_at":"2025-09-01T03:37:14.702Z","avatar_url":"https://github.com/parapluu.png","language":"C++","readme":"```\n||:encorec:||\n```\n\nThe Encore compiler.\n\nThere are two ways of installing the Encore compiler. The first ([**Playing around with Encore**](https://github.com/parapluu/encore/blob/master/README.md#playing-around-with-encore)) uses a virtual box image and it is easy getting the compiler up and running. The disadvantage of this approach is that benchmarks are meaningless. The second approach ([**Building Encore from Source**](https://github.com/parapluu/encore/blob/master/README.md#building-encore-from-source)) is a proper installation of all the dependencies (Haskell, llvm, etc).\n\nThis readme concludes with a discussion of the Encore command line arguments and details of the documentation.\n\n## Playing around with Encore\n\nWould you like to play around with Encore without having to install all the dependencies? Now you can!\n\n1. Install [VirtualBox](https://www.virtualbox.org/wiki/Downloads) and [Vagrant](https://www.vagrantup.com/).\n\n2. `git clone git@github.com:parapluu/encore.git`\n\n3. `cd encore`\n\n4. `make vagrant` (you need to run this make target only the first time you download the project)\n\nThis installs the Encore compiler in a Virtual Machine (VM).\n\nAt this point, you have a Ubuntu VM working for you. You will work on your localhost (marked as `localhost$`) and compile on the VM (marked as `vm$`).\nYour Encore code needs to be placed inside the `encore` folder (the VM is restricted to work only inside that folder).\n\nTo connect to the VM:\n\n    localhost$ vagrant ssh\n\nThis command will connect you to the VM (user: `vagrant`, password: `vagrant`).\n\nFrom the VM, compile using Encore:\n\n    vm$ encorec -clang example.enc\n\nTo exit the VM:\n\n    vm$ exit\n\nAfter playing around with Encore, you want to suspend or halt the machine\n(so that it does not consume resources).\n\nIn your local machine:\n\n    localhost$ vagrant halt\n\nor\n\n    localhost$ vagrant suspend\n\nTo start and connect again to the VM:\n\n    localhost$ vagrant up \u0026\u0026 vagrant ssh\n\n## Building Encore from Source\n\nMake sure that you have `doxygen` (for documentation), `premake4`, an up-to-date\n`clang` and `stack` in your path.\n\n### Installing on Debian based Linux distros\n\nTo install Encore on a Debian based Linux distribution you can use the `debian-install.sh` script.\nTo perform a full install run the script with the `-f` flag to completely install all dependencies,\nsetup the correct Haskell version and build and install Encore.\n\nIf you do not want the script to alter your `$PATH` variable or change the Haskell version use the\n`-h` flag to see available options.\n\n### Installing on OS X\n\n#### Step 1: Preliminaries\n\nWe're using:\n\n - doxygen v1.8.6\n - clang:\n    Apple LLVM version 7.0.2 (clang-700.1.81)\n    Target: x86_64-apple-darwin15.6.0\n    Thread model: posix\n - pcre2-10.21 (for Regex library)\n - stack (the haskell build tool)\n - premake4 (Premake Build Script Generator) 4.3\n\nBelow you find instructions for installing the preliminaries on OS X.\n\n##### Installing homebrew\n\nGo to http://brew.sh/, the instructions there work nicely. Make sure that your normal user is an admin (that you can use `sudo`). You should not need `sudo` to *use* `brew` in the future.\n\n##### Installing `doxygen`\n\nRun: `brew update; brew install doxygen`\n\n##### Installing `clang`:\n\nRun: `brew update; brew install llvm`\n\n##### Installing `premake4`\n\nGo to the [Premake4 Download page](http://premake.github.io/download.html),\ndownload and install `premake4`.\n\nAlternatively, run: `brew update; brew install premake`\n\n##### Installing `stack`\n\nIf you have homebrew, you can run `brew install haskell-stack`. Otherwise,\nuse these [installation instructions](http://docs.haskellstack.org/en/stable/README/#how-to-install).\nYou might have to run `stack update` in order to get the latest version\nof all the dependencies.\n\n##### Installing `pcre2`\n\nRun: `brew update; brew install pcre2`\n\n#### Step 2: Compiling and installing encore\n\n    cd encore\n    make\n    make test\n\n#### Step 3: Adding `encorec` to the path\n\nWe recommend that you add the `release` directory to your `PATH` environment variable -- this will allow you to invoke the compiler by just saying\n\n    $ encorec my_file.enc\n\nin any directory. To do this, add this line to your `~/.bashrc` file, inserting the proper path for `\u003cSOME_DIR\u003e`:\n\n    export PATH=\"\u003cSOME_DIR\u003e/encore/release:${PATH}\"\n\n### Compiling and Running Encore Programs\n\nThis instructions are the same for any Linux distribution and OS X.\n\nYou can compile a program by using\n\n    $ encorec my_file.enc\n\nThen, you can run the executable, as usual, through\n\n   ./my_file\n\nAlternatively, you can use a .enc-file as a script by adding `#! /usr/bin/env encorec --run` as its FIRST line. After you made the file executable:\n\n    $ chmod u+x my_file.enc\n\n..you can execute it:\n\n    $ ./my_file.enc\n\nThis will compile the file -- and run it.\n\nYou can find some example programs in the [test directory](https://github.com/parapluu/encore/tree/development/src/tests/encore/basic).\n\nHave fun!\n\n## `encorec` options\n\nRunning `encorec foo.enc` will typecheck the source and produce the executable\n`foo`. The following options are supported:\n\n```\n  --import [dirs]   | -I [dirs] colon separated list of directories in which to look for modules.\n  --out-file [file] | -o [file] Specify output file.\n  --generate-c      | -c        Outputs intermediate C fields in separate source tree.\n  --debug           | -g        Inserts debugging symbols in executable. Use with -c for improved debugging experience.\n  --type-check      | -tc       Only type check program, do not produce an executable.\n  --literate        |           Literate programming mode. Code blocks are delimited by '#+begin_src' and '#+end_src'.\n  --verbose         | -v        Print debug information during compiler stages.\n  --optimize N      | -O N      Optimise produced executable. N=0,1,2 or 3.\n  --profile         | -pg       Embed profiling information in the executable.\n  --run             |           Compile and run the program, but do not produce executable file.\n  --no-gc           |           DEBUG: disable GC and use C-malloc for allocation.\n  --help            |           Display this information.\n```\n\n## Documentation\n\nYou can find the documentation in different formats [here](https://stw.gitbooks.io/the-encore-programming-language/content/)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparapluu%2Fencore","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparapluu%2Fencore","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparapluu%2Fencore/lists"}