{ "info": { "author": "Logan Perkins", "author_email": "perkins@injeanieousdesigns.com", "bugtrack_url": null, "classifiers": [], "description": "schemepy\n========\n\nImplementation of scheme in python supporting call/cc and hygienic macros\nVersion 1.2 has added support for pre-expanding syntax in the syntax_expand \nmodule. It modifies SimpleProcedure objects in-place. Version 1.2 also \nadds a JIT compiler which converts SimpleProcedure objects to native python\nfunctions. It is available in the jit module. Setting scheme.jit.enabled\nwill give a basic, safe level of JIT activity. Setting scheme.jit.lambdas_enabled\nand scheme.jit.unstable_enabled increase the JIT activity, but can interfere\nwith dynamic programs. The JIT can be manually triggered for individual\nfunctions by calling scheme.jit.makeFunction(proc), which expands proc's\nsyntax (in-place), then returns a new python function for proc (or the \noriginal procedure if anything went wrong). By default the JIT is chatty,\nbut can be silenced in scheme.debug.debug_settings. Note that JITed \nfunctions break TCO.\n\nThe unstable level sometimes emits bytecode that chokes PYPY, but CPython\nhas no issues with it. \n\nUsing schemepy\n---------\n\nThere are 3 basic ways to use schemepy. As a stand-alone scheme interpreter:\n\n $ /usr/bin/schemepy \n\nAs a stand-alone REPL:\n\n $ /usr/bin/schemepy\n schemepy> \n\n\nOr from inside a python script\n\n import scheme\n scheme.repl.repl()\n schemepy> \n\nOr to run predefind strings from python\n\n import scheme\n scheme.eval.Eval(myString)\n #or\n scheme.eval.Eval(myFile)\n\nEval will only execute the first statement in its input, so if you want compound inputs, wrap them with \n \n (begin )\n\nThe default environment setup is controlled in builtins.py, with \nadditional definitions in builtins.scm (scheme/builtins.scm in the \nsource, /usr/share/schemepy/stdlib/builtins.scm once installed). \n\nScheme is sandboxed away from python, so only functions provided into \nthe global Environment (scheme.Globals.Globals) or some other scheme \nenvironment can be accessed. Note that by default, the interpreter is \ngiven access to the file system and other sensitive functions. If you \nwant to use it as a sandbox for user code, you need to strip out \nanything you don't want called. Also, getattr and getitem are \nundefined in the default environment. If you are running trusted \ncode, you can simply add the standard getattr to the global \nEnvironment. If you are running user code, and want to provide \ngetattr, write one that only allows access to approved data types:\n\n def safegetattr(obj, attr):\n if isinstance(obj, some_class):\n return getattr(obj, attr)\n raise TypeError(\"getattr only supports objects of type %r\" % some_class)\n\nor similar.\n\n\n\nDifferences from r5rs scheme\n---------\n\nMacro expansion is mixed with code execution. Normally macro \nexpansion would be done at compile time, but\nfor simplicity each statement is expanded right before execution. By \nitself, the only effect this has is on performance.\n\nMacros are first-class objects. Normally, macros and normal \nprocedures are essentially the same, except that macros' names are \nlisted in a MacroTable, while procedures are listed in the normal \nvariable table. I don't maintain a separate list of macros, so an \nobject being a macro is recorded on the object itself. Normally, this \nisn't noticable, as any code which wouldn't generate errors in racket \nshould produce the same output (This is done by making \ndefine-syntax take either a macro or a procedure and wrap it in a \nmacro, which calls the wrapped object with the syntax and expects the \nreturn type to be syntax), but it does open the door to some things \nwhich scheme users won't expect.\n\n (define some-macro #f)\n (define (somefun) \n (define-syntax junk (lambda (x) #'(+ 1 2)))\n (set! some-macro junk)\n )\n (somefun) (some-macro)\n ;3\n\n\nTail recursion and general Tail-Call-Optimisation\n---------\n\nTail recursion is not handled differently from other tail calls; but, \nTCO is partially supported. Some calls recursively call process(), \nwhich breaks TCO, but most calls are properly TC optimised.\n\n\n\nBooleans\n---------\n\nTruth values follow python's convention rather than scheme's (0, \nFalse, None, (), and '' are false, or anything which provides a \n__bool__ method which returns False). If you need scheme's behaviour, \nsimply rewrite eq? and what not to check for identity against False.", "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/perkinslr/schemepy", "keywords": "scheme r5rs define-syntax call/cc", "license": "LGPL", "maintainer": null, "maintainer_email": null, "name": "SchemePy", "package_url": "https://pypi.org/project/SchemePy/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/SchemePy/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/perkinslr/schemepy" }, "release_url": "https://pypi.org/project/SchemePy/1.2.0/", "requires_dist": null, "requires_python": null, "summary": "R5RS scheme interpreter, supporting hygenic macros and full call/cc", "version": "1.2.0" }, "last_serial": 1712492, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "b13a6c9d09f091ea8e0249439f90b2de", "sha256": "db32cef046c023cf9a11d9fab0cd33b48376dbf151c630ddbf5baaed002263c4" }, "downloads": -1, "filename": "SchemePy-1.0.tar.gz", "has_sig": false, "md5_digest": "b13a6c9d09f091ea8e0249439f90b2de", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 169809, "upload_time": "2014-12-22T20:26:18", "url": "https://files.pythonhosted.org/packages/7c/19/8309e49e4ad98fca716130617b2a1afbd0ad871f6aadb534798e79754df3/SchemePy-1.0.tar.gz" } ], "1.1": [ { "comment_text": "", "digests": { "md5": "d4c3e188b03062110038fc643439660b", "sha256": "9795a2c43941367d6a31d9a11adb49346d79a0ae5638dca0a9ae3e56936dbee6" }, "downloads": -1, "filename": "SchemePy-1.1.tar.gz", "has_sig": false, "md5_digest": "d4c3e188b03062110038fc643439660b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 154687, "upload_time": "2014-12-21T09:15:23", "url": "https://files.pythonhosted.org/packages/f5/7b/458e390a5fb7f966cd7c72691403162f17597842ccee3e66785b759c556b/SchemePy-1.1.tar.gz" } ], "1.1.01": [ { "comment_text": "", "digests": { "md5": "f3ad15bcd27ce2370c47d0c0f9f7c3fc", "sha256": "5865e10a0b9ba11f6b2303f5254e70273ca229314aa3436d3fdaabcd212e8048" }, "downloads": -1, "filename": "SchemePy-1.1.01.tar.gz", "has_sig": false, "md5_digest": "f3ad15bcd27ce2370c47d0c0f9f7c3fc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 154931, "upload_time": "2014-12-21T09:30:33", "url": "https://files.pythonhosted.org/packages/b4/d6/0ad7ae9cb8d8ba6937504db28753c0bcba3b9dfd17d92e18058f47fbff69/SchemePy-1.1.01.tar.gz" } ], "1.1.02": [ { "comment_text": "", "digests": { "md5": "6fe41ecf5be44a9fb2a89bd6c13d1ab3", "sha256": "5ac24da581de14204400c0cf3bbcc1ce5c0b5f960aee8f54992b523b1eb16813" }, "downloads": -1, "filename": "SchemePy-1.1.02.tar.gz", "has_sig": false, "md5_digest": "6fe41ecf5be44a9fb2a89bd6c13d1ab3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 170203, "upload_time": "2014-12-23T21:57:51", "url": "https://files.pythonhosted.org/packages/d5/73/55760fa770cc6cf6852f29f90230d2bb667d490bd4451272f80fe43f8b41/SchemePy-1.1.02.tar.gz" } ], "1.1.03": [ { "comment_text": "", "digests": { "md5": "eb25847fe40b39e9c22f48e62cd57f35", "sha256": "e206f4e6039e5da97133ab60f96fac29b32363fcae5a3d6702153c4be0468bdd" }, "downloads": -1, "filename": "SchemePy-1.1.03.tar.gz", "has_sig": false, "md5_digest": "eb25847fe40b39e9c22f48e62cd57f35", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 170260, "upload_time": "2014-12-24T01:43:59", "url": "https://files.pythonhosted.org/packages/28/75/c6c2d21a64934a68f631cfbd2c8737d5e5aaa972b53ca72a432348ad5fb7/SchemePy-1.1.03.tar.gz" } ], "1.1.04": [ { "comment_text": "built for Linux-3.15.5-gentoo-lp-debiancfg4-x86_64-Intel-R-_Core-TM-_i7-4500U_CPU_@_1.80GHz-with-glibc2.2.5", "digests": { "md5": "84e343385765d5d9a6d48834ee67df9f", "sha256": "5673bda6918da99ea942f8bb93276012fbbad3a0e31bcb74ec439efe13609fb5" }, "downloads": -1, "filename": "SchemePy-1.1.04.linux-x86_64.tar.gz", "has_sig": false, "md5_digest": "84e343385765d5d9a6d48834ee67df9f", "packagetype": "bdist_dumb", "python_version": "2.7", "requires_python": null, "size": 187896, "upload_time": "2015-03-07T01:32:35", "url": "https://files.pythonhosted.org/packages/92/c1/ef7ab5ae00b878420043940f2511bef44770de57bd6a2e515caf2c768b38/SchemePy-1.1.04.linux-x86_64.tar.gz" }, { "comment_text": "", "digests": { "md5": "73a19f37a181a31ece9cc6669aa7371e", "sha256": "98e609ccc37254ee294271a5a831bf5ff76b8fd8abaa5fa7813a99275cd4175c" }, "downloads": -1, "filename": "SchemePy-1.1.04.tar.gz", "has_sig": false, "md5_digest": "73a19f37a181a31ece9cc6669aa7371e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 184521, "upload_time": "2015-03-07T01:31:51", "url": "https://files.pythonhosted.org/packages/3f/b7/7a67e95f0b35ad4bcab5d6270c9f52a618ff30452399164324da658b2c24/SchemePy-1.1.04.tar.gz" } ], "1.2.0": [ { "comment_text": "built for Linux-3.19.2-gentoo-lp-debiancfg4-x86_64-Intel-R-_Core-TM-_i7-4500U_CPU_@_1.80GHz-with-glibc2.2.5", "digests": { "md5": "f4f12ee4b2a35fb9472cff553a8d2250", "sha256": "0768f337590f8f9d46af16acb540d0c005e15c72033f5b5e8ebc1ba62f73aa0a" }, "downloads": -1, "filename": "SchemePy-1.2.0.linux-x86_64.tar.gz", "has_sig": false, "md5_digest": "f4f12ee4b2a35fb9472cff553a8d2250", "packagetype": "bdist_dumb", "python_version": "2.7", "requires_python": null, "size": 211151, "upload_time": "2015-09-08T01:28:49", "url": "https://files.pythonhosted.org/packages/74/62/748e387e067f841eb47511a9cd01e81bc486893dfb03228f24e05156c9f1/SchemePy-1.2.0.linux-x86_64.tar.gz" }, { "comment_text": "", "digests": { "md5": "ca2122aa5231a41323c98ef1d901d936", "sha256": "eea2705b4075d27ce12166ad6c6b69d21962356c8f34a73b88e872be26f7c271" }, "downloads": -1, "filename": "SchemePy-1.2.0-py2-none-any.whl", "has_sig": false, "md5_digest": "ca2122aa5231a41323c98ef1d901d936", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 40849, "upload_time": "2015-09-08T02:12:11", "url": "https://files.pythonhosted.org/packages/3f/fb/7b0b2db5668623c0f7f7749b250c26e67292a929ced83ae4a2b89749441b/SchemePy-1.2.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c504e8cb100497e8f2d4c60008289d0f", "sha256": "7465a78d5b910e0326cc310de4e517a980eaa27533ad99945640b0cca20b4d65" }, "downloads": -1, "filename": "SchemePy-1.2.0.tar.gz", "has_sig": false, "md5_digest": "c504e8cb100497e8f2d4c60008289d0f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 200476, "upload_time": "2015-09-08T01:30:20", "url": "https://files.pythonhosted.org/packages/ff/85/f9fd7ac0aaaae9cd3d38fd75e8782621199da2b04acf36d7ee3e9a8d8f84/SchemePy-1.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "built for Linux-3.19.2-gentoo-lp-debiancfg4-x86_64-Intel-R-_Core-TM-_i7-4500U_CPU_@_1.80GHz-with-glibc2.2.5", "digests": { "md5": "f4f12ee4b2a35fb9472cff553a8d2250", "sha256": "0768f337590f8f9d46af16acb540d0c005e15c72033f5b5e8ebc1ba62f73aa0a" }, "downloads": -1, "filename": "SchemePy-1.2.0.linux-x86_64.tar.gz", "has_sig": false, "md5_digest": "f4f12ee4b2a35fb9472cff553a8d2250", "packagetype": "bdist_dumb", "python_version": "2.7", "requires_python": null, "size": 211151, "upload_time": "2015-09-08T01:28:49", "url": "https://files.pythonhosted.org/packages/74/62/748e387e067f841eb47511a9cd01e81bc486893dfb03228f24e05156c9f1/SchemePy-1.2.0.linux-x86_64.tar.gz" }, { "comment_text": "", "digests": { "md5": "ca2122aa5231a41323c98ef1d901d936", "sha256": "eea2705b4075d27ce12166ad6c6b69d21962356c8f34a73b88e872be26f7c271" }, "downloads": -1, "filename": "SchemePy-1.2.0-py2-none-any.whl", "has_sig": false, "md5_digest": "ca2122aa5231a41323c98ef1d901d936", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 40849, "upload_time": "2015-09-08T02:12:11", "url": "https://files.pythonhosted.org/packages/3f/fb/7b0b2db5668623c0f7f7749b250c26e67292a929ced83ae4a2b89749441b/SchemePy-1.2.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c504e8cb100497e8f2d4c60008289d0f", "sha256": "7465a78d5b910e0326cc310de4e517a980eaa27533ad99945640b0cca20b4d65" }, "downloads": -1, "filename": "SchemePy-1.2.0.tar.gz", "has_sig": false, "md5_digest": "c504e8cb100497e8f2d4c60008289d0f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 200476, "upload_time": "2015-09-08T01:30:20", "url": "https://files.pythonhosted.org/packages/ff/85/f9fd7ac0aaaae9cd3d38fd75e8782621199da2b04acf36d7ee3e9a8d8f84/SchemePy-1.2.0.tar.gz" } ] }