{"id":16099002,"url":"https://github.com/hellerve/mae","last_synced_at":"2025-03-18T07:30:56.167Z","repository":{"id":79626326,"uuid":"315039648","full_name":"hellerve/mae","owner":"hellerve","description":"maps are everything.","archived":false,"fork":false,"pushed_at":"2021-11-15T17:30:39.000Z","size":12,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-16T17:51:23.349Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/hellerve.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-11-22T13:06:34.000Z","updated_at":"2024-05-16T14:40:49.000Z","dependencies_parsed_at":"2023-05-13T22:00:21.072Z","dependency_job_id":null,"html_url":"https://github.com/hellerve/mae","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/hellerve%2Fmae","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellerve%2Fmae/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellerve%2Fmae/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellerve%2Fmae/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hellerve","download_url":"https://codeload.github.com/hellerve/mae/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244177648,"owners_count":20410993,"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-10-09T18:25:22.980Z","updated_at":"2025-03-18T07:30:56.160Z","avatar_url":"https://github.com/hellerve.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `{}` mae. `{}`\n\n**m**aps **a**re **e**verything. an experiment in language construction with an\ninicidental [lisp syntax](#why-lisp-syntax).\n\n## syntax.\n\nwe use lisp syntax, kind of. definitions use `def`. maps use curly braces.\ncommas and colons are whitespace. calling maps is indexing into them.\n\nfunctions are infinite maps, i.e. maps that do not precompute. they take\ninputs and produce output. hence, their syntax looks like this:\n\n```\n{(input args) -\u003e (output expression)}\n```\n\n### why lisp syntax?\n\nbecause i am lazy, lisp is easy to parse, and syntax doesn’t matter. i mean,\ndid you look at the error messages?\n\n## data types\n\nthe fun is in the definitions.\n\n### booleans.\n\n`true` is the map with one entry. `false` is the empty map. anything else is\nnot a boolean (but you can make it one by using `(neg (empty? \u003cmap\u003e))`).\n\n### integers.\n\nnumerical values are maps with `n` entries. any map can be an integer. there is\na reader expression for array syntax using brackets; it just generates the\nindices. there are reader literals, but since the only way to generate a key is\nto generate a recursively different map, any number over 5 is gnarly, and over\n25 it becomes borderline unusable. fun.\n\n### arrays.\n\nmaps with integral keys can be used like arrays.\n\n## control structures\n\nor: is this your card?\n\n### conditionals.\n\nconditionals are maps from `true` and `false` to other values. we can thus\ndefine the function\n\n```clojure\n(def if\n  {(cond a b) -\u003e (({true a false b} cond))}) ; branches are nullary infinite maps\n```\n\nmulti-branch conditionals work the same way, but there is no function for them.\n\n### loops\n\nloops happen when we iterate over maps. you have `foldr`, `map`, and `filter`\nat your disposal.\n\n```clojure\n(def print-all-keys {(m) -\u003e (map {(k v) -\u003e (prn k)} m)})\n```\n\n### functions\n\nif you have pure bounded functions, why not express them as maps instead?\ncomputation is an illusion of numbers in time anyway.\n\n## faqs\n\n### is this functional programming?\n\nit is maptional programming, naturally.\n\n### should i just read this, chuckle, and leave?\n\nyes, you should.\n\n### how can i support the development of mae?\n\nmae is not currently being developed, but, if you want to show your love, be\nkind to someone else.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhellerve%2Fmae","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhellerve%2Fmae","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhellerve%2Fmae/lists"}