{"id":25697135,"url":"https://github.com/SirusCodes/AntiLang","last_synced_at":"2025-02-25T02:03:22.456Z","repository":{"id":277194926,"uuid":"925965526","full_name":"SirusCodes/AntiLang","owner":"SirusCodes","description":"SirusCodes/anti-lang","archived":false,"fork":false,"pushed_at":"2025-02-19T18:24:45.000Z","size":109,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-19T19:31:43.108Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/SirusCodes.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-02T07:35:10.000Z","updated_at":"2025-02-19T18:25:39.000Z","dependencies_parsed_at":"2025-02-12T17:36:48.249Z","dependency_job_id":null,"html_url":"https://github.com/SirusCodes/AntiLang","commit_stats":null,"previous_names":["siruscodes/antilang"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SirusCodes%2FAntiLang","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SirusCodes%2FAntiLang/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SirusCodes%2FAntiLang/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SirusCodes%2FAntiLang/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SirusCodes","download_url":"https://codeload.github.com/SirusCodes/AntiLang/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240587472,"owners_count":19825005,"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":[],"created_at":"2025-02-25T02:01:46.191Z","updated_at":"2025-02-25T02:03:22.433Z","avatar_url":"https://github.com/SirusCodes.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"![Website](https://img.shields.io/website?url=https%3A%2F%2Fsiruscodes.github.io%2FAntiLang%2F\u0026style=flat\u0026label=Online%20interpreter)\n![GitHub Release](https://img.shields.io/github/v/release/SirusCodes/AntiLang?style=flat)\n\n# AntiLang - breaking all the conventions\n\n\u003e [!CAUTION]  \n\u003e For your own sanity, please don't use this language.\n\nAll modern programming languages are very similar. All the ifs, elses, and loops look the same with some minor syntax changes.  \nI was bored with them as they were not fun or interesting enough, hence **AntiLang**.\n\nIt **reverses** the structure of all the conditionals, loops, functions, everything, while keeping all the operators intact (I'm not that evil🙂). So get ready for some mind-bending coding that will make your brain do the FizzBuzz dance. 💃\n\nBelow is the syntax of the **FizzBuzz** program in **AntiLang**. \n\n\u003e [!WARNING]  \n\u003e May cause headaches and/or existential crises.\n\n```\n{} main func [\n    ,100 = count let\n    ,0 = i let\n\n    {count \u003e i} while [\n        {i % 3 == 0 \u0026\u0026 i % 5 == 0} if [\n            ,{$It’s a FizzBuzz moment, boys!$}print\n        ] {i % 3 == 0} if else [\n            ,{$Fizz is life, Buzz is overhyped$}print\n        ] {i % 5 == 0} if else [\n            ,{$Buzzfeed has nothing on this$}print\n        ] else [\n            ,{$This is awkward... Why not just $ + i + $?$}print\n        ]\n\n        ,1 += i\n    ]\n\n    ,0 return\n]\n\n,{}main\n```\n\nAny self-respecting developer would skip the rest of the documentation and run the code above immediately. Don't worry, you can run AntiLang directly from your browser - [AntiLang](https://siruscodes.github.io/AntiLang/). See you soon, because you'll need it...\n\n## Table of Contents\n- [AntiLang - breaking all the conventions](#antilang---breaking-all-the-conventions)\n- [How can I try it?](#how-can-i-try-it)\n- [Run it](#run-it)\n- [AntiLang has a REPL 🙀](#antilang-has-a-repl-)\n- [Syntax](#syntax)\n  - [Variable Declaration](#variable-declaration)\n  - [Operators](#operators)\n  - [Data Types](#data-types)\n    - [String](#string)\n    - [Float](#float)\n    - [Array](#array)\n    - [Map](#map)\n  - [Functions](#functions)\n  - [Built-in Functions](#built-in-functions)\n  - [Conditional Flows](#conditional-flows)\n  - [Loops](#loops)\n- [Suggestions](#suggestions)\n- [All the best](#all-the-best)\n\n## How can I try it?\n\nFor those who prefer convenience (and sanity), use the [online interpreter](https://siruscodes.github.io/AntiLang/). (I've spent significant time on this, so please use it!)\n\nI don't know why anyone would want to run this locally, but if you do (I'm not judging you), head over to the [release page](https://github.com/SirusCodes/AntiLang/releases) and get the latest binary for your system. Just remember, with great power comes great responsibility (and possibly a headache).\n\n## Run it\n\nOnce you have [downloaded the binary](#how-can-i-try-it) as per your OS and ARCH you can run AntiLang programs by using `antilang run \u003cfilename\u003e.al` (use `.al` as file extension).\n\nYou can download one of our [samples](https://github.com/SirusCodes/AntiLang/tree/main/sample)\n\n```sh\ncurl -O https://raw.githubusercontent.com/SirusCodes/AntiLang/refs/heads/main/sample/fizzbuzz.al\n\n./antilang run fizzbuzz.al\n```\n\nFor Windows -\n\n```pwsh\nInvoke-WebRequest \"https://raw.githubusercontent.com/SirusCodes/AntiLang/refs/heads/main/sample/fizzbuzz.al\" -Outfile fizzbuzz.al\n\n.\\antilang.exe run .\\fizzbuzz.al\n```\n\n## AntiLang has a REPL 🙀\n\nTo run REPL just run `antilang repl` and it should start REPL (Read Evaluate Print Loop).\n\n## Syntax\n\n### Variable Declaration\n\nIt's a dynamically typed language that supports int, float, string, map, and array.\n\n```\n,\u003cvalue\u003e = \u003cvar name\u003e let\n```\n\nThe declaration starts with a **comma** `,` (because commas are underrated) and ends with **let**. It's like a goodbye wave when you leave a party.\n\n```\n,10 = ten let\n```\n\n### Operators\n\nI thought of keeping these the same as all the other languages, so `a + b` is actually **a + b**, not `a - b` (though I wanted to do that, but I’m not that evil, right?).\n\nSupported operators:\n\n- **+**, **-**, **/**, **\\***, and **%** for arithmetic.\n- **\u0026\u0026**, **||**, and **!** for logical operators.\n- **=**, **+=**, **-=**, **/=**, and **\\***= for assignment.\n- **\u003c**, **\u003e**, **\u003c=**, **\u003e=**, **==**, and **!=** for comparisons.\n\nPS: Assignment operators are reversed to maintain consistency with `let` statements. So, `1 += i` will **increment** `i` by 1 (yeah, I like to keep things spicy).\n\n### Data Types\n\n#### String\n\nStrings are declared with the `$` sign because it's generally used for **string interpolation**, but I like to think of it as giving your strings a fresh haircut.\n\n```\n,$Hello Hell!$ = string let\n```\n\n#### Float\n\nInitially I thought to use `,` for float but ended use using `.` for floats. If you think it was a mistake [let me know](https://github.com/SirusCodes/AntiLang/issues/new).\n\n```\n,3.14 = pi let\n```\n\n#### Array\n\nArrays are declared with **`(`** and **`)`**, and values are **separated by `;`**. You know, just because it's cooler that way.\n\n```\n,(1; $Hello$) = array let\n```\n\nIndices start at **0** (don’t worry, we’re not that cruel). But, you have to specify the index before the variable name!\n\n```\n,(1)array\n```\n\n#### Map\n\nMaps use **`[`** and **`]`** instead of `{}`. Assignment is done using **`=`** instead of `:`. Why? Because why not.\n\n```\n,[$Hello$ = 1; $Hell$ = 6] = map let\n,($Hello$)map\n```\n\n### Functions\n\nFunctions are first-class citizens here in AntiLang. You can pass functions as parameters, like a boss (take that, Java!).\n\nHere's how functions are declared (don’t worry, it gets weird):\n\n```\n{a; b}add func [\n    ,a + b return\n]\n\n,{1; 1}add\n```\n\nTo return values, we use:\n\n```\n,\u003cvalue\u003e return\n```\n\n### Built-in Functions\n\nAntiLang has a small set of built-in functions, and I might add more in the future if you leave me some memes (or suggestions). So far, we support:\n\n- `{array|string}len`: Returns the length of an array or string.\n- `{array}first`: Returns the first element of an array.\n- `{array}last`: Returns the last element of an array.\n- `{array}rest`: Returns the array excluding the first element.\n- `{array; element}push`: Adds an element to the end of an array.\n- `{array}pop`: Removes the last element from an array.\n- `{array; index; element}addAt`: Adds an element at a specified index in an array.\n- `{array; index}removeAt`: Removes an element at a specified index in an array.\n- `{value}print`: Prints the value to the console.\n\n### Conditional Flows\n\nYes, we have `if`, `else`, and `else if` just like any normal language. But here, we like to add a little fun.\n\n```\n{a \u003c b} if [\n    ,{$b is greater$}print\n] {a \u003e b} if else [\n    ,{$a is greater$}print\n] else [\n    ,{$They are the same$}print\n]\n```\n\n### Loops\n\nRight now, AntiLang only supports the **while** loop. I'm too lazy to implement the `for` loop. If this repo gets **100 stars**, I might just go ahead and do it. 🤞\n\nHere’s an example of a **while loop**:\n\n```\n,0 = i let\n{i \u003c= 10} while [\n    ,{i}print\n    ,1 += i\n]\n```\n\n### Suggestions\n\nDo you have a better idea to make this language more interesting? Or just want to send a meme for the fun of it? [Open an issue](https://github.com/SirusCodes/AntiLang/issues/new) and let’s see what we can do to make coding **weirder and funnier**.\n\nOr you can just send a meme. I’ll be fine with that too.\n\n---\n\n### All the best\n\n- AntiLang is all about **reversing logic** but **keeping the operators intact** (well, almost).\n- You’re going to be spending more time figuring out the structure than the logic of your program. #TrueCoderPain\n- If you think the syntax is confusing, just remember: you're probably just not **AntiLang-ready** yet. It'll get easier (maybe). 😅\n  \nGo ahead, give it a [try](https://siruscodes.github.io/AntiLang/), and remember to keep your sanity in check. After all, **AntiLang** is not about getting the job done quickly; it's about having fun while losing your mind. 😜\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSirusCodes%2FAntiLang","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FSirusCodes%2FAntiLang","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSirusCodes%2FAntiLang/lists"}