Research Paper by Lead Scientists of Honda Research Institute & Rinf.tech Contributors
Store and Execute Sequential Notation
{
"volume": 5,
"current": {
"band": "Iron Maiden",
"song": "Phantom of the Opera",
"members": [
{"name": "Paul Di'Anno", "role": "vocals"},
{"name": "Dave Murray", "role": " guitar"},
{"name": "Dennis Stratton", "role": "guitar"},
{"name": "Steve Harris", "role": "bass guitar"},
{"name": "Nicko McBrain", "role": "drums"},
{"name": "Clive Burr", "role": "drums"}
]
}
"next": {
"band": "Metallica",
"song": "The Unforgiven II",
"members": [
{"firstname": "James Hetfield", "lastname": "vocals, rhythm guitar"},
{"firstname": "Kirk Hammett", "lastname": "lead guitar"},
{"firstname": "Jason Newsted", "lastname": "bass"},
{"firstname": "Lars Ulrich", "lastname": "Drums"}
]
}
}
[
()=> result = '',
'Start finding divisors for 100 numbers',
JSEN.for( 'i', 1, 100 ),
[
JSEN.get('i', (value)=> current = value),
()=> {
nTest = 1;
result = number + ': ';
},
JSEN.while( ()=> nTest <= current ), // Check divisors
[
JSEN.if( ()=> current % nTest == 0 ),
[
()=> result += nTest + ' ',
()=> ++nTest,
],
],
()=> console.log( result ),
],
]
The development of JSEN was financed by Honda Research Institute GmbH. The conclusions of the work are summarized in the research paper and GitHub repository bellow.
const JSEN = require( ‘JSEN’ );
const JSENVM = require( ‘JSENVM’ );
let dataArray = [];
let counter = 0;
const producer = [
JSEN.loop(),
[
()=> ++counter,
()=> dataArray.push( counter ),
JSEN.sleep( ()=> Math.random() * 2 ),
],
];
let data;
const consumer = [
JSEN.loop(),
[
JSEN.if( ()=> dataArray.length !== 0 ),
[
()=> data = dataArray.shift(),
()=> console.log("Consumed: " + data),
],
JSEN.sleep( ()=> Math.random() * 2 ),
],
];
JSENVM.run( producer, consumer );