{"id":24680264,"url":"https://github.com/phenax/aether","last_synced_at":"2026-02-21T10:31:28.813Z","repository":{"id":271193321,"uuid":"912665557","full_name":"phenax/aether","owner":"phenax","description":"Another one of those lisp interpreters","archived":false,"fork":false,"pushed_at":"2025-01-28T16:21:53.000Z","size":203,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-05T13:29:16.315Z","etag":null,"topics":["haskell","lisp-interpreter","programming-language","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":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/phenax.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,"zenodo":null}},"created_at":"2025-01-06T06:23:10.000Z","updated_at":"2025-02-20T23:03:56.000Z","dependencies_parsed_at":"2025-07-27T21:46:55.915Z","dependency_job_id":null,"html_url":"https://github.com/phenax/aether","commit_stats":null,"previous_names":["phenax/aether"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/phenax/aether","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phenax%2Faether","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phenax%2Faether/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phenax%2Faether/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phenax%2Faether/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phenax","download_url":"https://codeload.github.com/phenax/aether/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phenax%2Faether/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29679049,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T09:33:50.764Z","status":"ssl_error","status_checked_at":"2026-02-21T09:33:19.949Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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","lisp-interpreter","programming-language","scheme-interpreter"],"created_at":"2025-01-26T14:12:50.775Z","updated_at":"2026-02-21T10:31:28.798Z","avatar_url":"https://github.com/phenax.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Aether lang\nIt's an interpreter and a programming language. It's based on scheme. It's mine. Leave me alone.\n\n\n## Install\nClone and build it yourself\n- Via nix: `nix build`\n- Via cabal: `cabal build`\n\nOr just run directly it with nix flakes: `nix run github:phenax/aether -- repl`.\n\n\n## Running\n- Run the repl with `aether repl`. Use rlwrap for a better experience (`rlwrap aether repl`)\n- Evaluate a script file with `aether run ./path/to/file.scm -- arg1 arg2`\n\nThere is no help menu. I don't care about you.\n\n\n\n## Examples\nThe [examples](./examples/) directory has some examples to look at. For a (sort of) usable CLI example, take a look at [crop-video-cli](./examples/crop-video-cli.scm).\n\nHeres some normal stuff you can do in aether so far.\n\n### Functions\n`define` is used to define functions `(define (symbol ... args) ... exprs)`.\n\nIt can also be used to define values `(define symbol value)`.\n\n```scheme\n(define (factorial num)\n  (if (\u003c= num 1) 1\n    (* num (factorial (- num 1)))))\n\n(displayNl (factorial 5))\n\n(set results '[])\n(for (range 10 20) { -\u003e [n]\n  (let [ (result (factorial n)) ]\n    (set results (concat results result))\n    (displayNl n \"! is \" result))\n})\n; `()`, `[]`, `{}` are the same thing\n\n(displayNl results)\n```\n\n\n### Macros\n\n```scheme\n(defmacro (when condition ... exprs)\n  '(if ,condition\n    (progn ,@exprs)\n    #nil))\n\n(set n 5)\n(when (\u003e= n 5)\n  (set yay \"Yay!\")\n  (displayNl \"N is \u003e= 5 and everyone you love will die some day! \" yay)\n  (displayNl \"Good bye\"))\n```\n\n\n### Error handling\n`try` function handles errors in the expressions inside it and returns `'(error value)`.\n\n`error!` function is used to throw exceptions. `(error! 'error-identifier \"Error message\")`\n\n```scheme\n(define (divide! a b)\n  (if (zero? b)\n    (error! 'division-by-zero \"Cant divide by zero bro\")\n    (/ a b)))\n\n(expand [error value] (try (divide! 20))) ; expand macro destructures list into symbols\n\n(cond\n  [ (nil? error)\n      {displayNl \"Result: \" value} ]\n\n  [ (= 'division-by-zero (error/label error))\n      {displayNl \"DivByZero error: \" (error/message error)} ]\n\n  [ else\n      {displayNl \"Unexpected error: \" (error/message error)} ])\n```\n\n\n### Processes\n`!` function spawns a process and waits for it to end. Returns `'(stdout stderrr)`.\n\nOn non-zero exit code, it throws an error `(error! 'proc/non-zero-exit-code \"... \u003cstderr\u003e\")`\n\n```scheme\n; Example: Takes a screenshot of the screen of the focused window using imagemagick and saves it\n(expand [window-id, _] (! xdotool getwindowfocus))\n(! import -window ,window-id \"/home/user/Pictures/screenshot.jpg\") ; Imagemagick `import`\n\n; WIP: Process handling + pipes\n```\n\n\n### File IO\nOnly supports reading and writing text files\n\n```scheme\n(set contents (fs/read-file \"path/to/file\"))\n(fs/write-file \"path/to/file\" (string contents \"appending stuff\"))\n\n; WIP: file handle, stat, etc\n```\n\n\n### Import scripts\n`import` function imports script files, relative to cwd, into the current scope (symbol and strings both work).\n\n```scheme\n(import 'path/to/script-file-1.scm \"../foobar/script-file-2.scm\" \"./path/to/script-file-3.scm\")\n```\n\n\n### Infix syntax\nWhy not?\n\n```scheme\n; Always evaluated left to right. No fixity because fuck you\n($ 5 + 4 * 3 - 2)      ; 25\n; Equivalent to (- (* (+ 5 4) 3) 2)\n\n($ 5 + ($ 4 * 3) - 2)  ; 15\n; Equivalent to (- (+ 5 (* 4 3)) 2)\n```\n\n\n### Pipe/currying and other functional nerd stuff\n```scheme\n(set nums (list 1 2 3 4 5))\n(|\u003e nums\n  (_^ map (-\u003e [x] (* x 2)))  ; curried map x2\n  reverse                    ; reverse list\n  (^_ for displayNl))       ; display each item\n\n; _^ is curry second (same as `curry`): ((a, b) -\u003e c) -\u003e a -\u003e b -\u003e c\n; ^_ is curry first: ((a, b) -\u003e c) -\u003e b -\u003e a -\u003e c\n```\n\n\n### Records\n`record` macro creates record structures. It's just a list with accessors so nothing fancy.\n\n```scheme\n(record Person\n  :person/name  ; :person/ is just for namespacing. Can be any symbol\n  :person/age)\n\n(set john (Person \"John\" 8))\n\n(displayNl (:person/name john) \" is \" (:person/age john) \" years old\")\n\n; Create a copy with a property updated\n(set updated-john (set@:person/name \"Johnathy McJohnathan\" john))\n\n(displayNl (:person/name updated-john) \" is \" (:person/age updated-john) \" years old\")\n\n; Compose setters together to update multiple properties\n(set updated-john\n  (|\u003e john\n    (_^ set@:person/name \"Johneshwar\")\n    (_^ set@:person/age 9)))\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphenax%2Faether","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphenax%2Faether","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphenax%2Faether/lists"}