{"id":25865236,"url":"https://github.com/aziis98/ergolas","last_synced_at":"2026-06-08T12:32:42.014Z","repository":{"id":185778092,"uuid":"656407491","full_name":"aziis98/ergolas","owner":"aziis98","description":"an Embeddable Random GOlang LAnguage for Scripting","archived":false,"fork":false,"pushed_at":"2023-06-21T06:56:40.000Z","size":25,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-02T01:37:26.891Z","etag":null,"topics":["embeddable-scripting-language","golang","library","programming-language"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aziis98.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":"2023-06-20T22:35:59.000Z","updated_at":"2024-01-10T16:02:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"5186cd81-20e6-4591-924e-d862c00ff236","html_url":"https://github.com/aziis98/ergolas","commit_stats":null,"previous_names":["aziis98/ergolas"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/aziis98/ergolas","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aziis98%2Fergolas","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aziis98%2Fergolas/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aziis98%2Fergolas/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aziis98%2Fergolas/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aziis98","download_url":"https://codeload.github.com/aziis98/ergolas/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aziis98%2Fergolas/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34063150,"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-08T02:00:07.615Z","response_time":111,"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":["embeddable-scripting-language","golang","library","programming-language"],"created_at":"2025-03-02T01:34:05.016Z","updated_at":"2026-06-08T12:32:41.996Z","avatar_url":"https://github.com/aziis98.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ergolas (WIP)\n\nThis is just an **e**mbeddable **r**andom **go**lang **la**nguage for **s**cripting. Recently I use Golang very often and sometimes I want to add some extensibility features to my projects using some kind of scripting languages or DSL so I made this mini language for experimenting. There is an included tree walking interpreter but I plan to make it really easy to just parse an expression and get an AST to evaluate with a custom interpreter. \n\nThe syntax is very simple and pretty general and inherits many things from [Lisp](https://en.wikipedia.org/wiki/Lisp_(programming_language)), [REBOL](http://www.rebol.com/)/[Red](https://www.red-lang.org/) and [Julia](https://julialang.org/).\n\n```lua\nprintln \"Hello, World!\"\n```\n\n## Features\n\n- [ ] Parser\n    - [x] Function calls without parentheses\n    - [x] Property access\n    - [x] Quoted forms\n    - [x] Binary operators\n    - [x] Quasi-quotes with `:` for quoting and `$` for unquoting (might change `:` to `#` and comments to `//`)\n    - [ ] Unary operators\n    - [ ] String templating (for now missing, maybe something can be done just using quasiquotes)\n- [ ] Interpreter\n    - [ ] Simple tree walking interpreter\n        - [x] Basic operators and arithmetic\n        - [x] Basic printing and exiting\n        - [x] Basic variable assignment\n        - [ ] Lexical scoping\n        - [ ] Control flow\n        - [ ] Objects and complex values\n        - [ ] Dynamic scoping\n        - [ ] Hygienic macros\n    - [ ] More advanced interpreters...\n- [ ] Easily usable as a library\n- [ ] Small standard library\n- [ ] Interop from and with Go\n- [ ] Tooling\n    - [ ] Syntax highlighting for common editors\n    - [ ] `PKGBUILD` for easy global installation on Arch Linux thorough GitHub releases (mostly for trying this out with GitHub Actions)    \n\n## Usage\n\nTo try this out in a REPL (with colors!)\n\n```bash shell\n$ go run ./cmd/repl\n```\n\n## Reference\n\n### Literals\n\n```perl\n# Integer\n1\n\n# Decimal\n3.14\n\n# Identifier\nan-Example_identifier\n\n# String\n\"an example string\"\n\n# List (?) (not implemented)\n[1 2 3 4 5] # equivalent to \"List 1 2 3 4 5\"\n\n# Maps (?) (not implemented)\n{ a -\u003e 1, b -\u003e 2, c -\u003e 3 }\n```\n\n### Comments\n\n```perl\n\n# This is an inline comment\n\n```\n\n### Functions\n\nFunction call don't require parentheses if they \n\n```perl\n# [x] Parses ok, [x] Evals ok\nprintln \"a\" \"b\" c\" \n```\n\n```perl\n# [x] Parses ok, [x] Evals ok\nexit 1\n```\n\n### Anonymous Functions\n\n```perl\n# [x] Parses ok, [ ] Evals ok\n\n# anonymous function with params\nmy-func := fn x y { x + y }\n```\n\n```perl\n# [ ] Parses ok, [ ] Evals ok\n\n# anonymous lexical block without params, can be called with a context\nmy-block := { x + y }\nctx := Map [ x -\u003e 1, y -\u003e 2 ]\ncall my-block ctx\n```\n\n### Operators\n\nThe following binds \"a\" to 9, arithmetic operators don't have any precedence and are all left associative. There are a only a few right associative operators that for now just are `:=`, `::` even if only `:=` is used for binding variables, `::` will later be used to tell the type of variables.\n\n```perl\n# [x] Parses ok, [x] Evals ok\na := 1 + 2 * 3\n```\n\n#### Overloading\n\n```perl\n# [x] Parses ok, [ ] Evals ok\noperator lhs ++ rhs {\n    return List.join lhs rhs\n}\n```\n\n### Quotes\n\n```perl\n# [x] Parses ok, [ ] Evals ok\na := (1 + 1) # 2\nb := :(1 + 1) # :(1 + 1)\n```\n\n### Misc\n\nSome more examples and ideas for the language syntax and semantics\n\n```perl\n# [x] Parses ok, [ ] Evals ok\nlen := (v.x ^ 2) + (v.y ^ 2)\n\n# [x] Parses ok, [ ] Evals ok\nif { a \u003e b } {\n    println \"True case\"\n} {\n    println \"False case\" \n}\n\n# [x] Parses ok, [ ] Evals ok\nmy-list-1 := list 1 2 3 4 5\n\n# [x] Parses ok, [ ] Evals ok\nfor item my-list-1 {\n    printfln \"item = {}\" item\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faziis98%2Fergolas","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faziis98%2Fergolas","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faziis98%2Fergolas/lists"}