{ "info": { "author": "Andrew Phillips", "author_email": "skeledrew@gmail.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)", "Natural Language :: English", "Programming Language :: Python :: 3.7", "Topic :: Software Development" ], "description": "# Neulang\nCoding for humans.\n\n## Description\nNeulang is a natural language enabling layer embedded in Python. It takes scripts containing pseudocode in [Org](http://orgmode.org/) format and runs them.\n\n## Why?\nAs the easiest programming language for anyone to learn, Python is awesome.\nBut there's still that curve that continues to shut many out of the coding world.\nPeople shouldn't have to learn another language to code, especially in this age of smart devices, IoT and AI.\nLet's bring coding to the people, not the people to coding.\nOh, and I have a lot of pseudocode in Org format that I'd like to make executable.\n\n## Installing\n* `pip install neulang`\n\nor clone the latest version from [GitLab](https://gitlab.com/skeledrew/neulang).\n\n## Features\n* Command line mode\n * `neu [options] --command=\"* neu command\"`\n* Interactive mode\n * `neu [options] [-i]`\n * Exit with `*exit*`, `*quit*` or `CTRL+d`\n* Importable from module as an object instance\n * `from neulang import Neulang`\n * `n = Neulang()`\n * `script = \"* air_say 'hello world'\"`\n * `n.loads(script)`\n * `n.eval()`\n* Run script files\n * `neu [options] /path/to/script.neu`\n* Run a single node in a script file\n * `neu [options] script.neu -o\"s/org/path/as/regex/or/index\"`\n* Import other Neulang modules from the command line\n * `neu [options] -m\"path/to/first/module.neu:another/module.neu\"`\n* Python-style module access\n * `* include(\"neulang.natural.basics\")` via script\n * `n.load_module(\"neulang.natural.basics\")` via instance\n* Transpile Neu to Python source (requires [astor](https://pypi.org/project/astor/))\n * `n.to_py()` via instance\n * `neu script.neu --to-py` via CLI\n* Access the patterns defined in a module scope\n * `n.get_patterns()` via instance\n * `neu script.neu --patterns` via CLI\n\n## Usage\n* **NB: This is beta software.**\n* For the best experience, use a text editor which supports org-mode. Preferably Emacs as it is used for the project. A sibling project, the NAIC IDE, is also currently under development.\n* Activate org-mode on a new buffer (`ALT+x org-mode ENTER`) and write a script as organized pseudocode.\n* Modify your pseudocode so it adheres to the operations available in `tests/tests.neu`. The following operational layers are currently available:\n * Regular [Python expression](https://docs.python.org/3/reference/expressions.html) nodes:\n * `* print(\"Hello world\")`\n\n A provisional subset of Python statement-oriented features are also reimplemented as callables to ease transition. These are all prefixed with `x_`:\n * `* x_setv('os', x_import('os'))`\n * ASTIR (Abstract Syntax Tree Intermediate Representation) nodes as a drop-in for statements and expressions (not all are implemented as yet). It is distinguished by keywords beginning with `air_`. The rest tends to, in most cases, correspond to the Python-native name of the operation (though not in this example):\n * `* air_setv`\n * `** my_string`\n * `** This is a string`\n * `* air_call print my_string`\n * Natural language nodes parsed via the [Mycroft Adapt](https://github.com/MycroftAI/adapt) intent parser:\n * The `intent_parts` section takes 1+ valid regular expressions which uses dict groups to enable parsing into an intent. For convenience, named groups can be denoted by double angles, eg. `<>` expands to `(?P.+)`.\n * The `body` section is made of any of the layers, and also expands the named groups as individual name-bindings.\n * NB: see `tests.neu` for example usage.\n* Run your script: `neu script.neu`\n* Provide feedback on your experience, bugs and suggestions for improvement.\n\n## Examples\nThere is currently one example, a todo app. It uses `flask` and `SQLAlchemy` and is based on [this Flask intro tutorial](https://opensource.com/article/18/4/flask). The code is in `examples/flask_todo`. To install and run (assuming Neu is already working):\n* `git clone` and `cd` into the project\n* `pip install -r examples/flask_todo/requirements.txt`\n* `neu examples/flask_todo/todo.neu`\n\nThis starts a Flask app which serves an API for manages todos. The todos are stored in a - memory based by default - SQLite database. To interact with it, go to another terminal and run using the also included `HTTPie` app (or your preferred HTTP client which supports the methods POST, GET, PUT and DELETE):\n* `http -f POST http://127.0.0.1:5000/api/v0/tasks name=first id=0 note='My first note'`\n* `http GET http://127.0.0.1:5000/api/v0/tasks/0`\n* `http -f PUT http://127.0.0.1:5000/api/v0/tasks/0 name=first id=0 note='Editing the note...'`\n* `http -f POST http://127.0.0.1:5000/api/v0/tasks name=first id=0 note='Adding more things to do!'`\n* `http GET http://127.0.0.1:5000/api/v0/tasks`\n* `http DELETE http://127.0.0.1:5000/api/v0/tasks/0`\n\nGo check out the Neu code that makes it possible. There are 3 files: `flask.neu` which manages the Flask app, `database.neu` which manages the database modeling and transactions, and `todo.neu` which creates the app and defines the API endpoints. Don't forget to open in an editor with org-mode support!\n\n## Org-Mode Primer\nOrg-mode is a rich plain-text system for keeping notes, planning projects and a variety of other organizational tasks. It uses a hierarchial tree structure denoted by stars which can be easily manipulated with keyboard shortcuts. Parts of the text can be folded to show only the general structure and parts currently being worked on. \n\nThese core features are inherited by Neulang, which will in time make coding more a matter of organizing natural phrases/sentences which describe desired operations. Specifically, the org-mode features (and their Emacs bindings) which make Neulang easily manipulable are:\n* Create a new node\n * `ALT+ENTER`\n* Move a single node up/down\n * `ALT+UP/DOWN`\n* Indent/deindent a single node\n * `ALT+LEFT/RIGHT`\n* Indent/deindent a node and its children\n * `ALT_SHIFT+LEFT/RIGHT`\n* Cycle parent node folding\n * `TAB`\n\nSee [The Org Manual: Structure editing](https://www.gnu.org/software/emacs/manual/html_node/org/Structure-editing.html) for more.\n\n## License\nGNU AGPLv3+. See [LICENSE](LICENSE.md).\n\n## Contributing\nSee [CONTRIBUTING](CONTRIBUTING.md).\n\n## Release Notes\nSee [CHANGELOG](CHANGELOG.md).\n\n## To Do\n* Documentation\n* Implement remaining core Python features in AST\n* More...\n\n## News and Community\nFor more information, follow the [Neulang Dev](https://t.me/neulang) channel ([preview here](https://t.me/s/neulang)). Also join the official [Neulang Chat](https://t.me/neulang_chat) on [Telegram](https://telegram.org/) and/or the bridged [Matrix](https://matrix.org/) room at [#neulang:matrix.org](https://matrix.to/#/#neulang:matrix.org).\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://gitlab.com/skeledrew/neulang", "keywords": "", "license": "AGPLv3", "maintainer": "", "maintainer_email": "", "name": "neulang", "package_url": "https://pypi.org/project/neulang/", "platform": "any", "project_url": "https://pypi.org/project/neulang/", "project_urls": { "Homepage": "https://gitlab.com/skeledrew/neulang" }, "release_url": "https://pypi.org/project/neulang/0.3.2/", "requires_dist": [ "docopt", "adapt-parser" ], "requires_python": "", "summary": "Executable org-formatted pseudocode embedded in Python.", "version": "0.3.2" }, "last_serial": 5689165, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "92fafc229abc6132916ed34c42d5d3c9", "sha256": "b94ed1a6f50e3fbc800917723af6762ce0f8f0497c98ff2cd811d5ddf655d016" }, "downloads": -1, "filename": "neulang-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "92fafc229abc6132916ed34c42d5d3c9", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 36263, "upload_time": "2019-03-18T08:04:17", "url": "https://files.pythonhosted.org/packages/a0/09/d92b63245b35f404e1bc11b621e577f4f8b5f9367113574ae788e71286f7/neulang-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "10ed439abf9f72e1cc278b44337a35ef", "sha256": "3edfa6c725c231b8c4db91b260a237853c7635b2c6f240453712bc819a21c892" }, "downloads": -1, "filename": "neulang-0.1.0.tar.gz", "has_sig": false, "md5_digest": "10ed439abf9f72e1cc278b44337a35ef", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21968, "upload_time": "2019-03-18T08:04:20", "url": "https://files.pythonhosted.org/packages/3b/1e/fca288b1f6fcdc84846ba4de32a72e3705ec3e421972c1cae7b86c50fb85/neulang-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "5e8e2a3fb62002a982f5f7aaf428ec29", "sha256": "c23ef60870955826e911ddb5b8cdce4ee118847991a8e9486b1acbd8ac7fc632" }, "downloads": -1, "filename": "neulang-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "5e8e2a3fb62002a982f5f7aaf428ec29", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 38689, "upload_time": "2019-03-24T21:13:23", "url": "https://files.pythonhosted.org/packages/0a/a6/4c64d24fda409d9caff5bafb63847f3400dd2b24c03b6838ea28d91e58a6/neulang-0.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "29460f39623b5bca5d972e97ad3400a4", "sha256": "4b3c6169ebcefbfb9509a6696ae2350fa490b4ee87cc90f2ec298dcdb9fa9950" }, "downloads": -1, "filename": "neulang-0.2.0.tar.gz", "has_sig": false, "md5_digest": "29460f39623b5bca5d972e97ad3400a4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17696, "upload_time": "2019-03-24T21:13:24", "url": "https://files.pythonhosted.org/packages/36/00/49349c461b6089f9c9faec5561c78e9cf2dccdb8da11a6042ad855ee7521/neulang-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "968d5ada468a5f1652bcf3663909b7e1", "sha256": "823e206ec60827b3dd0f44582ce3f4692d7bd56f7c9149fd90ea107ca5c0d854" }, "downloads": -1, "filename": "neulang-0.2.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "968d5ada468a5f1652bcf3663909b7e1", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 39213, "upload_time": "2019-03-26T18:48:55", "url": "https://files.pythonhosted.org/packages/ff/5f/bc066aa99454ffb592b0326d06bd3ae358aa309f97cd7387b5ae198f2638/neulang-0.2.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d6bec0faeb01429a2292ba570c11a5bc", "sha256": "0391230ad9b3fd044036ac2e07c30884d52e86fec9aa7468efd8c528d99872dc" }, "downloads": -1, "filename": "neulang-0.2.1.tar.gz", "has_sig": false, "md5_digest": "d6bec0faeb01429a2292ba570c11a5bc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18732, "upload_time": "2019-03-26T18:48:57", "url": "https://files.pythonhosted.org/packages/07/dc/a9461de3fc89e8111763a11c58cf38cfd1ce76050486d36ebd909d556cc2/neulang-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "69705eb8db99ced23367ec487bba3031", "sha256": "fe49e8736054a3de63f7574c954e5a27f21b8a7e977b95c4c5fdf8023e236b4b" }, "downloads": -1, "filename": "neulang-0.2.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "69705eb8db99ced23367ec487bba3031", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 41705, "upload_time": "2019-06-18T15:12:16", "url": "https://files.pythonhosted.org/packages/8e/3c/5580c20245c8b244cbe9c14a5d9d1199ae6a73453843570b7f2c7ec4409c/neulang-0.2.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d740407a29a7810c04f6e225f462b096", "sha256": "3dedcc5470d947c683050cf6f626e254e392c6dbd977e4d86c11b006efd509a2" }, "downloads": -1, "filename": "neulang-0.2.2.tar.gz", "has_sig": false, "md5_digest": "d740407a29a7810c04f6e225f462b096", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20959, "upload_time": "2019-06-18T15:12:18", "url": "https://files.pythonhosted.org/packages/de/ff/8ece55c05553168fed4a392d0dc8ba547e01732ca0a70192b2715450ab84/neulang-0.2.2.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "0703afad8a5884c778b8ab6ed8d6c189", "sha256": "2edd59cc4036aebe4a76f8d04e123300d6c383eaec6b091a43ed91d548177f5f" }, "downloads": -1, "filename": "neulang-0.3.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "0703afad8a5884c778b8ab6ed8d6c189", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 42584, "upload_time": "2019-07-24T17:49:27", "url": "https://files.pythonhosted.org/packages/fb/48/54de3f47ad7ee0ba86688b93f78fadf16db7684c64cb7f106570bc432f19/neulang-0.3.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2cb2fc434cc4a2274eb146d5b27a7061", "sha256": "62a3f58c98ff8a3de84f204a9c8d6517cf30f6e300519db98d8b2fb9033cf2d6" }, "downloads": -1, "filename": "neulang-0.3.0.tar.gz", "has_sig": false, "md5_digest": "2cb2fc434cc4a2274eb146d5b27a7061", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 28596, "upload_time": "2019-07-24T17:49:29", "url": "https://files.pythonhosted.org/packages/bf/52/b4b568390b27885cbf3ec48198e3d1729aff0bfe4d13c0888600e9115b87/neulang-0.3.0.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "5699f4f39c80c9c4afe39cbfb1e163f8", "sha256": "b007eae188782998bac040a2b471799524661f1a3aa69f88c5f38069dea9dd91" }, "downloads": -1, "filename": "neulang-0.3.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "5699f4f39c80c9c4afe39cbfb1e163f8", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 56936, "upload_time": "2019-08-08T01:49:47", "url": "https://files.pythonhosted.org/packages/9a/5a/c8bbbe647eb67325186e69cc5e8aa792d674ba20cac9e5176dae2a2c8392/neulang-0.3.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "68695346daf38277bee003f77c7ce0ec", "sha256": "68698587d3c605ebd03684ce05672eaf1454a67c7a4c96588efae8fb9a7c3252" }, "downloads": -1, "filename": "neulang-0.3.1.tar.gz", "has_sig": false, "md5_digest": "68695346daf38277bee003f77c7ce0ec", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 39584, "upload_time": "2019-08-08T01:49:50", "url": "https://files.pythonhosted.org/packages/17/ad/113911c5588641564f461df5eac6063cd83dfb3034148ede7230a03043a4/neulang-0.3.1.tar.gz" } ], "0.3.2": [ { "comment_text": "", "digests": { "md5": "ca45b2e82c03b6e8a83b883f2ade24ab", "sha256": "f3db31ec13e88de67c47395fef26488bedf5797eebaf9027c4148682460a7cfc" }, "downloads": -1, "filename": "neulang-0.3.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ca45b2e82c03b6e8a83b883f2ade24ab", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 61756, "upload_time": "2019-08-16T19:21:58", "url": "https://files.pythonhosted.org/packages/bb/35/f3af59cc46514f09e7db06d475a1a771e9134f75db94c15df9b7ef48e2be/neulang-0.3.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "811e0ed2b1166c10d92b467224e69479", "sha256": "7f70de1784369c2d4fd593fd39430a687ea736b694a347a089a197587551e9e0" }, "downloads": -1, "filename": "neulang-0.3.2.tar.gz", "has_sig": false, "md5_digest": "811e0ed2b1166c10d92b467224e69479", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 44577, "upload_time": "2019-08-16T19:21:59", "url": "https://files.pythonhosted.org/packages/8a/e0/2b4688b26585a6e657c0953d1b646416090cf4e60b35e87de53907cce574/neulang-0.3.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ca45b2e82c03b6e8a83b883f2ade24ab", "sha256": "f3db31ec13e88de67c47395fef26488bedf5797eebaf9027c4148682460a7cfc" }, "downloads": -1, "filename": "neulang-0.3.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ca45b2e82c03b6e8a83b883f2ade24ab", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 61756, "upload_time": "2019-08-16T19:21:58", "url": "https://files.pythonhosted.org/packages/bb/35/f3af59cc46514f09e7db06d475a1a771e9134f75db94c15df9b7ef48e2be/neulang-0.3.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "811e0ed2b1166c10d92b467224e69479", "sha256": "7f70de1784369c2d4fd593fd39430a687ea736b694a347a089a197587551e9e0" }, "downloads": -1, "filename": "neulang-0.3.2.tar.gz", "has_sig": false, "md5_digest": "811e0ed2b1166c10d92b467224e69479", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 44577, "upload_time": "2019-08-16T19:21:59", "url": "https://files.pythonhosted.org/packages/8a/e0/2b4688b26585a6e657c0953d1b646416090cf4e60b35e87de53907cce574/neulang-0.3.2.tar.gz" } ] }