Say I had a Windows application, #cpp that runs inside the console, that does some inconceivably (to me) complex math on structured input data, then generates a corresponding output.

It’s mine but I didn’t write it, and don’t have the source code. But I do have an incredibly detailed article written by the author, that describes the math involved and optimisations to make it run, which I couldn’t begin to understand or explain.

What are the chances of finding someone to recreate it in #js ?

@siblingpastry shouldn't be hard. the tricky part is defining the maths it's doing
@siblingpastry shouldn't be an issue. The easiest path is likely to compile the cpp to wasm.
@steadmanticore I don’t have the source code though, only the compiled executable.

@siblingpastry ah, you did say that, sorry.

I still don't think it would necessarily be too bad (I do reverse engineering of compiled binaries for funsies), but yeah, much trickier.

@siblingpastry @steadmanticore

There are lots of decompiler tools that extract "source code" from an executable. It's not always very readable, but that kind of doesn't matter if it's just going back into a WASM compiler.

It might not work, at which point you're contracting someone. But it could work. And it would bypass a lot of effort if it did.

My bigger worry, whether you contract or convert, is having test cases on hand to verify that the new thing works the same as the old thing.

@gatesvp @steadmanticore I have loads of sample input and output data, and I can generate loads more as required. I’ve already prototyped an in-browser editor that can generate and pass it through an http API.
@siblingpastry I suppose the question is, where would it be running in JS, browser or node?
@fimion It would be running in-browser, presumably as an on-demand worker thread. The existing application allows me to bundle solutions with the game, but they have to assume that it starts from the beginning. A built-in would allow for players to get a solution from any board position, as well as create custom boards that are verified to be solveable. So latency of a few seconds generating the solution wouldn’t matter.