3 ms·
In said hypothetical world, though, the whatever-driver would also have been written by LLMs; and, if the printer or whatever is non-trivial and made by a typic
by dzaima 11mo ago
In said hypothetical world, though, the whatever-driver would also have been written by LLMs; and, if the printer or whatever is non-trivial and made by a typical large company, many LLM instances with a sizable amount of token spending over a long period of time.
So getting your own LLM rewrite to an equivalent point (or, rather, less buggy as that's the whole point!) would be rather expensive; at the absolute very least, certainly more expensive than if you still had the original source code to reference or modify (even if an LLM is the thing doing those). Having the original source code is still just strictly unconditionally better.
Never mind the question of how you even get your LLM to reverse-engineer & interact with & observe the physical hardware of your printer, and whatever wasted ink during debugging of the reinvention of what the original driver already did correctly.
- AnthonyMouse 11mo agoNow I'm kind of curious if you give an LLM the disassembly of a proprietary firmware blob and tell it to turn it into human-readable source code, how good is it at that? You could probably even train one to do that in particular. Take existing open source code and its assembly representations as training data and then treat it like a language translation task. Use the context to guess what the variable names were before the original compiler discarded them etc.
- CamperBob2 11mo agoShould be possible. A couple of years ago I used an earlier ChatGPT model to understand and debug some ARM assembly, which I'm not personally very familiar with. I can imagine that a process like what you describe, where a model is trained specifically on .asm / .c file pairs, would be pretty effective.
- deleted 11mo ago[deleted]
- dzaima 11mo agoThe most difficult parts of getting readable code would be dealing with inlined functions and otherwise-duplicated code from macros or similar, and dealing with in-memory structure layouts; both pretty complicated very-global tasks. (never mind naming things, but perhaps LLMs have a good shot at that) That said, chatgpt currently seems to fail even basic things - completely missed the `thrM` path being possible here: https://chatgpt.com/share/69296a8e-d620-800b-8c25-15f4260c78db https://chatgpt.com/share/69296a8e-d620-800b-8c25-15f4260c78... https://dzaima.github.io/paste/#0jZJNTsMwEIX3OcWoSFWCqrhN0wbKArkgVlAJAevKf2ktJU5lO2oK6jEQK/ZwDi7EEXCUNoDogs3I9rz3@XlkhEBUK6KMLBQUKSytXZkJQgtplyUNWZEj/khkTtDF9HaGaFZQNBrzPh/SIYkFoVE/PklIwlI6GDF6GpE@SXjimsMEGc0QLWVmpTKIaIfkITu6jgeRZyyxkoFUmVQCppCX2fwO@1OwPbdb16UK4MkD0MKWWgHf4BpQi7pOfLm5JzQTM9yrxVVw5m0PMvF/mPgXE/9keg2GRYcwMgVfmqtx7K8D6EKzrIKm2d6Sz9NaEaZwDFWYOizAtnVjrf9ammMHPd8/wu4ywWQ/KtumdDgQmRE7xjd37bj7EK2pcr42g13qG7/z@fr89vHi6vsEHpT7D4JZwYHoRZkLZcFuVsJ06nl8AQ#C https://dzaima.github.io/paste/#0jZJNTsMwEIX3OcWoSFWCqrhN0wb... and that's only basic bog-standard branching, no in-memory structures or stack usage (such trivial problems could be handled by using an actual proper disassembler before throwing an LLM at that wall, but of course that only solves the easy part)
- CamperBob2 11mo agoYou can't feed something like that to the free ChatGPT model and expect anything useful. Try these: https://chatgpt.com/s/t_6929f00ff5508191b75f31e219609a35 https://chatgpt.com/s/t_6929f00ff5508191b75f31e219609a35 (5.1 Pro Thinking) https://claude.ai/share/7d9caa25-14f7-4233-b15c-d32b86e20e09 https://claude.ai/share/7d9caa25-14f7-4233-b15c-d32b86e20e09 (Opus 4.5) https://docs.google.com/document/d/1C0lSKbLSZOyMWnGgR0QhZh3QxwdIZmSufNr6H5sXwQg/edit?usp=sharing https://docs.google.com/document/d/1C0lSKbLSZOyMWnGgR0QhZh3Q... (Gemini 3 Pro Thinking) All of them recognized the thrM exception path, although I didn't review them for correctness. That being said, I imagine the major showstopper in real-world disassembly tasks would simply be the limited context size. As you suggest, a standard LLM isn't really the best tool for the job, at least not without assistance to split up the task logically.
- dzaima 11mo agoThose first two indeed look correct (third link is not public); indeed free chatgpt is understandably not the best, but I did give it basically the smallest function in my codebase that does something meaningful, instead of any of the actually-non-trivial multi-kilobyte functions doing realistic things needing context.