{"id":22769800,"url":"https://github.com/bfontaine/eolas","last_synced_at":"2025-04-15T03:20:49.888Z","repository":{"id":57426680,"uuid":"83903320","full_name":"bfontaine/eolas","owner":"bfontaine","description":"Toy programming language","archived":false,"fork":false,"pushed_at":"2017-03-04T15:47:00.000Z","size":7,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-10T06:20:46.718Z","etag":null,"topics":["experiment","programming-language"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bfontaine.png","metadata":{"files":{"readme":"README.rst","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}},"created_at":"2017-03-04T15:29:09.000Z","updated_at":"2024-03-09T06:37:29.000Z","dependencies_parsed_at":"2022-09-19T06:00:31.117Z","dependency_job_id":null,"html_url":"https://github.com/bfontaine/eolas","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bfontaine%2Feolas","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bfontaine%2Feolas/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bfontaine%2Feolas/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bfontaine%2Feolas/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bfontaine","download_url":"https://codeload.github.com/bfontaine/eolas/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248809023,"owners_count":21164895,"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":["experiment","programming-language"],"created_at":"2024-12-11T15:15:53.364Z","updated_at":"2025-04-15T03:20:49.863Z","avatar_url":"https://github.com/bfontaine.png","language":"Python","readme":"=====\nEolas\n=====\n\n**Eolas** is a toy language derived from a `@Maitre_Eolas’ Tweet`_. A few\npeople responded to the Tweet saying it was invalid code and it wouldn’t be\npossible to write such program in any language due to obvious flaws like ``=``\nfor comparison and strings without quotes.\n\nThis project provides an interpreter for that language. It parses the original\nprogram and evaluates it as intended.\n\n.. _`@Maitre_Eolas’ Tweet`: https://twitter.com/Maitre_Eolas/status/830450153391849472\n\nInstall\n-------\n\n**Eolas** is distributed as a Python3 library and executable::\n\n    pip install eolas\n\nNote: you may need to use ``pip3`` instead of ``pip`` if your default\ninstallation is Python 2.\n\nRun\n---\n\nRun ``eolas --help`` to see all options. The interpreter reads from ``STDIN``\nunless you give it a filename. You may also evaluate short programs using\n``--eval \"\u003cyour code\u003e\"``.\n\nYou can set the original memory using ``--set name=value``. Compare the results\nwhen the interpreter is run on the original program::\n\n    $ eolas code.eolas\n    lose\n    $ eolas --set 'avocat=Maitre Eolas' code.eolas\n    Win\n\nSpecification\n-------------\n\nThe original code block::\n\n    {\n    IF (avocat = Maitre Eolas)\n    THEN (Result = Win)\n    ELSE\n    (Result = lose)\n    return 0;\n    }\n\nIn **Eolas**, a program is a suite of instructions wrapped in curly brackets.\n\nInstructions\n~~~~~~~~~~~~\n\n**Eolas** has three instructions:\n\n* ``IF (condition) THEN (instruction) ELSE (instruction)``: Usual if/then/else.\n  The ``ELSE`` part is mandatory as well as parentheses everywhere. You can’t\n  have more than one instruction in each part. The condition can be any\n  expression.\n* Assignment: assignments in **Eolas** work as expected, using the syntax\n  ``name = value``. All variables are global and names may contain spaces.\n* ``return code``: Interrupt the program with the given exit code.\n\nA program may store its result in a special variable ``Result``. It’ll be\nprinted by the interpreter at the end.\n\nExpressions\n~~~~~~~~~~~\n\nOnly three value types are supported: integers, strings, and booleans. There is\nno literal for booleans; they can only be obtained through comparison\noperators. There’s only one such operator for now: ``=`` to check for equality.\n\nThe ``=`` operator is right-associative, so you can write code like this::\n\n    { this_is_true = 42 = 42 }\n\nVariables may contain spaces and evaluate to their string representation if\nthey’re not set. There is no other way to write strings, and as such empty\nstrings can’t be written.\n\nNegative integers are not supported.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbfontaine%2Feolas","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbfontaine%2Feolas","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbfontaine%2Feolas/lists"}