{"id":22546852,"url":"https://github.com/4nkitd/slang","last_synced_at":"2025-08-08T12:13:55.904Z","repository":{"id":64304096,"uuid":"420198808","full_name":"4nkitd/slang","owner":"4nkitd","description":"slang 🐕‍🦺 | a Programing language written to understand how programing languages are written","archived":false,"fork":false,"pushed_at":"2021-10-23T21:10:49.000Z","size":82,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-02T09:31:25.159Z","etag":null,"topics":["go","golang","programming-language"],"latest_commit_sha":null,"homepage":"https://4nkitd.github.io/slang/","language":"Go","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/4nkitd.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null}},"created_at":"2021-10-22T18:10:48.000Z","updated_at":"2024-02-09T08:10:40.000Z","dependencies_parsed_at":"2023-01-15T10:15:48.821Z","dependency_job_id":null,"html_url":"https://github.com/4nkitd/slang","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4nkitd%2Fslang","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4nkitd%2Fslang/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4nkitd%2Fslang/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4nkitd%2Fslang/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/4nkitd","download_url":"https://codeload.github.com/4nkitd/slang/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245999313,"owners_count":20707554,"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":["go","golang","programming-language"],"created_at":"2024-12-07T15:09:11.360Z","updated_at":"2025-03-28T08:46:31.697Z","avatar_url":"https://github.com/4nkitd.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# slang 🐕‍🦺\n\ngoal was to learn how a interpreter works,  in other works who does these programing languages i use on daily basis works behind the seen  how a variable is assigned it's value and other things in the same realm.\n\n## why Go ?\n\nbefore this i mainly worked with scripting language other than java. the gofmt and binary file output are the main reasons though.\n\n## can i use this language ?\n\n### NO\n\nthis barely even compare to the stepping stones of a daily driven language like go or js. it exists only so that someone can read and understand how a language works under the hood.\n\n---\u003c!-- markdownlint-capture --\u003e\n\n### Main Components of a language\n\n- Token list\n- Tokenizer ( lexer )\n- Parser\n- Compiler\n\n### How to RUN\n\n```bash\n    #file is a flag , use it to run your file\n    slang -file ./sample/sample.so\n```\nOR\n\n```bash\n    slang \n    # running slang in your terminal without any flags gives you a console to work with.\n```\n\n### Supported Datatype \n\n- Boolean\n- Integer\n- String\n\n### How to define a variable\n```\nlet x = 42;\n```\n\n### How to if/else \n\n    Does not support elseif\n\n```\n        if (x == 1) {\n            return true;\n        } else {\n            return false;\n        }\n```\n\n### How to use a function\n```\nlet fibonacci = fn (x) {\n    if (x == 0) {\n        return 0;\n    } else {\n        if (x == 1) {\n            return 1;\n        } else {\n            fibonacci(x - 1) + fibonacci(x - 2);\n        }\n    }\n};\n\nfibonacci(15);\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F4nkitd%2Fslang","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F4nkitd%2Fslang","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F4nkitd%2Fslang/lists"}