This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

FoURLth stands for URLs in forth. Forth is a third-generation programming language created by Charles Moore in the early 1970s on an IBM 1130. He thought of it as more of a fourth-generation language and would have named it “fourth” but for the fact that file names on the 1130 could only be five characters long at the time. Hence, forth.

Forth makes heavy and more or less explicit use of a stack to maintain execution state. Because of its stack-orientedness, RPN (Reverse Polish Notation) works naturally for writing forth programs.

This module works in a python pyramid environment using traversal to decode a URL into a forth program. Whereas an actual forth program that multiplies two numbers and then squares them might look like this:

12 27 * dup *

The equivalent foURLth “program” would look just like a URL: http://fourlth.com/12/27/*/dup/*

Interaction with Pyramid

The FourlthInterpreter class is designed to work like a pyramid traversal resource, so it has a __getitem__ method, as well as other methods that can be invoked once the “program” has been decoded and is ready to run.

The default view simply returns a JSON object that contains the word result associated with whatever the top of the stack was at the end of execution. If the stack is empty, this value will be null. There are two other view callables included for demonstration and debugging purposes.

The pyramid traversal algorithim will scan the PATH_INFO portion of this URL, calling the resource’s __getitem__ method to look up each element. However, rather than returning the result of a lookup, the element is incorporated into the “program” being pseudo-compiled and the resource itself gets returned again.

Where new words are being defined, the returned resource is actually a new FourlthInterpreter instance that will be embedded in the current one. More or less the same scheme is used for IF-ELSE-THEN and LOOP constructions.

Why Bother?

The idea was to come up with a way to create highly-customized, server-side functions, safely, that could be rapidly engineered and deployed in web applications. Specifically, I wanted to have a simple query engine that could access gene expression data (microarray or RNA seq) and metadata that are part of a larger, web-based application. The idea was to be able to, for example, do a search for genes by symbol, then find out which, if any, datasets had expression information for those genes. Such a query might look like:

http://fourlth.net/Gata5/Myb/genesearch/ANY/datasetsearch/metadata

which mightthen return:

{ 'genes': ['Gata5', 'Muyb'], 'datasets': ['hiltonlab' { 'celltypes:' [...] }, ...] }

This JSON object could then be used by client-side logic to populate the web, dynamically.

An addition to building in querying capability, I’ve also built in several analytical tools. One could, theoretically, also incorporate an R interpreter via the rpy2 module, but that necessarily bloats the size of the server-side portion of the application. Care should be taken when doing this.

Acknowledgments

These sites served as references for the features included in this implementation:

Author

Nick Seidenman <seidenman@wehi.edu.au> Molecular Medicine Walter and Eliza Hall Institute Parkville, VIC Australia
Release History

Release History

0.1.0

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
fourlth-0.1.0-py2.7.egg (28.5 kB) Copy SHA256 Checksum SHA256 2.7 Egg Aug 8, 2013

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting