{"id":28763249,"url":"https://github.com/glimmr-lang/piccodescript","last_synced_at":"2025-06-17T09:08:00.953Z","repository":{"id":295058165,"uuid":"988893050","full_name":"Glimmr-Lang/PiccodeScript","owner":"Glimmr-Lang","description":"A simple functional scripting language created in java","archived":false,"fork":false,"pushed_at":"2025-06-16T15:01:54.000Z","size":585,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-16T16:20:37.563Z","etag":null,"topics":["compiler","functional","functional-programming","interpreter","java","jvm","jvm-languages","language","script","scripting-language"],"latest_commit_sha":null,"homepage":"https://picasso-releases.fly.dev/piccodescript/","language":"Java","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/Glimmr-Lang.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-23T08:31:36.000Z","updated_at":"2025-06-16T15:01:57.000Z","dependencies_parsed_at":"2025-05-23T13:18:59.391Z","dependency_job_id":"caa4e77c-afe4-4e02-9751-c44386969278","html_url":"https://github.com/Glimmr-Lang/PiccodeScript","commit_stats":null,"previous_names":["glimmr-lang/piccodescript"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Glimmr-Lang/PiccodeScript","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Glimmr-Lang%2FPiccodeScript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Glimmr-Lang%2FPiccodeScript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Glimmr-Lang%2FPiccodeScript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Glimmr-Lang%2FPiccodeScript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Glimmr-Lang","download_url":"https://codeload.github.com/Glimmr-Lang/PiccodeScript/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Glimmr-Lang%2FPiccodeScript/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260326760,"owners_count":22992385,"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":["compiler","functional","functional-programming","interpreter","java","jvm","jvm-languages","language","script","scripting-language"],"created_at":"2025-06-17T09:08:00.208Z","updated_at":"2025-06-17T09:08:00.914Z","avatar_url":"https://github.com/Glimmr-Lang.png","language":"Java","readme":"# PiccodeScript\n\n\u003e A simple interpreted, functional programming language.\n\n## Why?\n\nPiccodeScript started as a dsl for an image editor (Picasso Code) I was building, and overtime \nI fell in love with the simple syntax and I wanted to make to its own project, possibly for \nembedding in my java programs or for general scripting. \n\n## Installation\n\u003e\u003e TODO:\n\n## Example\n\n###### Hello World \n```js\nimport std.io\n\nfunction main() = IO.println(\"Hello, world\")\n\nmain()\n```\n\n###### Factorial\n\n```js\nimport std.io\n\nfunction fact(x=1) = \n  when x {\n    is 0 -\u003e 1\n    is 1 -\u003e 1\n    else -\u003e x * fact(x - 1)\n  }\n```\n\n## Embedding API\n\nTo use the language in your project simply add it your `pom.xml` file as a dependency:\n\n\n```xml\n\u003crepositories\u003e\n\t\u003crepository\u003e\n\t\t\u003cid\u003ejitpack.io\u003c/id\u003e\n\t\t\u003curl\u003ehttps://jitpack.io\u003c/url\u003e\n\t\u003c/repository\u003e\n\u003c/repositories\u003e\n\n\u003cdependency\u003e\n\t\u003cgroupId\u003ecom.github.Glimmr-Lang\u003c/groupId\u003e\n\t\u003cartifactId\u003ePiccodeScript\u003c/artifactId\u003e\n\t\u003cversion\u003eTag\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n and then add the following code to your solution:\n\n```java\nCompiler.compile(\"function zero() = 0\")\n```\n\nIf you want to get a list of AST nodes do this:\n\n```java\nCompiler.prepareGlobalScope();\nList\u003cAst\u003e nodes = Compiler.parse(input);\n\n// Then you can execute them or do what you want\nfor (var expr: nodes) {\n\texpr.execute();\n}\n```\n\nTo add symbols to the current scope you can do the following: \n\n```java\nContext.top.putLocal(\"hello\", new PiccodeString(\"Hello, world\"));\n\nCompiler.compile(\"hello + 20\"); // concate hello, world and 20 \n```\n\n## Inspired by\n- Lua  - The simplicity\n- Rust - The flexibility\n- SML  - Functional programming concepts\n\n\n\n\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglimmr-lang%2Fpiccodescript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fglimmr-lang%2Fpiccodescript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglimmr-lang%2Fpiccodescript/lists"}