{"id":13610031,"url":"https://github.com/anaseto/goal","last_synced_at":"2025-04-12T22:32:30.127Z","repository":{"id":154541150,"uuid":"630569757","full_name":"anaseto/goal","owner":"anaseto","description":"Goal, an embeddable scripting array language. (mirror repository)","archived":true,"fork":false,"pushed_at":"2023-08-23T08:40:10.000Z","size":1798,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-07T16:41:50.624Z","etag":null,"topics":["array-language","functional-language","go","golang","programming-language"],"latest_commit_sha":null,"homepage":"https://codeberg.org/anaseto/goal","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/anaseto.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","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}},"created_at":"2023-04-20T16:58:41.000Z","updated_at":"2024-01-10T15:43:45.000Z","dependencies_parsed_at":"2024-04-16T08:30:52.147Z","dependency_job_id":"8c770066-abcf-40c2-99b0-62ddd9bdd412","html_url":"https://github.com/anaseto/goal","commit_stats":null,"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anaseto%2Fgoal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anaseto%2Fgoal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anaseto%2Fgoal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anaseto%2Fgoal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anaseto","download_url":"https://codeload.github.com/anaseto/goal/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248641182,"owners_count":21138160,"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":["array-language","functional-language","go","golang","programming-language"],"created_at":"2024-08-01T19:01:40.523Z","updated_at":"2025-04-12T22:32:29.649Z","avatar_url":"https://github.com/anaseto.png","language":"Go","readme":"**Mirror closed because of 2FA, now only at https://codeberg.org/anaseto/goal**\n\n# Goal\n\n[![pkg.go.dev](https://pkg.go.dev/badge/codeberg.org/anaseto/goal.svg)](https://pkg.go.dev/codeberg.org/anaseto/goal)\n[![godocs.io](https://godocs.io/codeberg.org/anaseto/goal?status.svg)](https://godocs.io/codeberg.org/anaseto/goal)\n\nGoal is an embeddable array programming language with a bytecode interpreter,\nwritten in Go. It provides both a command line intepreter (that can be used in\nthe REPL), and a library interface. The core features are mostly there and\ntested, so Goal is usable both for writing useful short scripts and playing\nwith the REPL. User testing and bug reports are welcome!\n\nLike in most array programming languages, Goal's builtins vectorize operations\non immutable arrays, and encourage a functional style for control and data\ntransformations, supported by a simple dynamic type system with little\nabstraction, and mutable variables (but no mutable values).\n\nIt's main distinctive features are as follows:\n\n* Syntax inspired mainly from the K language, but with quite a few deviations.\n  For example, backquotes produce Go-like raw strings instead of symbols,\n  `rx/\\s+/` is a compile-time regular expression literal, and there is\n  Perl-style string interpolation. On the other side, there are no tacit\n  compositions, and digraph operator verbs and adverbs are gone or done\n  differently (except for global assignment with ::).\n* Primitive semantics are both inspired from the\n  [ngn/k](https://codeberg.org/ngn/k) variant of the K language and\n  [BQN](https://mlochbaum.github.io/BQN/index.html). For example, group by,\n  classify, shifts, windows, binary search and occurrence count take after\n  BQN's semantics, but free-form immutable arrays, dictionaries and adverbs\n  take after K.\n* Unlike in typical array languages, strings are atoms, and common string\n  handling functions have been integrated into the primitives, including\n  regular expression functions. Primitives acting on whole strings are\n  Unicode-aware (like case-folding or Unicode properties in regexps).\n* Error handling makes a distinction between fatal errors (panics) and\n  recoverable errors which are handled as values.\n* Integrated support for csv, json, time handling, and basic math.\n* Simple IO: read/write files, run commands/pipes, open filehandles.\n* Easily embeddable and extensible in Go.\n* Array performance is quite decent, with specialized algorithms depending on\n  inputs (type, size, range), and variable liveness analysis that reduces\n  cloning by reusing dead immutable arrays (in code with limited branching).\n  However, it is not a goal to reach state-of-the-art (no SIMD, and no bit\n  booleans, fitting integers in arrays using either uint8 or int64 elements).\n+ Scalar performance is typical for a bytecode-compiled interpreter (without\n  JIT), somewhat slower than a C bytecode interpreter: value representation is\n  less compact than how it could be done in C, but Goal does have unboxed\n  integers and floats.\n\nIf this list is not enough to satisfy your curiosity, have a look at the [why\nsection](https://anaseto.codeberg.page/goal/chap-FAQ.html#why) of the FAQ.  You\ncan also read the [Credits.md](Credits.md) to know about main inspiration\nsources for the language. Last, but not least, there are some [implementation\nnotes](docs/Implementation.md) too.\n\n# Install\n\nTo install the command line interpreter, first do the following:\n\n* Install the [go compiler](https://golang.org/).\n* Add `$(go env GOPATH)/bin` to your `$PATH` (for example `export PATH=\"$PATH:$(go env GOPATH)/bin\"`).\n\nThen you can build the intepreter with:\n\n\tgo install ./cmd/goal\n\nAlternatively, you may type `go build -o /path/to/bin/goal ./cmd/goal` to put\nthe resulting binary in a custom location in your $PATH.\n\nThe `goal` command should now be available. Type `goal --help` for command-line\nusage.\n\nTyping just `goal` opens the REPL. For a better experience using the REPL (to\nget typical keyboard shortcuts), you can install the readline wrapper `rlwrap`\nprogram (available as a package in most systems), and then use instead `rlwrap\ngoal`.\n\n# Links\n\n* [Goal docs](https://anaseto.codeberg.page/goal/) : work-in-progress\n  documentation for Goal.\n* [vim-goal](https://codeberg.org/anaseto/vim-goal) : vim files for Goal.\n* [APL Farm](https://matrix.to/#/#aplfarm:matrix.org) : chat about array\n  languages.\n\n# Documentation\n\nIn addition to the work-in-progress [documentation\nwebsite](https://anaseto.codeberg.page/goal/), you might be interested in the\n[Changelog](Changes.md) changes between releases. The REPL help is also\navailable in text form here at [docs/help.txt](docs/help.txt).\n\n# Examples\n\nA few short examples can be found in the `examples` and `testdata/scripts`\ndirectory. Because the latter are used for testing, they come along an expected\nresult after a `/RESULT:` comment.\n\nAlso, various code generation scripts in the toplevel `scripts` directory are\nwritten in Goal.\n","funding_links":[],"categories":["Uncategorized"],"sub_categories":["Uncategorized"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanaseto%2Fgoal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanaseto%2Fgoal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanaseto%2Fgoal/lists"}