Gpt chat, amazing tool for debugging

i think I’m going to price up a open ai account, see if i can train gpt chat on the haiku api, what a incredible tool. I’m not very good with most programming languages, but man 2hrs with gpt, like 6 months of classes, simply amazing.

could be invaluable for porting software !! creating gui apps etc

1 Like


8 posts were split to a new topic: Behavior of forum and web browsers for large images

my goal would be for porting, big applications

I tried it with my native language and understands the same

Thanks at @SCollins for pointing to GPT chat. I hadn’t heard of it before.

Just point chatGPT at our bug tracker and tell it to solve some bugs. We can skip Beta 4 and release R1 in a few weeks. :rofl: :see_no_evil:


it might be capable with supervision

1 Like

In the #haiku_os_chat on matrix, Gerasim Troeglazov wrote a simple calculator app with GPT. The only thing they added to the generated code was a line to create the BApplication

By the way, which chatroom is the best place for Haiku user, non-dev questions? It’s ok if it’s Telegram, matrix, irc… or should I ask in the dev chat rooms?

#include <Application.h>
#include <Bitmap.h>
#include <File.h>
#include <TranslatorRoster.h>
#include <stdio.h>

int main(int argc, char** argv) {
  // Crea un oggetto BApplication per poter utilizzare le API di Haiku
  BApplication app("application/x-vnd.Screenshot");

  // Prendi lo screenshot dello schermo intero
  BRect bounds(BScreen().Frame());
  BBitmap bitmap(bounds, B_RGB32, true);
  BView* view = new BView(bounds, "Screenshot view", B_FOLLOW_NONE, B_WILL_DRAW);
  view->SetHighColor(0, 0, 0);
  app.Driver()->DrawBitmap(&bitmap, bounds, bounds);

  // Salva lo screenshot come file PNG
  BFile file("screenshot.png", B_CREATE_FILE | B_ERASE_FILE | B_WRITE_ONLY);
  BTranslatorRoster().Translate(&bitmap, NULL, NULL, &file, B_PNG_FORMAT);

  return 0;

Some comments:
Potentially it takes portions from GitHub. Allegedly GPT-3 is pre-trained with billion lines of code from existing repositories.

The astonishing thing is that it puts comments in the same language of the request

1 Like

I don’t trus humans (including myself) with writing any kind of slightly complex code without memory leaks and race conditions. Can robots do better?


Yes I think robots can do better if taught so. It’s like chess programs. First they were inferior now some are superior to humans.

you can copy and paste code, and ask gpt to look for recursion, loop errors, leaks etc, it can even suggest fixes.

I’d imagine there may be false positives.

i jist found it incredibly helpful writing some custom controls for a machine, and man, it really was.

here’s a really really novel idea, integrate chatgpt or similar into a ide, wow, that, it could be massive in leveraging productivity.

1 Like

This may not be a good idea beyond very simple programs:


code security is a BS issue

This is super interesting topic for developing at least simple BeOS-like applets that extend the OS. Something like TuneTracker was at start could be achievable relatively easy and safe - no?

I see it more suitable for creating simple snippets or skeleton classes very quickly to speed things up a bit.
The other interesting use case is for showing online documentation and examples of Haiku API.
I presume ChatGPT has been trained with a subset if not all the content of BeBook and Haiku Book and code from GitHub (like Copilot)

1 Like

I would not trust it in an automated way. And I do not think it is evolved enough to reply by itself to code review comments on Gerrit.

If someone wants to try to use it to improve documentation, they will have to take responsibility for any issues resulting (that means getting it past code review and applying changes as requested, with or without assistance).

Writing code is not the most important part in an application, doing the proper architecture and design is. And then debugging. And doing debugging and evolutions on code you didn’t write is a bit more difficult than on code you designed yourself.

Is that what we’re going to get? People trying to write applications this way with code they don’t fully understand? I can’t say I have a problem with that, I did it in some way with different tools (writing apps in Delphi when I was 12 years old or so, I had no idea what a variable was, it was quite a mess).

So let’s see where it can be useful and how far it can get before reaching its limitations (or at which point it becomes more annoying and verbose to tell chatGPT what you want than write the code yourself).


as it stands, it’s useful for debugging, it can comment code, etc. it’s also great if you need a idea on how to handle a logic issue.

it’s really a very useful tool, i think of it as a good tool for self guided learning, debugging, code lookup and reads and understands documentation.

i think having it in a IDE as a tool would be a huge help. certainly could cut down on a lot of the grinding boiler plate work.

1 Like

Who is they? Besides 3dEyes?

The only thing they added to the generated code

In fact, if you point out errors in the generated code to the AI, then the AI starts to take that into account and writes better. For example, now it already creates an instance of the application, generates the correct message handling.