11 ms·
I had a detailed conversion with chatGPT about how to gracefully handle terminating conditions of a rust program. It summarized cogently to register at_exit()’s
by fnordpiglet 4y ago
I had a detailed conversion with chatGPT about how to gracefully handle terminating conditions of a rust program. It summarized cogently to register at_exit()’s for each thread, panic handlers, and register signal handlers. It advised and explain in detail on my query about the thread handling for each of these variants, gave really helpful advice on collecting join handles in a closure on the main thread and waiting for the child threads to exit their at_exit handlers since at_exit can’t guarantee when handlers will execute. It went into detail about cases the process won’t have the ability to clean up. I was able to ask it a lot of clarifying questions and it provided useful responses with clear coherent explanations that were salient and considered the full context of the discussion. I’m certain when I go to actually implement it it’ll have gotten so details wrong. But it provided about as clear explanation of process termination mechanics (for Unix) as I’ve seen articulated, and did so in a way that was directed by my questions not in a 300 page reference manual or random semi relevant questions in stackoverflow answered by partially right contributors.
If this is a con, then consider me a mark.
- jwie 4y agoIt’s only as good as the information it harvested. In a space where less true information is available, the results would be quite poor.
- danielbln 4y agoThere are already ways of dynamically populating the context of the model with information retrieves as text embeddings from a vector store, based on the initial prompt. This way you can feed the model current and correct information which it will weave into its output
- fnordpiglet 4y agoSame would be true for searching for the results or trying to find a human who is familiar. In a space where less true information is available, the results would be quite poor for literally everything.
- zabzonk 4y agobut isn't it getting its information from all those "partially right contributors"? if so, won't it be only partially right (i.e. sometimes/often wrong) itself?
- FeepingCreature 4y agoTheorizing: If the network acquires a pattern of understanding that characterizes the correct response (in other word, if the network "groks" a topic), it will express its knowledge internally as "a correct model (small, efficient)" and "various mistakes that people often make (big, uncompressed)". In this case, the correct pattern should get by far the most reinforcement (because it's a smaller target), and should usually be selected to generate the answer unless the network has a particular reason to expect itself to be playing somebody who's mistaken. This is also how humans learn, although we can do this process purely internally.
- lyu07282 4y agoI have the same experience with it, it's very useful, especially when you are unsure about what to even look for. I have a few theories I suspect it's just a bias we have, most people aren't doing or creating anything, they aren't solving problems or learning new things constantly like engineers do, so chatgpt feels useless to them. Or perhaps the problems we want to talk or learn about are just easier for an ai to answer than the things they want out of it, or we are just better at asking the right questions to extract the value out of it, similar to how you learn to use Google correctly to find something. I don't know I'm really confused about how some people think it's so worthless.
- bnralt 4y agoI think this is true for both ChatGPT and AI art. People use them the same way they would Google, get an output that’s mediocre, and write the entire thing off. There was a similar reaction when people were being shown the web decades ago. But when you start playing with these things, finding out where they’re useful, and how to make use of them, they can do very impressive things.
- deleted 4y ago[deleted]
- huijzer 4y ago> I don't know I'm really confused about how some people think it's so worthless. Maybe because either they believe that ChatGPT is worthless, or they have to deal with the fact that their knowledge is becoming worthless (or, at least, worth less).
- holoduke 4y agoFrom either side there is a lot of belief with just minor real experience to fully judge. For me it saves tons of coding time. Together with copilot i am twice as productive. At least.
- jasonfarnon 4y ago
- derekp7 4y agoAfter many years of experience, I still sometimes stumble on how to phrase a regex pattern to get exactly what I want if it is a bit unconventional. Before I'd have to look up lists of common regex's (sed commands, etc). But I've lately been feeding in sample input lines, telling it what I want to do, and it has been really good about answering correctly (and explaining each part of the regex). Sometimes I have to clarify "But this will also output x, on line 3, but I really want it to output y". And it gives a correction based on my clarification.
- rqtwteye 4y agoSame for me. I fed it a few requirements and test objectives and its comments were pretty reasonable. With a little specialized training it will probably do better than most systems engineers or testers I know.
- MagicMoonlight 4y agoOkay so it generated a response which was “reasonable” How do you know it was correct? Because you checked it’s entire output manually and determined it probably wasn’t too wrong? So what happens if you now trust it to write firmware for some difficult old timey hardware that nobody understands anymore. It seems correct. But then it actually was just making it up and the coolant system of the power plant breaks and kills 20,000 people.
- danielbln 4y agoAre you assuming occasional non-factual output is going to be an issue in the future?
- rqtwteye 4y agoYou certainly have to validate the output but I am pretty sure not too far in the future AI will be able to do a better job than humans.
- worik 4y ago> So what happens if you now trust it to write firmware for some difficult old timey hardware that nobody understands anymore. How well would anyone do? Would you trust me?
- fnordpiglet 4y agoYou should see who they hire to write firmware. I wouldn’t trust them with my cable box.
- worik 4y ago
- skybrian 4y agoWhen I got out of school I went to work for Oracle and decided to read the database manuals, even though I wasn't working on database stuff. When I left I read other database manuals and was able to help people code database stuff, not because I was a real database expert, but because I had read the manuals and they hadn't. I think something similar is going on here? For some subjects and some questions, ChatGPT acts like a co-worker who has read all the manuals, and that's enough.
- fnordpiglet 4y agoI was actually literally thinking about that as I worked on my solo project. This is like a coworker I can ask questions of and bounce ideas off of. It actually gives some insightful ideas. I was working on a file rotation scheme and it suggested naming the files uuid_<time in ms>_<resolution number> with the intent that resolution conflicts won’t need to be walked very often if ever optimizing the common case of file.0, file.1, etc. This isn’t like earth shattering or something I wouldn’t have thought of on my own, but it was something I would have a convo about and someone would suggest it and I would pause and consider and find value in it. This is beyond a reference material discussion, this is bouncing architectural ideas off of someone who knows their shit but occasionally hallucinates. That’s generally what I look for in coworkers and employees anyways. Note: I’m aware UUIDs can contain the time but the intent was the UUID was invariant in the process and it would move to another file once it got to a certain size.
- nkingsy 4y agoI mean usually the coworker wouldn’t be hallucinating at work
- fnordpiglet 4y agoOnly the ones I’d be caught hanging out with would
- rablackburn 4y agoThat depends, what’s the rate of hallucination compared to your coworker whose microdoses are a little too macro some days? :)
- Reptur 4y agoYeah, yesterday I just told it to write a Dockerfile for me, with exactly what I wanted. instead of changing anything by hand, I told it what to fix, without telling it how to. Took 20-30 follow-up messages, telling it to add things, remove things, fix things, make things compatible with the versions of software it was running etc. It worked. Running the container now, works great.
- qayxc 4y ago> Took 20-30 follow-up messages, telling it to add things, remove things, fix things, make things compatible with the versions of software it was running etc. So in other words you basically spent just as much time and effort as if you did it yourself?
- bordercases 4y agoThe arc of software development is to make people depend on vaguer specifications to tell systems what they want, and rely on recognition of what they see being what they want with fast feedback loops, versus slowly recalling the syntax of how to state it. It could be the same time spent, but not the same amount of cognitive effort.
- randomdigitz 4y agoThis is why I stopped using it as much. Realized it was taking more time asking it questions than just doing the work.
- fnordpiglet 4y agoI don’t use it to do work I can do already, I use it to bootstrap in areas of confusion.
- Reptur 4y agoI understand your point, and you are right. Had I been familiar with the image I was working with, and the version differences in configuration etc. It probably would have taken me the same amount of time. I look at this from a more zoomed out perspective, this is just the beginning. The point is its capable and will improve.
- ravenstine 4y agoI recently had it translate some Lingo code (a dead language used in Macromedia Shockwave) to JavaScript and it did an impressive job considering the lack of documentation available. Sure, the code was simple, and Lingo is very English-like, but it helped me learn a few things about the syntax and produced JS that in theory would work if consumed by some other script that would call its methods appropriately. If people think ChatGPT is a con, I just don't see it. Any con will be from how pop-tech misrepresents it.
- freejazz 4y ago> "If this is a con, then consider me a mark." I already did before I read this part.
- fnordpiglet 4y agoStop PM’ing me about transferring funds. I’m not interested in the prince’s inheritance.
- joe_the_user 4y agoYeah, in my experimenting with ChatGPT, it seems quite good at condensing factual information where there's not much chance that people will making things up online. The thing is that this doesn't extend to situations where, say, a common summary of a topic isn't true when one looks at things in more detail. For example, Earnest Hemingway is know for "short, concise sentences" and ChatGPT will give this description when asked about his style. But Hemingway in fact used complicate compound sentences fairly frequently - sentences by that a Strunk and White style definition should be broken up. ChatGPT will not admit this even when prompted (though I think most actual critics say this), and it will recommend the long sample sentence I give it be broken up.
- worik 4y agoChatGPT Is a flat out liar It is what I love most about it Ask it if it is human
- throw1234651234 4y agoI tried it this whole week. I was initially amazed and thinking "maybe it really will replace my job." Then I switched to "it's a useful helper" and "I can use it to study things". Maybe after the gained confidence, I gave it some more difficult tasks - write code that will give a user read-only permissions - it obviously failed to note that the public schema is special, so that the user could still DROP tables. Asked it where the total count of users in Auth0 is - it lied. Asked it to solve a basic algo problem, it got it wrong. Told it to write incremental back off and remove a try-catch, it couldn't remove the try-catch. Etc, etc. Kind of over it already. Does copilot do anything differently other than being available as an IDE extension?
- nadavr 4y agoI find copilot better because I don't have to disrupt my flow to "ask" it anything. I start writing code, it suggests something, I hit tab if I like it, move on to the next line. Also, it can read all of my other code (in the project?) so it seems more context aware.
- acchow 4y agoCopilot seems pretty magical to me so far. It seems to be aware of not only the AST but also the types, so if you design your types well it can often get things correct.
- throw1234651234 4y agoI really need to try copilot, if it's truly aware of the overall context, it would be way more helpful than chatGPT, which seems truly good for isolated pure functions (clear input, clear output, DRY). At the end of the day, a good coder can write the function faster than they can describe it. Of course, ChatGPT does throw cool new syntax your way once in a while. For example, I didn't know .Chunk existed in .NET to cleanly break up ids and such into batches to process.
- acchow 4y agoCopilot also describes the function for you. It can code-complete a block of comments which describes the next many lines of code, and then also code-complete the lines of code for you. It makes mistakes tho. For example, if you have two fields in a struct that could have been used and their names are very similar and they have the same type, then Copilot could use the wrong one. This is effectively a typo, except in code that was autogenerated, and it often takes a LONG TIME to debug a typo like this.... Ideally, you would be in a language with a more expressive type system (like Ocaml) so that those two fields have different types and such a typo cannot be valid.
- wvenable 4y agoI asked ChatGPT to create some 6502 assembly to multiply two numbers. It generated an iterative approach (add A to itself B times for A*B) but didn't include the actual addition. I told it that "hey, you forgot to do the addition in that code" and it promptly corrected itself. Personally, I don't consider that terrible given what I was asking it.
- moffkalast 4y agoYeah it feels like it performs really well if you know what needs to be done and how. Spare no detail from the description of how exactly it should do it and it'll usually get most of it right and save some of the time spent messing around with initial setup and boilerplate.
- dicknuckle 4y agoThat's were I've had my best luck with it.
- deleted 4y ago[deleted]
- Cardinal7167 4y agoThe most mind blowing thing to me is how it’s responsive to feedback like this. It’s like pair programming with a junior. It might be faster for me to just type it myself, but it’s doing what I tell it and filling in a fair amount of blanks itself.
- undersuit 4y agoBut is it responsive? If I gave ChatGPT the same 6502 prompt now that it's done it once would I also have to correct it about the addition as well?
- des1nderlase 4y agoYou are not asking for something impossible, its just not there yet. The speed of progress in the field is something few can extrapolate well over next 5 years.
- amrangaye 4y agoI’ve had the same experience with Python code. I found this article poorly written and alarmist - he really doesn’t prove his main point beyond hand waving, and phrases about MS about to “hand over” their search engine to the AI sounds like someone who really doesn’t know much about GPT. Guess I’m disappointed because when I clicked the title I was expecting a cogent criticism I could learn from.
- nr2x 4y agoYup, told it I was trying to build a search interface on top of a huge Postgres database and wanted ways to speed it up. Told me to check out Elasticsearch, which is promising.
- SoylentYellow 4y agoI hear ya. I want to be able to just ask how to configure something on my Linux system instead of stumbling through man pages, stack exchange, and random websites hoping I am used the right verbiage to describe what I want to do. Or to have it write some boilerplate code for me while I focus on my domain specific implementation and testing.
- drcode 4y agoLast time I articulated your sentiment, the reply was something along the lines of "Well, if you actually needed to ask it about terminating conditions of rust programs, you are certainly the last person who should be judging the validity of its answer" LOL
- graeme 4y agoVital caveat. If you can access the correctness of the output, chatgpt can be extremely useful If you cannot….well, that is where it shines at con artistry
- rychco 4y agoI really like ChatGPT & I similarly enjoy GitHub Copilot. The combination of these two technologies has eliminated a large chunk of the time I previously spent referencing documentation, repo issues, man pages, & stack overflow. If you treat ChatGPT as the expert, you’re going to be disappointed. But when YOU are the expert & can verify what ChatGPT outputs, then it makes a fantastic automated reference.
- kilgnad 4y agoIt goes both ways but people usually take one extreme. You absolutely cannot deny the fact that chatGPT produces a lot of bullshit. But at the same time you absolutely cannot deny the fact that it produces a lot of real answers to very complex questions. Both the ability to make shit up and give real complex answers are amazing achievements. I think a lot of people haven't picked up on the fact that in both cases chatGPT actually understands what you are telling it.
- busyant 4y ago> I think a lot of people haven't picked up on the fact that in both cases chatGPT actually understands what you are telling it. This is something that I haven't seen mentioned yet. The stunning aspect of ChatGPT is that it seems to understand* the nuances of what I'm asking. Yes, sometimes it spews bullshit, but the bullshit is still trying to address my questions, no matter how odd. * I suspect that "understand" may not be the correct word here, depending on your definition. But at the very least, it can parse the nuances of my questions.
- svachalek 4y agoThe subtlety of its communication is fairly astonishing. "Digital assistants" from the world's biggest tech companies can respond to a few basic template questions and commands and tend to fall back on "here's a link to Wikipedia, chief". In the same day and age, ChatGPT can respond to a statement like "actually it's a cat" with "yes, my apologies for the error, [repeats a lot of stuff with corrections]". In the process it's recognizing that your response is a correction, what "it" refers to, some of the implications of what that change means, and that you are expecting it to issue a response that amends its previous statements. It's several generations ahead of the state of the art.
- deleted 4y ago[deleted]
- kilgnad 4y ago> I suspect that "understand" may not be the correct word here, There's no other word for what's going on. The inputs and resulting outputs show something indistinguishable from understanding. If we choose to define "understanding" as some deeper internal process well that's a deadend because we don't even know the meaning of the term "understanding" from the context of the human brain. So more or less from the inputs and the outputs there's only one word that describes what's going on. It "understands" you.
- xorcist 4y agoIt is a text generator, trained on a huge corpus including the public web. Given the prevalence of this kind of threads on the corpus, it seems likely it should be able to piece together an intelligible text on it. Maybe a more fitting question to ask when evaluating the technology as a tool for programmers is if it is better than searching Stack Overflow alone?
- SergeAx 4y agoYesterday I asked ChatGPT, how do I use DataMapping pattern instead of ActiveRecord with Django framework. It recommended me a `Django-OOOR` package. When I asked what that package is, it said, that it is an integration package for OORM, Open Object Relational Mapping component of OpenERP. Both package and component are made up bullshit, I kid you not. Did you try to actually code and test those graceful termination parts?