{"id":22960277,"url":"https://github.com/stringmanolo/simple2022","last_synced_at":"2025-04-02T02:43:20.394Z","repository":{"id":95119534,"uuid":"446704021","full_name":"StringManolo/simple2022","owner":"StringManolo","description":"Simple programming language","archived":false,"fork":false,"pushed_at":"2022-01-14T11:40:09.000Z","size":38,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-07T17:44:53.115Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/StringManolo.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-01-11T06:30:37.000Z","updated_at":"2022-01-11T06:33:41.000Z","dependencies_parsed_at":"2023-05-26T19:00:36.702Z","dependency_job_id":null,"html_url":"https://github.com/StringManolo/simple2022","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StringManolo%2Fsimple2022","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StringManolo%2Fsimple2022/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StringManolo%2Fsimple2022/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StringManolo%2Fsimple2022/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StringManolo","download_url":"https://codeload.github.com/StringManolo/simple2022/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246746879,"owners_count":20827061,"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":"2024-12-14T18:32:08.543Z","updated_at":"2025-04-02T02:43:20.364Z","avatar_url":"https://github.com/StringManolo.png","language":"JavaScript","readme":"# SIMPLE 2022\n\nSimple is a new programming language (under development)\n\nThis lenguage is desgined thinking in simplicity and productivity. Focused on fast development, should be usefull to create small and fast scripts. \n\n\n#### Notice\nThe code quality is really bad.   \n\n\n\n#### Usage\n##### Compile and Run\n- Transpile your SIMPLE code to C++\n```\nnode compiler.js -f myCode.imp -o myCode.cpp -l c++\n```\n- Compile your C++ code\n```\ng++ myCode.cpp -o myProgram --std=c++20\n```\n- Run your code\n```\nchmod +775 myProgram\n./myProgram\n```\n##### Run Once\n```\nnode compiler.mjs -f myCode.imp -o myCode.cpp -l c++ -b -r\nrm myCode.cpp\n```\n##### Show tokens\n```\nnode compile.mjs -f myCode.imp -t\n```\n##### Show parser\n```\nnode compile.mjs -f myCode.imp -p\n```\n##### Show code\n```\nnode compile.mjs -f myCode.imp -l c++\n```\n\n\n#### Features\n- Bash like functions\n- Bash like function calls\n- Variables\n- Types are guessed\n- Transpilable to multiple languages\n- Short and simple syntax\n- Really easy to learn\n\n\n\n#### Next\n- Modules to call complex c++ code\n\n\n#### Syntax\n##### Variables\nYou can use variables to save values.\n```\nres = 5\n```\n\n##### Internal Functions\nThere are some predefined functions you can use.\n- out\n```\nout \"Hello world!\\n\"\n```\n\n- in\n```\nin \"What is your name?\"\n```\n\n- +in\n```\n+in \"How old are you?\"\n```\n\n##### Functions\nYou can create functions. You will need them to basic actions like addition. \n- Void function\n```\nsayHello {\n  out \"Hello\"\n}\n\nsayHello\n```\n\n- Function returning value\n```\nadd {\n  $1 + $2\n}\n\nadd 2 7\n```\n\n- Function with multiple expresions and returning a value\n```\nsub {\n  out \"Substraction started...\\n\"\n  $1 - $2\n}\n\nres = sub 10 7\nout res\n```\n\n##### Conditionals\n```\nif 5 \u003e 1\n  out \"All good!\"\nelse\n  out \"Whaaaat?\"\nfi\n```\n\n##### Loops\n- For  \nFor loops require four arguments. Variable name for the itherator, initial variable value, value to reach, amouth of increment.\n```\nfor i 0 10 1\n  out i\n  out \"\\n\"\nrof\n```\n\n\n#### Examples\n```\nsub {\n  $1 - $2\n}\n\nage = +in \"Your age -\u003e \"\n\nif age \u003c 18\n  out \"You are underage, access denied.\"\n  diff = sub 18 age\n  out \"\\nTry again in \"\n  out diff\n  out \" year/s\"\nelse\n  out \"Welcome!\"\nfi\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstringmanolo%2Fsimple2022","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstringmanolo%2Fsimple2022","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstringmanolo%2Fsimple2022/lists"}