Chat gpt code generation

I used chat gpt to generate some unity specific c# code today and it works frighteningly well.

2 Likes

I LOVE chatGPT! Its helped me a lot.
From understanding other peoples code, converting from what type of code to another, converting one style to another (please show me how to do the same using the promise version of the api…loved that one), writing things in languages I hardly know (AutoIT) and my fav so far is getting it to make regex’s for me.
It can make a lot of mistakes but if you know some coding already it makes a fantastic place to start from.

can you change the following js code so its simpler and uses for loop and arrays…

const beer = (amount) => Array.from(new Array(amount+1).keys(), x => x > 1 ? x + ’ bottles of beer on the wall, ’ + x + ’ bottles of beer.\n’ + ‘Take one down and pass it around, ’ + (x - 1) + ’ bottles of beer on the wall.\n\n’ : x== 1 ? ‘1 bottle of beer on the wall, 1 bottle of beer.\nTake one down and pass it around, no more bottles of beer on the wall.\n\n’ : ‘No more bottles of beer on the wall, no more bottles of beer.\nGo to the store and buy some more, ’ + (amount) + ’ bottles of beer on the wall.’).reverse().join(‘’);

const beer = (amount) => {
  let result = "";
  for (let i = amount; i >= 0; i--) {
    if (i > 1) {
      result += `${i} bottles of beer on the wall, ${i} bottles of beer.\nTake one down and pass it around, ${i - 1} bottles of beer on the wall.\n\n`;
    } else if (i === 1) {
      result += `1 bottle of beer on the wall, 1 bottle of beer.\nTake one down and pass it around, no more bottles of beer on the wall.\n\n`;
    } else {
      result += `No more bottles of beer on the wall, no more bottles of beer.\nGo to the store and buy some more, ${amount} bottles of beer on the wall.`;
    }
  }
  return result;
};
1 Like

This is just the start of what services like Chat GPT can do. Really exciting times!

This is almost the realization of the chatbot dream that kept cropping up every few years, only to fizzle out because they weren’t very useful :robot:

1 Like

I have been having a problem while using ChatGPT recently. Sometimes I am getting this error code 1020 and sometimes 404. Could anybody please tell me what the error is actually? Its a very interesting and useful tool. I really have no idea about the error. Any assistance would be greatly appreciated.

Have you tried logging out and logging back in?

Some of these errors could just be caused by chatgpt getting overwhelmed with traffic. The free version has no guaranteed uptime.

Thank you so much.

I haven’t really been following this at all, so it’s crazy to see that that’s possible.

I read today that Microsoft has some kind of stake in GPT and is integrating it into Bing. Maybe there will finally be a reason to use Bing.

1 Like

I thought this video had a good view on all that…

3 Likes

Yes, I have logged in and out several times, but still the was happening. But I was searching online and found some articles like this one. What do you think if this post might be helpful in anyway? One thing Proton VPN has been installed on my PC. I dont know whether the problem is having due to the VPN.

I hope they rename Bing to Clippy.

1 Like

Proton VPN may have something to do with it. I do know they do bot-detection extensively (via Cloudflare, I believe), and you accessing via a VPN may raise some red flags on their service. If you disable Proton VPN, does everything work correctly?

Cheers,
Kirupa :slight_smile:

I wasn’t really either but I started a job a few months ago as the only c# dev, and when I came in the office someone who doesn’t code brought it up and typed in a sentence and it spit some fairly advanced code for unity scripts. Immediate realization I need to be on top of this or else the robot took er jobs as southpark would say.

It missed a few imports, and certainly you still need a coder to use it, but it’s far more powerful than I thought.

I’ve just been laughing at the term “ai” for the last 15 years, but whatever u call it it’s definitely impressive

2 Likes

I hope it takes my job but I still get paid. Is that possible?

3 Likes

Its called “democratic socialism”…:smile:
Apparently youse are all over it up there…

1 Like

If Microsoft integrate chat into Bing like in this video then Ill be a convert in a second. Im really poor but Id be even willing to pay for that if it could still do the codeing stuff.

1 Like

My problem with Bing is that it doesn’t return a lot of scholarly articles, and there’s no way that I can see to only search for them.

I just can’t get over how ridiculous this thing is.

I feel like the old days where you would ask a question to somebody then it’s like, oh yeah I forgot. I’ll just Google that.

I have a few tasks ahead of me.

I can ask chat gpt, what would be a good library to use for this scenario, now give me an example of it.

And it just writes everything for me. I just can’t get over how good it is at c# and unity specific questions.

I have to convert some primitive data to a specific file formats and it’s just like oh yeah, you can use this library, and this is how you do it, annnnnd it’s done

1 Like