<iframe class="gist-iframe" src="/gist/fowtwtio/48fcc40af75971634d2e2234d3d63c84.js" allowfullscreen="" frameborder="0" height="undefined" width="undefined">
</div>
</div>
</figure></iframe></div></div></figure><p id="94b7">Next I’ve asked him (the AI) to act as if it were a debugger, thus giving him the typical commands and expecting it to show the typical data an IDE debugger would show us developers while running code step by step. This was the most challenging step, as <b>ChatGPT</b> often refused to behave as requested, reminding me that it was only a “language model and not capable of running programs”, with its usual warning banner. After a few attempts, I was able to get it to comply with my requests.</p><figure id="5d70"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*IDEbrju-x-vLxYVDRAFMbg.png"><figcaption>Debugging step by step 1 ChatGPT AI brain</figcaption></figure><p id="14f0">Here I instruct <b>ChatGPT</b> to continue executing the program while continuing to show the required debugging information:</p><figure id="2eb2"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*LQoj_gz6T46op8x5Eiz4rw.png"><figcaption>Debugging step by step 2 inside ChatGPT AI brain</figcaption></figure><p id="01fb">And that’s the end of that run. I’ve managed to test it mutiple times, and it has always shown different values for the random value, making it seem as natural as it could be while running on a real computer.</p><p id="e4e1">I also tried running the same test on the <b>text-davinci-3</b> <b>GPT-3</b> model from the official playground website <a href="https://beta.openai.com/playground">https://beta.openai.com/playground</a> with even nicer structured debugger-like responses. This model is though different from the one used in <b>ChatGPT</b>, since it’s not tailored for conversations and chats, but more for certain specific tasks such as text summarization and such, and will thus appear less human in his responses. Even the web interface is clearly not made for chatting with the AI. Neverthless from the images below you can see from his replies , which are highlighted in green, how it behaved similarly to <b>ChatGPT</b>, delivering similar amazing results.</p><figure id="4b6b"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*DEEWvbR0LLzlolS-3ZwYqA.png"><figcaption>Providing the input program</figcaption></figure><figure id="7d78"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*hXzIXG5ugPl5qjP_7COIIA.png"><figcaption>Asking the AI to provide the stack of the program</figcaption></figure><figure id="e8d0"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*HsarroaR8rYRxBaQgEZj-g.png"><figcaption>The AI debugger goes one step forward in the program execution</figcaption></figure><figure id="8378"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*zKptPjRefKUH2Uo_Cgo9Ww.png"><figcaption>The AI debugger terminates the program execution</figcaption></figure><p id="cb89">And that’s the end of the tests for this article. I will continue to experiment with <b>ChatGPT</b> to see how far I can push its capabilities. One area I’m particularly interested in is how it would handle debugging <b>multi-threaded</b> programs. As many programmers know, debugging <b>multi-threaded</b> programs can be a difficult and time-consuming task. It would be great to have an AI assistant to help with it and potentially make debugging more efficient and effective.</p><p id="6e3b">Advanced <b>NLP</b> models, potentially tailored specifically for testing purposes, could revolutionize the world of development by providing the ability to automatically run and debug code. This would relieve programmers from one of their most tedious and time-consuming tasks. With the help of this technology, developers could test their code more quick
Options
ly and efficiently, leading to faster development times and higher-quality software. Already with <b>ChatGPT</b>, developers can now theoretically run and debug their code directly within the AI, which we remind was not designed for this purpose. This innovative approach to development has the potential to fundamentally change how we think about building and debugging software. What do you think? How do you envision this technology being used in the future? Would you be interested in using an AI like <b>ChatGPT</b> to help you with your development work?”</p><p id="3a27">If you liked 👏 this article you may enjoy reading through some of my other articles. Oh, and don’t forget to follow me! 🫵</p><h1 id="8e38">Further reading</h1><p id="9a5c"><i>Below, you can find some of my other articles:</i></p><div id="1980" class="link-block">
<a href="https://levelup.gitconnected.com/run-a-kubernetes-cluster-on-apple-silicon-mac-with-kind-9d6608a93a9">
<div>
<div>
<h2>Run a Kubernetes cluster on Apple Silicon Mac with kind</h2>
<div><h3>How to set up a Kubernetes cluster inside a Docker container on a Mac in just a few commands</h3></div>
<div><p>levelup.gitconnected.com</p></div>
</div>
<div>
<div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/1*P4qkzE5_kSYRHuuWsqqYHA.jpeg)"></div>
</div>
</div>
</a>
</div><div id="c603" class="link-block">
<a href="https://levelup.gitconnected.com/stablediffusion-on-apple-silicon-macs-native-deployment-for-zero-fan-spin-and-maximum-performance-9d47ab6dac94">
<div>
<div>
<h2>StableDiffusion on Apple Silicon Macs: Native Deployment for Zero Fan Spin and Maximum Performance</h2>
<div><h3>Step-by-step guide to deploy StableDiffusion on Apple Silicon Macs unleashing the full potential of the Apple Silicon…</h3></div>
<div><p>levelup.gitconnected.com</p></div>
</div>
<div>
<div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/1*-Y2p4kgOhhDhjRoP57qu6Q.png)"></div>
</div>
</div>
</a>
</div><div id="01bb" class="link-block">
<a href="https://readmedium.com/is-the-future-of-search-here-comparing-google-and-chatgpt-34a2b59f327c">
<div>
<div>
<h2>Is the Future of Search Here? Comparing Google and ChatGPT</h2>
<div><h3>The rise of large language model AI assistants: will they replace Search Engines?</h3></div>
<div><p>medium.com</p></div>
</div>
<div>
<div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/1*aedszUcIcKyYPP3n8YQ2aA.png)"></div>
</div>
</div>
</a>
</div><p id="b459">If you enjoyed reading my stories and want to support me, <a href="https://medium.com/@stringmeteor/membership">consider signing up for <b>Medium</b> membership through my referral link</a>. You get a 1-month free trial that grants you access to all the content on <b>Medium</b>. 🎁</p><div id="91d6" class="link-block">
<a href="https://medium.com/@stringmeteor/membership">
<div>
<div>
<h2>Join Medium with my referral link — StringMeteor</h2>
<div><h3>Read every story from StringMeteor (and thousands of other writers on Medium). Your membership fee directly supports…</h3></div>
<div><p>medium.com</p></div>
</div>
<div>
<div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*G-H5KPWLDyHgPI2v)"></div>
</div>
</div>
</a>
</div></article></body>
ChatGPT
ChatGPT: The AI Assistant That Can Run and Debug Your Code
Will AI revolutionize development by debugging code in our place?
As probably many of you reading this piece already know, GPT is a large-scale language model developed by OpenAI that uses deep learning techniques to generate human-like text, and can be used for a variety of natural language processing tasks, such as translation, summarization, and text generation. Recently, ChatGPT, a new entry in the OpenAIGPT models lineup, was released as an open beta, freely accessible to everyone after signing up on the website. This gives users the opportunity to experiment with the chatbot and create virtual assistants that can engage in human-like conversation and perform a variety of complex tasks, many of which were not thought to be easily carried out by a language model in the near future. The model has been optimised for conversational language, but has since shown to be just as capable as the other members of the family, with the main difference being its ease of access and interaction, perhaps what has been lacking until now to make the headlines.
Generated by AI — Credits to DALL-E
GPT-3 and now its cousin ChatGPT have since amazed many with their ability to perform tasks that were not previously believed possible for a language model. For example, ChatGPT has been shown to be able of running a virtual machine inside itself, allowing it to simulate the behaviour of a real computer.
This demonstrates how these tools can be used not only to design virtual assistants that can effectively engage in conversation, but also for performing complex tasks such as code generation and description.
As far as conversations are concerned, ChatGPT has been able to generate human-like responses to questions and prompts, making it difficult even for experts to distinguish it from a real human conversation. This is thanks to the fact that ishas been trained on large amounts of refined and filtered data. What we’ve seen until now has already led some to wonder whether future iterations of such models, potentially trained on much larger data sets and with better quality data and architectures, could one day become indistinguishable from a human in conversation.
In one of my recent field trials, I managed to trick ChatGPT into running and debugging code inside itself, something that the AI assistant was not designed for. This was not an easy feat, as ChatGPT is not intended to execute or debug code, but through some creative inputs given and experimentation, I was able to make it work. In this article, I will share what steps I’ve followed as I tricked ChatGPT into running and debugging code, and I will discuss the potential implications of this breakthrough for the world of development, if even a small enhanced part of what we’ve seen, is shipped in a commercial or consumer product.
First of all I asked ChatGPT for a simple Python program, this will be the one which we’ll try to run and debug inside the magic mind of ChatGPT. Nothing fancy, it just generates a random number and prints something depending on the value of it.
Making ChatGPT generate a simple Python program
Here is the piece of code that ChatGPT has provided in response to my query. Feel free to try it out for yourself:
Next I’ve asked him (the AI) to act as if it were a debugger, thus giving him the typical commands and expecting it to show the typical data an IDE debugger would show us developers while running code step by step. This was the most challenging step, as ChatGPT often refused to behave as requested, reminding me that it was only a “language model and not capable of running programs”, with its usual warning banner. After a few attempts, I was able to get it to comply with my requests.
Debugging step by step 1 ChatGPT AI brain
Here I instruct ChatGPT to continue executing the program while continuing to show the required debugging information:
Debugging step by step 2 inside ChatGPT AI brain
And that’s the end of that run. I’ve managed to test it mutiple times, and it has always shown different values for the random value, making it seem as natural as it could be while running on a real computer.
I also tried running the same test on the text-davinci-3GPT-3 model from the official playground website https://beta.openai.com/playground with even nicer structured debugger-like responses. This model is though different from the one used in ChatGPT, since it’s not tailored for conversations and chats, but more for certain specific tasks such as text summarization and such, and will thus appear less human in his responses. Even the web interface is clearly not made for chatting with the AI. Neverthless from the images below you can see from his replies , which are highlighted in green, how it behaved similarly to ChatGPT, delivering similar amazing results.
Providing the input programAsking the AI to provide the stack of the programThe AI debugger goes one step forward in the program executionThe AI debugger terminates the program execution
And that’s the end of the tests for this article. I will continue to experiment with ChatGPT to see how far I can push its capabilities. One area I’m particularly interested in is how it would handle debugging multi-threaded programs. As many programmers know, debugging multi-threaded programs can be a difficult and time-consuming task. It would be great to have an AI assistant to help with it and potentially make debugging more efficient and effective.
Advanced NLP models, potentially tailored specifically for testing purposes, could revolutionize the world of development by providing the ability to automatically run and debug code. This would relieve programmers from one of their most tedious and time-consuming tasks. With the help of this technology, developers could test their code more quickly and efficiently, leading to faster development times and higher-quality software. Already with ChatGPT, developers can now theoretically run and debug their code directly within the AI, which we remind was not designed for this purpose. This innovative approach to development has the potential to fundamentally change how we think about building and debugging software. What do you think? How do you envision this technology being used in the future? Would you be interested in using an AI like ChatGPT to help you with your development work?”
If you liked 👏 this article you may enjoy reading through some of my other articles. Oh, and don’t forget to follow me! 🫵