13 ms·
> NFTs couldn't re-write my entire Python codebase into Go Neither can LLMs. They can produce output that looks like a plausible re-write of your codebase, but
by cloogshicer 2y ago
> NFTs couldn't re-write my entire Python codebase into Go
Neither can LLMs. They can produce output that looks like a plausible re-write of your codebase, but on closer inspection turns out to have many minor and major errors everywhere.
The problem is that the closer inspection part is very often more work than writing the code by hand in the first place.
There hasn't been enough evidence for me that this will be possible to fix.
- HaZeust 2y agoI've used GPT-4 to do what I had said. I pasted the errors I was given, and did so for 2-3 more iterations, and it successfully ported critical in-house infrastructure from Python 3 to Go.
- sergiotapia 2y agoyou're never going to convince people that are in an ideological battle against AI.
- bigstrat2003 2y agoAnd you're never going to convince anyone if you assume without evidence that they are ideologically opposed to AI. Lots of people have tried these tools with an open mind and found them to not be useful, you need to address those criticisms rather than using a dismissive insult.
- HaZeust 2y agoWhat evidence would you like? You're posting on a thread that hyperlinks to a list of code and Claude Artifacts for pet-projects that can make thousands a month with some low-effort PPC and an AdWords embed, and some mid-size projects that can be anything from grounds to a promotion at a programming role - to the MVP for a PMF-stage startup. What, specifically, would pivot your pre-conceived notions?
- inexcf 2y agoDid you even look at the artifacts? Its a bunch of things a beginner would do on their first day programming. How do you make thousands a month from 1 library call to solve a qr code. A promotion for building an input field and calling a json to yaml converter library?
- newswasboring 2y ago> Its a bunch of things a beginner would do on their first day programming. Is this an exaggeration? Because this is absolutely not true. I'm a beginner in JavaScript and other web stuff and I absolutely can't build it in many days.
- inexcf 2y agoYou better check the code, mate. The meat of what most of it does is a one liner calling jsQR or some other imported lib to do the real work. I am not exaggerating in the slightest.
- newswasboring 2y agoDude. I don't judge my knowledge after the answer is given to me. If I was the junior programmer assigned to the author and they were having this chat with me I am telling you as a beginner I wouldn't be able to do it. Of course if you show me the answers I will think I can do it easy, because answers in programming are always easy (good answers anyways). It's the process of finding the answer that is hard. And I'm not a bad programmer either, I'm at least mediocre, I'm just unfamiliar with web technology.
- inexcf 2y agoI am of the firm believe that you can put "JavaScript scan qr code" in a search engine and arrive at your goal. The answers range from libraries to code snippets basically the same as those created by Claude. Using the same libraries. I feel like googling every step would be faster than trying to get it right with LLMs, but that is a different point. I've seen a complete no-code person install whisper x with a virtual Python environment and use it for realtime speech to text in their Japanese lessons, in less than 3 hours. You can do a simple library call in JavaScript.
- epolanski 2y agoIssue is, it takes time to learn how to interact with these tools and get the best out of them. And they get better quite fast.
- unit149 2y agoclaude-to-sql parser is particularly useful in LLM implementation
- sergiotapia 2y agoyou are replying to a submission with a dozen or more examples of real tangible stuff, and you still argue? pointless.
- farts_mckensy 2y agoNo need to address the criticisms. Just have chat gpt do it.
- versteegen 2y agoHumans have a massive pro-human bias. Don't ask one whether AI can replace humans and expect a fair answer.
- n0id34 2y agoWell, obviously. The only ones happy about all of our potential replacements would be those that have the power to do the replacing and save themselves a shitload of money. It's hardly like everyone is going to rejoice at the rapid advancement of AI that can potentially make most of us jobless....unless, as I said, you're the one in charge, then it's wonderful.
- Workaccount2 2y ago"It is difficult to get a man to understand something when his salary depends upon his not understanding it." - Upton Sinclair.
- fhdsgbbcaA 2y agoThere’s no ideological battle here. The first self-driving DARPA grand challenge was passed in 2005, everybody thought we’d have self driving on the road within a decade. 20 years later that’s still not the case, because it turns out NN/ML can do some very impressive things at the 99% correct level. The other 1% ranges in severity from “weird lane change” to “a person riding a bicycle gets killed”. GPT-3.5 was the DARPA grand challenge moment, we’re still years away from LLM being reliable - and they may never be fully trustworthy.
- josephg 2y ago> they may never be fully trustworthy. So? Neither are humans. Neither is google search. Chatgpt doesn't write bug free code, but neither do I. The question isn't "when will it be perfect". The question is "when will it be useful?". Or, "When is it useful enough that you're not employable?" I don't think its so far away. Everyone I know with a spark in their eye has found weird and wonderful ways to make use of chatgpt & claude. I've used it to do system design, help with cooking, practice improv, write project proposals, teach me history, translate code, ... all sorts of things. Yeah, the quality is lower than that of an expert human. But I don't need a 5 star chef to tell me how long to put potatoes in the oven, make suggestions for characters to play, or listen to me talk about encryption systems and make suggestions. Its wildly useful today. Seriously, anyone who says otherwise hasn't tried it or doesn't understand how to make proper use of it. Between my GF and I, we average about 1-2 conversations with chatgpt per day. That number will only go up.
- fhdsgbbcaA 2y agoI find it very interesting the primary rebuttals to people criticizing LLM from the “converted” tends to result in implicit suggestions the critique is rooted in old fashioned thinking. That’s not remotely true. I am an expert, and it’s incredibly clear to me how bad LLM are. I still use them heavily, but I don’t trust any output that doesn’t conform to my prior expert knowledge and they are constantly wrong. I think what is likely happening is many people aren’t an expert in anything, but the LLM makes them feel like they are and they don’t want that feeling to go away and get irrationally defensive at cogent criticism of the technology. And that’s all it is, a new technology with a lot of hype and a lot of promise, but it’s not proven, it’s not reliable, and I do think it is messing with people’s heads in a way that worries me greatly.
- VirusNewbie 2y agoBut how do you know those were the only errors?
- HaZeust 2y agoWhat's this question even mean? Because they're the only ones that came up in the debugger portion of the IDE, the output serves the intended purposes, the logging and error handling that I wanted to include were in the initial write-up prompt, and I could read the code it wrote because I partially knew the outputted language - and when I wasn't sure of a line, I asked it for clarification and a source from a reputable knowledgebase of the language, and GPT provided it?
- majormajor 2y agoI would've expected an answer involving "an exhaustive suite of test cases still passed" - "it looks right" is a low bar for any complex software project these days. It's the long, long, long tail of edge cases - not just porting them, but even identifying them to test - that slow or doom most real-world human rewrites, after all.
- josephg 2y agoTrue - but you can ask the chatbot to write a test suite too.
- IshKebab 2y agoI have also tried to do this and it didn't work as smoothly as you claim. I don't think either of you are wrong; it just heavily depends on the complexity of the app and how familiar LLMs are with it. E.g. rewriting a web scraper, CRUD backend or a build script? Sure, maybe. Rewriting a bootloader, compiler or GUI app? No chance.
- josephg 2y agoIts funny seeing the goalposts move in real time. "Yes, AI can make human sounding sentences, but can it play chess?" "Well yes, it can play chess. But no computer can beat a human grandmaster at chess." "Well it beat Kasperov - but it has no hope of beating a human at Go." "Its funny - it can beat humans at go but still can't speak as well as a toddler." "Alright it can write simple problems, but it introduces bugs in anything nontrivial, and it can't fix those bugs!" I write bugs in anything nontrivial too! My human advantages are currently that I'm better at handling a large context, and I can iterate better than the computer can. But - seriously, do you think innovation will stop here? Did the improvements ever stop? It seems like a pretty trivial engineering problem to hook an AI up to a compiler / runtime so it can iterate just like we can. Anthropic is clearly already starting to try that. I agree with you, today. I used claude to help translate some rust code into typescript. I needed to go through the output with a fine toothed comb to fix a lot of obvious bugs and clean up the output. But the improvement over what was possible with GPT3.5 is totally insane. At the current rate of change, I give it 5-10 years before we can ask chatgpt to make a working compiler from scratch for a novel language.
- wrtasfg 2y agoOf course it can stop, once legislation catches up and forbids IP theft using a thinly disguised probabilistic and compressed database of other people's code.
- josephg 2y agoYou really think those laws are coming? That the US and Chinese governments will force AI companies to put the genie back in the bottle? I think you're going to be very disappointed.
- swat535 2y agoGPT-4 has no understanding of logic what-so-ever, let's stop pretending it does. If it gives you a solution that is wrong, you have to point it at, then it will give you a second version , if that is also wrong, it will then slightly modify the same solutions over and over again instead of actually fixing the issue. It gets stuck in a loop of giving you 2-3 versions of the same solution with the slightly different outputs. It's only useful for boilerplate code and even then, you have to clean it up..
- GaggiX 2y agoThen you should try Claude, I have never seen it get stuck in a loop, at some point it would just rewrite everything if it came to that.
- tharant 2y agoI feel like I’ve been gaslit by the entire GenAI industry that I’m just bad at prompt engineering. When I’m talking to an LLM about stuff unrelated to code-generation, I can get sane and reasonable responses—engaging and useful even. The same goes for image generation and even the bit of video generation I’ve tried. For me however, getting any of these models to produce reasonably sane code has proven elusive. Claude is a bit better than others IME but I can’t even get it to describe a usable project template and directory structure for anything other than very simple Scala, Java, or Python projects. The code I’m able to generate always needs dramatic and manual changes; even trying to get a model to refactor a method in the code it wrote within the current context window results in bugs and broken business logic. I dearly wish I knew how others are able to accomplish things like “it successfully ported critical in-house infrastructure from Python 3 to Go.”. To date, I’ve seen no actual evidence (aside from what are purported to be LLM-generated artifacts) that anything beyond generating (or RAG-ing existing code) is even possible. What am I missing? Is it unrealistic for me to assume that prompt engineering such a seemingly dramatic LLM-generated code rewrite is something that I could learn by example from others? If not, can somebody recommend resources related to learning how to accomplish non-trivial code generation?
- malfist 2y agoI think it's level of expertise. You are an expert in coding (10,000 hours and all that) so you know when the code is wrong. Everything else you put into it and get plausible sounding response is just as incorrect as the plausible sounding responses to coding questions, just you know enough to spot the errors. LLMs are insidious, it feeds into "everything is simple" concept a lot of us have of the world. We ask an LLM for a project plan and it looks so good we're willing to fire our TPM, or a TPM asks the LLM for code and it gives them code that looks so good they question the value of an engineer. In reality, the LLM cannot do either role's job well.
- tharant 2y ago> You are an expert in coding (10,000 hours and all that) so you know when the code is wrong. While I appreciate the suggestion that I might be an expert, I am decidedly not. That said, I’ve been writing what the companies I’ve worked for would consider “mission critical” code (mostly Java/Scala, Python, and SQL) for about twenty years, I’ve been a Unix/Linux sysadmin for over thirty years, and I’ve been in IT for almost forty years. Perhaps the modernity and/or popularity of the languages are my problem? Are the models going to produce better code if I target “modern” languages like Go/Rust, and the various HTML/JS/FE frameworks instead of “legacy” languages like Java or SQL? Or maybe my experience is too close to bare metal and need to focus on more trivial projects with higher-level or more modern languages? (fwiw, I don’t actually consider Go/Rust/JS/etc to be higher-level or more “modern” languages than the JVM languages with which I’m experienced; I’m open to arguments though) > LLMs are insidious, it feeds into "everything is simple" concept a lot of us have of the world. Yah, that’s what I mean when I say I feel gaslit. > In reality, the LLM cannot do either role's job well. I am aware of this. I’m not looking for an agent. That said, am I being too simplistic or unreasonable in expecting that I too could leverage these models (albeit perhaps after acquiring some missing piece of knowledge) as assistants capable of reasoning about my code or even the code they generate? If so, how are others able to get LLMs to generate what they claim are “deployable” non-trivial projects or refactorings of entire “critical” projects from the Python language to Go? Is someone lying or do I just need (seemingly dramatically) deeper knowledge of how to “correctly” prompt the models? Have I simply been victim of (again, seemingly dramatically) overly optimistic marketing hype?
- fhdsgbbcaA 2y agoThat just means the bugs are so subtle you haven’t found them yet, they are there and unspooling the damage may be very painful.
- HaZeust 2y agoThat's rather assuming of you, they're there no less than they would be for a human's programming - and VERY likely no more.
- kuhewa 2y agoBut one is trying to write good-enough code. The other is trying to write good-enough-looking code. The probability of pain arising from the bugs of the latter is probably greater.
- HaZeust 2y agoI'd actually love to see a benchmark on this - we're just speculating now.
- kuhewa 2y agoThe work demonstrating the Frankfurtian Bullshit nature of generated prose would suggest as much, given the architecture is the same for code outputs it seems like a fair assumption until it is demonstrated otherwise.
- tharant 2y ago> they're there no less than they would be for a human's programming - and VERY likely no more. This is VERY different from my own experience. The bugs introduced by the code I’ve tried to generate via LLMs (Mostly Claude, some GPT-4o and o1-preview, and lots of one-off fiddling with local models to see if they’re any better/worse than commercial products) are considerably more numerous (and often more subtle) than what my fellow engineers—juniors included—tend to introduce. I /want/ these tools to be useful; they haven’t been so far though and I’m kinda stuck on understanding if I’m just not using ‘em right or if they’re even capable of what I want to do. Like I said in a previous comment; I don’t know if I’m being gaslit or if I’m being naive but it feels a lot more like gaslighting.
- ants_everywhere 2y agoGPT-4 is pretty bad at generating Python. It kind of works as well as combining 2-3 stack overflow questions, but it can't tell that the combination is sane. I mostly agree with what the others are saying. It can generate boilerplate and it can generate simple API calls when there are lots of examples in the training set. Generating Go is probably easier because at least you get compiler feedback. Right now the only place it saves me time are with languages I don't know at all and with languages like Bash and SQL where I just can't bring myself to care enough to remember the long tail of more esoteric points that I don't use every day.
- deleted 2y ago[deleted]
- RayVR 2y agoSorry, but you’re just wrong. Yes, mistakes may happen. However, I’ve used it to translate a fairly complex MIP definition export into a complete CP-SAT implementation. I use these models all the time for complex tasks. One major thing that is perhaps not immediately obvious is that the models are only good at translation. If I give it a really good explanation of what I want in code or even English, and ask it to do it another way or implement it with specific tools, I get pretty good output. Using these to actually solve problems is not possible. Give it a complex problem description with no instructions on how to solve it, and they fail immediately.
- risyachka 2y agoThey fail even at not really complex problems. In most cases it’s faster to do it manually then beg ai to fix everything so that the result is proper, not just “kinda works”. For me they save a lot of time on research or general guidance. But when it comes to actual code - not really useful.
- tharant 2y ago> If I give it a really good explanation of what I want in code or even English, and ask it to do it another way or implement it with specific tools, I get pretty good output. I don’t get good output, not when trying to get code that matches a detailed spec (which includes the languages I wish to use, the structure of the APIs, and the libraries I think might be useful) so your suggestion that we’re “just wrong” and your claim that the tools can be used for coding “complex tasks” is difficult for me to swallow. I’ll admit that perhaps I’m not using ‘em right but that’s why I’m here—to get advice on /how/ to use ‘em correctly; to date, the implications found in the advice I have received is to: - limit my scope to strict HTML/JS (not web/ui frameworks), or - limit the size of the project to a handful (less than ten) of very short files, or - limit my scope to code translation only, or - limit the size of my chat sessions. Unfortunately, those limitations don’t fit the needs of my environment.
- mhh__ 2y agoWell this is what tests are for. You could make the same argument about outsourcing or "kids these days" and so on
- ainiriand 2y agoI can basically tell ChatGPT to build any Rust commandline tool I can think of and with some back and forth it produces what I need. I did this many times already.
- okwhatnow3773 2y agoYou can also ask Google to produce working code for you, it’s a miracle. What you are looking at is mangled other people’s work. Great. Thanks AI, for digging it up, but let’s not get too excited here. I’ll be getting excited when we give it some first principles and it can actually learn on its own.
- ainiriand 2y agoIsn't that AGI? I completely disagree with this viewpoint. I've created terminal games with my own rules, and that shows me the tool can take what it knows about Rust and assemble code to complete a task. It's essentially doing the same thing a human would. While I understand the criticism, I sometimes feel that the cynical perspective we bring into these discussions prevents us from offering more meaningful critique.
- tharant 2y agoI can too (probably; I don’t know enough about Rust) but the command line tools that I’ve tried to build in Python are severely limited in the scope of their capabilities. IOW, trying to generate or work with a non-trivial project has been, for me thus far, impossible. If your Rust tools are truly non-trivial, I’d love to know /how/ you prompted ChatGPT to accomplish what you want—ideally with chat session transcripts that include the generated artifacts. I recognize that you may not want or be able to share such things; if that’s the case, can you share or discuss the resources you used in order to learn how to do it? I’ve not yet been able to find any resources that demonstrate what I’d consider to be non-trivial and I’m hoping that’s only a failure of my Google-fu rather than an indictment of the purported capabilities of these models.
- ainiriand 2y ago
- hackernewds 2y agoCan't tell if serious. I've done this multiple times with success requiring only 5 minutes of review
- devjab 2y agoI disagree with you on this. If you go through my history on LLM’s you’ll see that I didn’t consider them more than fancy auto-complete. I still think of it mainly as fancy auto-compete for a lot of things, but we’ve begun using Claude in our porting of our C to Rust. Claude does it really, really, well. You have to look it over, but it’s far more efficient than any one of us can without the assistance. I don’t have the exact numbers but we’re close to a 90% accuracy on what is accepted without corrections. We follow a YAGNI approach to our code architecture and abstractions, meaning it’s very straight forward with things happening where they are written and not in 9 million places like Clean Code lovers try to do. Our C services and Libraries are also fairly small and “one purpose”. I’m not sure you would be wrong on larger code bases, at least not right now. With what we see Claude do now though, I don’t think we’re far from a world where Software Developers are going to do significantly different work. I also think quite a lot of the stuff we do today will no longer exist.