{"id":18463903,"url":"https://github.com/vimpunk/ill","last_synced_at":"2025-04-28T13:36:34.034Z","repository":{"id":117061949,"uuid":"138223397","full_name":"vimpunk/ILL","owner":"vimpunk","description":":heart: I LIKE LISPS :heart: my toy LISP dialect","archived":false,"fork":false,"pushed_at":"2018-07-10T23:20:56.000Z","size":51,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-16T16:58:06.300Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vimpunk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2018-06-21T21:25:45.000Z","updated_at":"2018-07-17T18:49:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"c15bb63b-5492-4fef-a392-467d93731f5e","html_url":"https://github.com/vimpunk/ILL","commit_stats":null,"previous_names":["vimpunk/ill"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vimpunk%2FILL","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vimpunk%2FILL/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vimpunk%2FILL/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vimpunk%2FILL/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vimpunk","download_url":"https://codeload.github.com/vimpunk/ILL/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251320589,"owners_count":21570599,"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-11-06T09:08:20.227Z","updated_at":"2025-04-28T13:36:33.980Z","avatar_url":"https://github.com/vimpunk.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ILL - I LIKE LISPS\n\nThis is a small toy LISP dialect I've written for purely (self) educational purposes. It's not meant to be a language used\nin the wild--heck, it's written in Python! An interpreter inside an interpreter, performance must be pretty abysmal!\n\nI'd lie if I claimed that I'm an expert at LISPS and its numerous dialects, so it's probably safest for me the say that\nILL is not a real LISP (hence the name). It currently doesn't even support macros (and perhaps it never will as I never really\nunderstood or used them (in that order)), tail call optimization, nor a whole host of builtin functions! But hey, it's\na work-in-progress.\n\n## Whirlwind tour of the language\n\nThe basics are just as you'd expect:\n```\n(+ 1 (* 2 3))\n```\n\nTypes:\n- bool: `true` or `false`\n- number: `2` or `2.02`\n- string: `\"a utf8 string\"`\n- vector: `[1 2 3 \"four\"]`\n- map: `{\"key\": \"value\"}`\n\nVariable binding:\n```\n(let greeting \"hello world\")\n(let name (/ 8 2))\n(let vec [1 23 (+ 2 34) (+ \"hello\" \"world\")])\n(let map {\"key1\":1 2:2 (+ 2 3):3})\n```\n\nConditional branching:\n```\n(if (= 2 2 2)\n    2\n    \"not 2\")\n```\n\nFunction definition:\n```\n(fn fib (n)\n    (if (\u003c= n 2)\n        1\n        (fib (- n 1) (- n 2))))\n\n(fn greeter () \"hello!\")\n\n(fn adder (a b) (+ a b))\n```\n\nYou can loop with recursion, but since tail call optimization is not yet implemented (and I prefer explicit loop\nconstructs anyway), a while keyword is provided:\n```\n(let i 0)\n(while (\u003c i 10)\n    (do (print i)\n        (let i (+ i 1))))\n```\n\nLooping through collection elements is also supported:\n```\n(let list [1 2 3 4 5])\n(each (list element)\n    (print element))\n```\nor if the iterable is a map:\n```\n(let answers {\n    \"The Answer to the Ultimate Question of Life, the Universe, and Everything\": 42})\n(each (answers key val)\n    (print key \": \" val))\n```\n\n\nYou can also use multiple statements within if branches and function bodies with the `do` function, which evaluates all\nits arguments and returns the last one:\n```\n(fn function-name (param1 param2)\n    (do (let tmp param1)\n        (+ tmp param1)))\n```\n\nSince everything is an expression and thus evaluates to a value, you can use function definitions within expressions\nas anonymus functions, like so:\n```\n((fn adder (a b) (+ a b)) 3 4)\n```\n\n## Running it\n\nJust execute `./ill/repl.py` for the repl and `./ill/ill.py $filename` to run source code. Yes, it's not very\nergonomic. Yet.\n\n## Useful things that have been built with ILL:\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvimpunk%2Fill","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvimpunk%2Fill","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvimpunk%2Fill/lists"}