{"id":16967885,"url":"https://github.com/skyf0l/hal","last_synced_at":"2025-03-21T18:18:35.045Z","repository":{"id":134742735,"uuid":"433097710","full_name":"skyf0l/hal","owner":"skyf0l","description":"Epitech - A Lisp interpreter in Haskell","archived":false,"fork":false,"pushed_at":"2021-11-29T19:54:26.000Z","size":32,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-26T13:11:50.991Z","etag":null,"topics":["haskell","interpreter","lisp","lisp-interpreter","parser","r6rs","r6rs-scheme","scheme","scheme-interpreter"],"latest_commit_sha":null,"homepage":"","language":"Haskell","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/skyf0l.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":"2021-11-29T15:32:51.000Z","updated_at":"2021-12-02T14:10:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"ea0824d2-296a-4408-8a04-0d8511c63825","html_url":"https://github.com/skyf0l/hal","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/skyf0l%2Fhal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skyf0l%2Fhal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skyf0l%2Fhal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skyf0l%2Fhal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skyf0l","download_url":"https://codeload.github.com/skyf0l/hal/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244844531,"owners_count":20519790,"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":["haskell","interpreter","lisp","lisp-interpreter","parser","r6rs","r6rs-scheme","scheme","scheme-interpreter"],"created_at":"2024-10-14T00:10:03.279Z","updated_at":"2025-03-21T18:18:34.992Z","avatar_url":"https://github.com/skyf0l.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HAL\n\nA lisp interpreter in Haskell based on [r6rs](http://www.r6rs.org/)\n\nBy [@skyf0l](https://github.com/skyf0l) and [@pebloop](https://github.com/pebloop)\n\n# Notes\n\n\u003c!-- Grade : ... | Mark : ... --\u003e\n\n| Category            | Percentage | Tests     |\n| ------------------- | ---------- | --------- |\n| 01 Basics           | 100%       | 3/3       |\n| 02 Quote            | 100%       | 2/2       |\n| 03 Cons Car Cdr     | 100%       | 5/5       |\n| 04 Arithmetics      | 100%       | 3/3       |\n| 05 Equalities       | 100%       | 5/5       |\n| 06 Define           | 100%       | 2/2       |\n| 07 Conditionals     | 100%       | 3/3       |\n| 08 Lambda           | 100%       | 3/3       |\n| 09 Complex programs | 100%       | 5/5       |\n| 10 Error handling   | 100%       | 4/4       |\n| 99 Coding style     | 100%       | 3/3       |\n| **End scores**      | **100%**   | **38/38** |\n\n# Features\n\n- Builtins\n  - Basics (car, cdr, cons, void, ...)\n  - Predicates (eq?, null?, number?, pair?, ...)\n  - Arithmetic (+, -, \\*, div, mod, min, max, even?, odd?, pow, sum, product, ...)\n  - Comparisons (\u003c, \u003e, \u003c=, \u003e=)\n  - String comparison (string=?, string\u003c?, string\u003c=?, string\u003e?, string\u003e=?)\n  - List functions (length, append, reverse, map, filter, foldl, foldr, ...)\n  - Algorithms (fibonacci, factorial, merge-sort)\n  - IO (display, newline)\n  - Load library (load)\n- Forms\n  - Cond\n  - If\n  - Let\n  - Lambda\n  - Quote\n  - Set\n  - Define\n  - Begin\n- REPL\n  - Read-eval-print loop (interactive)\n  - Debug commands (show expression in datums / forms)\n  - Environment commands (show, enter, leave, clear)\n\n# Usage\n\n```\n$ ./hal --help\nUsage: ./hal [FILE]... [OPTION]...\n  -h                --help                   Show this help and exit\n  -q                --quiet                  Suppress prompt\n  -i                --interactive            Enable interactive mode\n  -l FILE/DIR PATH  --library=FILE/DIR PATH  Add a library path\n```\n\n# Demo\n\n```lisp\n$ ./hal\nHAL - Lisp REPL\nType :h to see help\nType :q to quit\n\n\u003e (define add (lambda (a b) (+ a b)))\n\u003e add\n#\u003cprocedure\u003e\n\u003e (add 40 2)\n42\n\u003e (set! add 42)\n\u003e add\n42\n\u003e (fib 21)\n10946\n\u003e (merge-sort '(39 16 22 24 17 29 18 26 27 3 34 25 10 6 7 12 8 30 2 21 13 36 14 38 32 41 40 4 35 19 5 33 23 9 15 31 28 20 42 37 11 1))\n(1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42)\n```\n\n# Build\n\n```\n$ make\n```\n\nor\n\n```\n$ stack build --copy-bins\n```\n\n# Tests\n\n```\n$ make tests_run\n```\n\nor\n\n```\n$ ./tests.sh\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskyf0l%2Fhal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskyf0l%2Fhal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskyf0l%2Fhal/lists"}