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.

2 Likes

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.

1 Like

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

3 Likes

I agree with code generation features, but anyone can tell me Chat GPT can work as SEO. What exactly Chat GPT do for a SEO ?

2 Likes

It is a great weapon. I want to upload some blog to the sites but donā€™t even know the coding that what is code for alignment and for many other fields. But, Chat GPT can do it within a minute. Such an great tool for coding as well as for new content creation.

I came across an interesting scenario recently. I had Chat gpt generate some specific code for me.
I still needed help with my solution, while searching for it, I came across an old post that I am certain chat gpt had learned from.

The solution/ example chat GPT came up with was so similar to this post, just modifying a few variable names.

Funny, all of the code weā€™ve all been posting online for decades has now been consumed by the language model and regurgitated back to us in a quite amazing form.

1 Like