19 ms·
Programming with natural language is going to work (2010)
- omginternets 3y agoSure, if the natural language we're talking about is formalized to the point of basically being math. Let's not confuse that with "everyone will be able to program", though.
- 6gvONxR4sf7o 3y agoI'd love if the ambiguities could be a dialogue of question/answer, rather than being fully specified ahead of time like we generally have programming today. It seems much more efficient.
- dools 3y agoThat's what programming with ChatGPT is like.
- 6gvONxR4sf7o 3y agoYep! And I'd bet that's a huge part of why it took off. An equally capable model with a "write a better prompt and try again" UX wouldn't be nearly as useful.
- anothernewdude 3y agoA massive pain in the ass?
- dools 3y agoHave you not spent much time working with ChatGPT? Or maybe you haven't upgraded to plus so you get GPT4? It's so fucking good. It's a bit like pair programming. Even though it can't always give you the result you want, it does so an appreciable percentage of the time and it's a fabulous way to think through problems, especially as a complement to the "google -> stackoverflow -> copy -> paste" style programming when you're trying things out or unsure of how to do something.
- cookieperson 3y agoDo people actually do that much copy paste programming? People I work with are more inclined to read the docs and lean on intellisense. The people I've seen cling to chatgpt have been spending a lot of time forgetting LSPs exist and wondering why some hallucinated method doesn't exist... They also tend to think really long 1 liners are good code over explicit easy to read 3 liners...
- dools 3y ago> Do people actually do that much copy paste programming? So much: https://stackoverflow.blog/2021/12/30/how-often-do-people-actually-copy-and-paste-from-stack-overflow-now-we-know/ https://stackoverflow.blog/2021/12/30/how-often-do-people-ac...
- cookieperson 3y agoYea but when you really look at the numbers most people are copy pasting git commands, npm package manager commands, warning suppression syntax, etc. That's not really programming and is a symptom that the tools people are using stink or that they don't use those features very often. Not to say there aren't millions of other copy pasted but most of the remaining ones seem to be about data science, which is again a good hint that an API is complicated, and the fallout there isn't too bad because as data scientists work they check their manipulations.
- grt_thr 3y agoThe ambiguity is exponential. I wish that the people hyping on llms read the older literature and sentence parsing. The only reason why people are so impressed is that chatgpt sometimes gives better results than Google. Which just ought to tell you hiw bad google has gotten.
- wolfgang42 3y agoWell, programmers provide a natural language interface and somehow we usually manage the ambiguity and complexity OK. In my experience, a lot of support requests for bespoke/in-house software go like this: > User: Why is my wibble being quarked? This shouldn’t be happening! > Dev: Wibble ID, please? > User: ID 234567. This is terrible! > Dev: [rummages in git blame] Well, this wibble is frobnicated, and three years ago [links to Slack thread] you said that all frobnicated wibbles should be automatically quarked. > User: Yes, but that was before we automated the Acme account. We never frobnicate their wibbles! > Dev: ...so, is there a way for me to tell if a client wants their wibbles unfrobnicated, or should I hard-code an exception for Acme? (And then, six months later: “Why are none of Acme’s wibbles being frobnicated automatically?”) If you could introduce an AI assistant that could answer these questions instantly (instead of starting with a support ticket), it’d cut the feedback loop from hours or days down to seconds, and the users (who are generally pretty smart in their field, even if my frustration is showing above) would have a much better resource for understanding the black box they’ve been given and why it works the way it does.
- wolfgang42 3y agoOops, only now do I realize that should have been “we never quark their wibbles” and “a client wants their wibbles unquarked.” (Hopefully doesn’t make a difference to comprehension since they’re nonsense words anyway, but there you go.)
- marcosdumay 3y ago> If you could introduce an AI assistant that could answer these questions instantly If you have some change documentation so good that you are able to answer that kind of question for things that a previous developer changed, you may have a chance of making the computer answer it. Personally, I have never seen the first part done.
- quickthrower2 3y agoSounds like agile (small a) as opposed to waterfall.
- shrimp_emoji 3y agoIsn't ChatGPT (or some now not that far fetched futuristic version that's superior) a 5GL? You ask it for a program in English, and it codes it for you. You've just coded in natural language.
- takeda 3y agoI would love to see somebody writing a compiler that way.
- n8cpdx 3y agohttps://medium.com/@byanofsky/chatgpt-helped-me-build-a-compiler-7aebcd2a2c20 https://medium.com/@byanofsky/chatgpt-helped-me-build-a-comp...
- ilaksh 3y agoThe original version of my site aidev.codes was a bit like that. The concept was to keep refining the spec and each time it would regenerate starting with whatever section had been modified. There was even a way to clone an "app spec" like with Codepens. People generally didn't seem very interested. Also the bigger problem was that the gpt-3.5 models really wouldn't return the same thing consistently so a minor change could throw other things off. Also a conversation feels like a much more intuitive way of doing it. So I switched to that.
- goatlover 3y agoYou still have to make sure the code runs correctly and incorporate it into the rest of the code base. You also need to have some idea of what sort of code you're asking for, particularly if it has to fit with existing code.
- captnObvious 3y agoCheck out chatgpt code interpreter. One step down…
- quickthrower2 3y ago
- speed_spread 3y agoIt'll be the same way everybody can program with Excel right now. Things will work fine, until they don't anymore, at which point a professional will be brought in to help fix "the bug". Obviously, that bug will the obvious result of the whole thing being a horrible mess and will be unfixable without a proper rewrite. _Maybe_ the AI will be able to help with the rewrite, generating test cases and translating business logic, which would be nice.
- qumpis 3y agoI think many people give up too quickly (as could perceived by those professionals who had to put sweat when learning how to put things back when they break). But a capable language model might serve as a debugger: "you're stuck? About to call a professional? No worries, explain to me what you see and let me ask you questions in order to find a fix together"
- noisy_boy 3y agoI think it'll evolve into the AI Assistant being an always-on/always-available app/service/client (ala Siri/Alexa) coupled with a much more powerful online service. Advantage is that once the client is installed, it has access to practically everything the user is doing (which is what the tech companies dream of) and can actually ingest the inputs without the user having to summarize/translate into a text box (problem with Excel? AI assistant can read the excel sheet that has the issue so you can just ask questions). I also think that the main two reasons behind Alexa/Siri not seeing very high adoption rates are misinterpretation of the voice commands + quality of results. With LLMs, at least the first issue should improve dramatically and if the popularity of ChatGPT is anything to go by, the second issue should also see improvements.
- cableshaft 3y agoI'd much rather program with the help of ChatGPT 4, as it is right now, over programming with Excel (I've done both). And at least on a smaller scale, the code generated by ChatGPT hasn't been a mess at all. Sometimes it's incorrect or insufficient and it can't handle the more complex solution I'm asking of it, but the code isn't messy and doesn't require me to rewrite it from scratch, just fix what's incorrect.
- bee_rider 3y agoI guess this will open up programming to anyone who can handle the math required to describe the behavior of a program. Unfortunately it is not even clear to me that this population is anywhere near as large as the existing population of programmers.
- geysersam 3y agoI don't see why you need a language "formalized to the point of math" to instruct a computer to follow simple instructions (Write a crud API for this and this, it should have these endpoints etc.) Of course there will be ambiguity, but you could say anything higher level than assembly is also ambiguous, but that's not usually a problem. I think it's reasonable to expect that more people will be able to program if this becomes reality. Just as going from assembly to c allowed more people to program.
- cableshaft 3y agoEh, I was using it to help generate animated backgrounds with various custom geometry and animations tonight for a game of mine, and it performed admirably but it was struggling a bit. I wouldn't mind if it had a bit more formalization to the point of math to it for those bits. Was still good enough that I got some usable options from it, though.
- diligence_ 3y ago[dead]
- lcuff 3y agoI suspect as things evolve with the Large Language Models, there will be integration with existing computer languages and frameworks. That the ability to say "Create a web site using language X with framework Y" will become a reality. This ability to get Hello World done in 5 minutes instead of 1/2 a day to walk through a intro book/tutorial, well, that's a win. Then, down the road, each AI might have a preferred/default language, technology and framework. Quite possibly newly created. This has a parallel to intermediate representations (the earliest of which I'm aware of is p-code in UCSD Pascal). But it is also analogous to compiling C to assembler, and then machine code. Similarly with Java. Wolfram is correct when he talks about needing it to be a representation that the creator can inspect and verify. Not necessarily the least bit easy with a complex project. It will be an engineering journey, but it does spark in me the hope that English (or anyone's native language) becomes the high level language of choice for guiding machines in tasks. Mathematica? Humph. Stephen Wolfram is very pleased with things he's thought of or perhaps synthesized, but I'm gonna say, I think Mathematica is not the generic solution we will want.
- 6510 3y agoFront end js is like the nest we've been building for it - not knowing why.
- nordsieck 3y ago> I suspect as things evolve with the Large Language Models, there will be integration with existing computer languages and frameworks. That the ability to say "Create a web site using language X with framework Y" will become a reality. So, I think a key challenge is that modern programming languages do 2 things simultaneously. 1. They provide direct instruction to computers. 2. They document precise human intent. Even if the need for part 1 goes away, part 2 will always be with us. I would expect that if natural language programming becomes a thing, that a dialect forms - akin to legalese - that embodies best practices for precisely documenting human intent.
- galleywest200 3y ago> I would expect that if natural language programming becomes a thing, that a dialect forms - akin to legalese - that embodies best practices for precisely documenting human intent. Sort of like how the SQL syntax seems designed for business admin folks to use, but us programmers ended up using it.
- revered_ 3y ago[flagged]
- dboreham 3y agoWe've been doing this for 200+ years. All the programming languages we use, and mathematical notation, are based in some way upon natural language concepts (yes even FP languages). So really we're talking about a continuum. And also worth noting that human languages evolve over time. So both programming languages will evolve to be more natural, and natural language will evolve to be more machine-parsable.
- gwoolhurme 3y agoYeah. The first time I saw Haskell written out, it felt like a blending of formal math and programming. I was really excited at how it looks like it could have come from my discrete math book. I don't think programming in english is a good idea, but like you said, we will probably get something that looks more like formal languages, because that's what we've always done.
- grt_thr 3y agoMathematics as shown in textbooks is not rigorous. I don't understand why so many people fetishize something they saw at university. Formalised mathematics are incomprehensible to humans and orders of magnitude longer then anything you can see in textbook or mathematical papers outside automated theorem proving.
- hnfong 3y agoThis reminds me of a tangential rant in the book "The Poincare Conjecture": "... the postulates are unclear. Does postulate 2 mean that we can extend any line segment forever? Does it mean that we can cut up any segment? And if it means the first, who is to say that the resulting line is unique? And how seriously should we take the definitions? Are they just meant to provide guidance about a word that is essentially undefined (today's, and probably Euclid's, in-terpretation) or are they supposed to completely specify the object named? In the latter case, just what does the phrase "a breadthless length" mean? Mathematicians and scholars know that there are gaps in Euclid, and there has been a great deal of discussion over the ages about alternate axioms, or possible additional ones. That has not stopped generations of worshipful school-masters, besotted with the majestic order, the accessibility and the patent usefulness of the Elements from rushing in and trumpeting it as the finest in human thought. However, to a thoughtful student, the Elements can seem less rational than capricious. The insistence that the Elements is flawless, and the apex of rigorous thought, turns some students away from mathematics. One wonders how much fear of mathematics stems from the disjuncture between the assertion that Euclid is perfect and some students' intuitive, but difficult to articulate, sense that some things in it are not quite right. Unless you are unusually rebel-lious, it is easy blame yourself and conclude that mathematics is beyond you. It is worth bearing in mind that mathematical results, for all they are represented as eternal and outside specific human cultures, are in fact transmitted and understood within definite social and cultural contexts. Some argue, for example, that the Greeks invented proof in order to make sense of the statements of mathematical results of Babylon and Egypt without access to the context in which such results were used and discovered. In order to make use of the results, the Greeks needed to sort out different, seemingly..."
- armchairhacker 3y agoRemember the phrase "developers spend 10% of the time writing code and 90% of the time debugging?" Even if it isn't 90%, most developers like writing code more than debugging, so most would prefer to automate the latter. AI translating natural language into code probably isn't as important as AI generating bug-free code and/or debugging its code. Even GPT-4 struggles with this: sometimes you point out a bug and it works, but sometimes it just can't find the issue and starts hallucinating even more as it gets confused. Everyone's trying to train GPT models to write code, but maybe we should be training them how to use a debugger. Though its a lot harder to map text generation to debugging... Also, it's a bit ironic how one way to prevent bugs is using stronger type systems and formal methods. But, AI is particularly bad at formal methods. But maybe with a system like MCTS combined with much faster generation...
- Hirrolot 3y agoI'm imagining an AI based on a deductive system rather than sequential text generation. This is roughly how "strong type systems" work, and so it might be simpler to map this model to formal methods. By the way, if you spend 90% of time debugging your code, I think that's really sad. Either the programming language sucks, or the codebase sucks, or both. I probably spend 10-20% max of my time on debugging.
- hnfong 3y agoThe "strong type systems" work by having you design the types correctly in the first place. If designed correctly they work wonders, and 90+% of the time if the code compiles it's probably correct. That's a big "if" though, and most of your time writing "strong type systems" is coming up with the correct type structure. The one thing worse than debugging code is debugging "types". Those 30-page C++ compiler errors are definitely worse than whatever I had to do with (for example) Python.
- raincole 3y ago> Those 30-page C++ compiler errors are definitely worse than whatever I had to do with (for example) Python. Everyone complains how slowly Rust compiles. But at least its error messages are much better.
- deleted 3y ago[deleted]
- pyrale 3y agoIt seems like this article is an advertising for Wolfram Alpha's then-new feature. It brings few elements to support the headline thesis, aside from showing these features.
- dusted 3y agoOne way to view a programming language, that differs from the traditional math-oriented perspective, is that a programming language is a subset of a natural language which has become sufficiently unambiguous. Ambiguity is in my opinion the biggest reason why "plain {insert natural language} programming won't be a thing".. The major challenge in normal commercial software development is not writing working code, it's aligning expectations and identifying assumptions and eliminating ambiguities.. At that point, the coding part is more or less mapping the description to whatever particular words the implementation language is using.
- fsflover 3y ago> Ambiguity is in my opinion the biggest reason why "plain {insert natural language} programming won't be a thing" How about Ithkuil? https://news.ycombinator.com/item?id=36022731 https://news.ycombinator.com/item?id=36022731
- classified 3y agoYou're joking. Even the inventor doesn't speak it fluently.
- fsflover 3y agoI wasn't talking about fluency, just about possibility to use it for programming.
- thomastjeffery 3y agoProgramming languages don't entirely remove ambiguity: they isolate themselves from it. Everything in a program is unambiguous, but no useful program stays entirely within its own black box. Ambiguity still exists between programs. This ambiguity is the source of incompatibility.
- heikkilevanto 3y agoLong time ago they tried to develop a system where the users could explain things in "plain" English instead of the difficult codes used so far. It was called cobol. As has already been pointed out, 90% of time is spent on debugging and modifying existing code, not writing new stuff. And of the 10% of coding, 20% is writing the happy path, and 80% is spent in handling errors, corner cases, input validation, and inconsistent domain rules. Maybe we can have AI tools to help with all this, but there is still a long way to go. And when we get there, it will still take professional developers to use those tools, and to understand all the special cases.
- moffkalast 3y ago> It was called cobol. Taking something that's lower level than C and replacing characters with words is not exactly what one'd call a plain English interface, it's just being obnoxiously verbose. There's a stark difference between trying to somehow half-assedly hardcode this into a language, and having a language that is designed for debugging only, fairly strict in handling corner cases, and then having a natural language interface on top of it so nobody actually has to write the cancer that it likely ends up being.
- deleted 3y ago[deleted]
- dang 3y agoDiscussed at the time: Generating code from natural language is closer than you think - https://news.ycombinator.com/item?id=1912530 https://news.ycombinator.com/item?id=1912530 - Nov 2010 (80 comments)
- rexsteroxxy 3y agoFrom the top comment: > I teach computer science and have a particular fondness for introductory CS. The reason Stephen Wolfram is wrong, wrong, wrong about this is that people that have never been taught programming can't express themselves precisely enough in their native language, either; and even among those of us that have been programming for decades, when we express ourselves in natural language we can be very precise but it takes a lot more work and becomes a lot more unwieldy than just writing out our instructions in [pseudo]code. I used to think the same thing, but I what changed my mind was the noticable increase in precision that came with ChatGPT 4. Before I felt like a monkey - not I actually get things done they way "I intended".
- cookieperson 3y agoSo you can go to chatgpt and say," I want to make a new search engine that is better then my competitors in performance, resource consumption, and cost. It must be the best in class for relevant searches, using a new hyper efficient search algorithm and data structures. It must have a pay to use API so I can sell ad space. It needs to have a marketable name with best selling branding. I also would like this search engine to have email, an online multiuser Microsoft word clone with the fastest live editing feature. This platform must be written in terraform, html, go lang, and node js using trusted dependencies and be completely secure using best practices. I also need end to end tests for the deployment of this product, dashboards to monitor it's uptime, performance, revenue, etc in AWS. My initial budget is 100k. Given the technical realities of my request also provide a summary for any limitations that arose, and technical specifications of this product." Dang dude, why aren't you a billionaire competing with Google, bing, etc tomorrow?
- WastingMyTime89 3y ago
- ericol 3y ago[flagged]
- rickdeckard 3y ago[flagged]
- makz 3y agoThis is not new. There is something called rethorical algebra. Rhetorical Algebra It was developed by ancient Babylonians where the equation was written in the form of words that remained up to the 16th century. Example: x + 5 = 8, is written as " The thing plus five equal to eight".