{"id":18976743,"url":"https://github.com/palikar/alisp","last_synced_at":"2026-04-09T12:30:18.215Z","repository":{"id":93817480,"uuid":"192503717","full_name":"palikar/alisp","owner":"palikar","description":"Lisp Interpreter written in C++","archived":false,"fork":false,"pushed_at":"2020-09-22T11:52:42.000Z","size":4889,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-01T09:40:16.222Z","etag":null,"topics":["cpp","cpp17","general-purpose","interpreter","language","lisp-interpreter","lisp-languages","scheme-interpreter"],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/palikar.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-06-18T08:58:48.000Z","updated_at":"2024-09-18T13:19:29.000Z","dependencies_parsed_at":"2023-03-13T17:10:00.418Z","dependency_job_id":null,"html_url":"https://github.com/palikar/alisp","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/palikar%2Falisp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/palikar%2Falisp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/palikar%2Falisp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/palikar%2Falisp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/palikar","download_url":"https://codeload.github.com/palikar/alisp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239978060,"owners_count":19728271,"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":["cpp","cpp17","general-purpose","interpreter","language","lisp-interpreter","lisp-languages","scheme-interpreter"],"created_at":"2024-11-08T15:26:08.697Z","updated_at":"2026-04-09T12:30:18.169Z","avatar_url":"https://github.com/palikar.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/palikar/alisp.svg?branch=master)](https://travis-ci.org/palikar/alisp)\n    [![Documentation Status](https://readthedocs.org/projects/alisp/badge/?version=latest)](https://alisp.readthedocs.io/en/latest/?badge=latest)\n    [![CodeFactor](https://www.codefactor.io/repository/github/palikar/alisp/badge)](https://www.codefactor.io/repository/github/palikar/alisp)\n    [![Codacy Badge](https://api.codacy.com/project/badge/Grade/283df2678f0a4eaeb93c35b48ed0c483)](https://app.codacy.com/manual/palikar/alisp?utm_source=github.com\u0026utm_medium=referral\u0026utm_content=palikar/alisp\u0026utm_campaign=Badge_Grade_Dashboard)\n    [![codecov](https://codecov.io/gh/palikar/alisp/branch/master/graph/badge.svg)](https://codecov.io/gh/palikar/alisp)\n    [![ScoreMe](http://readme-score-api.herokuapp.com/score.svg?url=https%3a%2f%2fgithub.com%2fpalikar%2fctgraph%2f)](http://clayallsopp.github.io/readme-score?url=https%3a%2f%2fgithub.com%2fpalikar%2fctgraph%2f)\n    [![Licence](https://img.shields.io/github/license/palikar/alisp)](https://github.com/palikar/alisp/)\n    [![Version](https://img.shields.io/github/v/tag/palikar/alisp)](https://github.com/palikar/alisp/)\n\n\n# ALisp\n\n![img](./logo.png)\n\n\n## Abstract\n\nALisp is a interpreted [Lisp Scheme](https://en.wikipedia.org/wiki/Scheme_(programming_language)) language. I\u0026rsquo;ve developed it on my own around 2019-2020. This is my first try in language design and I have focused on simplicity and ease of development. The design follows relatively closely the one of [Emacs Lisp](https://www.gnu.org/software/emacs/manual/html_node/eintr/). A lot of conventions, syntax and concepts are borrowed from there. ALisp does, however, has it\u0026rsquo;s own features like runtime dynamic modules loading, proper file importing as well as general programming language features that are expected.\n\n\n\nBy now I\u0026rsquo;ve developed the core features and even written several small library like modules that enable some \u0026ldquo;real\u0026rdquo; programming in the language. Alisp comes with a interpret that is just a binary executable, much like the one of [Python](https://www.python.org/). The interpreter can evaluate files and provides a [REPL](https://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop) environment.\n\n\n## Building\n\nThe project requires C++17 compliant compiler. It is tested with clang-7, gcc-7, gcc-8 and gcc-9. CMake is used as a build system and [conan](https://conan.io/) is required as one package is pulled form there. Conan can be isntalled through pip with:\n\n```sh\npip install conan\n```\n\nThis is more or less the only requirement for build the project. Having the [GNU Readline](https://tiswww.case.edu/php/chet/readline/rltop.html) on your system is nice but it is not necessary.\n\n\n\nOnce this is done, the building is \u0026ldquo;standard\u0026rdquo;:\n\n```sh\ngit clone https://github.com/palikar/\nmkdir build\ncd build\ncmake .. -DCMAKE_BUILD_TYPE=\"Release\" -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=\"/usr\"\nmake -j8 \u0026\u0026 make install\n```\n\nThis should be enough to get your started with ALisp. You should care to adjust the flags as you desire.\n\n\n### Building tests\n\nThe project can also be build with variety of tests and checks. This, however, requires some more tools to be available on the system. Those include [gcovr](https://gcovr.com/en/stable/) and [valgrind](https://valgrind.org/). If you have those, you should be ok while running something like:\n\n```sh\nmkdir build_test\ncd build_test\ncmake .. -DCMAKE_BUILD_TYPE=\"Debug\" -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=\"/usr\" -DBUILD_TESTING=ON -DBUILD_EXAMPLES=ON -DENABLE_COVERAGE=ON -DVALGRIND_CHECKS=ON\nmake -j8\n```\n\nNow you can run several make targets to perform all the tests, checks and coverage.\n\n```sh\nmake test             # runs all of the tests\nmake valgrind_checks  # runs all of the valgrind checks and generates reports\nmake test_examples    # runs all of the scripts meant for testing\n```\n\n\n\nCMake can also be executed with `-DRUN_PERFORMANCE_TESTS` which will include several tests that are meant to stress the interpreter a little bit and evaluate its performance.\n\n\n### Building the documentation\n\nCurrently the project does not have the most stellar documentation but the setup is there. There are two typed of documentations. The first one is the language specification, references and general description on how to work with the interpreter. This one can be build trough executing:\n\n```sh\nmake dog_gen    # generates the website with the documentation\n```\n\nin the root directory.\n\n\n\nThe source code has its own documentation that is built with [Doxygen](http://www.doxygen.nl/).\n\n```sh\nmkdir build_doc\ncd build_doc\ncmake .. -DBUILD_DOC=ON\nmake doc\n```\n\n\n## Usage\n\nFor a very simple demo of the language, create a file named `hello.al` with the following contents:\n\n```emacs-lisp\n(defvar a 42)\n(if (== a 42)(println \"Hello World!\")\n  (println \"Hello World, something is wrong with this language :/\"))\n```\n\nThe script can be executed like:\n\n```\nalisp hello.al\n```\n\n\n\nThe interpreter has a man-page-like help that can be useful but it\u0026rsquo;s not as polished as I wanted it to be. The useful parts of the help are:\n\n    DESCRIPTION\n    The alisp programming language.\n    \n    SYNOPSIS\n            alisp [-v] [-h] [-i] [-d] [-l] [-Q] [-I \u003cinclude\u003e]... [-W \u003cwarnings\u003e]...\n                  [-e \u003cexpr\u003e] [\u003cfile\u003e [\u003cargs\u003e]...]\n    \n    OPTIONS\n            -v, --version\n                        Show the version and build information of the current\n                        executable\n    \n            -h, --help  Print help information\n            -i, --interactive\n                        Start interactive mode after file evaluation\n    \n            -d, --parse-debug\n                        Debug output from the parser\n    \n            -l, --eval-debug\n                        Debug output from the evaluator\n    \n            -Q, --quick-start\n                        Do not loady any scripts on initialization\n    \n            -I \u003cinclude\u003e\n                        Extra include directories for module imports.\n    \n            -W \u003cwarnings\u003e\n                        Warning types that should be enabled.\n    \n            \u003cexpr\u003e      Input string to evaluate\n            \u003cfile\u003e      Input file\n            \u003cargs\u003e...   Arguments for the script being ran.\n\nThe `-l` and `-d` flags are there for debugging purposes.\n\n\n\nSee the [documentation](https://alisp.readthedocs.io/en/latest/) for more information.\n\n\n## Acknowledgments\n\nI\u0026rsquo;ve learned a ton while developing Lisp. Here are some of the sources that I\u0026rsquo;ve taken inspiration from:\n\n-   [ChaiScript](https://github.com/ChaiScript/ChaiScript/) - a lot of the things I\u0026rsquo;ve leaned about C++ comes from this project. It also taught me about practical parsing, interpreter design and a good dose of template meta programming.\n-   [Catch2](https://github.com/ChaiScript/ChaiScript/) - This is the library ALisp uses for its tests\n-   [Clipp](https://github.com/muellan/clipp) - This is the library ALisp uses for command line arguments handling\n-   [Rang](https://www.google.com/search?q=c%2B%2B+rang\u0026ie=utf-8\u0026oe=utf-8\u0026client=firefox-b-e) - A simple library for printing text with color on the console.\n-   [GNU Emacs](https://www.gnu.org/software/emacs/manual/html_node/eintr/) - The whole project is written in Emacs. But, more importantly, the source code of Emacs taught me a lot of things about Lisp interpretation.\n-   [TinyXML2](https://github.com/leethomason/tinyxml2) - The XML module of Alisp is using TinyXML2 internally for parsing and handling XML-Data.\n-   [Subprocess](https://github.com/arun11299/cpp-subprocess) - A small C++ library that Alisp uses to spawn processes, expect their output as well as communication with them.\n-   [SimpleJSON](https://github.com/nbsdx/SimpleJSON) - A very simple JSON-Parser that I modified in order to generate an s-expression based on a JSON-formatted input.\n\n\n## License\n\nCopyright © 2019-2020 Stanislav Arnaudov.\n\nDistributed under the GNU General Public License, version 2\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpalikar%2Falisp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpalikar%2Falisp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpalikar%2Falisp/lists"}