Show HN: JavaScript Program Synthesis
grgv.xyz
grgv.xyz
function run(input) {
let output = []
for (let i0 in input) {
// block
let n2 = input[i0];
let n1 = n2 - i0;
if(n1 > i0) {
// block
output[0] = n2;
}
}
return output
}
console.log(run([4,3,8,2,5,1]))
console.log(run([1,1,1,1,1,20,0,0]))
// my counter example:
console.log(run([10, 9]))
It seems you still need to inspect the program to check if the program actually does what you expect it to do. This seems much harder to do with the generated code in the article.From my perspective most web development could be replaced by an advanced synthesizing algorithm and a product owner who understands the dsl.
I feel like the majority of web development work these days is just stringing together apis, which could easily be automated.
Coupled with next gen design tools for the front end I predict a huge reduction in development resources required for most projects.