{"id":16870251,"url":"https://github.com/metagn/kismet","last_synced_at":"2025-03-18T19:38:36.423Z","repository":{"id":149520078,"uuid":"108763457","full_name":"metagn/kismet","owner":"metagn","description":"Weird lisp-like language with imperative syntax and typed macros","archived":false,"fork":false,"pushed_at":"2022-01-16T13:33:55.000Z","size":719,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-14T15:03:22.076Z","etag":null,"topics":["programming-language"],"latest_commit_sha":null,"homepage":"","language":"Groovy","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/metagn.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":"2017-10-29T19:17:05.000Z","updated_at":"2021-11-21T03:48:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"439e188c-79e3-4bb0-ab30-a10fabe03ec1","html_url":"https://github.com/metagn/kismet","commit_stats":{"total_commits":77,"total_committers":2,"mean_commits":38.5,"dds":0.4155844155844156,"last_synced_commit":"e9843fb92177cea4dd6d445cc460581f575805e7"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metagn%2Fkismet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metagn%2Fkismet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metagn%2Fkismet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metagn%2Fkismet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/metagn","download_url":"https://codeload.github.com/metagn/kismet/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244290503,"owners_count":20429369,"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":["programming-language"],"created_at":"2024-10-13T15:03:27.497Z","updated_at":"2025-03-18T19:38:36.378Z","avatar_url":"https://github.com/metagn.png","language":"Groovy","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kismet\n\nA programming language. Started in 2016 or 2017.\n\n## Program example\n\n```\nlet (each i: range 1 100) {\n  tu: reduce (0, 5, 3) [fn [a b]\n    [bit_or\n      [left_shift a 1]\n      [if [divs? i b] 1 0]]]\n  echo [i, \"Fizz\", \"Buzz\", \"FizzBuzz\"].[tu]\n}\n\n;; alternatively\n\n(let (result l: [], each i: range 1 100)\n  (add l (i, \"Fizz\", \"Buzz\", \"FizzBuzz\").[\n    (reduce (0, 5, 3) (fn (a, b)\n      (bit_or\n        (left_shift a 1)\n        (if (divs? i b) 1 0))))])))\n```\n\n## Quirks\n\nNot interesting features, just things to know to understand the language.\n\n* Syntax: Random, mostly hacked together.\n  - `[]` expressions with no comma are always calls, `()` expressions without\n    commas can be single expressions, calls or blocks separated by `;`,\n    `{}` without commas is an \"open block\" meaning newlines separate expressions\n    which is the same at top level.\n  - `()`, `[]` and `{}` expressions with commas respectively form tuple, list\n    and set expressions, and if every expression in `{}` is a colon expression or\n    it starts with `{:`, it becomes a map expression.\n  - Subscripts, properties with `.` and `a(b, c)` call syntax are supported,\n    `(` and `[` can be preceded by `.`. Colons such as `a: b` are the infix\n    assignment syntax though you can still write `= a b`.\n  - String escape scheme is different for some reason. `\\uXXXX` and octal\n    `\\XXX` replaced with `\\u(x|X|o|O|b|B)?{XXXX}` where x, X and no character\n    imply hex, o and O imply octal, b and B imply binary, presumably for larger\n    unicode characters. Also raw string calls like in Python which I just added.\n  - Backticks are quoted identifiers\n* Type system, very broken:\n  - You can overload variables with any types.\n    ```\n    a: 3\n    a: true\n    incr a\n    assert_is (prefer_type a Boolean, prefer_type a Int) (true, 4)\n    ```\n    This is how function overloading works.\n  - Call expressions are typed by checking the call value for the lowest supertype\n    of the following types in order (where the preferred type is for the value of\n    the call expression):\n    - `Template` (function that takes parser object and expressions and outputs expression)\n    - `TypeChecker` (function that takes scope context and expressions and outputs typed expression)\n    \n    ^ ideally the above would be overloadable with some kind of `Untyped` type\n    to represent untyped expressions \n    \n    - `TypedTemplate[Tuple[type of arg1, type of arg2, ...], preferred type]`\n      (function that takes scope context and typed expressions and outputs typed expression)\n    - `Instructor[Tuple[type of arg1, type of arg2, ...], preferred type]`\n      (function that takes instructions which are just processed AST and outputs value at runtime)\n    - `Function[Tuple[type of arg1, type of arg2, ...], preferred type]`\n    \n    If functions with a supertype of the above type are found but functions with subtypes\n    exist, those functions will be checked at runtime for the given arguments in a certain order.\n    Otherwise a function named `call` with type\n    `Function[Tuple[type of call value, Tuple[type of arg1, type of arg2, ...]], preferred type]`\n    will be searched, which if not found will fail the type check for the call expression.\n  - Tuple types can have varargs, ideally represented by a list at runtime but\n    I don't think that's how it works currently.\n  - `null` has type `None` which is a subtype of all types.\n* `let` template, as seen above, allows `each` and `result` assignments. Funnily enough\n  I thought of aliasing `let` to `for` a long while after thinking of `each`.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetagn%2Fkismet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmetagn%2Fkismet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetagn%2Fkismet/lists"}