{"id":22553275,"url":"https://github.com/aasteria/mylispinterpreter","last_synced_at":"2025-03-28T10:24:50.648Z","repository":{"id":258102951,"uuid":"873313788","full_name":"AAsteria/MyLispInterpreter","owner":"AAsteria","description":"A simple interpreter for Lisp written in F#","archived":false,"fork":false,"pushed_at":"2024-10-16T06:02:02.000Z","size":9,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-02T11:12:49.298Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"F#","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/AAsteria.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":"2024-10-16T00:38:53.000Z","updated_at":"2024-12-10T21:36:05.000Z","dependencies_parsed_at":"2024-10-18T05:17:51.115Z","dependency_job_id":null,"html_url":"https://github.com/AAsteria/MyLispInterpreter","commit_stats":null,"previous_names":["aasteria/mylispinterpreter"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AAsteria%2FMyLispInterpreter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AAsteria%2FMyLispInterpreter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AAsteria%2FMyLispInterpreter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AAsteria%2FMyLispInterpreter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AAsteria","download_url":"https://codeload.github.com/AAsteria/MyLispInterpreter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246010552,"owners_count":20709125,"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-12-07T18:09:02.578Z","updated_at":"2025-03-28T10:24:50.616Z","avatar_url":"https://github.com/AAsteria.png","language":"F#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MyLispInterpreter\nA simple interpreter for Lisp written in F#\n\n## Build \u0026 Run the Project\n```bash\ndotnet build\ndotnet run\n```\n\n## Features\n### Arithmetic Operations\n\n-   Addition (`+`), subtraction (`-`), multiplication (`*`), division (`/`)\n-   Supports arbitrary-precision integers (`bigint`)\n\n### Variables and Functions\n\n-   `define` to bind symbols to values or functions\n-   `lambda` for creating anonymous functions\n\n### Control Structures\n\n-   Conditional expressions with `if`\n-   Sequence execution with `begin`\n\n### Macros\n\n-   Define macros using `defmacro`\n-   Macro expansion with parameter substitution\n\n### Error Handling\n\n-   Exception handling with `try`, `catch`, and `throw`\n\n### List Operations\n\n-   `list`, `cons`, `car`, `cdr`, `append`\n-   Functional operations: `map`, `filter`, `reduce`\n\n### Strings\n\n-   String literals with double quotes\n-   String functions: `string-length`, `string-append`, `substring`, `string-\u003elist`\n\n### Boolean Values\n\n-   `true` and `false` literals\n-   Logical operations with `not`, `and`, `or`\n\n### Tail Call Optimization\n\n-   Supports proper tail recursion for efficient recursion\n\n### Built-in Functions\n\n-   Symbol creation with `symbol`\n-   Output with `print`\n\n## Testing Examples\n\n### Arithmetic Operations\n\n```bash\nLisp\u003e (+ 1 2 3 4 5)\nNumber 15\n\nLisp\u003e (* 2 3 4)\nNumber 24\n\nLisp\u003e (- 10 3 2)\nNumber 5\n\nLisp\u003e (/ 100 5 2)\nNumber 10 \n```\n\n### Variables and Functions\n\n```bash\nLisp\u003e (define x 10)\nSymbol \"x\"\n\nLisp\u003e x\nNumber 10\n\nLisp\u003e (define square (lambda (n) (* n n)))\nSymbol \"square\"\n\nLisp\u003e (square 5)\nNumber 25\n\n```\n### Control Structures\n\n```bash\nLisp\u003e (if true \"Yes\" \"No\")\nString \"Yes\"\n\nLisp\u003e (define n 5)\nSymbol \"n\"\n\nLisp\u003e (if (= n 5) (print \"n is five\") (print \"n is not five\"))\nn is five\nBool true\n```\n\n### Macros\n\n```bash\nLisp\u003e (defmacro when (condition body)\n         (list (symbol \"if\") condition body))\nSymbol \"when\"\n\nLisp\u003e (when true (print \"Condition is true\"))\nCondition is true\nBool true\n\nLisp\u003e (defmacro unless (condition body)\n         (list (symbol \"if\") (list (symbol \"not\") condition) body))\nSymbol \"unless\"\n\nLisp\u003e (unless false (print \"Condition is false\"))\nCondition is false\nBool true\n```\n\n### Error Handling\n\n```bash\nLisp\u003e (try (/ 1 0) (catch e (print (string-append \"Error: \" e))))\nError: Division by zero\nBool true\n```\n\n### List Operations\n\n```bash\nLisp\u003e (define lst (list 1 2 3 4 5))\nSymbol \"lst\"\n\nLisp\u003e (car lst)\nNumber 1\n\nLisp\u003e (cdr lst)\nList [Number 2; Number 3; Number 4; Number 5]\n\nLisp\u003e (cons 0 lst)\nList [Number 0; Number 1; Number 2; Number 3; Number 4; Number 5]\n\nLisp\u003e (append lst (list 6 7 8))\nList [Number 1; Number 2; Number 3; Number 4; Number 5; Number 6; Number 7; Number 8]\n\nLisp\u003e (map (lambda (x) (* x x)) lst)\nList [Number 1; Number 4; Number 9; Number 16; Number 25]\n\n```\n\n### Strings\n\n```bash\nLisp\u003e (define greeting \"Hello, World!\")\nSymbol \"greeting\"\n\nLisp\u003e (string-length greeting)\nNumber 13\n\nLisp\u003e (substring greeting 7 5)\nString \"World\"\n\nLisp\u003e (string-append greeting \" How are you?\")\nString \"Hello, World! How are you?\"\n```\n\n### Tail-Recursive Factorial Function\n\n```bash\nLisp\u003e (define fact (lambda (n acc)\n         (if (= n 0)\n             acc\n             (fact (- n 1) (* n acc)))))\nSymbol \"fact\"\n\nLisp\u003e (fact 5 1)\nNumber 120\n```\n\n## License\nNotice that this project is under MIT License.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faasteria%2Fmylispinterpreter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faasteria%2Fmylispinterpreter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faasteria%2Fmylispinterpreter/lists"}