{"id":30034236,"url":"https://github.com/skyost/scriny","last_synced_at":"2026-06-18T21:31:17.608Z","repository":{"id":306139369,"uuid":"1025079730","full_name":"Skyost/Scriny","owner":"Skyost","description":"A tiny scripting language for Dart.","archived":false,"fork":false,"pushed_at":"2025-12-06T14:34:52.000Z","size":154,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-14T14:54:46.521Z","etag":null,"topics":["evaluation","math","parser","script"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/scriny","language":"Dart","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/Skyost.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"Skyost","patreon":null,"open_collective":null,"ko_fi":"Skyost","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":["paypal.me/Skyost"]}},"created_at":"2025-07-23T17:29:56.000Z","updated_at":"2025-12-06T14:34:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"095795a9-3319-4647-8c6a-9e00baff4ca3","html_url":"https://github.com/Skyost/Scriny","commit_stats":null,"previous_names":["skyost/scriny"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/Skyost/Scriny","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Skyost%2FScriny","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Skyost%2FScriny/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Skyost%2FScriny/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Skyost%2FScriny/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Skyost","download_url":"https://codeload.github.com/Skyost/Scriny/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Skyost%2FScriny/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34508862,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-18T02:00:06.871Z","response_time":128,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["evaluation","math","parser","script"],"created_at":"2025-08-06T23:20:10.359Z","updated_at":"2026-06-18T21:31:17.597Z","avatar_url":"https://github.com/Skyost.png","language":"Dart","funding_links":["https://github.com/sponsors/Skyost","https://ko-fi.com/Skyost","paypal.me/Skyost","https://paypal.me/Skyost"],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/Skyost/Scriny/raw/main/scriny.svg\" alt=\"Scriny\" width=\"120\"/\u003e\n\u003c/div\u003e\n\n\u0026nbsp;\n\n**Scriny** is a tiny scripting language for Dart (it's actually the concatenation of \"script\" and \"tiny\").\n\n[![Pub Likes](https://img.shields.io/pub/likes/scriny?style=flat-square)](https://pub.dev/packages/scriny/score)\n[![Pub Points](https://img.shields.io/pub/points/scriny?style=flat-square)](https://pub.dev/packages/scriny/score)\n[![MIT License](https://img.shields.io/badge/License-MIT-yellow.svg?style=flat-square)](#License)\n\n## Features\n\n* Evaluates simple mathematical expressions.\n* Supports variables of type string, number, boolean, list, map, and null.\n* Includes control structures (`if`, `else`, `for`, `while`, etc.).\n* Allows custom top-level functions and variables.\n* Easy to use and integrate.\n\nScriny is already used in two of my projects :\n- [Mathonaut](https://mathonaut.skyost.eu), for parsing and evaluating mathematical expressions.\n- [Révise tes maths !](https://github.com/Skyost/ReviseTesMaths), for a similar purpose.\n\n## Getting Started\n\nAdd Scriny to your project by following the instructions [here](https://pub.dev/packages/scriny/install).\n\n## Usage\n\n### Code\n\nAll the code examples below can be parsed using `ScrinyParser.parseProgram` and executed using\n`run()`.\n\n#### Mathematical expressions\n\nThis evaluates to `9` :\n\n```\n(2 + 1) * 3\n```\n\nThis evaluates to `8` :\n\n```\n2^3\n```\n\nThis evaluates to `true` :\n\n```\n2 == (1 + 1)\n```\n\n\u003e [!NOTE]\n\u003e To negate a boolean, use the classic `!`. You can also use `!=` instead of `==`.\n\nThis evaluates to Dart’s `math.e` :\n\n```\nexp(1)\n```\n\n\u003e [!NOTE]\n\u003e You can find all available built-in functions [here](https://pub.dev/documentation/scriny/latest/scriny/EvaluableFunction-class.html).\n\u003e We'll see how to add custom functions later.\n\n#### Variables\n\nThis returns `8` :\n\n```\na = 10;\nb = -2;\nreturn a + b;\n```\n\nThis throws an error :\n\n```\na = 10;\nb = -2;\ndelete a;\nreturn a + b;\n```\n\nThis returns `\"Hello world !\"` :\n\n```\nlist = [\"Hello\"];\nmap = {\"w\": \"world\"};\nreturn list[0] + \" \" + map[\"w\"] + \" !\";\n```\n\n#### Control statements\n\nThis evaluates to `1` :\n\n```\nif (true) {\n  return 1;\n} else {\n  return 2;\n}\n```\n\nThis prints `0` to `9` and returns `null` :\n\n```\nfor (i in range(10)) {\n  print(i);\n}\n```\n\n\u003e [!NOTE]\n\u003e If you don't return a value in your script, then `null` is returned.\n\u003e This is not the case for simple expressions (eg. `1 + 1` returns `2` once evaluated).\n\nThis returns `1998` :\n\n```\nn = 0;\nwhile (true) {\n  n = n + 1;\n  if (n == 1998) {\n    break;\n  }\n}\nreturn n;\n```\n\nThis returns `[2, 4]` :\n\n```\nlist = [];\nlist = list + [1, 2, 3];\ndelete list[0];\nlist[1] = 4;\nreturn list;\n```\n\n#### Custom top-level variables and functions\n\nAdding custom top-level constants, variables and functions to Scriny is straightforward.\nAll you have to do is to provide a custom `EvaluationContext` to `ScrinyParser.parseProgram`.\n\nCheck out the example on [pub.dev](https://pub.dev/packages/Scriny/example), and see the\n[`EvaluationContext`](https://pub.dev/documentation/scriny/latest/scriny/EvaluationContext-class.html)\nclass documentation for more information.\n\n### Interpreter\n\nScriny comes with a built-in interpreter ! If you have a Scriny script file, you can run it with :\n\n```bash\ndart run scriny --file=\u003cpath\u003e\n```\n\nIf your script consists of a single line, you can run it with :\n\n```bash\ndart run scriny --code=\"\u003cyour_code\u003e\"\n```\n\n## License\n\nThis project is licensed under the [MIT License](https://github.com/Skyost/Scriny/blob/main/LICENSE).\n\n## Contributions\n\nThere are many ways you can contribute to this project :\n\n* [Fork it](https://github.com/Skyost/Scriny/fork) on GitHub.\n* [Submit an issue](https://github.com/Skyost/Scriny/issues/new/choose) for a feature request or bug report.\n* [Donate](https://paypal.me/Skyost) to support the developer.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskyost%2Fscriny","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskyost%2Fscriny","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskyost%2Fscriny/lists"}