15 ms·
LLMs and Programming in the first days of 2024
- Havoc 3y agoI definitely mostly use it in the same way - generating discrete snippets. Haven’t had much luck with code completion thus far.
- andyjohnson0 3y ago> These are all things I do not want to do, especially now, with Google having become a sea of spam in which to hunt for a few useful things. Seriously, just don't use Google for search. Google search is just a way to get you to look at their ads. Use a search engine that is aligned with your best interests, suppresses spammy sites, and lets you customise what you want it to surface. I've used chatgpt as a coding assistant, with varying results. But my experience is that better search is orders of magnitude more useful.
- wrkronmiller 3y ago> Use a search engine that suppresses spammy sites and lets you customise what you want it to surface. Can you give an example of such a search engine? Which one(s) do you use and why?
- dewey 3y agoKagi does that, switched to it full time after years of giving alternatives like DDG a go and failing. Can recommend!
- times_trw 3y agoCan you give an example where kagi is better than google? I've tried a couple of searches on the free tier and they gave pretty much the same results. I only have so many free searches to check too.
- dewey 3y agoIt allows me to remove websites from the results. That’s already one of the main selling points for me.
- times_trw 3y agoSure, but can you please give me an example since I only have so many searches and I've switched over to chatgpt for most of my former googling tasks.
- Terretta 3y agoAbove, I suggested pay for Kagi. A search engine is more than just serps: https://blog.kagi.com/kagi-features https://blog.kagi.com/kagi-features If you prefer LLMs to Googling, then at least consider "phind": https://www.phind.com/search?home=true https://www.phind.com/search?home=true
- a12k 3y agoGoogle has been inundated with SEO spam, and sometimes I want current things so LLMs don't work that well. One example is I was buying a ... wait, actually I was putting together some examples for you to compare Kagi (I am an unlimited subscriber) to Google directly, and none of them work now. My Google results for things like "best running shoes 2024" or things like that returned basically the same results as Kagi, pushing sites like Reddit and Wirecutter and REI blog and other known-good blogs to the top. Tried this in Private Browsing as well. This is definitely a departure because when I subscribed to Kagi a couple months ago, all of my Google results for similar searches were SEO spam blogs filled with Amazon affiliate links that look like they had just sucked some Amazon reviews automatically into some poor facade to generate affiliate revenue. These results were a surprise to me. Not sure what changed.
- times_trw 3y agoYes, that's what I was getting too. I imagine what changed is that Kagi started getting traction on site like here and some managers at google actually did something about it. My own test "voynich illuminated manuscript" which used to give nothing but pintrest spam on google. Now there is just one result from pintrest in google and pretty much every result in Kagi is from pintrest. There is an academic tab which seems interesting. I will give it a try later.
- andyjohnson0 3y agoKagi. You have to pay - but it prioritises based on content, not ads, and it lets you pin / emphasise / deemphasise / block sites according to your needs. (No connection with kagi.com except being a very satisfied user)
- Terretta 3y agoPay for Kagi. It's a tool. Pay for it, so search results are the product, instead of an ad platform sold to advertisers with you as the product.
- visarga 3y agoI use phind.com, but perplexity.ai also works well
- thenevermind 3y agoI see a lot of recommendations for kagi, but no mention of brave search - specifically the (beta) feature called “goggles”. Afaiu it’s a blend of kagi’s “lenses” and the site ranking in search results. https://search.brave.com/help/goggles https://search.brave.com/help/goggles There is a list (search) of public goggles: https://search.brave.com/goggles https://search.brave.com/goggles The goggles itself are just text files with basic syntax and can be hosted on e.g. github gist. (though you have to publish it to brave) https://github.com/brave/goggles-quickstart/blob/main/goggles/quickstart.goggle https://github.com/brave/goggles-quickstart/blob/main/goggle... Tbh, I can’t really compare brave search to kagi, since I never used kagi (though I’m using Orion - webkit based browser from the same dev and love it). Afaik, brave search is using its own index, thus making the results somehow limited and inferior to kagis. Just wanted to throw some (free) alternative here that works for me. :) * Note that Brave search, despite privacy oriented, is still ad funded and there was few controversies about brave’s (browser) privacy in the past. (if that’s relevant for you) * I’m not affiliated with Brave in any way.
- eurekin 3y agoI like to use chatgpt for the easy stuff, things I forgot, do to rarely to remember or code in another language very similar to the one I already know. I do quickly run into bumps, where search is necessary (a lot of times it's some variant of a breaking change in a dependent library). Once I find a good enough issue description, I just slap that back into chatgpt. It handles it very well and sticks for the rest of the conversation. Somehow chatgpt is aware that the context information takes precedence over trained data. I also have the Kagi subscription, which I'm using for above. I'm very happy with both tools working in tandem and am genuinely happy about that kind of time spending
- kibibu 3y agoThe deep coder example doesn't appear to actually be doing what the comments or the article say it does. It appears no better than the mixtral example that it's supposedly an improvement on.
- antirez 3y agoThis is my cut & paste failure (I didn't re-check the GPT-4 output that fixed the grammar). Fixing...
- times_trw 3y agoDo you know of an article that covers LLMs from the point of view of a tutor/study partner/reading group? Yours is the first blog which matches my experiences with the code side of things, but I've found them even more useful in the learning side of things.
- adamgordonbell 3y agoI wrote an article subtitled "llms flatten steep learning curves": https://earthly.dev/blog/future-is-rusty/ https://earthly.dev/blog/future-is-rusty/
- 4ad 3y agoThis might be a good article, I wouldn't know because I can't read this monospace atrocity. Reader view in Safari preserves the monospace font... /facepalm
- antirez 3y agoMaybe I can help you: https://gist.github.com/antirez/931cb4f814e2c852a8289b6fa8767b5d https://gist.github.com/antirez/931cb4f814e2c852a8289b6fa876...
- 082349872349872 3y agoIn order to protect your delicate sensibilities I would further suggest to avoid consulting most research output from before the mid 1980s. eg https://www.rand.org/content/dam/rand/pubs/research_memoranda/2008/RM704.pdf https://www.rand.org/content/dam/rand/pubs/research_memorand...
- noelwelsh 3y agoI also found it looks awful, which made it hard for me to read, but Firefox reader mode did at least change the font.
- habibur 3y agoHow many of us remember that at the beginning of last year the fear was that programming by programmers will get obsolete by 2024 and LLMs will be doing all the job? How much has changed?
- delusional 3y agoI remember 10 years ago when the fear was that cheaper programmers in developing countries (India mostly) would be doing all the programming. It's just a scam to keep you scared and stop you from empathizing with your fellow workers.
- bl0rg 3y agoI don't think it's a scam or a conspiracy. It's human nature to worry and when given a reasonably sounding, but scary, idea we tend to spread it to others.
- concordDance 3y ago> It's just a scam to keep you scared and stop you from empathizing with your fellow workers. I am quite unconvinced this is the reason. Seems rather conspiratorial.
- FrustratedMonky 3y agoOutsourcing was more of a threat than AI. And a lot of jobs really did move. It is still a real thing, not that many programming jobs moved back to the states.
- plagiarist 3y agoThat's legit. I've managed to dodge it but many jobs have moved overseas. Many of my coworkers the past years have been contractors living in other countries. This is what happened to America's manufacturing industry. Shouldn't emphasizing with fellow workers mean recognizing the pattern instead of dismissing it as FUD?
- aulin 3y agoSo far I've seen bad programmers create more (and possibly worse) bad code and good ones use LLM to their advantage.
- mercurialsolo 3y agoHonestly speaking code generation is a form of augmented retrieval. And going further back, I would say human memory is generated from context rather than retrieved (which is why it's often fallible - we hallucinate details). LLM's today for me are the equivalent of a large scale human memory for code or for faster augmented retrieval - do they hallucinate details, quite often, but do I find it utilitarian versus dragging myself over documentation details - more often than not.
- 082349872349872 3y ago> At the same time, however, my experience over the past few months suggests that for system programming, LLMs almost never provide acceptable solutions if you are already an experienced programmer. Hmm, this suggests to me that in a better world, the systems problems would have been solved with code, and the sorts of one-off problems which current LLMs do handle well would have been solved with formulae in a (shell-like? not necessarily turing-complete?) DSL.
- chii 3y ago> LLMs almost never provide acceptable solutions if you are already an experienced programmer. or, the other stuff GPT was producing is just as bad, but that he's not experienced enough in the domain to see it, where as the stuff he is experienced with looks immediately sus or subpar.
- 082349872349872 3y agoAfter looking at https://github.com/antirez/simple-language-model/blob/main/plot.py https://github.com/antirez/simple-language-model/blob/main/p... that does seem likely.
- antirez 3y agoYes, but this is working. I literally didn't look at the code... but at the result. In other fields GPT can't deliver working code at all.
- jgalt212 3y ago> this erudite fool is at our disposal and answers all the questions asked of them, Yes, but I have to double-check every answer. And that, for me, greatly mitigates or entirely negates their utility. Of what value is a pocket calculator that only gets the right answer 75% if the time, and you don't ex ante know what 75%?
- antirez 3y agoProgramming is special because 99% of times you can tell immediately if something works or not, so the risk of misinformation is very narrow.
- xyproto 3y agoHi! I'm a big fan of Redis and also the little Kilo editor you wrote. But, I have to disagree on this point, since many programs written in ie. C have security issues that takes a long time to discover.
- couchand 3y agoPerhaps you've omitted some important context here, or you're using an extremely restricted definition of "works"? The interesting and hard question with software is not "did it compile" but rather "did it meet the never-clearly-articulated needs of the user"... I would agree that it is a primary goal of software engineering to move as much as possible into the category of automatic verification, but we're a long, long way from 99%.
- kevindamm 3y agoSalient point: > Would I have been able to do it without ChatGPT? Certainly yes, but the most interesting thing is not the fact that it would have taken me longer: the truth is that I wouldn't even have tried, because it wouldn't have been worth it. This is the true enabling power of LLMs for code assistance -- reducing the activation energy of new tasks enough that they are tackled (and finished) when they otherwise would have been left on the pile of future projects indefinitely. I think the internet and the open source movement had a similar effect, in that if you did not attempt a project that you had some small interest in, it would only be a matter of time before someone else did enough of a similar problem for you to reuse or repurpose their work, and this led to an explosion of (often useful, or at least usable) applications and libraries. I agree with the author that LLMs are not by themselves very capable but provide a force multiplier for those with the basic skills and motivation.
- somewhereoutth 3y agoHowever could it be that the 'entertainment effect' of using a new (and trendy) technology like LLMs provides the activation energy for otherwise mundane tasks?
- apwell23 3y agoThis is true. I write way more documentation now since llm does all the formatting, structure , diagrams ect. I just guide it at a high level.
- apwell23 3y agoI use chatgpt as my thinking partner writing code. I chat with it all day everday to finish work. My company has approved copilot but Copilot autocomplete has been an awful experience. company hasn't approved copilot chat ( which is what i need) . But I would love something similar that can run on my laptop for my code to generate unit tests, code comments ect ( ofcourse with my input and guidance).
- deergomoo 3y ago> My company has approved copilot but Copilot autocomplete has been an awful experience I had the same experience, I feel like I must be crazy because so many of my colleagues have been singing its praises. I found it immensely distracting and disabled it again after a couple of days. It was like having someone trying to finish my sentence while I was still speaking; even when they were right, it was still annoying and knocked me out of my flow (and very often, it wasn’t right).
- fipar 3y agoI actually find copilot quite useful but I use it from emacs and it only provides suggestions when I intentionally hit my defined shortcut for it, so it never gets in the way. It may be worth for you to try setting it up in a similar way in the tool you’re using it from, as I agree I’d find the experience awful if it was always trying to autocomplete my sentences.
- moffkalast 3y agoFwiw, there are now some local models that rival 3.5-turbo in code chat, like the Codeninja I tried out the other day. Not nearly as good as 4 which iirc runs the copilot backend, but for sensitive data that can't leave the premises it's the only real option. Or getting a dedicated instance from OpenAI I guess.
- cassianoleal 3y agoIf you use VS Code or a JetBrains IDE, Continue works well with Ollama and it’s really easy to get going. [0] https://continue.dev/ https://continue.dev/ [1] https://ollama.ai/ https://ollama.ai/
- cies 3y ago> This should really make programmers think. Is it worth writing programs of this kind? Sure, you get paid, and quite handsomely, but if an LLM can do part of it, maybe it's not the best place to be in five or ten years. Some one, a person with a sense of responsibility, has to sign off on changes to the code. LLMs have shown to come with answers that make no sense or contain bugs. A person (for now) needs to decide is the LLM's suggestion is acceptable, if we need more tests, if we want to maintain it. I think programmers will be needed for that, they will just be made more productive (as what happened with the introduction of garbage collection, strong typed languages, powerful IDEs, StackExchange, ...)
- fallingknife 3y agoI have found only a few cases where ChatGPT has been very useful to me. e.g. writing long SQL queries and certain mathematical functions like finding the area of intersection of two rectangles. And it hallucinates enough that a lot of the time I can't use it because I know it would take more time to check it for correctness and edge cases than it would to just write it in the first place. Maybe I am using it wrong, but so far the results for me have been extremely impressive, but not yet very useful.
- plagiarist 3y agoI'm surprised it can do long SQL queries, I wouldn't have thought. I've been looking into PRQL or other solutions to cover that ground. Can it do reasonably complex things like window functions?
- fallingknife 3y agoNever tried it with something like that. I just mean long as in a lot of text like selecting a lot of stuff from a lot of tables and grouping, etc.
- boulos 3y agoI really like the argument about misinformation vs testing. I'm not totally sold on "you can just see it", but I do think something like TDD could suddenly be really productive in this world. I've found autocomplete via these systems to be improving rapidly. For some work, it's already a big boost, and it's close to a difference in kind from the original IntelliSense. Amusingly though, I primarily write in an editor without any autocomplete, so I don't experience this often. But I do, precisely for the throwaway code and lower-value changes. Finally, it's not clear to me that the distinction is between systems programming and scripting. My sense is that Chat GPT and similar are (a) heavily influenced by the large corpus of Python, so it's better at it than C and (b) the examples here involved more clever bit manipulation than most software engineers ever interact with.
- 082349872349872 3y ago> the examples here involved more clever bit manipulation than most software engineers ever interact with Perlis once quoth: > 18. A program without a loop and a structured variable isn't worth writing. After 5 minutes of thought, I'd update that, for my hacking, to: "A program without some convergence reasoning and a non-injective change of representation isn't worth writing." (iow, I'd be happy to let LLMs, or at least other people, wrangle glue and parsley code, according to the taxonomy of: https://news.ycombinator.com/item?id=32498382 https://news.ycombinator.com/item?id=32498382 )
- boulos 3y agoI like the term parsley code! I do suspect though that both the hashing and 6-bit weight examples are just extremely rare in the corpus. It wasn't confused about loops, or hashing generally, but just didn't do as well as antirez would have liked. The description of the 6-bit to "why don't I just cast this to 8-bits" thing is definitely a problem. And worse, it's a problem a more junior engineer might not understand. But I suspect that a model trained on a corpus with lots more bit manipulation would have been fine, as it wasn't complex. Clearly we just need a fine tuned one :).
- gumballindie 3y agoFor me LLMs revealed how easily it is to manipulate masses with properly done marketing. Despite these tools being obviously unreliable, tens of people on here report how well they work and how much they changed their lives. Shows that with sufficient propaganda you can make people see and feel things which are not there - not a new concept. But what’s new to me is just how easy it is.
- bratbag 3y agoI'm ok with a degree of unreliability when experimenting with new ideas. That's a tradeoff I already make when using relativly new third party libraries/services to accelerate experimentation.
- gumballindie 3y agoThat is ok, I do it too - that's why I use tools such as chatgpt. But from that to calling it life changing there's a wide gap. The tool is nowhere near what's advertised, far from it.
- pluc 3y agobro it's 2024, get SSL
- netcraft 3y agoWhen it comes to programming, I agree completely. The sweet spot for any use of LLMs is that you already know enough about the subject to verify the work - at least the output - and know enough how to describe in detail (ideally only salient details) what you want. Huge +1 to it helping me do things faster, do things that I wouldnt have otherwise done, or using it for throwaway, mostly inconsequential yet valuable programs. But another area I have found it extremely helpful in is exploring a new topic entirely, programming or otherwise. Telling it that I dont know what im talking about, don't necessarily need specifics, but here is what I want to talk about and want it to help me think through. Especially if you are that person who is willing to take what you hear and do more research or ask more question. The entrance to so many fields and subjects is just understanding the basic jargon, listening for the distinctions being made and understanding why, and knowing who the authorities are on the subject.
- netcraft 3y agoI'll add another thought here - what I really want many times is a custom LLM like GPT, but trained on a particular language or framework or topic. I would love to go to a website for a new language and be able to talk about its documentation and ask questions of an LLM to help me understand. Huge bonus points if it was trained on real world code examples of that language or framework and I could have it help me write a new program or function right there. More bonus points if its tied in with an online repl where it can help me right inline.
- crq-yml 3y agoEase of retraining/refinement is something I'm really hoping for. There are an endless number projects to make a "cleaner, revised X", where the coding itself is rote and has already been done at some point, it's just shoved into slightly different semantics that will be a bit more optimal or secure or configurable. It's something that an LLM feels like it's "tip of the tongue" capable of, and in more trivial cases you really can tell GPT to "rewrite this from JS to Python" and it works. But it's limited by just interpolating what's in the training set, when what you want is "port all these standard libraries to my experimental language, and also make a build system for them".
- deleted 3y ago[deleted]
- amclennon 3y ago> At the same time, however, my experience over the past few months suggests that for system programming, LLMs almost never provide acceptable solutions if you are already an experienced programmer. In one off tasks where someone is not enough of an expert to know its flaws, and such expertise is not required, "the marvel is not that the bear dances well, but that the bear dances at all".
- tmaly 3y agoI think LLMs are good for quick prototyping first drafts of small functions or simple systems. For me they help when time is short and when I want to maximize creative exploration.
- miki123211 3y agoI think the most under-appreciated aspect of LLMs, one on which the article touched on but didn't directly address, is being the "developer that knows everything" aspect. No matter how senior of a programmer you are, you're eventually going to encounter a technology you know very little about. You're always going to be a junior at something. Maybe you're the God of Win32, C++ and COM, but you get stuck on obscure NSIS scripts when packaging your software. Maybe you've been writing web apps for the last 25 years and sit on the PHP language committee, but then you're asked to implement some obscure ISO standard for communicating with credit card networks, and you've never communicated with credit card networks on that level before. Maybe you've been writing iOS apps since the first iPhone and Mac apps before that, spent a few years at Apple, know most iOS APIs by heart and designed quite a few yourself, but then you're asked to implement CalDAV support in your app and you don't know what CalDAV is, much less how to use it. An LLM can help you out in these situations. Maybe it won't write all the code for you, but it'll at least put you on the right track.
- reactordev 3y ago>"No matter how senior of a programmer you are, you're eventually going to encounter a technology you know very little about" Or worse, you've filled your head with different tech and now you need to rehash and brush up on stuff you learned prior but swept under the rug for new stuff. It's a strange sensation. Naturally you just go with the median of whatever your company you work for is doing - then find yourself in this situation where it's "been a while" since you worked on CSS. Or it might take you a weekend of study to bring back those Python dataclass skills.
- sime2009 3y agoI've found LLMs great for vague questions about functions and APIs whose details I've long forgotten. Recognising the right answer when it appears is often faster than digging through random results on google.
- Salgat 3y agoAt its heart GPT is the world's best googler. As long as you can find it on Google, an LLM can probably do a better and faster job of finding and curating the information for you.
- pknerd 3y agoBesides using chatGPT for certain pieces of code that use a 3rd party library. I successfully used it as a "Code Reviewer". I recently copied functions of a Symfony PHP controller and asked for a code review and suggestions for refactoring with code and reasons. Surprisingly it worked very well and I was able to refactor a good amount of code.
- kvz 3y agoantirez thank you for talking some sense. I’ve seen skilled devs discard LLMs entirely based on seeing one (too many) hallucinations, then proclaiming they are inferior and throwing the baby away with the bathwater. There is still plenty of use to be had from them even if they are imperfect.
- couchand 3y agoThis post is absolutely devastating to me. Salvatore is surely one of the most capable software engineers working today. He can lucidly see that this supposed tool is completely useless to him within his area of expertise. Then, rather than cast it off as the ill-fitting, bent screwdriver that it is, he accepts the boosters' premise that he must find some use for it. Just as any introductory macroeconomics class teaches, if one island has superior skill in producing widgets A, it doesn't matter how terrible the other island's skill at producing B is, we'll still see specialization where island A leverages island B. So of course antirez's relative ability in systems programming would relegate the LLM to other progamming tasks. However! We do not exist in isolation. There is a multitude of human beings around us, hungry for technical challenges and food. Many of them have or could obtain skills complimentary to our own. In working together, our cooperative efforts could be more than the sum of their parts. Perhaps the LLM is better at writing PyTorch code than antirez. Just because we have an old bent screwdriver in the garage doesn't mean we should try to use it. Perhaps we'd be better off heading to the hardware store today.
- nuz 3y agoThe funny thing about LLMs is that there's no rush in adopting them. They're semi useful but not really right now, but you're not gonna be 'left behind' if you don't make use of them. Everyone involved is working their hardest to make them more capable so when that day comes, you'll just use it to prompt what you want. But there's no rush to try to squeeze out anything out of the current generation which mostly lowers productivity rather than increases it.
- fhd2 3y agoMy thinking exactly! There's FOMO going on (and being fueled by people most of which seem to hope to somehow make money off it), but the barriers to entry for using LLMs are just not that high. When the tools are good enough, I'll happily use them. Today, for the work I do, I found that not to be the case yet. I wouldn't advocate for not trying them, but I see no reason to force yourself to use them.
- 3y ago
- dmezzetti 3y agoWhile there clearly was a lot of hype, retrieval augmented generation (RAG) proved to be an effective technique with LLMs. Using RAG with project documentation and/or code can be useful.
- eminence32 3y ago> Since the advent of ChatGPT, and later by using LLMs that operate locally Does HN have any favorite local LLMs for coding-related tasks?
- duckkg5 3y agodeepseek-coder has been decent for my purposes
- kubrickslair 3y agoPhind-CodeLlama-34B-v2 seems to work well for our team.
- voidhorse 3y agoI enjoy antirez's work, and I enjoyed this essay, but I disagree with many of its conclusions. In particular: > this goal forces the model to create some form of abstract model. This model is weak, patchy, and imperfect, but it must exist if we observe what we observe. Is a completely fallacious line of reasoning, and I'm surprised that he draws this conclusion. The whole reason the "problem of other minds" is still a problem in philosophy is precisely because we cannot be certain that some "abstract model" exists in someone's head (man or machine, do you argue it does? show it to me) simply because an output meeting certain constraints exists. This is exactly the problem of education. A student that studies to answer questions correctly on a test may not have an abstract model of the subject area at all. Even they may not be conducting what we call reasoning. If a student aces a test, can you confidently say they actually understand a domain? Or did they simply ace a test? Furthermore, LLM's lack of consistency and inability to answer basic mathematical questions, and their limitation to purely text based areas of concern and representation are all much stronger arguments for siding with the notion that they really are just sophisticated, stochastic, machines, incapable of what we'd normally call reason in a human context. If LLM's "reason" it is a much different form of reasoning than that which human beings are capable of, and I'm highly skeptical that any such network will achieve parity to human reason until it can "grow up" and learn embodied in a rich, multi sensory environment, just like human beings. For machines to achieve reason, they will need to break out of the text-only/digital-only box first.
- antirez 3y ago> is still a problem in philosophy Exactly! This is why I removed this fundamental questions from my post: in this moment they don't have any clear reply and will basically make an already complex landscape even more complex. I believe that right now, whatever is happening inside LLMs, we need to focus on investigating the practical level of their "reasoning" abilities. They are very different objects than human brains, but they can do certain limited tasks that before LLMs we thought to be completely in the domain of humans. We know that LLMs are just very complex functions interpolating their inputs, but this functions are so convoluted, that in practical ways they can solve problems that were, before LLMs, completely outside the reach of automatic systems. Whatever is happening inside those systems is not really important for the way they can or can't reshape our society.
- anotherpaulg 3y agoThe code was written mostly by doing cut & paste on ChatGPT… I am constantly shocked by how many people put up with such a painful workflow. OP is clearly an experienced engineer, not a novice using GPT to code above their knowledge. I assume OP usually cares about ergonomics and efficiency in their coding workflow and tools. But so many folks put up with cutting and pasting code back and forth between GPT and their local files. This frustrating workflow was what initially led me to create aider. It lets you share your local git repo with GPT, so that new code and edits are applied directly into your files. Aider also shares related code context with GPT, so that it can write code that is integrated with your project. This lets GPT make more sophisticated contributions, not just isolated code that is easy to copy & paste. The result is a seamless “pair programming” workflow, where you and GPT are editing the files together as you chat. https://github.com/paul-gauthier/aider https://github.com/paul-gauthier/aider
- adamgordonbell 3y agoI like aider. But is there a way to use it to just chat about the code? I use LLMs to chat about pros and cons of various approaches or rubber duck out problems. I need to copy code over for that, but I've not found aider good for these kinds of things, because it's all about applying changes. I usually have several back and forths about the right way to do things and then maybe apply some change.
- anotherpaulg 3y agoGlad to hear you're finding aider useful! Sure, there's a few things you could keep in mind if you just want to chat about code (not modify it): 1. You can tell GPT that at the start of the chat. "I don't want you to change the code, just answer my questions during this conversation." 2. You can run `aider --dry-run` which will prevent any modification of your files. Even if GPT specifies edits, they will just be displayed in the chat and not applied to your files. 3. It's safe to interrupt GPT with CONTROL-C during the chat in aider. If you see GPT is going down a wrong path, or starting to specify an edit that you don't like... just stop it. The conversation history will reflect that you interrupted GPT with ^C, so it will get the implication that you stopped it. 4. You can use the `/undo` command inside the chat to revert the last changes that GPT made to your files. So if you decide it did something wrong, it's easy to undo. 5. You can work on a new git branch, allow GPT to muck with your files during the conversation and then simply discard the branch afterwards.
- madeofpalk 3y ago> I have a problem, I need to quickly know something that I can verify* if the LLM is feeding me nonsense. Well, in such cases, I use the LLM to speed up my need for knowledge.* This is the key insight from using LLMs in my opinion. One thing that makes programming especially well suited for LLMs is that it's often trivial to verify the correctness. I've been toying around this concept for evaluating whether a LLM is the right tool for the job. Graph out "how important is it that the output is correct" vs "how easy is it to verify the output is correct". Using ChatGPT to make a list of songs featuring female artists who have won an Emmy is time consuming to verify it's correct, but it's also not very important and it's okay if it contains some errors.
- adamgordonbell 3y agoYeah, exactly. Problems where coming up with solution is hard but verifying a possible solution is easy. And we all know what that class of problems is called.
- blibble 3y ago> One thing that makes programming especially well suited for LLMs is that it's often trivial to verify the correctness. is this why software never has any bugs?
- latexr 3y agoIf something is time consuming, not very important, and accuracy doesn’t matter, perhaps the correct answer is to not do it. The world is already full of irrelevant inaccurate drivel and we’d do well to have less, not accelerate its production. This is not a comment on your specific example, but on the idea as a whole.
- sevagh 3y agoThere is an impedance problem when working on a new project. At the beginning, when there's 0% of the task done, and you need to start _somewhere_, with a hello world or a CMakeLists file or a Python script or whatever, it takes effort. Before ChatGPT/LLM, I had to pull that effort out from within myself, with my fingertips. Now, I can farm it out to ChatGPT. It's less efficient, not as powerful as if I truly "sat down and did it myself," but it removes the cost of "deciding to sit down and do it myself." And even then, I'm cribbing and mashing together copy-pasted fragments from GitHub code search, Stackoverflow, random blog posts, reading docs, Discord, etc. After several attempts and retries, I have a "5% beginning" of a project when it finally takes form and I can truly work on it. I sort of transition from copy-pasting ChatGPT crap to quickly create a bunch of shallow, bullshit proofs-of-concept, eventually gathering enough momentum to dive into it myself. So, yes, it's slower, and more inefficient, and ChatGPT can't do it better than I can. But it's easier and I don't have to dig as deep. The end result is I have much more endurance in the actual important parts of the project (the middle and end), versus burning myself out on the beginning.
- itomato 3y agoWas I digging too deeply before? Was I asking the right questions from the beginning, and if not, can I effectively salvage my work? Sunk costs disappear into a $20 subscription
- esafak 3y agoLLMs are going to have to get much cheaper to train to be useful in corporations, where the questions you want to ask are going to depend on proprietary code. You can't ask "What does subsystem FooBar do, and where does it fit in the overall architecture?" You'd want to be able to continuously retrain the model, as the code base evolves.
- abhinavstarts 3y ago> High levels of reasoning are not required. LLMs are quite good at doing this, although they remain strongly limited by the maximum size of their context. This should really make programmers think. Is it worth writing programs of this kind? Sure, you get paid, and quite handsomely, but if an LLM can do part of it, maybe it's not the best place to be in five or ten years I appreciate the author writing this article. Whenever I read about future of field, I get anxiety and confusion but then again I think other options too which were available to me was less interest of me. I am now at the place that I still have the opportunity to pivot and focus on pure/applied mathematics than being in software field. Honestly I wanted to make money through this career but I don't know what carrer to choose now. I keep working on myself and don't compare myself to others but if argument is top 1% programmers will be required in the future then I doubt myself because I have still learn lot of things and then how about competing with both experienced & knowledgeable. I was thinking about pin-pointing a target then becoming expert at it (by 10000 hrs rule) I'm sorry to ask but today or in-general I am very confused which path/carrer to Target related to computing, Mathematics. Please suggest and give me your valuable advice. Thank you
- drubio 3y agoWhat an ending... I have never loved learning the details of an obscure communication protocol or the convoluted methods of a library written by someone who wants to show how good they are. It seems like "junk knowledge" to me. LLMs save me from all this more and more every day. This is depressing or tongue-in-cheek considering who he is -- Redis creator -- and has an older post titled 'In defense of linked lists', so talking about linked lists in Rust is not "junk knowledge" or something an LLM can analyze circles around any human. It's the best coding nihilism as a profession post I have read though.
- antirez 3y agoThere is a misunderstanding going here. A linked list is a pure form of knowledge. What we see today is an explosion of arbitrary complexity that is the fruit, mostly, of bad design. If I learn the internals of React, I'm not really understanding anything fundamental. If I get to know the subtleness of Rust semantics and then Rust goes away, I'm left with nothing: it's not like learning Lisp. Think to all the folks that used to master M4 macros in the Sendmail, 30 years ago. I was saying the same, back then: this is garbage knowledge. Today we have a great example in Kubernetes, and all the other synthetic complexity out there. I'm in, instead, to learn important ML concepts, new data structures, new abstractions. Not the result of some poor design activity. LLMs allow you to offload this memorization out of your mind, to make space for distilled ideas.
- gilbetron 3y agoSpot on - it is one of the main reasons I haven't enjoyed programming in recent years, so much of it is learning what you call "garbage knowledge". Yet another API, yet another DSL, yet another standard library. Endless reading of internal wiki pages to learn the byzantine deployment system of my current company. Even worse, when I know exactly what I want, but some little dependency or piece of tooling is bad and I spend hours, or days, trying to debug it. I, too, find LLMs a balm for this pain. They have kind-of-basic level of knowledge, but about everything. In short, it allows for a more efficient expenditure of mental and emotional energy!
- emporas 3y ago
- Wowfunhappy 3y agoFor the past few days, I have been trying to fix a bug in a closed-source Mac app. I otherwise love the app, but this bug has been driving me crazy for years. I was pretty sure I knew which Objective-C method was broadly responsible for the bug, but I didn't know what that method did, and the decompiled version was a nonsensical mess. I felt like I'd hit a wall. Then I thought to feed the decompiler babble to GPT-4 and ask for a clean version. The result wasn't perfect, but I was able to clean it up. I swizzled the result into the app, and I'm pretty sure the bug is gone. (I never found reproduction steps, but the problem would usually have occurred by now.) I never could have done this without GPT-4.
- HarHarVeryFunny 3y agoThis sounds rather like the junior/bad developer who makes a bug disappear (at least for time being) by changing the order of functions in a source file or some such. Admittedly a complete rewrite of a piece of code, even without understanding what you are doing (e.g by using an LLM), is unlikely to have the same bugs as the original implementation (but may have different bugs), but hopefully no-one is doing this for code where bugs have any significant consequence (e.g. system downtime, cost to customers).
- Wowfunhappy 3y agoJust to be clear, I do understand the new version of the method. I don't entirely know how it fits into the larger system, but that's to be expected when I literally don't have the source code. When I cleaned it up, I took out some complexity which I believe was responsible for the bug, at the cost of some performance. According to GPT-4, the original version was checking file descriptors to decide when to do work. My version just does the work every 5ms.
- ruszki 3y agoSo the parent commenter tried to tell you, that they (and I too) heard this story from junior and bad programmers in the past 20 years all the time, and they didn’t use LLMs. It doesn’t matter whether you use generative AIs or not, it’s a bad way of thinking, and long term it’s not beneficial to anybody. The real problem is that you didn’t dig deeper when you figured out that that code change fixed the problem.
- sebringj 3y agoCurrently, what I get out from it is a good quick overview with some hallucinations. You have to actually know what you're doing to check the code. However, this is a fast moving target and will in no time be doing that part as well. I think stepping back and thinking maybe this thing is just giving us more and more agency and what can we do with that? We need to adapt to not constrain ourselves to just being programmers. We are humans with agency and if we can adapt to this, we can be more and more powerful having our technical insight that we've gained over the years to do some really cool things. I have a startup and with ChatGPT I've managed to do all parts of the stack with confidence and used it for all sorts of business related things outside of coding that have really helped move the business forward quickly.
- renonce 3y ago> Homo sapiens invented neural networks Is it just me or did anyone smile at this sentence? The first paragraph sounds like the academic way of saying "we invented huge neural networks but we couldn't understand it".
- kromem 3y agoPerhaps the most important point in the piece, and one that can't be repeated enough or understood enough as we head into what 2024 has in store: > And then, do LLMs have some reasoning abilities, or is it all a bluff? Perhaps at times, they seem to reason only because, as semioticians would say, the "signifier" gives the impression of a meaning that actually does not exist. Those who have worked enough with LLMs, while accepting their limits, know for sure that it cannot be so: their ability to blend what they have seen before goes well beyond randomly regurgitating words. As much as their training was mostly carried out during pre-training, in predicting the next token, this goal forces the model to create some form of abstract model. This model is weak, patchy, and imperfect, but it must exist if we observe what we observe. If our mathematical certainties are doubtful and the greatest experts are often on opposing positions, believing what one sees with their own eyes seems a wise approach.
- ahgamut 3y ago> Instead, many have deeply underestimated LLMs, saying that after all they were nothing more than somewhat advanced Markov chains, capable, at most, of regurgitating extremely limited variations of what they had seen in the training set. Then this notion of the parrot, in the face of evidence, was almost universally retracted. I'd like to see this evidence, and by that I don't mean someone just writing a blog post or tweeting "hey I asked an LLM to do this, and wow". Is there a numerical measurement, like training loss or perplexity, that quantifies "outside the training set"? Otherwise, I find it difficult to take statements like the above seriously. LLMs can do some interesting things with text, no doubt. But these models are trained on terabytes of data. Can you really guarantee "there is no part of my query that is in the training set, not even reworded"? Perhaps we can grep through the training set every time one of these claims are made.
- skepticATX 3y agoExactly. I think that it’s very hard for us to comprehend just how much is out there on the internet. The perfect example of that is the tikz unicorn in the Sparks paper. Seemed like a unique task, until someone found a tikz unicorn in an obscure website. There is plenty of evidence that LLMs struggle as you move out of distribution. Which makes perfect sense as long as you stop trying to attribute what they’re doing to magic. This doesn’t mean they’re not useful, of course. But it means that we should should be skeptical about wild capability claims until we have better evidence than a tweet, as you put it.
- Legend2440 3y agoThey didn't actually find a unicorn ; they found other tikz animals. It still generalized to the unicorn. This was the package: https://ctan.org/pkg/tikzlings?lang=en https://ctan.org/pkg/tikzlings?lang=en
- famouswaffles 3y ago>Can you really guarantee "there is no part of my query that is in the training set, not even reworded"? I mean..yes? Multi digit arithmetic, translation, summarization. There are many tasks where this is trivial.
- tipsytoad 3y agoThe most useful feature of llms is how much output you get from such little signal. Just yesterday I created a fairly advanced script from my phone on the bus ride home with chatgpt which was an absolute pleasure. I think multi-prompt conversations don't get nearly as much attention as they should in llm evaluations.
- danielbln 3y agoI suppose multi-prompt conversations are just a variation on few-shot prompting. I do agree though, that they don't play a big enough role in eval, but also in the heads of many people. So many capable engineers I now nope out of GPT because the first answer isn't satisfactory, instead of continuing the dialog.
- IKantRead 3y agoThis quote in particular struck me as relevant: > And now Google is unusable: using LLMs even just as a compressed form of documentation is a good idea. Beyond all the hype, it'd undeniable that LLMs are good at matching your query about a programming problem to an answer without inundating you with ads and blog spam. LLMs are, at the very least, just better at answering your questions than putting your question into to google and searching Stack Overflow. About two years ago I got so sick of how awful Google was for any serious technical questions that I started building up a collection of reference books again just because it was quickly becoming the only way to get answers about many topics I cared about. I still find these are helpful since even GPT-4 struggles with more nuanced topics, but at least I have a fantastic solution for all those mundane problems that come up. Thinking about it, it's not surprising that Google completely dropped the ball on AI since their business model has become bad search (i.e. they derive all their profit from adding things you don't want to your search experience). At their most basic, LLMs are just really powerful search engines, it would take some cleverness to make them bad in the way Google benefits from.
- antirez 3y ago@dang something is wrong with the ranking of this post.
- DarnyEscoba 3y ago[dead]
- slowmovintarget 3y agoTLS cert has expired on the antirez site.
- CaptainFever 3y agoI feel that I'm being too conservative with how I use AI. Currently I use Copilot Autocomplete with a bit of Copilot Chat, which is great and almost always gets small snippets correct, but I sometimes worry that I'm not using it to the full potential -- so I can be faster with my side projects -- for example, by generating entire classes.
- antirez 3y agoIn general Copilot is much weaker than bigger/slower models, so if you have the feeling you are not using AI enough, the first thing to try IMHO is to chat with powerful models like GPT4 to see what is the current state of art in code generation.
- CaptainFever 3y agoThank you for the suggestion, antirez! Unfortunately that option does cost money (Copilot is free for students), although Bing might be an alright alternative.
- antirez 3y agoIndeed, you are right. If you have an M[1,2,3] MacBook with enough RAM, you may want to run some model like DeepSeek-coder 34B in local. Or the smaller one, but it is going to be weaker.
- bbor 3y agoLLMs are like stupid savants who know a lot of things. Leaving the requisite “no, that’s not what language models are, you’re misunderstanding what’s important here, the best knowledge model already exists and it’s called Wikipedia”
- block_dagger 3y agoOne of the areas that has sped up the most for me while using ChatGPT to code is having it write test cases. Paste it a class and it can write a pretty good set of specs if you iterate with it. Literally 10x faster than doing it myself. This speed-up can also occur with languages/frameworks I'm not familiar with.
- legendofbrando 3y agoThis is one of the best pieces I’ve read that articulates what it’s like to work closely with LLMs as creative partners.
- andai 3y agoI find that I am very unproductive if I am connected to the internet. The only way for me to get any real work done is to turn off the router. At the same time, GPT apparently doubles programming productivity. (Though obviously this depends on the task.) I've long wished to have the best of both worlds. It seems I may soon get my wish: local LLMs will probably catch up with GPT-4 this year, or even outpace it!
- kaycey2022 3y agoHere it is said that the earlier assumption of LLMs being parrots has been universally retracted in the face of the evidence. But if you see the NYT case against OpenAI, being uncontrolled parrots is exactly what ChatGPT is being accused of. Which is the truth?
- SZJX 3y ago> I regret to say it, but it's true: most of today's programming consists of regurgitating the same things in slightly different forms. High levels of reasoning are not required. But that's basically what engineering (, and medicine, and law, and all sorts of professions out there,) has always been about. Engineers build railways and bridges based on the same proven principles in slightly different forms, adapting to the specific needs of each project. Their job is not to come up with groundbreaking inventions every day.
- achleitner 3y ago[dead]