{"id":20846110,"url":"https://github.com/issadarkthing/x-lisp","last_synced_at":"2025-06-25T10:36:56.697Z","repository":{"id":112710976,"uuid":"285537481","full_name":"issadarkthing/x-lisp","owner":"issadarkthing","description":"Lisp interpreter written in Deno","archived":false,"fork":false,"pushed_at":"2020-08-28T04:29:33.000Z","size":46,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-09T02:59:00.610Z","etag":null,"topics":["deno","language","lisp","lisp-interpreter","parenthesis","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/issadarkthing.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","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,"zenodo":null}},"created_at":"2020-08-06T10:07:04.000Z","updated_at":"2023-04-15T19:46:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"7a736d01-baca-4998-9512-602c90c508ce","html_url":"https://github.com/issadarkthing/x-lisp","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/issadarkthing/x-lisp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/issadarkthing%2Fx-lisp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/issadarkthing%2Fx-lisp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/issadarkthing%2Fx-lisp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/issadarkthing%2Fx-lisp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/issadarkthing","download_url":"https://codeload.github.com/issadarkthing/x-lisp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/issadarkthing%2Fx-lisp/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261853226,"owners_count":23219826,"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":["deno","language","lisp","lisp-interpreter","parenthesis","typescript"],"created_at":"2024-11-18T02:15:04.729Z","updated_at":"2025-06-25T10:36:56.687Z","avatar_url":"https://github.com/issadarkthing.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# X-lisp\nX-lisp is a simple lisp interpreter. So far, everything is a \nfunction. \n\nThis is general construct of the language `(name args args)`, \nthe first argument inside parenthesis \nis the function name, and the subsequent is\nthe function arguments.\n\n## Installation\nMake sure you have **Deno** installed, if not you can install it [here](https://deno.land/#installation).\n```sh\n$ deno install --allow-read github.com/issadarkthing/x-lisp/xlisp.ts\n```\n\n## Data types (Kind)\nTwo major data type in x-lisp is `Fn` and `Kind`. `Fn` is function type which\ntakes at least one argument; the symbol. Everything with the parenthesis\nis a `Fn` type. In fact, the whole module is a big `prog` function \n(we will talk about this later). Every `Fn` creates a new scope, the variables\ndefined inside `Fn` is only visible within `Fn`.\n\nPrimitive data types are `Kind`s. They are not callable and cannot be the first\nitem inside a `parenthesis`.\n- string\n- number\n- nil\n- boolean\n- cons `list`\n\n## Cons\nCons is a list and the only data structure _so far_ in the language. The cons function\nis a variadic function which means it takes multiple arguments and returns a\ncons.\n\n## Math\n\n| function       |  description                  |\n| -------------  | ------------                  |\n| ```(+ a b)```  | add numbers                   |\n| ```(- a b)```  | subtract numbers              |\n| ```(* a b)```  | multiply numbers              |\n| ```(/ a b)```  | divide numbers                |\n\n## Logical function\n\n|   function      |  description               |\n| -------------   | ------------               |\n| ```(and a b)``` | and `\u0026\u0026`                   |\n| ```(or a b)```  | or `\\|\\|`                  |\n| ```(eq a b)```  | equal `==`                 |\n| ```(ne a b)```  | not equal `!=`             |\n| ```(gt a b)```  | greater then `\u003e`           |\n| ```(ge a b)```  | greater then or equal `\u003e=` |\n| ```(lt a b)```  | lesser then `\u003c`            |\n| ```(le a b)```  | lesser then or equal `\u003c=`  |\n\n## Function\n`defun` is a function that takes 3 arguments: identifier, cons, function.\n```lisp\n(defun adder (# a b c)\n\t(+ a b c))\n```\n\n## Variable binding\n`set` bind a `Kind` to a symbol. The symbol is visible inside the parent scope.\n```lisp\n(set a 10 b 12)\n```\n\n## Control flow (expression)\n`if` is not a statement but rather a function which takes 3 `Fn` types. The first\nargument must be an `Fn` that returns a bool `Kind`.\n```lisp\n(if (\u003c 10 11)\n\t(id \"so truee\")\n\t(id \"so wrong\"))\n```\nNotice the `id` function, it is needed there because it needs to turn `Kind` type\nto `Fn` type.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fissadarkthing%2Fx-lisp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fissadarkthing%2Fx-lisp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fissadarkthing%2Fx-lisp/lists"}