logicgateeso


Namelogicgateeso JSON
Version 0.1.2 PyPI version JSON
download
home_pagehttps://replit.com/@s3D27ZHOU/LogicGate
Summaryan esolang designed for manual encryption with logic gates
upload_time2023-04-15 11:22:59
maintainer
docs_urlNone
authorTaokyle
requires_python>=3.10,<4.0
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            LogicGate
=========

This language is inspired by logic gates, by using simple alphabet you
could make a program.

It is designed as a way for manual encryption, which kinda failed

All you can do in this language is to make a program with logic gates,
sounds difficult and indeed it is.

Startup
-------

First, make a logic gate file. The file extension should be lgeso also
you will need the runner

Runner
------

To use it, import the python file **LogicGate.py** in your python
script, or just run the LogicGate.py Remember for the run function, only
the filename argument is needed. The run function will return an exit
code if you use the run function, and outputs of the file will be
printed(binary to ascii, and logical binary if enabled) The compile
function does the otherwise, it doesn’t return anything but it can write
code into lgeso file.

syntax
------

For syntax it is very straight forward. It process each character in
each line as each command For gates with multiple inputs (such as or,
and) type like other syntax, the quota for the gate will automatically
be processed. No linking between words, unless the syntax at the middle
is invalid

Basic gates(gates that doesn’t require includes):
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

A (and gate): the next **2** results will be accepted as inputs. If both
inputs are 1, output is 1, else 0

O (or gate): the next **2** results will be accepted as inputs. If one
of the inputs are 1, output is 1, else 0

N (not gate): the next **1** result will be accepted as inputs. If the
input is 1, output is 0, else 0

1 and 0 (True and False): **NO** result will be accepted as inputs. They
are the results, self explanatory

special syntax
~~~~~~~~~~~~~~

There are 2 special syntax

—-- (three hyphens): new word, used for the ascii output separating the
binary for ascii translation

### (three hashes): comment the entire line

For any of the special syntax, they are not being interpreted as special
syntax unless the entire syntax appears. They can be anywhere in a line,
and that line will act like what the syntax shows (if the special syntax
appears in the same line, they will be scanned and processed according
to here)

examples
========

This is a hello world in LogicGate

``1\n 0\n 0\n 1\n 0\n 0\n 0\n ---\n 1\n 1\n 0\n 0\n 1\n 0\n 1\n ---\n 1\n 1\n 0\n 1\n 1\n 0\n 0\n ---\n 1\n 1\n 0\n 1\n 1\n 0\n 0\n ---\n 1\n 1\n 0\n 1\n 1\n 1\n 1\n ---\n 1\n 0\n 0\n 0\n 0\n 0\n ---\n 1\n 0\n 1\n 0\n 1\n 1\n 1\n ---\n 1\n 1\n 0\n 1\n 1\n 1\n 1\n ---\n 1\n 1\n 1\n 0\n 0\n 1\n 0\n ---\n 1\n 1\n 0\n 1\n 1\n 0\n 0\n ---\n 1\n 1\n 0\n 0\n 1\n 0\n 0\n ---\n 1\n 0\n 0\n 0\n 0\n 1\n``

