{ "info": { "author": "Nick Seidenman", "author_email": "seidenman@wehi.edu.au", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "License :: OSI Approved :: BSD License" ], "description": "========================\nFoURLth -- URLs in Forth\n========================\n\n*FoURLth* stands for *URLs in forth*. Forth is a third-generation programming language \ncreated by Charles Moore in the early 1970s on an IBM 1130. He thought of it as more of a fourth-generation\nlanguage and would have named it \"fourth\" but for the fact that file names on the 1130 could only be\nfive characters long at the time. Hence, *forth*.\n\nForth makes heavy and more or less explicit use of a stack to maintain execution state. Because of its\nstack-orientedness, *RPN* (Reverse Polish Notation) works naturally for writing forth programs. \n\nThis module works in a python *pyramid* environment using traversal to decode a URL into a forth program.\nWhereas an actual forth program that multiplies two numbers and then squares them might look like this::\n\n 12 27 * dup *\n\nThe equivalent foURLth \"program\" would look just like a URL: ``http://fourlth.com/12/27/*/dup/*``\n\nInteraction with Pyramid\n------------------------\n\nThe *FourlthInterpreter* class is designed to work like a pyramid traversal *resource*, so it\nhas a ``__getitem__`` method, as well as other methods that can be invoked once the \"program\" has\nbeen decoded and is ready to run. \n\nThe default view simply returns a JSON object that contains the word ``result`` associated with\nwhatever the top of the stack was at the end of execution. If the stack is empty, this value will be ``null``.\nThere are two other view callables included for demonstration and debugging purposes.\n\nThe pyramid traversal algorithim will scan the ``PATH_INFO`` portion of this URL, calling the\nresource's ``__getitem__`` method to look up each element. However, rather than returning the result of\na lookup, the element is incorporated into the \"program\" being pseudo-compiled and the resource itself\ngets returned again. \n\nWhere new words are being defined, the returned resource is actually a new *FourlthInterpreter* instance\nthat will be embedded in the current one. More or less the same scheme is used for IF-ELSE-THEN and\nLOOP constructions.\n\nWhy Bother?\n-----------\n\nThe idea was to come up with a way to create highly-customized, server-side functions, safely, that could\nbe rapidly engineered and deployed in web applications. Specifically, I wanted to have a simple query\nengine that could access gene expression data (microarray or RNA seq) and metadata that are part of a larger,\nweb-based application. The idea was to be able to, for example, do a search for genes by symbol, then find out\nwhich, if any, datasets had expression information for those genes. Such a query might look like::\n\n http://fourlth.net/Gata5/Myb/genesearch/ANY/datasetsearch/metadata\n\nwhich mightthen return::\n\n { 'genes': ['Gata5', 'Muyb'], 'datasets': ['hiltonlab' { 'celltypes:' [...] }, ...] }\n\nThis JSON object could then be used by client-side logic to populate the web, dynamically.\n\nAn addition to building in querying capability, I've also built in several analytical tools.\nOne could, theoretically, also incorporate an *R* interpreter via the *rpy2* module, but\nthat necessarily bloats the size of the server-side portion of the application. Care should be taken \nwhen doing this.\n\nAcknowledgments\n---------------\n\nThese sites served as references for the features included in this implementation:\n\n * http://galileo.phys.virginia.edu/classes/551.jvn.fall01/primer.htm\n * http://theforthsource.com/\n\n\nAuthor\n------\n\n Nick Seidenman \n Molecular Medicine\n Walter and Eliza Hall Institute\n Parkville, VIC\n Australia", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://pypi.python.org/pypi/fourlth/", "keywords": "forth computer language web programming", "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "fourlth", "package_url": "https://pypi.org/project/fourlth/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/fourlth/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://pypi.python.org/pypi/fourlth/" }, "release_url": "https://pypi.org/project/fourlth/0.1.0/", "requires_dist": null, "requires_python": null, "summary": "FORTH implementation that can be used with pyramid to pass forth program as URL", "version": "0.1.0" }, "last_serial": 835361, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "37d906ec68b4ef65a758024c63662c39", "sha256": "899e135c134f14ceec4fba45eab12ad6fe2b8452649ee326a239c01d8854ed25" }, "downloads": -1, "filename": "fourlth-0.1.0-py2.7.egg", "has_sig": false, "md5_digest": "37d906ec68b4ef65a758024c63662c39", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 28451, "upload_time": "2013-08-08T08:30:08", "url": "https://files.pythonhosted.org/packages/4f/a1/62d994f4817065dcc9abc022be2d227710796988fd11a4df28600217a172/fourlth-0.1.0-py2.7.egg" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "37d906ec68b4ef65a758024c63662c39", "sha256": "899e135c134f14ceec4fba45eab12ad6fe2b8452649ee326a239c01d8854ed25" }, "downloads": -1, "filename": "fourlth-0.1.0-py2.7.egg", "has_sig": false, "md5_digest": "37d906ec68b4ef65a758024c63662c39", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 28451, "upload_time": "2013-08-08T08:30:08", "url": "https://files.pythonhosted.org/packages/4f/a1/62d994f4817065dcc9abc022be2d227710796988fd11a4df28600217a172/fourlth-0.1.0-py2.7.egg" } ] }