5 ms·
ExifTool is merely a bunch of Perl code, which can't be parsed nor compiled to a program, i.e. computer instructions. There is nothing to port. The only other
by cthor 2y ago
ExifTool is merely a bunch of Perl code, which can't be parsed nor compiled to a program, i.e. computer instructions. There is nothing to port.
The only other option is a rewrite. Does that really sound easier?
- tantalor 2y agoComment obviously meant "port" as in "to another programming language". > only other option is a rewrite If you mean by hand, not necessarily, you could use a "code converter" tool to do the rewrite automatically. But it may be impractical; perl is a notoriously difficult language to work with. Perl is pretty close to Ruby and Python; those may be the most obvious candidates.
- cthor 2y agoThere are no programs that will fully transpile Perl to not-Perl, because that would require parsing Perl. A code converter that kindof-sortof-but-not-really transpiles (like Python's 2to3) would require a lot of debugging of ugly machine generated source code. Who wants to do that? Would probably be even harder than a full rewrite. (How many Python libraries were actually ported using 2to3?) Similar for using any translation an LLM might spit out. So yes, by hand. And it's not obvious if a full rewrite of a complex library would be easier than porting its runtime to WASM, especially when said runtime has been ported to countless other systems already.
- ab5tract 2y agoEnglish is a notoriously difficult language to work with. Should we be translating all of our English to Esperanto?
- hobs 2y agoIt really depends on how ExifTool (which again, I started from a point of ignorance so idk) decides to do the work in the first place. Does it have a bunch of magic functions that decide random things about bits? Does it have some sort of internal metadata file format identification lookup? No idea! But in some of those cases rewriting it is a lot less insane than others.