{"id":17463824,"url":"https://github.com/noratrieb/dilaria","last_synced_at":"2025-04-19T18:54:58.802Z","repository":{"id":103788167,"uuid":"413163536","full_name":"Noratrieb/dilaria","owner":"Noratrieb","description":"A small embeddable scripting language","archived":false,"fork":false,"pushed_at":"2022-05-30T17:11:15.000Z","size":417,"stargazers_count":20,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-07T07:38:01.693Z","etag":null,"topics":["language","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Noratrieb.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}},"created_at":"2021-10-03T18:30:53.000Z","updated_at":"2024-07-28T01:00:55.000Z","dependencies_parsed_at":"2023-10-20T22:04:43.267Z","dependency_job_id":null,"html_url":"https://github.com/Noratrieb/dilaria","commit_stats":null,"previous_names":["noratrieb/dilaria"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Noratrieb%2Fdilaria","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Noratrieb%2Fdilaria/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Noratrieb%2Fdilaria/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Noratrieb%2Fdilaria/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Noratrieb","download_url":"https://codeload.github.com/Noratrieb/dilaria/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249239297,"owners_count":21235835,"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":["language","rust"],"created_at":"2024-10-18T10:25:31.383Z","updated_at":"2025-04-16T12:30:57.610Z","avatar_url":"https://github.com/Noratrieb.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"`dilaria` is a small embeddable scripting language\n\nIt's inspired by Javascript, Lox, Lua, Python, Rust and more\n\n# Reference\n\n## Overview\n\nDeclaring variables using `let`\n\n```rust\nlet hello = 4;\n```\n\nSemicolons are needed :)\n\n```rust\nlet test = 5;\nlet another = 4;\n```\n\nThe language has strings, numbers, arrays, objects and null and booleans\n\n```rust\nlet string = \"hallo\";\nlet number = 4; \nlet array = [];\nlet object = {};\nlet _null = null;\nlet bool = true;\n```\n\nYou access properties on objects using `.`\n\n```rust\nlet obj = {};\nobj.hi = \"hi!\";\n```\n\nThere is the `print` statement to print a value, but this will be removed\n```rust\nlet name = \"nils\";\nprint name;\n```\n\nFunctions are first class\n\n```rust\nlet obj = {};\nobj.hello = helloFn;\nobj.hello();\n```\n\nFunctions are declared using `fn`\n\n```rust\nfn greet(name) {\n    return \"hello, \" + name;\n}\n```\n\nFunctions are closures\n\nComments using `#`\n```py\n# hi!\n```\n\nMultiline comments using `##` until `##`\n```\n##\nhi\ncomment\n##\n```\n\nThere are many native functions, that can easily be customized and added/removed by the host\n\n```rust\n# rocket game\nturnRocketLeft(29);\nturnRocketRight(32);\n\n# chat bot\nmessage.respond(\"hi\");\n\n# dangerous http requests\nfn callback(html) {\n    print(html);\n}\nfetch(\"https://github.com/Nilstrieb\", callback);\n```\n\nBasic arithmetic and boolean logic is available\n\n```rust\nlet a = 5;\nlet b = 5;\nprint(a + b / b * b - a % b);\nprint(true and false or false or true and false);\n```\n\nLoops and conditionals\n\n```rust\nlet x = true;\nif x {\n    print(\"true!\");\n} else {\n    print(\"false :(\");\n}\n\nloop {\n    while 1 \u003e 5 {\n        print(\"yeet\");\n        break;\n    }\n    # no for loops for now, but will be added (probably like python)\n}\n```\n\nPattern matching!\n\n```rust\n# design is still wip\n\nlet obj = {};\nobj.x = 5;\nobj.y = \"hey\";\n\nmatch obj {\n    { no } =\u003e print \"our thing didn't match here\",\n    { x, y } =\u003e print \"we got it! \" + x,\n    \"test\" =\u003e print \"string 'test'\",\n    other =\u003e print \"something else: \" + other,\n}\n```\n\n`dilaria` is dynamically and *strongly* typed\n\n## Detail\n\n### Reserved Keywords\n\n#### Statements\n`fn`\n`let`\n`if`\n`else`\n`loop`\n`while`\n`for`\n`break`\n(`print` temporary)\n\n#### Values\n`true`\n`false`\n`null`\n\n#### Operators\n`not`\n`and`\n`or`\n\n### Operators\n`==`\n`\u003e=`\n`\u003e`\n`\u003c=`\n`\u003c`\n`!=`\n`+`\n`-`\n`*`\n`/`\n`%`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoratrieb%2Fdilaria","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnoratrieb%2Fdilaria","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoratrieb%2Fdilaria/lists"}