{"id":18555262,"url":"https://github.com/c3d/xl-c","last_synced_at":"2025-04-24T06:10:23.820Z","repository":{"id":146253513,"uuid":"91227762","full_name":"c3d/xl-c","owner":"c3d","description":"A re-implementation of the XL programming language in straight C","archived":false,"fork":false,"pushed_at":"2019-04-11T19:53:24.000Z","size":209,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-30T07:41:14.172Z","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":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/c3d.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2017-05-14T07:41:40.000Z","updated_at":"2024-02-21T13:55:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"24e80683-c91d-47d1-acb9-2ff766be2e71","html_url":"https://github.com/c3d/xl-c","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/c3d%2Fxl-c","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c3d%2Fxl-c/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c3d%2Fxl-c/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c3d%2Fxl-c/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/c3d","download_url":"https://codeload.github.com/c3d/xl-c/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250573351,"owners_count":21452352,"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-11-06T21:25:52.804Z","updated_at":"2025-04-24T06:10:23.803Z","avatar_url":"https://github.com/c3d.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# XL\n### An extensible programming language\n\nXL is a very simple and small programming language specifically\ndesigned to be integrated in larger projects.\n\nXL is also a somewhat special language because it is minimalistic yet\nusable. It was designed to be extensible by programmers, and as a\nresult, most of the features that you expect to be built-ins in most\nlanguages (like control or data structures) are really defined by the\nlibrary in XL. As a matter of fact, XL is defined using a *single*\noperator.\n\n## The magic rewrite operator\n\nThe rewrite operator in XL is written `-\u003e`. Something like `A -\u003e B`\nreads as *if you see A in a program, rewrite it as B*. Depending on\nthe context, this rewrite operators can be used to define:\n\n* Variables\n\n          X -\u003e 0\n     \n* Functions\n\n          distance A, B -\u003e sqrt((B-A)^2)\n\n* Functions can be defined using special cases and recursion\n\n          0! -\u003e 1\n          N! -\u003e N * (N-1)!\n \n* Operators, which can also include special cases\n\n          0 + B -\u003e B\n          A + 0 -\u003e A\n          A + B -\u003e (A-1) + (B+1)\n     \n* Combinations of operators\n\n          A in B..C -\u003e A \u003e= B and A \u003c= C\n\n* Control structures\n\n          loop Body -\u003e Body; loop Body\n          if true then TrueBody else FalseBody -\u003e TrueBody\n          if false then TrueBody else FalseBody -\u003e FalseBody\n          while Condition loop Body -\u003e\n              if Condition then\n                  Body\n                  while Condition loop Body\n\n\n## Field-tested\n\nXL was field-tested at a relatively large scale in the Tao3D project, where\nit serves as a dynamic document description language for a real-time\n3D rendering engine. XL also serves as the foundation for ELFE, which\nis a version of XL indented to allow quick experiments with the Internet\nof things.\n\n\n## Under re-construction\n\nIt is based on these experiences that the current rewrite is taking\nplace. The new implementation will take advantage of several years of\nexperience with the older implementations. It will be written in C,\nrely on LLVM only as an option, if ever, and should be noticeably\nfaster.\n\nFor the moment, this new implementation does not work at all, though.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fc3d%2Fxl-c","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fc3d%2Fxl-c","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fc3d%2Fxl-c/lists"}