{ "info": { "author": "Nicholas Bollweg", "author_email": "nick.bollweg@gmail.com", "bugtrack_url": null, "classifiers": [ "Framework :: IPython", "License :: OSI Approved :: BSD License", "Programming Language :: Lisp", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3" ], "description": "# [hy_kernel][]\n\n[![build-badge][]][build] [![pypi-badge][]][pypi]\n\nA simple [Jupyter][] kernel for [Hy](http://hylang.org), a pythonic lisp.\n\n[![](screenshot.png) _The Hy tutorial as a Jupyter Notebook_][tutorial]\n\n\n## Features\n- basic REPL functionality\n- autocomplete with most special Hy constructs\n- syntax highlighting from [lighttable-hylang][]\n- [cell and line magics][magic]\n- [interactive widgets][widgets]\n- [pretty good tests][build]\n\n\n## Installation\n\n\n### pip\n```shell\npip install hy_kernel\n```\n\n\n### docker\nYou can try out Hy Kernel in Docker with [Docker Compose][docker-compose]:\n\n```bash\ngit clone https://github.com/bollwyvl/hy_kernel.git\ncd hy_kernel && docker-compose up\n```\n\n## Execution\nTo start the notebook in your directory of choice, with a running Hy kernel:\n\n```console\nipython console --kernel hy\n```\n\nOr the notebook web GUI:\n\n```shell\nipython notebook\n```\n\nOr:\n```shell\nipython qtconsole --kernel hy\n```\n\nOr:\nYour GUI might have a kernel selector: In the Web GUI it's in the\nupper-right-hand corner. Find it, and select `Hy` kernel from the kernel\nselector.\n\n![IPython Kernel Selector][kernel-selector]\n\n\n## Implementation\nThis kernel subclasses [IPythonKernel][] directly, as opposed to using\n[KernelBase][], which would probably the correct thing to do. This works, but\nmight be brittle. Each cell is run through [astor][], so you're actually\nseeing hy \u2192 ast \u2192 py \u2192 ast. While this probably incurs additional overhead,\nthe benefits (free magics, widgets, all the history works) are just too great to\ngive up.\n\n\n## Limitations\n\n### QtConsole\nA lot of things don't work quite right in the qt console, and this will not be\nsupported to the same extent as the HTML notebook and terminal console.\n\n### Operators\n\n_Issue #5_\n\nUse of operators e.g. `*`, `+`, `/` as the left-most atom in an expression appears to\nwork:\n```hylang\n;; works\n(+ 1 1)\n```\n\nUsing operators as just about anything else doesn't:\n```hylang\n;; breaks\n(reduce + [1 2 3])\n```\n\n#### Workaround\nUse the `operator` module:\n\n```hylang\n(import (operator (mul add)))\n(reduce mul [1 2 3])\n```\n\nThis will probably need to be fixed upstream.\n\n\n### Magic\nCell and line magics are \"supported\", with the following caveats.\n\n#### \"Inline\" Line Magics\n\n_Issue #13_\n\nBecause we don't have much whitespace control over what gets compiled, and can't\ndo dirty tricks with comments (the hy compiler strips them), inline/indented\nline magics are probably not going to work.\n\n```hylang\n;; breaks\n(if True (\n !ls\n))\n```\n\n#### Raw Magics\nAdditionally, cell magics that should _not_ be parsed as Hy need to be _extra_-\nmagiced, with `%%%`. This is because there is no way to know whether a\nparticular magic expects python, or some other crazy thing e.g. html, ruby,\na file... not that `%%file` works anyway (see #12).\n\n```hylang\n%%html\n

This Breaks!

\n```\n\nbreaks, while\n\n```hylang\n%%%html\n

This Works!

\n```\n\nworks.\n\n\n## Collaboration\nIssues, pull requests, and forks are all supported and encouraged on the [Github\nrepository][hy_kernel].\n\nThis [discussion on `hylang-discuss`][discuss] is also a good place to chime in.\n\nAdditionally, the [Jupyter list][] can provide a larger perspective on how this\nstuff fits into the larger picture of interactive computing.\n\n[astor]: https://github.com/berkerpeksag/astor\n[build-badge]: https://travis-ci.org/bollwyvl/hy_kernel.svg\n[build]: https://travis-ci.org/bollwyvl/hy_kernel\n[discuss]: https://groups.google.com/forum/#!topic/hylang-discuss/UkoET6pU5sM\n[docker-compose]: https://docs.docker.com/compose/\n[hy_kernel]: https://github.com/bollwyvl/hy_kernel\n[IPythonKernel]: https://github.com/ipython/ipython/blob/master/IPython/kernel/zmq/ipkernel.py\n[Jupyter]: http://jupyter.org\n[Jupyter list]: https://groups.google.com/forum/#!forum/jupyter\n[kernel-selector]: http://ipython.org/ipython-doc/dev/_images/kernel_selector_screenshot.png\n[KernelBase]: https://github.com/ipython/ipython/blob/master/IPython/kernel/zmq/kernelbase.py\n[lighttable-hylang]: https://github.com/cndreisbach/lighttable-hylang\n[magic]: notebooks/Magics.ipynb\n[pypi-badge]: https://img.shields.io/pypi/v/hy_kernel.svg\n[pypi]: https://pypi.python.org/pypi/hy_kernel/\n[tutorial]: http://nbviewer.ipython.org/github/bollwyvl/hy_kernel/blob/master/notebooks/Tutorial.ipynb\n[widgets]: notebooks/Widgets.ipynb", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/bollwyvl/hy_kernel", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "hy_kernel", "package_url": "https://pypi.org/project/hy_kernel/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/hy_kernel/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/bollwyvl/hy_kernel" }, "release_url": "https://pypi.org/project/hy_kernel/0.3.0/", "requires_dist": null, "requires_python": null, "summary": "A hy kernel for IPython", "version": "0.3.0" }, "last_serial": 1591355, "releases": { "0.1.3": [ { "comment_text": "", "digests": { "md5": "e527fbfd3fd38aa1c7d4a46baf3a76b7", "sha256": "09886266b283b1a0070ee5cc699d60e061267cb016ece526c037d71836ca401c" }, "downloads": -1, "filename": "hy_kernel-0.1.3.tar.gz", "has_sig": false, "md5_digest": "e527fbfd3fd38aa1c7d4a46baf3a76b7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23411, "upload_time": "2015-06-07T01:22:33", "url": "https://files.pythonhosted.org/packages/d3/57/fb274043b6ddcefe58a7434c4fa55459f4b747c0c6f4d1a4757d8503abdd/hy_kernel-0.1.3.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "61aa646b9bb1d1edfcacffaba49fb6da", "sha256": "38d97cb0b81af6472efca3e1359f28cd15a3ef58b496066d06b602a13b051ddc" }, "downloads": -1, "filename": "hy_kernel-0.2.0.tar.gz", "has_sig": false, "md5_digest": "61aa646b9bb1d1edfcacffaba49fb6da", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25258, "upload_time": "2015-06-07T17:09:11", "url": "https://files.pythonhosted.org/packages/fd/18/bc2dc2ab64c18d680ab864a93db2ea546f8e00dc5e172a13b8865f9b4b29/hy_kernel-0.2.0.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "92feba6c80d9aa692f39adf4f1fe080f", "sha256": "f2c84220accc0284a3dd51660fabc4a4d49cea70e9a7652d503fe578c7b682da" }, "downloads": -1, "filename": "hy_kernel-0.3.0.tar.gz", "has_sig": false, "md5_digest": "92feba6c80d9aa692f39adf4f1fe080f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24847, "upload_time": "2015-06-14T05:36:56", "url": "https://files.pythonhosted.org/packages/24/d2/0b7f200e4fda7487947d762c995a9bf814467fcf4454d480cf7c83cf56b6/hy_kernel-0.3.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "92feba6c80d9aa692f39adf4f1fe080f", "sha256": "f2c84220accc0284a3dd51660fabc4a4d49cea70e9a7652d503fe578c7b682da" }, "downloads": -1, "filename": "hy_kernel-0.3.0.tar.gz", "has_sig": false, "md5_digest": "92feba6c80d9aa692f39adf4f1fe080f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24847, "upload_time": "2015-06-14T05:36:56", "url": "https://files.pythonhosted.org/packages/24/d2/0b7f200e4fda7487947d762c995a9bf814467fcf4454d480cf7c83cf56b6/hy_kernel-0.3.0.tar.gz" } ] }