{"id":24013139,"url":"https://github.com/lukeuke/yail","last_synced_at":"2026-06-07T20:32:33.375Z","repository":{"id":270748223,"uuid":"911331055","full_name":"Lukeuke/Yail","owner":"Lukeuke","description":"Yet another interpreted language","archived":false,"fork":false,"pushed_at":"2025-01-23T19:34:45.000Z","size":116,"stargazers_count":0,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-23T20:24:10.302Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","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/Lukeuke.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":"2025-01-02T19:05:28.000Z","updated_at":"2025-01-23T19:33:15.000Z","dependencies_parsed_at":"2025-01-02T20:32:36.181Z","dependency_job_id":"72b38612-5037-4fd4-8493-ab86e1102384","html_url":"https://github.com/Lukeuke/Yail","commit_stats":null,"previous_names":["lukeuke/yail"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lukeuke%2FYail","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lukeuke%2FYail/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lukeuke%2FYail/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lukeuke%2FYail/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Lukeuke","download_url":"https://codeload.github.com/Lukeuke/Yail/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240702536,"owners_count":19843936,"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":"2025-01-08T06:39:17.569Z","updated_at":"2026-06-07T20:32:33.086Z","avatar_url":"https://github.com/Lukeuke.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Yail (Yet another interpreted language)\nCreated out of pure fun. Not for real use.\n\n**Solving real coding problems**\n- [Codewars](https://github.com/Lukeuke/Yail/blob/main/.github/codewars/codewars.md)\n\n## Conventions\n\u003c!\u003e **Package names must be equal to its file names**!\n\n## Examples:\n\n### Variables\n\n```js\nvar x = 3;\nvar y = x + 3;\nprintln(y);\n// output: 6\n```\n\n### Data types\n- i32 -\u003e Integer\n- any -\u003e dynamically sets the proper return type\n\n\u003e To disable type checking use ``#use disable-type-checking`` on top of the file.\n\n### I/O\n\n```js\nvar x = \"\";\n\nprintln(\"type something:\");\nx = input();\n\nprintln(x);\n```\n\n#### Parsing\n```js\nvar x = \"5\";\n\nx = parseInt(x);\n\nprintln(x + 6);\n// output: 11\n```\n\n#### Casting\n```js\nfunky test() double {\n    return 1.45;\n}\n\nvar x = test();\nx += 1.0;\n\nprintln(typeof((string)x));\n```\n\n### Iterators\nWhile loops\n```js\nvar x = 5;\n\nwhile x \u003e= 0 {\n    println(x);\n    x--;\n}\n\nwhile true {\n    println(\"break example\");\n    break;\n}\n```\n\nFor loops\n```js\nfor var i = 0; i \u003c 10; i++ {\n    println(i);\n}\n```\n\nForeach\n```js\npackage main\n\nvar x = [\"test\", \"ad\"] string;\n\nforeach (var a in x) {\n    println(a);\n}\n```\n\n### If-statements\n```js\nvar x = 5;\n\nif x \u003e 10 {\n  println(\":D\");\n}\nelse if x \u003c 10 {\n  println(\":(\");\n}\nelse {\n  println(\"???\");\n}\n```\n\n### Functions\n\n\u003e More about functions here: [Docs - functions](https://github.com/Lukeuke/Yail/blob/main/docs/functions.md)\n\n```js\nvar x = 5;\n\nfunky addNumbers(a i32, b i32) i32 {\n\n    println(x); // \u003c- NOTE: value not accessable here\n\n    return a + b;\n}\n\nx = addNumbers(3, 5);\n\nprintln(x);\n```\n\n### Access modifiers\n\n```js\npackage test\n\nfunky test() string {\n  return \"called from test()\";\n}\n\npub funky test2() string {\n  println(\"called test2()\");\n  return test();\n}\n\npackage main\n\n// Exception: Cannot call private function 'test'.\nprintln(test());\n// output: \n// called test2()\n// called from test()\nprintln(test2());\n```\n\n### Arrays\n```js\npackage main\n\nvar x = \"hello\";\n\nfor (var i = 0; i \u003c= 4; i++) {\n    println(x[i]);\n}\n```\n\n```js\nvar x = [1, 2] i32;\n\nprintln(x[-1]); // 2\n\nx[-1] = 0;\n\nprintln(x[-1]); // 0\n```\n\n### Dictionaries\n```js\npackage main\n\nvar dict = {\"key1\": 1, \"key2\": 2};\nvar x = dict[\"key1\"];\n\nprintln(x); // 1\ndict[\"key1\"] = 2;\nprint(dict[\"key1\"]); // 2\n```\n\n\n### Reference types\nReference works kinda like in C, declare it by '\u0026amp;' \n\n\u003e \u003c!\u003e Reference works only on ***IAccessible*** types (Arrays, Dictionaries)\n\n```js\npackage main\n\nvar dict = {\"key1\": 1, \"key2\": 2};\n\nvar x = dict[\"key1\"];\n\nprintln(x); // 1\n\ndict[\"key1\"] = 2;\n\nprintln(x); // 1\n\n// to fix, you need to tell that is a reference\n\nvar x1 = \u0026dict[\"key1\"]; // \u003c-\n\nprintln(x1); // 2\n\ndict[\"key1\"] = 3;\n\nprintln(x1); // 3\n```\n\n### Libraries\n\u003e \u003c!\u003e Package name must be equal to the file name: ```package main``` in ```main.yail```\n```js\nusing math // library import\n\npackage main // necessary to define main package\n\nprintln(abs(-5)); // function inside imported package\n```\n\n#### External libraries\n\u003e \u003c!\u003e Package name must be equal to the file name: ```package main``` in ```main.yail```\n\n\u003e \u003c!\u003e Interpreter is getting path from the project root file.\n\n```\n├── main.yail\n├── src\n│   ├── test.yail\n```\n\ntest.yail\n```js\npackage test\n\npub funky publicFn() void {\n  println(\"calling publicFn\");\n}\n```\n\nmain.yail\n```js\nusing \"./src/test.yail\" // only windows support\n\npackage main\n\ntest::publicFn();\n```\n\n### Structs\n```js\npackage main\n\npub struct Point {\n    var x i32;\n    var y i32;\n}\n\nvar p = new Point();\np.x = 2;\np.y = 2;\n\nprint(p.x); // 2\n```\n\n### Supports\n\n- [x] Int, bool, char, string, double, null\n- [x] Single-line, multi-line comments\n- [x] Arrhythmic operators\n- [x] Console outputs ``print()`` / ``println()`` \n- [x] Console input ``input()``\n- [x] Parsing ex.: ``parseInt()``\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukeuke%2Fyail","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flukeuke%2Fyail","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukeuke%2Fyail/lists"}