Is there a Factorio extension like "Scriptorio" that lets you put JSON on conveyor belts? With JavaScript or Lua function factories.
Then you could pass the b-trees themselves around with conveyor belts and inserters, as well as the objects to insert and search.
And write a recursive search function with a loop of conveyor belts running through factories, that just loops the tree around peeling off a level at a time until it hits the leaf, breaking the loop and outputting the result.
It's an interesting execution model, not standard JavaScript, more data flow. Should you allow "quantum tunneling" and "action at a distance" by allowing multiple references to the same underlying JSON objects from different conveyor belts / inserters / factories? That could be useful, but Factorio itself traditionally treats each physical item having a unique identity, so maybe it would be more "realistic" not to support multiple references. Or you can only make multiple references once you research "Quantum Tunneling JSON" technology, with the "JSON Reference Entangler Factory"!
If it doesn't exist you can probably wedge it in fairly easily.
I suggest that it would be worth your time to give it a poke just to see what a thoroughly excellent example of software engineering they've made there.
I missed his entire career. head down working no time for TV, people said "you should check this guy out" and a few years later he wasnt there no more.
Then you could pass the b-trees themselves around with conveyor belts and inserters, as well as the objects to insert and search.
And write a recursive search function with a loop of conveyor belts running through factories, that just loops the tree around peeling off a level at a time until it hits the leaf, breaking the loop and outputting the result.
It's an interesting execution model, not standard JavaScript, more data flow. Should you allow "quantum tunneling" and "action at a distance" by allowing multiple references to the same underlying JSON objects from different conveyor belts / inserters / factories? That could be useful, but Factorio itself traditionally treats each physical item having a unique identity, so maybe it would be more "realistic" not to support multiple references. Or you can only make multiple references once you research "Quantum Tunneling JSON" technology, with the "JSON Reference Entangler Factory"!