{"id":21662864,"url":"https://github.com/ktravis/lark","last_synced_at":"2025-03-20T05:49:01.154Z","repository":{"id":147327801,"uuid":"44531240","full_name":"ktravis/lark","owner":"ktravis","description":"An odd dynamic programming language, interpreted by Python","archived":false,"fork":false,"pushed_at":"2015-12-09T12:22:57.000Z","size":46,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-25T07:27:33.579Z","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/ktravis.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}},"created_at":"2015-10-19T11:53:34.000Z","updated_at":"2020-07-06T10:31:26.000Z","dependencies_parsed_at":"2023-04-15T12:27:22.964Z","dependency_job_id":null,"html_url":"https://github.com/ktravis/lark","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/ktravis%2Flark","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ktravis%2Flark/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ktravis%2Flark/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ktravis%2Flark/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ktravis","download_url":"https://codeload.github.com/ktravis/lark/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244560373,"owners_count":20472219,"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-25T10:18:26.703Z","updated_at":"2025-03-20T05:49:01.110Z","avatar_url":"https://github.com/ktravis.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lark\n\nLanguage running on python -- everything is a value, whatever that means.\n\n\n## Features\n\n- python interoperability\n- reference counting (not complete yet, but close)\n- namespaces\n- closures\n- dynamic variables\n- flexible tuple data type (named members and positional slots)\n- explicit and unambiguous \"references\"\n\n\n## Getting Started\n\n```bash\npip install ply\n./lark.py\n```\n\n\n## Examples\n\n```\n# comments\nx = 3\ny = { x } # boxed val\nz = [a]{ a * x } # parametrized value\nz[2] # 6\n\nstr = 'hello wendl' #string\n\nmake_counter = [n]{\n    a = n\n    { ^a = a + 1 } # last expression is returned\n}\nif true\n    print['sane universe']\nelif false\n    print['uh oh']\nelse\n    print['who even knows']\nend\n\nthing = if x \u003e 2\n    'x is bigger than two'\nelse\n    'x is 2 or smaller'\nend\n\nnoref = [x] { x += 1 }\ny = 0\nnoref[y] # 1\ny # 1\n\nyesref = [^x] { x += 1 }\n# yesref[y] # error\nyesref[^y] # 1\ny # 1\nyesref[^y] # 2\n\ncounter = make_counter[0]\nprint[counter] # 1\nprint[counter] # 2\nprint[counter] # 3\n\nt = (1,) # tuple\nt2 = (1, \"hello world\") # more tuple\nprint[t.0] # 1\ni = 1\nprint[t2.(i)] # hello world\n\ni = 0\nloop true\n    i += 1\n    print[i]\n    if i \u003e 5\n        break\n    end\nend\n\n# default parameter values\nlog = [msg=\"default used!\"] { print[\"LOG: \" + msg] }\nlog['parameter provided'] # \u003e LOG: parameter provided\nlog # \u003e LOG: default used!\n\n# default parameters must be at the end\ntest = [a, b=1]{ a + b }\ntest[1]    # \u003e 2\ntest[1, 2] # \u003e 3\n\nnamespace hello {\n    namespace world {\n        yes = true\n    }\n}\nprint[hello::world::yes] # true\n\nimport test # imports a file named test (optional extensions)\nimport test::nested # imports namespace \"nested\" from file test,\n                   # or file \"nested[.lk]\" from folder 'test'\n\nnested::my_value = i\n\nextern \"\"\"import sys\"\"\"\ninput = extern \"sys.stdin.readline().strip()\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fktravis%2Flark","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fktravis%2Flark","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fktravis%2Flark/lists"}