4 ms·
The conditions you’ve set here are very strict, but I have something that may almost fit. I’ve used Grok 3 to create a decompiler and then a compiler for a made
by M4v3R 2y ago
The conditions you’ve set here are very strict, but I have something that may almost fit. I’ve used Grok 3 to create a decompiler and then a compiler for a made up scripting language (for scripts extracted from Final Fantasy VII data files). I’ve fed it an example of how the low-level “assembly/opcodes” look like and then how I would like the higher level scripting language to look. With minimal guiding (I was telling it what I want, but not how I want it) it implemented a working decompiler and compiler that worked exactly to my specifications, written in Typescript. Created a custom tokenizer, parser to a custom AST structure and everything else that was needed. It took a few prompts to get right (and to add features I didn’t think about initially), but the resulting 1400+ lines of code I found to be very impressive for what a “fancy autocomplete” as many people say could generate.
Here’s the initial conversation if you’re interested: https://grok.com/share/bGVnYWN5_9ce1bed4-7136-4761-b45e-0ab02550c2b2 https://grok.com/share/bGVnYWN5_9ce1bed4-7136-4761-b45e-0ab0...
- aprilthird2021 2y ago> I’ve fed it an example of how the low-level “assembly/opcodes” look like and then how I would like the higher level scripting language to look. With minimal guiding (I was telling it what I want, but not how I want it) it implemented a working decompiler and compiler that worked exactly to my specifications, written in Typescript. I think this already falls out of OP's guidelines, which you pointed out are quite strict. They also happen to be the guidelines an AI would need to meet to "replace" competent engineers.
- signatoremo 2y agoIf there used to be 10 engineers in a team, and with LLM they only need eight because LLM help the team achieve the same workload, then two of them have been "replaced", even though the LLM can't do everything an engineer does. I haven't heard of any prediction that AI will completely replace all programmers.
- M4v3R 2y agoExactly. The argument never was that AI will replace every single programmer. But it looks like it will replace a good chunk of them. How many exactly remains to be seen.
- aprilthird2021 2y agoThis doesn't make sense though unless your company isn't growing. Most dev teams have large backlogs of work and any increase in productivity can lead to an increase in revenue generation. Programmers aren't paid to generate code. They're paid to figure out how to do X Y and Z business initiatives. Unless you don't have that many initiatives, how much sense does it make to let go of the people who can do that for you? It makes sense when companies are trying to cut costs, but that happens when the cost of borrowing is higher than the realizable profit margin
- aesbetic 2y agoI know popular sentiment is writing compilers is hard but not simple ones like this one without optimizations. Basic stages like lexing, parsing, building AST, and code gen aren’t conceptually difficult, just a lot code to churn out. Though I’ll admit LLMs have been weirdly good at regex.
- M4v3R 2y agoWell you’re saying this because you’re probably already familiar with the subject. I remember learning about writing your own compiler for the first time and it took me many hours to write the most simple lexer and fully understand it. And now an LLM can write that to my exact specific in minutes instead of hours. To me that’s quite a breakthrough.