{"id":13780558,"url":"https://github.com/wbhart/Cesium","last_synced_at":"2025-05-11T13:32:34.695Z","repository":{"id":141422382,"uuid":"2039458","full_name":"wbhart/Cesium","owner":"wbhart","description":"Fast interpreter with LLVM backend.","archived":false,"fork":false,"pushed_at":"2014-01-10T10:16:51.000Z","size":223,"stargazers_count":10,"open_issues_count":1,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-08-03T18:15:12.793Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://selmer.warwick.ac.uk/cesium.pdf","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/wbhart.png","metadata":{"files":{"readme":"README","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":"2011-07-13T01:25:57.000Z","updated_at":"2021-06-23T07:08:58.000Z","dependencies_parsed_at":"2023-03-13T10:33:47.782Z","dependency_job_id":null,"html_url":"https://github.com/wbhart/Cesium","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/wbhart%2FCesium","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wbhart%2FCesium/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wbhart%2FCesium/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wbhart%2FCesium/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wbhart","download_url":"https://codeload.github.com/wbhart/Cesium/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225056840,"owners_count":17414220,"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-08-03T18:01:17.226Z","updated_at":"2024-11-17T15:31:20.855Z","avatar_url":"https://github.com/wbhart.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"readme":"Cesium v 0.2\n============\n\nTo make, ensure that you have Boehm's GC and the latest LLVM installed on your machine.\n\nYou will need to adjust some paths in the makefile and in cs_env. Note that I have Cesium in a directory called cstar2. Simply replace that with whatever directory you have Cesium in.\n\nType source cs_env.\n\nNow just type make.\n\nTo run it just type:\n\n./cs\n\nIt accepts:\n\n1) strings: \"hello\"\n2) booleans: true false\n3) integers: -12345\n4) doubles: 1.23 1.23e-20\n\nYou can do computations with: \n\n1) doubles, integers and booleans\n2) +, -, *, /, %, \u003c\u003c, \u003e\u003e and parentheses.\n3) \u0026, |, ^|, ~\n4) \u003c, \u003e, \u003c=, \u003e=, ==, !=\n5) \u0026\u0026, ||, !\n6) i++, i--, ++i, --i\n7) i+=c, i-=c, i*=c, i/=c, i%=c\n8) i\u0026=c, i|=c, i^|=c\n9) i\u003c\u003c=c, i\u003e\u003e=c\n\nvar i = 1.2, j = 2.2, k = i + j - i*j;\n\netc.\n\nThe following control flow statements are valid:\n\n1) if (bool_expr) stmt1 \n2) if (bool_expr) stmt1 ; (useful at the top level)\n3) if (bool_expr) stmt1 else stmt2\n4) while (bool_expr) stmt1\n5) break;\n6) { stmt; ... }\n\nThe following compound expressions are valid:\n\n1) if expr then expr1 else expr2\n2) (expr1, expr2, ...) // tuples whose elements can have arbitrary types \n\nFunctions and applications are as follows:\n\n1) fn fn_name(a, b, c, ....) { stmt; .... return expr; .... }\n2) fn_name(1, 2, 3, ....);\n\nAnonymous functions (closures) are expressions which can be defined as:\n\n1) lambda(a, b, c) { expr1; expr2; ...; expr }\n2) lambda(a, b, c) expr\n\nBeware that as lambdas are expressions, a statement ending in a lambda must be terminated by a semicolon __even if it already ends in a brace__.\n\nOne can assign to tuples:\n\nvar (i, (j, k)) = (1, (2, 3));\n\nTo define a new datatype:\n\ndatatype mytype(a, b, c);\nvar s = mytype(1, 2, 3);\ns.a += 4;\n\nTo initialise an array of length 100:\nvar i = 0, a = array(100);\nwhile (i \u003c 100) {\n   a[i] = i;\n}\n\nThe file \"tests\" gives a lot of examples of things you can (and can't) do.\n\nNote there are no typeclass checks at the moment. Things like \"string\"+\"more\"; typecheck fine, but then just crash. This will be fixed eventually.\n\nWatch this space for updates.\n\n(Greg license: please refer to the greg-0.1 directory.)\n\nCesium license:\n\nCopyright 2011 William Hart. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification, are\npermitted provided that the following conditions are met:\n\n   1. Redistributions of source code must retain the above copyright notice, this list of\n      conditions and the following disclaimer.\n\n   2. Redistributions in binary form must reproduce the above copyright notice, this list\n      of conditions and the following disclaimer in the documentation and/or other materials\n      provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY William Hart ``AS IS'' AND ANY EXPRESS OR IMPLIED\nWARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\nFITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL William Hart OR\nCONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\nSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\nNEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF\nADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\nThe views and conclusions contained in the software and documentation are those of the\nauthors and should not be interpreted as representing official policies, either expressed\nor implied, of William Hart.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwbhart%2FCesium","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwbhart%2FCesium","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwbhart%2FCesium/lists"}