{"id":21068475,"url":"https://github.com/matheusfillipe/mangle","last_synced_at":"2025-07-01T15:09:32.391Z","repository":{"id":56899535,"uuid":"475189489","full_name":"matheusfillipe/mangle","owner":"matheusfillipe","description":"Exolang that can take any utf8 text as valid code and return some result out of it","archived":false,"fork":false,"pushed_at":"2022-04-06T00:15:23.000Z","size":82,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-16T03:35:58.635Z","etag":null,"topics":["exolang","interpreter","joke","programming-language","pyo3","python","repl","rust","scripting-language","word-counter"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/matheusfillipe.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}},"created_at":"2022-03-28T21:48:06.000Z","updated_at":"2023-02-03T11:34:20.000Z","dependencies_parsed_at":"2022-08-20T17:40:44.189Z","dependency_job_id":null,"html_url":"https://github.com/matheusfillipe/mangle","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/matheusfillipe/mangle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matheusfillipe%2Fmangle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matheusfillipe%2Fmangle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matheusfillipe%2Fmangle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matheusfillipe%2Fmangle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/matheusfillipe","download_url":"https://codeload.github.com/matheusfillipe/mangle/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matheusfillipe%2Fmangle/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261032034,"owners_count":23100046,"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":["exolang","interpreter","joke","programming-language","pyo3","python","repl","rust","scripting-language","word-counter"],"created_at":"2024-11-19T18:22:04.267Z","updated_at":"2025-07-01T15:09:32.368Z","avatar_url":"https://github.com/matheusfillipe.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Website](https://img.shields.io/badge/website-mangle.ga-blue.svg)](https://mangle.ga)\n[![Pypi](https://badge.fury.io/py/mangle.svg)](https://pypi.org/project/mangle/)\n[![Crates.io](https://img.shields.io/crates/v/mangle.svg)](https://crates.io/crates/mangle)\n[![Chat with me on irc](https://img.shields.io/badge/-IRC-gray?logo=gitter)](https://mangle.ga/irc)\n[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/matheusfillipe/mangle/master/LICENSE)\n[![CircleCI Build Status](https://circleci.com/gh/matheusfillipe/mangle.svg?style=shield)](https://circleci.com/gh/matheusfillipe/mangle)\n[![codecov](https://codecov.io/gh/matheusfillipe/mangle/branch/master/graph/badge.svg)](https://codecov.io/gh/matheusfillipe/mangle)\n\n### WIP: This is a work in progress, there is nothing working yet\n\n# Mangle\n\nAn exolang (A scripting programming language just for fun) without any reserved keywords that can run any utf8 compatible with more than 2 space separated words on it.\n\n## Installation\n\n`cargo install mangle`\n\n\n### Python bindings\n\nPython bindings are available for python \u003e 3.7. You can install them with:\n\n`pip install mangle`\n\nThen you can get started evaluating mangle from python with:\n\n```python\nimport mangle\nmangle.eval(\"cat is fat\")\n\u003e\u003e '5'\n```\n\nMore info at: https://github.com/matheusfillipe/mangle/tree/master/python\n\n## How it works\nThere are only labels, variables and operators. All variables are globally scoped, there are no locals, classes or anything fancy. All variables are dynamically typed and shadowed.\n\n### Sentences\nThe only type of scope is sentences. Sentences are like english sentences, any text that comes before the punctuation marks: `.,;:?!`. All the other symbols will be interpreted as variable names, operators, labels, strings or numbers.\n\nIf a text has none of those punctuation marks it will run as a single sentence.\n\n### Sentence Labels\nThe label of a sentence is the last word before the punctuation mark except by the first sentence. Labels are the way to have subroutines on this language. They define a scope with a body that you can `goto` from any other subroutine. \n\nThe first sentence on the interpreted code is the equivalent of the main function in another languages, so it has no need for a label. If the first sentence doesn't call any function, all the others labels will execute in the order they are until you exit or jump to another label.\n\n\n### Data Types\nThe only types are strings, ints and stacks.\n\n#### Int\nThe `length of a word - 1` define its numerical value. For example \"a\" evaluates to 0 and \"cat\" to 2.\n\n#### Strings\nThe words themselves can be also interpreted as strings. You can't easily build multiword strings like \"a bird\" though since that would read as: `\"a` and `bird\"` each as individual words.\n\n#### Stacks\nStrings themselves are a stack of ints that the interpreter itself decodes at runtime. You can add ints to a stack by adding to its variable. \n\nWIP...\n\n\n## Operator\nOperators are defined by the word's length. Here is the table of operators on this language\n\n| Word Length | Operator | syntax                      | Example    | Description                     |\n|:-----------:|:--------:|:---------------------------:|:----------:|:-------------------------------:|\n| 1           |          |                             |            |                                 |\n| 2           | Assign   | _OP_ **receiver** **Value** | is cat fat | Assigns variable cat to value 3 |\n| 3           |          |                             |            |                                 |\n| 4           |          |                             |            |                                 |\n| 5           |          |                             |            |                                 |\n| 6           |          |                             |            |                                 |\n| 7           |          |                             |            |                                 |\n| 8           |          |                             |            |                                 |\n| 9           |          |                             |            |                                 |\n| 10          |          |                             |            |                                 |\n| 11          |          |                             |            |                                 |\n\n\n## But then spaces are keywords heh?\nWell... In some interpretation yes, I guess I lied then, sorry about it. You can still pass the `-F` argument to change the word separator (like field separator in awk) to any other character.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatheusfillipe%2Fmangle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatheusfillipe%2Fmangle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatheusfillipe%2Fmangle/lists"}