JS 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…
> JS minification is fairly mechanical and comparably simple, so the inversion should be relatively easy. This is stated as if it's a truism, but I can't understand how you can actually believe this. Converting `let userSignedInTimestamp = new Date()` to `let x = new Date()` is trivial, but going the other way probably requires reading and understanding the rest of the surrounding code to see in what contexts `x` is…
OpenAI is good at unminifying code
231–240 of 321 posts
Re: OpenAI is good at unminifying code
#232Earlier quoted context omitted.
Sure, but that claim wouldn't be true for humans, right? So it's a nonsequiteur. The relevant claim would be: all humans can do is move around in their environments, adapt the world around them through action, observe using adaptive sensory motor systems, grow and adapt their brains and bodies in response to novel and changing environments, abstract sensory motor techniques into symbolic concepts, vocalize this using…
> all they can do is, in fact, sample from a compression of historical texts using a weighted probability metric. I don't think that's all they can do. I think they know more than what is explicitly stated in their training sets. They can generalize knowledge and generalize relationships between the concepts that are in the training sets. They're currently mediocre at it, but the results we observe from SOTA generati…
Compression is understanding. If you have a model which explains shadows you can compress your video data much better. Since you "understand" how shadows work.
Re: OpenAI is good at unminifying code
#233Tried hard, couldn't find any similar code.
Re: OpenAI is good at unminifying code
#234There’s no denying it. This task is intellectual. Does not involve rote memorization. There are not tons and tons of data pairs on the web of minimized code and unminified code for llms to learn from.
The llm understands what it is unminifying and it is in general superior to humans on this regard. But only in this specific subject.
Re: OpenAI is good at unminifying code
#235Earlier quoted context omitted.
> Seems like we could render all code open source. I agree. I think "AI generating/understanding source code" is a huge red herring. If AI was any good at understanding code, it would just build (or fix) the binary. And I believe how it will turn out to be, when we really have AI programmers, they will not bother with human-readable code, but code everything in machine code (and if they are tasked in maintaining exis…
Why wouldn't AIs benefit from using abstractions? At the very least it saves tokens. Fewer tokens means less time spent solving a problem, which means more problem solving throughput. That is true for machines and people alike. If anything I expect AI-written programs in the not so distant future to be incomprehensible because they're too short. Something like reading an APL program.
Re: OpenAI is good at unminifying code
#236This is an example of superior intellectual performance to humans. There’s no denying it. This task is intellectual. Does not involve rote memorization. There are not tons and tons of data pairs on the web of minimized code and unminified code for llms to learn from. The llm understands what it is unminifying and it is in general superior to humans on this regard. But only in this specific subject.
> There are not tons and tons of data pairs on the web of minimized code and unminified code for llms to learn from.
Are you sure about this? These can be easily generated from existing JS to use as a training set, not to mention the enormous amount of non-minified JS which is already used to train it.
Re: OpenAI is good at unminifying code
#237Earlier quoted context omitted.
> JS minification is fairly mechanical and comparably simple, so the inversion should be relatively easy. This is stated as if it's a truism, but I can't understand how you can actually believe this. Converting `let userSignedInTimestamp = new Date()` to `let x = new Date()` is trivial, but going the other way probably requires reading and understanding the rest of the surrounding code to see in what contexts `x` is…
Because of how trivial that step is, it's likely pretty easy to just take lots of code and minify it. Then you have the training data you need to learn to generate full code from minified code. If your goal is to generate additional useful training data for your LLM, it could make sense to actually do that.
Re: OpenAI is good at unminifying code
#238Author of HumanifyJS here! I've created specifically a LLM based tool for this, which uses LLMs on AST level to guarantee that the code keeps working after the unminification step: https://github.com/jehna/humanify
More tools should be built on ASTs, great work! I'm still waiting for the AST level version control tbh
Re: OpenAI is good at unminifying code
#239This is an example of superior intellectual performance to humans. There’s no denying it. This task is intellectual. Does not involve rote memorization. There are not tons and tons of data pairs on the web of minimized code and unminified code for llms to learn from. The llm understands what it is unminifying and it is in general superior to humans on this regard. But only in this specific subject.
The challenge of understanding minified code for a human comes from opaque variable names, awkward loops, minimal whitespacing, etc. These aren't things that a computer has trouble with: it's why we minify in the first place. Attention, as a scheme, should do great with it.
I'd also say there is tons of minified/non-minified code out there. That's the goal of a map file. Given that OpenAI has specifically invested in web browsing and software development, I wouldn't be surprised if part of their training involved minified/unminified data.
Re: OpenAI is good at unminifying code
#240This is an example of superior intellectual performance to humans. There’s no denying it. This task is intellectual. Does not involve rote memorization. There are not tons and tons of data pairs on the web of minimized code and unminified code for llms to learn from. The llm understands what it is unminifying and it is in general superior to humans on this regard. But only in this specific subject.