This post basically says that I don't need to document my code anymore. No more comments, they can be generated automatically. Hurray!
OpenAI is good at unminifying code
71–80 of 321 posts
Re: OpenAI is good at unminifying code
#72JS minification is fairly mechanical and comparably simple, so the inversion should be relatively easy. It would be of course tedious enough to be manually done in general, but transformations themselves are fairly limited so it is possible to read them only with some notes to track mangled identifiers. A more general unminification or unobfuscation still seems to be an open problem. I wrote handful of programs that…
I'm not on PC so it's not tested.
Re: OpenAI is good at unminifying code
#73Please let this one have knock-on effects on reverse engineering.
Re: OpenAI is good at unminifying code
#74Earlier quoted context omitted.
It's because the author miscopy-pasted the original code: those "â–‘â–’â–“â–ˆ" at the end of the O5 string are supposed to be the block characters. E.g. "â–‘" in Windows-1252 [0] is 0xE2 0x96 0xE2 which, in UTF-8, exactly the encoding for U+2592 MEDIUM SHADE [1]. [0] https://en.wikipedia.org/wiki/Windows-1252#Character_set [1] https://www.compart.com/en/unicode/U+2592
Possible that this is the mistake. However, I don't think I miscopied the original code. https://reactive.network/assets/index-8b4ef4ac.js If you look for `oahkbdpqwmZO0QLCJUYXzcvunxrjft` in the output, you should see that those characters appear exactly like that. Maybe an issue with encoding of the script file?
Re: OpenAI is good at unminifying code
#75LLMs are excellent at text transformation. It's their core strength and I don't see it being used enough.
One potential benefit should be that with the right tooling around it it should be able to translate your code base to a different language and/or framework more or less at the push of a button. So if a team is wondering if it would be worth it to switch a big chunk of the code base from python to elixir they don't have to wonder anymore. I tried translating a python script to javascript the other day and it was flaw…
It does a well at writing simple to medium complexity automation scripts around AWS.
If it gets something wrong, I tell it to “verify your answer using the documentation available on the web”
Re: OpenAI is good at unminifying code
#76This post basically says that I don't need to document my code anymore. No more comments, they can be generated automatically. Hurray!
Re: OpenAI is good at unminifying code
#77Re: OpenAI is good at unminifying code
#78As someone who is "not a developer" - I use the following process to help my:
1. I setup StyleGuide rules for the AI, telling it how to write out my files/scripts:
- Always provide full path, description of function, invocation examples, and version number.
- Frequently have it summarize and explain the project, project logic, and a particular file's functions.
- Have it create a README.MD for the file/project
- Tell it to give me mermaid diagrams and swim diagrams for the logic/code/project/process
- Close prompts with "Review, Explain, Propose, Confirm, Execute" I do this because Claude and ChatGPT are FN malevelant in their ignoring of project files/context - and their hallucinate as soon as their context window/memory fills up.
Further they very frequently "forget" to refer to the project context files uploaded/artifacts they themselves have proposed and written etc.
But - asking for a readme with code mermaid and logic is helpful to keep me on track.
Re: OpenAI is good at unminifying code
#79Re: OpenAI is good at unminifying code
#80it is also pretty good at decompiling - try feeding it the output of https://godbolt.org/