{"id":16900559,"url":"https://github.com/d0nutptr/c-plus-or-minus","last_synced_at":"2025-03-20T12:44:25.075Z","repository":{"id":34123217,"uuid":"37954408","full_name":"d0nutptr/C-plus-or-minus","owner":"d0nutptr","description":"This is the C plus or minus lexer, parser, compiler, and runtime","archived":false,"fork":false,"pushed_at":"2016-01-28T20:33:46.000Z","size":13668,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-25T12:42:51.718Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","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/d0nutptr.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}},"created_at":"2015-06-24T01:19:03.000Z","updated_at":"2015-11-04T04:40:41.000Z","dependencies_parsed_at":"2022-08-18T05:15:31.949Z","dependency_job_id":null,"html_url":"https://github.com/d0nutptr/C-plus-or-minus","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/d0nutptr%2FC-plus-or-minus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d0nutptr%2FC-plus-or-minus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d0nutptr%2FC-plus-or-minus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d0nutptr%2FC-plus-or-minus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/d0nutptr","download_url":"https://codeload.github.com/d0nutptr/C-plus-or-minus/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244613946,"owners_count":20481650,"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-10-13T17:55:10.438Z","updated_at":"2025-03-20T12:44:25.043Z","avatar_url":"https://github.com/d0nutptr.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# C±\nMost serverside platforms today use a loosely typed scripting language like Javascript (node.js) or PHP which can be infuriating for some developers who want the cold, hard cradle of type checking baked into the language. Additionally, these languages dont have any compile type checks since they're mostly interpreted. For the rare few platforms with strongly typed languages (ASP.NET / C#) you're restricted to the IIS server and large boilerplate code for your server. \n\nIntroducing **C±**\n\n**C±** is a strongly typed scripting language with C-like syntax for serverside platforms. When completed, it will run on apache and nginx through plugins and allow you to write either small and quick scripts for your site or larger, OOP style projects for your platforms.\n\n#Code Examples\n\nYour code could look like this:\n\n    String messages = \"\u003cul\u003e\";\n    \n    for(int i = 0; i \u003c 10; i ++)\n    {\n        messages += \"\u003cli\u003eValue: \" + i + \"\u003c/li\u003e\";    \n    }\n    \n    messages += \"\u003c/ul\u003e\";\n    \nor Object Oriented like this:\n\n    class UnorganizedList\n    {\n        List elements;\n    \n        UnorganizedList()\n        {\n            elements = new List();\n        }\n    \n        function void add(String element)\n        {\n            elements.add(element);\n        }\n    \n        function String toString()\n        {\n            String value = \"\u003cul\u003e\";\n    \n            for(int i = 0; i \u003c elements.size(); i ++)\n            {\n                value = value + \"\u003cli\u003e\" + elements.get(i) + \"\u003c/li\u003e\";\n            }\n    \n            value = value + \"\u003c/ul\u003e\";\n    \n            return value;\n        }\n    }\n    \n    UnorganizedList myList = new UnorganizedList();\n    \n    for(int i = 0; i \u003c 10; i ++)\n    {\n        myList.add(i + \"\");\n    }\n\n#Printing To A Page\n*\"But how do I print to a page?\"*, you ask. Like this!\n\n*indexCode.cpm*\n\n    String messages = \"\u003cul\u003e\";\n    \n    for(int i = 0; i \u003c 10; i ++)\n    {\n        messages += \"\u003cli\u003eValue: \" + i + \"\u003c/li\u003e\";    \n    }\n    \n    messages += \"\u003c/ul\u003e\";\n\n*index.cpm*\n\n    import \"indexCode.cpm\";\n    \n    \u003chtml\u003e\n        \u003cbody\u003e\n            {{messages}}\n        \u003c/body\u003e\n    \u003c/html\u003e\n\n#Example\nFile of all currently supported features. If you can't see it being done here, it's probably not possible (*yet*).\n\n    import \"default.m\";\n    \n    int a = 0 ;\n    boolean b = false;\n    char c = '2';\n    double d = 10.2;\n    String str = \"String values\";\n    \n    ExtendedObj _obj = null;\n    \n    String value = getObjSingleton().toString();\n    \n    print(value);\n    \n    if ( getObjSingleton() != null )\n    {\n    \tboolean var = getObjSingleton() instanceof MyObject;\n    }\n    \n    function ExtendedObj getObjSingleton()\n    {\n    \tif (_obj == null )\n    \t{\n    \t\t_obj = new ExtendedObj(false);\n    \t}\n    \t\n    \treturn _obj;\n    }\n    \n    class MyObject \n    {\n    \tboolean myBool;\n    \t\n    \tMyObject(boolean a)\n    \t{\n    \t\tmyBool = a;\n    \t}\n    \t\n    \tfunction char getChar()\n    \t{\n    \t\treturn '\\0';\n    \t}\n    }\n    \n    class ExtendedObj : MyObject\n    {\n    \tExtendedObj(boolean a)\n    \t{\n    \t\tsuper (a);\n    \t}\n    \t\n    \tfunction char[] getChars()\n    \t{\n    \t\tchar[] arr = new char[2];\n    \t\tarr[0] = getChar();\n    \t\tarr[1] = getChar();\n    \t\treturn arr;\n    \t}\n    \t\n    \tfunction void doNothing(int a, boolean b)\n    \t{\n    \t\treturn ;\n    \t}\n    \t\n    \tfunction String read()\n    \t{\n    \t\treturn \"\\r\\n\";\n    \t}\n    \t\n    \tfunction int get()\n    \t{\n    \t\tfor (Obj a in aSet) { print(a); }\n    \t}\n    \t\n    \tfunction int getInt()\n    \t{\n    \t\tint value = 0;\n    \t\t\n    \t\tif (obj instanceof b)\n    \t\t{\n    \t\t\tfor (int i = 0; i \u003c 10; i ++)\n    \t\t\t{\n    \t\t\t\tvalue = value + i;\n    \t\t\t}\n    \t\t}\n    \t\t\n    \t\treturn value;\n    \t}\n    }\n    \n    class partial ExtendedObj\n    {\n    \tfunction String toString()\n    \t{\n    \t\treturn \"test of toString()\";\n    \t}\n    }\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd0nutptr%2Fc-plus-or-minus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fd0nutptr%2Fc-plus-or-minus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd0nutptr%2Fc-plus-or-minus/lists"}