Thursday, December 13, 2007

Flock

had an idea of a new programming language over lunch.

Flock

In flock everything is a graph.
So
A = 5 ;

assigns a graph with one node ( with value 5 ) to the Flock called A.

A graph consists of nodes + (weighted)edges.

A node can be an atom ( int,float,string,char..) or another graph as a 'value' or label.

A flock can have a disjoint (unconnected) graph.

Naturally everything can be represented with a graph of one sort or another. For example
A = 'map.gig'.loadAsImage();
makes a gridded graph with each A node being a pixel and the links are the way to get from one adjacent pixel to another.

alternatively a linked list is a linear graph. A hash table is a graph.

In Flock method can be assigned to
a) A Node
b) an edge
b) The entire flock ( single message shared over all instances)

Flock methods can be used to implement parallel programming by using a special method to call the method from the flock in parrell.

A large flock may be distributed invisibly across a number of computers. Hence a message may be transmitted from one sheep/link to another down an edge and actually be transmitting over the network.

No comments: