{"id":19975480,"url":"https://github.com/bemwamalak/kemet","last_synced_at":"2026-01-04T23:01:31.106Z","repository":{"id":87226844,"uuid":"528447139","full_name":"BemwaMalak/Kemet","owner":"BemwaMalak","description":"Kemet is an interpreted language inspired from the BASIC programming language which first appeared in 1964. The name CHEMIT is inspired from the ancient egyptian civilization.","archived":false,"fork":false,"pushed_at":"2024-08-06T21:37:29.000Z","size":27,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-08-07T00:50:55.256Z","etag":null,"topics":["interpreter","programming-language","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BemwaMalak.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2022-08-24T13:56:20.000Z","updated_at":"2024-08-07T00:51:20.275Z","dependencies_parsed_at":"2024-08-07T01:18:57.944Z","dependency_job_id":null,"html_url":"https://github.com/BemwaMalak/Kemet","commit_stats":null,"previous_names":["bemwamalak/kemet"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BemwaMalak%2FKemet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BemwaMalak%2FKemet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BemwaMalak%2FKemet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BemwaMalak%2FKemet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BemwaMalak","download_url":"https://codeload.github.com/BemwaMalak/Kemet/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224380334,"owners_count":17301609,"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":["interpreter","programming-language","python"],"created_at":"2024-11-13T03:18:36.447Z","updated_at":"2026-01-04T23:01:31.024Z","avatar_url":"https://github.com/BemwaMalak.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# KEMET\r\n#### Description: Kemet is an interpreted language inspired from the BASIC programming language which first appeared in 1964.\r\n\r\nThe interpreter is written in Python 3 and it currently can be used as an Interactive Prompt to evaluate expressions in real-time or to evaluate external files written in Kemet.\r\n\r\n## Working with kemet\r\nBy executing the interpreter file (shell.py) you will be presented with this interface in the command line:\r\n```\r\n\r\nKemet\u003e\r\n\r\n```\r\nYou can evaluate expressions by writing them after `Kemet\u003e`:\r\n```\r\n\r\nKemet\u003e 1 + 2 + 3\r\n6\r\nKemet\u003e PRINT(\"hello world!\")\r\nhello world!\r\n0\r\n```\r\n\r\n### Evaluating external files\r\nIt's possible to load external files written in Kemet by calling the RUN function inside the interpreter interface.\r\n```\r\nkemet\u003e RUN(\"test.myopl\")\r\nHello\r\n0\r\n```\r\n\r\n## Basic kemet functionalities\r\n\r\n### Working with mathematics expressions\r\nKemet supports the order of operations in mathematics.\r\nThe order of operations, which is used throughout mathematics, science, technology, and many computer programming languages, is expressed here:\r\n\u003cbr\u003e\r\n1. exponentiation and root extraction\r\n2. multiplication and division\r\n3. addition and subtraction\r\n\u003cbr\u003e\r\nThis means that if, in a mathematical expression, a subexpression appears between two operators, the operator that is higher in the above list should be applied first.\r\n\r\n```\r\n\r\nkemet\u003e 1 + 2 * 3\r\n7\r\nkemet\u003e (1 + 2) * 3\r\n9\r\nkemet\u003e 2^3 + 1\r\n9\r\n\r\n```\r\nNote that the `^` operator is the power operator in kemet.\r\n\r\n### Variables\r\nYou can make variables and assign them any value using the `VAR` keyword.\r\n\r\n```\r\nkemet\u003e VAR a = 1\r\n1\r\nkemet\u003e VAR b = 2.2\r\n2.2\r\nkemet\u003e VAR b = \"string\"\r\n\"string\"\r\n```\r\n\r\n### Comparison operators\r\nKemet also supports different comparison operators: equals, not equals, less than, greater than, etc.\r\nAlso, it supports the logical operators: AND, OR and NOT.\r\n\r\n```\r\nkemet\u003e 1 \u003e 0\r\n1\r\nkemet\u003e 2 \u003c -2\r\n0\r\nkemet\u003e 2 != 2\r\n0\r\nkemet\u003e 2 == 2\r\n1\r\nkemet\u003e 1 OR 0\r\n1\r\nkemet\u003e 1 AND 0\r\n0\r\nkemet\u003e NOT 1\r\n0\r\nkemet\u003e NOT 0\r\n1\r\n\r\n```\r\n### If statements\r\nYou can also use if statements in kemet using the following syntax:\r\n```\r\nkemet \u003e IF(1 \u003e 0) THEN PRINT(\"Hello\")\r\nHello\r\n0\r\n\r\n```\r\nNote that if the expression inside of the if statement evaluates to true then the expression after the `THEN` keyword will be executed, and you can also use the `ELSE` keyword to execute another expression if the expression inside the if statement is evaluated to false or 0.\r\n```\r\nkemet \u003e IF(1 \u003c 0) THEN PRINT(\"Hello\") ELSE PRINT(\"Oops\")\r\nOops\r\n0\r\n\r\n```\r\nYou can also use else-if statements.\r\n\r\n```\r\nkemet \u003e IF(1 \u003c 0) THEN PRINT(\"Hello\") ELSE IF(1 \u003e 0) THEN PRINT(\"Oops\")\r\nOops\r\n0\r\n\r\n```\r\n\r\n### FOR and WHILE statements\r\nYou can use the FOR and WHILE statements for looping in kemet:\r\n```\r\n\r\nkemet \u003e FOR i = 5 TO 10 STEP 1 THEN PRINT(\"Hello\")\r\nHello\r\nHello\r\nHello\r\nHello\r\nHello\r\n[0, 0, 0, 0, 0]\r\n\r\nkemet\u003e WHILE TRUE THEN PRINT(\"Oops infinite loop\")\r\ninfinite loop\r\n....\r\n\r\n```\r\n\r\n### Functions\r\nIn kemet you can define functions using the `FUN` keyword.\r\n\r\n```\r\n\r\nkemet \u003e FUN test(a) -\u003e a + 1\r\n\u003cfunction test\u003e\r\nkemet \u003e test(1)\r\n2\r\n\r\n```\r\n\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbemwamalak%2Fkemet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbemwamalak%2Fkemet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbemwamalak%2Fkemet/lists"}