{"id":42966881,"url":"https://github.com/pixilcode/tego-lang","last_synced_at":"2026-01-31T00:02:43.867Z","repository":{"id":169530684,"uuid":"203285856","full_name":"pixilcode/tego-lang","owner":"pixilcode","description":"A dynamically-typed functional programming language with linked lists as first class members, written in Rust","archived":false,"fork":false,"pushed_at":"2025-04-17T03:10:56.000Z","size":357,"stargazers_count":2,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-17T17:19:40.146Z","etag":null,"topics":["programming-language"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pixilcode.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.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,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-08-20T02:37:29.000Z","updated_at":"2025-04-17T03:10:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"d19eb5ad-31ff-4e9d-acc6-802e546f3ef0","html_url":"https://github.com/pixilcode/tego-lang","commit_stats":null,"previous_names":["pixilcode/tego-lang"],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/pixilcode/tego-lang","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixilcode%2Ftego-lang","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixilcode%2Ftego-lang/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixilcode%2Ftego-lang/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixilcode%2Ftego-lang/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pixilcode","download_url":"https://codeload.github.com/pixilcode/tego-lang/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixilcode%2Ftego-lang/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28923752,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-30T22:32:35.345Z","status":"ssl_error","status_checked_at":"2026-01-30T22:32:31.927Z","response_time":66,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["programming-language"],"created_at":"2026-01-31T00:02:42.971Z","updated_at":"2026-01-31T00:02:43.853Z","avatar_url":"https://github.com/pixilcode.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tego Language\n\nTego is a functional programming language designed for simplicity, pattern matching, and extensibility. It features a REPL, a parser, and an interpreter, allowing users to write, evaluate, and execute Tego programs interactively or from files.\n\n## Features\n\n- **Pattern Matching**: Supports matching over tuples, integers, booleans, characters, and strings.\n- **Functional Programming**: Includes lambda expressions, function application, and higher-order functions.\n- **Custom Types**: Allows defining and matching custom types and tuples.\n- **Commands and IO**: Provides commands (IO monads) for interacting with the environment, including `println`, `readLine`, and `readInt`.\n- **Error Handling**: Offers detailed and user-friendly parsing and runtime error messages.\n- **Boxed Values**: Supports boxed values for grouping and manipulation.\n- **REPL**: Interactive Read-Eval-Print Loop for testing and experimenting with Tego code.\n- **File Execution**: Run `.tgo` files directly from the command line.\n\n## Installation\n\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/theDragonFire/tego-lang.git\n   cd tego-lang\n   ```\n\n2. Build the project using Cargo:\n   ```bash\n   cargo build --release\n   ```\n\n3. The compiled binary will be available in the `target/release` directory.\n\n## Usage\n\n### REPL\n\n*WIP*\n\nStart the interactive REPL:\n```bash\ncargo run -- repl\n```\n\nExample session:\n```\nWelcome to\n   /\\\n  //\\\\\n //||\\\\  _   __   ___\n   ||  ||_| / || // \\\\\n   ||  ||_  \\_|| \\\\_//\n            \\_||       \n\nType ':q' or ':quit' to exit\n\n\u003e\u003e let a = 1\n\u003e\u003e a + 2\n3 : Int\n```\n\n### Running Files\n\nRun a `.tgo` file:\n```bash\ncargo run -- run path/to/file.tgo\n```\n\nExample:\n```bash\ncargo run -- run tego/examples/addOne.tgo\n```\n\n\n## Language Syntax\n\n### Declarations\n\n```tego\nval = 1\nid a = a\nconst a _ = a\n```\n\n### Expressions\n\n- **If Expressions**:\n  ```tego\n  if a \u003e 1 then \"greater\" else \"lesser\"\n  ```\n\n- **Match Expressions**:\n  ```tego\n  match a to\n  | 1 -\u003e \"one\"\n  | _ -\u003e \"other\"\n  ```\n\n- **Lambda Functions**:\n  ```tego\n  fn a -\u003e a + 1\n  ```\n\n### Commands\n\n`do` expressions chain commands together for IO operations.\n\n- `return a`: Wraps a value in a command.\n- `println a`: Prints a value followed by a newline.\n- `readLine`: Reads a line from standard input.\n- `readInt`: Reads an integer from standard input. (WIP)\n\n## Examples\n\n### Hello World\n\n```tego\nmain = \"Hello, World!\"\n```\n\n### Factorial\n\n```tego\nfactorial n =\n  match n to\n  | 0 -\u003e 1\n  | _ -\u003e n * factorial (n - 1)\n```\n\n### Fibonacci\n\n```tego\nfib n =\n  match n to\n  | 0 -\u003e 0\n  | 1 -\u003e 1\n  | _ -\u003e fib (n - 1) + fib (n - 2)\n```\n\n## Development\n\n### Running Tests\n\nRun the test suite:\n```bash\ncargo test\n```\n\n### Project Structure\n\n- **`tego_parser`**: Handles parsing of Tego code into an abstract syntax tree (AST).\n- **`tego_interpreter`**: Evaluates the AST and executes commands.\n- **`tego`**: CLI for running the REPL or executing files.\n\n### Contributing\n\nContributions are welcome! Please open an issue or submit a pull request.\n\n## License\n\nThis project is licensed under the GPL3 License. See the [LICENSE](LICENSE) file for details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpixilcode%2Ftego-lang","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpixilcode%2Ftego-lang","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpixilcode%2Ftego-lang/lists"}