|
|
|
|
|
by NonHyloMorph
3 hours ago
|
|
Can someone with a deeper understanding of these sort of processes say something about the intricaies of building such a transformation process? Seems like constucting the architecture and feedback loops that guide the LLM to achieve a specific goal (byte wise bevhaviour replication) seems rather non trivial and as its on field of research? How common is it to achieve what the authors are publishing here as been having achieved? How elaborate are the achieved goals (i assume that what is specified here is rather precise and assume its true - in good faith for the sake of my question and as it is stated for the sake of being potentually reviewed/checked against)? How advanced are the metrics/behavioral constraints that guided the process? Whats the state of the art of this sort of ehm..reversereplication(?)archaeomorphic kyberneering(?), archaehylomorphic programming(?). Seems like an interesting approach and maybe thats also partially because I haven't seen such an approach - regarding the specificity and methology of defining the desired endresult. [some speculative neologismification based on my (limited) understanding of ancient greek ethymology《to illustrate my aesthesis of that process. For the notion of hylomorphism see gilbert simondon ("machine") philosophy] Adding: polite request to overlook potential orthographic deficiencies of text |
|
So, for example, i ported stb_image from C to Jai (you can think of Jai as similar to Zig, another c-style lang).
To do that, i built my own agent scheduling/swarm system, because there is nothing out there that works, its all slop. First i used normal claudecode and the likes to build a set of translation rules, documentation about the project, and set up the context for all. Then the first stage of the swarm was to use claude to split the 7000 line library into chunks of about 500 lines each, a few functions/structs at a time. Then each deepseek bot had a task of translating that snippet of code from C to Jai. Next, i had a system merge it all back together. This was done with just a single claudecode running over time. It had to be agentic and not a script because the bots often would duplicate definitions and things like that.
Then, i had a system where it would try to compile the project, get an error list, parse the error list, and split that error list across multiple fixer agents.
Doing multiple fixers because Jai can give you a large error list across a bunch of functions, so this speeds it up. If your project rules/setup/etc is better you can improve this step to have less errors to begin with. The more tools you can have to prevent errors instantly on a feedback loop of each sub-task, the better it goes.
After the fixer step, the code was ported, but with some mistakes. I ran a wide pass of having 2 agents look at each struct/function, and validate if the translation was done well. 2 of them because if both agree the function is fine, the function probably is actually fine.
Next, i began iterating the test suite. The library had a decent enough test suite, so splitting the work between testing + fixing tests across the different parts of the library was doable. for example i would run fixes on png format and jpeg format at once couse their code doesnt overlap.
After the tests were 100% green, the next stage was to implement a literal exploit finding swarm to fuzz it all, which actually found a couple errors on the original library and found a bunch of more obscure bugs in the port.
After that, now i have my own version of this image loading library, more hardened than the original, on a pet lenguage i wanted to do it for.
Here is the result https://github.com/vblanco20-1/stb_image_jai
Note that the better the AI you have, the less error the process has, and the larger chunking you can use. Mythos can likely do this same port much easier, but deepseek flash did it in about 3 bucks of tokens including the trial runs and experiments.
I later use this tooling to build a translator agent swarm for my videogame that can do english to anything translation for 7000 strings that can be menu buttons, tooltips, small fluff text, and others.