afaik i already translated it to lite-c.
also
define max_nodes 300; // maximum number of nodes that can be used in this demo
define max_arrays 90000; // 300 x 300 (max_nodes * max_nodes)
would be
var max_nodes=300; // maximum number of nodes that can be used in this demo
var max_arrays=90000; // 300 x 300 (max_nodes * max_nodes)
not the one you did.