An implementation of programmable neural networks in Lua
| examples | Organize Luneur. Add CLI. | |
| img | Organize Luneur. Add CLI. | |
| LICENSE | fix luneur if run is called with no args, add license | |
| luneur.lua | fix luneur if run is called with no args, add license | |
| main.lua | Organize Luneur. Add CLI. | |
| README.md | Organize Luneur. Add CLI. | |
Luneur
A programming language for writing McCulloch-Pitts Neural Networks. This code is ported from the work of Devine Lu Linvega's.
Luneur supports rudimentary IO via nueron hooks.
Example
Cat
The following describes the classic cat program using a neural network and external hooks for IO.
init*; init*: signal*.
The signal* will fire once:
and activate the cat* program.
cat* tiggers a: read* from standard io.
no-input* prevents another;
no-input* means the program is:
done*.
if there character-read*;
consume the character-read* event:
then write* to standard io.
if there was a write*: then read*.
init* my program.
Averages
Find the everage of numbers read from standard input.
init* will begin my program.
init* will disable itself;
init* will activate: signal*.
The signal* will fire once:
and activate the average* program.
average* will:
read-line* from input then show-in-4* ticks.
read-line* will: loop-in-4* ticks and convert it's input into-a-number*.
using into-a-number*: we will accumulate* and count* it:
from there we will compute-the-average*:
finally, storing the last-average* for later.
In the last tick of our loop ( loop-in-1* );
prevent print* from happening.
In the last tick of our loop ( loop-in-1* ):
make our average* program run again.
In the last tick of our show delay ( show-in-1* ):
trigger last-average*.
We will try to show last-average*:
using print* every cycle.
countdown show-in-4*:
show-in-3*:
show-in-2*:
show-in-1*.
countdown loop-in-4* ticks:
loop-in-3*:
loop-in-2*:
loop-in-1*.