lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 2014-06-30 09:11, Jorge wrote:
On 29/06/14 11:31, Mayuresh Kathe wrote:
hi,

just in case folks didn't know, the inventor of flow-based programming
loves lua enough to have started off on an implementation using it.

more about 'fbp' at; http://www.jpaulmorrison.com/fbp/

Thanks for the head up, yet another thing I thought I had invented all
by myself  :)

In case anyone is interested in this sort of things, I remind of
l-flow, a toy flow programming language written in pure Lua:

https://github.com/xopxe/lflow

A sample program could be as follows:

-----------------------------
'gris:1', 0.1 > sensor_poll > sense_left
'gris:2', 0.1 > sensor_poll > sense_right

sense_left, '>', 50 > threshold > forward_left
sense_right, '>', 50 > threshold > forward_right

forward_left, forward_left > motors >
-----------------------------

This controls a line-following robot, a typical first step in
educational robotics (variations are a "moth", follow the light and
"roach", escape from light).

The motivation behind it is pretty specific:
1. Test Lumen, the multitasking scheduler (https://github.com/xopxe/Lumen)
2. Experiment with an environment for building simple control programs
for educational robotics: is it possible learn to write control
applications for robots without learning imperative programming
before?

But this could inspire someone to do something, so there it goes.

cool, but, while flow-based programming does has the word flow in it,
it goes beyond flow programming.

in 'fbp', there are independent programs (like black-boxes) working
as independent processes, concurrently, exchanging information by way
of "information packets" there-by liberating such a system from
typical von-neumann oriented programming limitations.

~mayuresh