another version generated by LogicGate.compile():
``O1NNAANNNNA1AA1AO0AA1AO1NNANNAA1A1111111111\n NNANNAAAO0O000001\n OO0NNN10\n O1O1NNA1O01\n NNOONNA0O0000\n 0\n AA0NNANNOONNNNAO0A1O0000001\n ---\n OO1O1OAO1NNAO111111\n NNNNO0NNAA1O0N01\n OANNOA0O00000\n ANNNNA001\n NNA11\n NNANNA1ANNO0001\n NNAANNAOOA1NNAO10110111\n ---\n OA111\n A1OA1OO0A1O1NNA1O0ONNNNNNN0000\n A1O0A00\n A1O0NNAO0O0A111\n NNAO1NNONNNNA1O1111\n O0A1OANNA0NNOO0ON10000\n 0\n ---\n O0NNN0\n A1ANNNNNNNNNNO101\n O00\n NNA1OO1ONNAO10110\n OAA1110\n OO0AAO0AAONNO0O0NNO00001100\n NNO0A0ONNN10\n ---\n O0O1O0A1NNO1ANNO0AA1O1AA1A1A11111\n NNANNO1ONNNNNNNNNNO0AO11101\n O0OONNNNAAO0N11000\n A1O0N0\n OONNNNOA1ONNOO0AA11100100\n NNO0ON00\n O0OA1NNA1O100\n ---\n O0OO1OO1A1O1000\n NNOO0AONNONNO0A0NNA0NNA010010\n NNAA0OOOA0O000001\n A0NNNNN1\n AO0NNNNA1OO0001\n O0OA1O0O0OO0OA1O00000\n ---\n 1\n A0NNAO0A0OA0NNA1A0000\n NNO0NNA1NNOO011\n NNO0NNA0A0A0NNOO000\n ANNA1AA1NNNNNNNNAA1NNAA1A111111\n NNA1ANNA1OAO1O11111\n A1A1NNA1O1NNANNA1AA1111\n ---\n ONNNNAOO11110\n OANNOONNA1AA1110111\n AA0NNNNNNO0O0A0O0N10\n NNNNNNOA110\n O1OONNA1101\n A1NNNNA11\n ANNOONNAAO1A1ANNA11111011\n ---\n O0NNO0AO0A111\n NNNNNNA1O0ONNA1NNNNO0NNANNOOA1ANNNNAA11110111\n NNO11\n AO0AN101\n OAA1000\n 1\n O0A0NNO0O0NNA0A0NNA1ON10\n ---\n O0N0\n NNNNNNO0ONNA1N00\n O00\n O0AN01\n NNONNNNNNNNA111\n NNNNONNOO0000\n AONNO0ANNO00101\n ---\n O1ONNANNNNA1111\n NNNNOOOO0NNAA1NNONNO1011111\n NNA0A0A01\n AA1N10\n O1OANNNNNNA1ONNNNOO1AOOO1AAN0110111110\n 0\n OOAO0NNO0A0OAANNA0AONNO0001100000\n ---\n A1A1NNO0NNA11\n OA100\n NNANNOA1001\n 0\n NNO0OA0O000\n ANNO0OONNA1O11001\n ---``

Sources
-------

Current source code(working in progress): `gitbub
link <https://github.com/TaokyleYT/LogicGate/>`__\  Esolang wiki:
`LogicGate <https://esolangs.org/wiki/LogicGate>`__\Replit up-to-date version:
`replit <https://replit.com/@s3D27ZHOU/LogicGate>`__

            

Raw data

            {
    "_id": null,
    "home_page": "https://replit.com/@s3D27ZHOU/LogicGate",
    "name": "logicgateeso",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.10,<4.0",
    "maintainer_email": "",
    "keywords": "",
    "author": "Taokyle",
    "author_email": "taokyle415@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/56/24/ec82c1978bbd3aba999805b29e43d4b038dfba48505aa80cbcf59ae956c8/LogicGateESO-0.1.2.tar.gz",
    "platform": null,
    "description": "LogicGate\n=========\n\nThis language is inspired by logic gates, by using simple alphabet you\ncould make a program.\n\nIt is designed as a way for manual encryption, which kinda failed\n\nAll you can do in this language is to make a program with logic gates,\nsounds difficult and indeed it is.\n\nStartup\n-------\n\nFirst, make a logic gate file. The file extension should be lgeso also\nyou will need the runner\n\nRunner\n------\n\nTo use it, import the python file **LogicGate.py** in your python\nscript, or just run the LogicGate.py Remember for the run function, only\nthe filename argument is needed. The run function will return an exit\ncode if you use the run function, and outputs of the file will be\nprinted(binary to ascii, and logical binary if enabled) The compile\nfunction does the otherwise, it doesn\u2019t return anything but it can write\ncode into lgeso file.\n\nsyntax\n------\n\nFor syntax it is very straight forward. It process each character in\neach line as each command For gates with multiple inputs (such as or,\nand) type like other syntax, the quota for the gate will automatically\nbe processed. No linking between words, unless the syntax at the middle\nis invalid\n\nBasic gates(gates that doesn\u2019t require includes):\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nA (and gate): the next **2** results will be accepted as inputs. If both\ninputs are 1, output is 1, else 0\n\nO (or gate): the next **2** results will be accepted as inputs. If one\nof the inputs are 1, output is 1, else 0\n\nN (not gate): the next **1** result will be accepted as inputs. If the\ninput is 1, output is 0, else 0\n\n1 and 0 (True and False): **NO** result will be accepted as inputs. They\nare the results, self explanatory\n\nspecial syntax\n~~~~~~~~~~~~~~\n\nThere are 2 special syntax\n\n\u2014-- (three hyphens): new word, used for the ascii output separating the\nbinary for ascii translation\n\n### (three hashes): comment the entire line\n\nFor any of the special syntax, they are not being interpreted as special\nsyntax unless the entire syntax appears. They can be anywhere in a line,\nand that line will act like what the syntax shows (if the special syntax\nappears in the same line, they will be scanned and processed according\nto here)\n\nexamples\n========\n\nThis is a hello world in LogicGate\n\n``1\\n 0\\n 0\\n 1\\n 0\\n 0\\n 0\\n ---\\n 1\\n 1\\n 0\\n 0\\n 1\\n 0\\n 1\\n ---\\n 1\\n 1\\n 0\\n 1\\n 1\\n 0\\n 0\\n ---\\n 1\\n 1\\n 0\\n 1\\n 1\\n 0\\n 0\\n ---\\n 1\\n 1\\n 0\\n 1\\n 1\\n 1\\n 1\\n ---\\n 1\\n 0\\n 0\\n 0\\n 0\\n 0\\n ---\\n 1\\n 0\\n 1\\n 0\\n 1\\n 1\\n 1\\n ---\\n 1\\n 1\\n 0\\n 1\\n 1\\n 1\\n 1\\n ---\\n 1\\n 1\\n 1\\n 0\\n 0\\n 1\\n 0\\n ---\\n 1\\n 1\\n 0\\n 1\\n 1\\n 0\\n 0\\n ---\\n 1\\n 1\\n 0\\n 0\\n 1\\n 0\\n 0\\n ---\\n 1\\n 0\\n 0\\n 0\\n 0\\n 1\\n``\n\nanother version generated by LogicGate.compile():\n``O1NNAANNNNA1AA1AO0AA1AO1NNANNAA1A1111111111\\n NNANNAAAO0O000001\\n OO0NNN10\\n O1O1NNA1O01\\n NNOONNA0O0000\\n 0\\n AA0NNANNOONNNNAO0A1O0000001\\n ---\\n OO1O1OAO1NNAO111111\\n NNNNO0NNAA1O0N01\\n OANNOA0O00000\\n ANNNNA001\\n NNA11\\n NNANNA1ANNO0001\\n NNAANNAOOA1NNAO10110111\\n ---\\n OA111\\n A1OA1OO0A1O1NNA1O0ONNNNNNN0000\\n A1O0A00\\n A1O0NNAO0O0A111\\n NNAO1NNONNNNA1O1111\\n O0A1OANNA0NNOO0ON10000\\n 0\\n ---\\n O0NNN0\\n A1ANNNNNNNNNNO101\\n O00\\n NNA1OO1ONNAO10110\\n OAA1110\\n OO0AAO0AAONNO0O0NNO00001100\\n NNO0A0ONNN10\\n ---\\n O0O1O0A1NNO1ANNO0AA1O1AA1A1A11111\\n NNANNO1ONNNNNNNNNNO0AO11101\\n O0OONNNNAAO0N11000\\n A1O0N0\\n OONNNNOA1ONNOO0AA11100100\\n NNO0ON00\\n O0OA1NNA1O100\\n ---\\n O0OO1OO1A1O1000\\n NNOO0AONNONNO0A0NNA0NNA010010\\n NNAA0OOOA0O000001\\n A0NNNNN1\\n AO0NNNNA1OO0001\\n O0OA1O0O0OO0OA1O00000\\n ---\\n 1\\n A0NNAO0A0OA0NNA1A0000\\n NNO0NNA1NNOO011\\n NNO0NNA0A0A0NNOO000\\n ANNA1AA1NNNNNNNNAA1NNAA1A111111\\n NNA1ANNA1OAO1O11111\\n A1A1NNA1O1NNANNA1AA1111\\n ---\\n ONNNNAOO11110\\n OANNOONNA1AA1110111\\n AA0NNNNNNO0O0A0O0N10\\n NNNNNNOA110\\n O1OONNA1101\\n A1NNNNA11\\n ANNOONNAAO1A1ANNA11111011\\n ---\\n O0NNO0AO0A111\\n NNNNNNA1O0ONNA1NNNNO0NNANNOOA1ANNNNAA11110111\\n NNO11\\n AO0AN101\\n OAA1000\\n 1\\n O0A0NNO0O0NNA0A0NNA1ON10\\n ---\\n O0N0\\n NNNNNNO0ONNA1N00\\n O00\\n O0AN01\\n NNONNNNNNNNA111\\n NNNNONNOO0000\\n AONNO0ANNO00101\\n ---\\n O1ONNANNNNA1111\\n NNNNOOOO0NNAA1NNONNO1011111\\n NNA0A0A01\\n AA1N10\\n O1OANNNNNNA1ONNNNOO1AOOO1AAN0110111110\\n 0\\n OOAO0NNO0A0OAANNA0AONNO0001100000\\n ---\\n A1A1NNO0NNA11\\n OA100\\n NNANNOA1001\\n 0\\n NNO0OA0O000\\n ANNO0OONNA1O11001\\n ---``\n\nSources\n-------\n\nCurrent source code(working in progress): `gitbub\nlink <https://github.com/TaokyleYT/LogicGate/>`__\\  Esolang wiki:\n`LogicGate <https://esolangs.org/wiki/LogicGate>`__\\Replit up-to-date version:\n`replit <https://replit.com/@s3D27ZHOU/LogicGate>`__\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "an esolang designed for manual encryption with logic gates",
    "version": "0.1.2",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f0ba19d9721fc9e5b2860d2a71fae43b278bdb2a13d7af1332d8a025ec57c9a5",
                "md5": "667b7aa18a6d7492a8b6c447e16be74b",
                "sha256": "2900141ba7f663ca22fef32243a3d0a19918888a75b6c5c29f9345102ea7b973"
            },
            "downloads": -1,
            "filename": "LogicGateESO-0.1.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "667b7aa18a6d7492a8b6c447e16be74b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10,<4.0",
            "size": 7010,
            "upload_time": "2023-04-15T11:22:58",
            "upload_time_iso_8601": "2023-04-15T11:22:58.547826Z",
            "url": "https://files.pythonhosted.org/packages/f0/ba/19d9721fc9e5b2860d2a71fae43b278bdb2a13d7af1332d8a025ec57c9a5/LogicGateESO-0.1.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5624ec82c1978bbd3aba999805b29e43d4b038dfba48505aa80cbcf59ae956c8",
                "md5": "32d94ba8cad37c8f78cf6f82b6c4fd97",
                "sha256": "de1385d3cf7042465a01e4fdc03f165feb3092519b02f5312e9ce2f74aca2fcd"
            },
            "downloads": -1,
            "filename": "LogicGateESO-0.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "32d94ba8cad37c8f78cf6f82b6c4fd97",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10,<4.0",
            "size": 7527,
            "upload_time": "2023-04-15T11:22:59",
            "upload_time_iso_8601": "2023-04-15T11:22:59.708577Z",
            "url": "https://files.pythonhosted.org/packages/56/24/ec82c1978bbd3aba999805b29e43d4b038dfba48505aa80cbcf59ae956c8/LogicGateESO-0.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-04-15 11:22:59",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "logicgateeso"
}
        
Elapsed time: 0.05743s