{"id":42618701,"url":"https://github.com/gab-language/cgab","last_synced_at":"2026-01-29T04:13:44.875Z","repository":{"id":48152204,"uuid":"499701993","full_name":"gab-language/cgab","owner":"gab-language","description":"A small, embeddable, and extensible scripting language.","archived":false,"fork":false,"pushed_at":"2026-01-14T03:34:22.000Z","size":96637,"stargazers_count":7,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-14T07:01:37.892Z","etag":null,"topics":["interpreter","programming-language"],"latest_commit_sha":null,"homepage":"https://gab-language.github.io/site/","language":"C","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/gab-language.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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}},"created_at":"2022-06-04T02:16:08.000Z","updated_at":"2025-11-17T19:08:18.000Z","dependencies_parsed_at":"2024-03-15T22:31:23.297Z","dependency_job_id":"14b4944e-a258-4cba-9dc5-75443e83950b","html_url":"https://github.com/gab-language/cgab","commit_stats":null,"previous_names":["teddyrandby/cgab","gab-language/cgab"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/gab-language/cgab","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gab-language%2Fcgab","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gab-language%2Fcgab/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gab-language%2Fcgab/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gab-language%2Fcgab/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gab-language","download_url":"https://codeload.github.com/gab-language/cgab/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gab-language%2Fcgab/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28862142,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-28T22:56:21.783Z","status":"online","status_checked_at":"2026-01-29T02:00:06.714Z","response_time":59,"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":["interpreter","programming-language"],"created_at":"2026-01-29T04:13:44.233Z","updated_at":"2026-01-29T04:13:44.867Z","avatar_url":"https://github.com/gab-language.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Gab\nGab is a dynamic scripting language. It's goals are:\n- be *simple* - in design and implementation. \n- be *fast*. Performance is a feature.\n- be *embeddable*. The c-api should be stable, simple, and productive.\nFor in-depth documentation and exploration, see [gab's website](https://gab-language.github.io/site/).\n## Inspiration\nGab is heavily inspired by [Clojure](https://clojure.org), [Self](https://selflanguage.org/), [Lua](https://www.lua.org/), and [Erlang](https://www.erlang.org/).\n```gab\nspawn_task = (i) =\u003e do\n    Fibers.make () =\u003e do\n        Strings\n            .make('Hello from ', i)\n            .println\n    end\nend\n\nRanges\n    .make(0 20000)\n    .each spawn_task\n```\n### Project Structure\nThere are several sub-projects within this repository.\n- The first is `cgab`, a static c-library which provides the functionality of the Gab language itself. The source files for this library are in `src/cgab`.\n- The second is `gab`, the cli tool which *depends on* `cgab`, and provides an interface to the programmer for running and compiling Gab code. The source files are found in `src/gab`.\n- The third is a collection of builtin c-modules, the source files for which are found in `src/mod`. Each of these files is a unique Gab c-module, and are compiled independantly from one another.\n- The fourth is a collection of builtin Gab modules, the source files for which are found in `mod/`. These files are installed alongside the dynamic c-modules above when installing a version of Gab with `gab get`\n- There are two other Gab modules `repl` and `lsp`, which are likely to be broken out into their own repos in the future.\n#### TODO:\n- [ ] Instead of malloc/free, write a custom per-job allocator. This can function like a bump allocator, and can enable further optimizations:\n    - allocate-as-dead. Objects that *survive* their first collection are *moved* out of the bump allocator, and into long term storage.\n        This can work because we are __guaranteed__ to visit all the roots that kept this object alive in that first collection.\n    - Moving objects is not safe (we can't traverse all pointers in c-code). The allocate-as-dead strategy is still useful,\n        but will need to adjust how locking works (which right now, delays drefing objects until \"unlock\" is called)\n    - Interestingly, it is known at object-creation time whether it is movable or not. Maybe this can be used to choose a specific allocation strategy.\n- [ ] Optimize shape datastructure.\n    - Shapes are mutable because of their ugly transition vector\n    - Building big shapes (like for tuples) is basically traversing a linked list in O(n) time (ugly)\n    - Include some optimizations for records, like popping values, swapping shapes with the same value, etc.\n        - A *pop_front* operation can point to the same underlying record, just with a different shape! (And some sort of tombstone thing) \n- [ ] Optimize string interning datastructure.\n    - Hashmap works well enough, but copies a lot of data and makes concat/slice slow.\n- [ ] JIT Compilation (need I say more)\n    - Copy-and-patch JIT compiler? Refactoring VM.c via macros to write into stencils\n# Dependencies\nlibc is the only dependency.\n# Installation\nThis project is built with `Make`. The `Makefile` expects some environment variables to be present. Specifically:\n  - `GAB_PREFIX`: A place for gab to install data without root. This is for packages and other kinds of things. Something like `/home/\u003cuser\u003e`\n  - `GAB_INSTALLPREFIX`: Where gab should install itself - the executable, header files, libcgab, etc. Something like `/usr/local`\n  - `GAB_CCFLAGS`: Additional flags ot pass to the c compiler.\n[Clide](https://github.com/TeddyRandby/clide) is a tool for managing shell scripts within projects. cgab uses it to manage useful scripts and build configuration. To configure and install with clide, run `clide install` and complete the prompts.\nIf clide is unavailable, it is simple to just use make. To install a release build:\n  1. `GAB_PREFIX=\"\u003cpath\u003e\" GAB_INSTALL_PREFIX=\"\u003cpath\u003e\" GAB_CCFLAGS=\"-O3\" make build`\n  2. `sudo make install`\n# C-API Documentation\nThe c-api is contained in the single header file `gab.h`. You can generate documentation with `clide docs`, or by just running `doxygen`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgab-language%2Fcgab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgab-language%2Fcgab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgab-language%2Fcgab/lists"}