Recent

Author Topic: Using chatgpt to bring the pascal/lazarus platform up to date more quickly.  (Read 5664 times)

Webdrifter

  • Jr. Member
  • **
  • Posts: 68
I have seen examples of ChatGPT coding, debugging and optimizing new code and of re-engineering existing software and rewriting into another language.

Off course we can use these possibilities as a tool within Lazarus (off course ChatGPT might not be free for long, so what to do in that case. and it's servers are already overloaded much off the time).

But what interests me most is how we can use it as a tool to upgrade the Freepascal/Lazarus-platform on all the items it is lagging behind compared to other more popular platforms.

Let's be honest, despite the effort of some very dedicated people,  the capacity op this community to keep up with the demands of the time have been its largest problem for many decades. This could finally bring at least part of the solution, if we start a well coordinated project to make the leap forward we have all been waiting for so long....  :)

 

Bart

  • Hero Member
  • *****
  • Posts: 5297
    • Bart en Mariska's Webstek
You know that all this ChatGPT does is find the moest often used text in the context of the previous text? It does not have a concept of what is true or false, right or wrong.
It will also use completely wrong examples of code it found on the internet.
Potentially this can lead to more and more wrong code, when people start publishing that wrong code on the net and ChatGPT uses that as input for it's learning capabilities.

Bart

Thaddy

  • Hero Member
  • *****
  • Posts: 14645
  • Sensorship about opinions does not belong here.
The wrong code comes mostly from asking a wrong or not complete question. The more precise the question, the better the answer. And scraping the internet is just a - small - part of the models.
bitrate is always calculated like this:sample rate * bitdepth * number of channels.

PascalDragon

  • Hero Member
  • *****
  • Posts: 5526
  • Compiler Developer
But what interests me most is how we can use it as a tool to upgrade the Freepascal/Lazarus-platform on all the items it is lagging behind compared to other more popular platforms.

Contributions based on AI systems for Free Pascal and Lazarus will have to be rejected, because it is not clear what these AI systems used as source for their models and thus they might infringe licenses or copyright.

MarkMLl

  • Hero Member
  • *****
  • Posts: 6763
Contributions based on AI systems for Free Pascal and Lazarus will have to be rejected, because it is not clear what these AI systems used as source for their models and thus they might infringe licenses or copyright.

Notwithstanding the other points made, I have to agree with that.

It's curious how, in conventional technology and commerce, ones boss is entitled to ask how one arrived at a particular conclusion: yet that is considered forbidden territory in the context of "AI".

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

Bogen85

  • Hero Member
  • *****
  • Posts: 595
But what interests me most is how we can use it as a tool to upgrade the Freepascal/Lazarus-platform on all the items it is lagging behind compared to other more popular platforms.

Contributions based on AI systems for Free Pascal and Lazarus will have to be rejected, because it is not clear what these AI systems used as source for their models and thus they might infringe licenses or copyright.

Somewhat agreed... In theory... But that theory would need to be proven...

This is a "new world".... of sorts...
As things currently stand, there is little case history on this.

However, from my experiments with openai and text-davinci-3, it "appears" pretty obvious to me that much (if not all) of the code being generated is not coming from examples.

Don't get me wrong, some could be coming from examples.... But I have no proof of that yet for what I've done.

The code generated seems generally to be based on what I specify, and I've been able to specify very detailed/specific requirements and have it give me working examples that match what I submitted in my prompt.

So specific that I highly doubt it is finding examples to fit my very specific prompts.

Of course, there is the possibility I'm being deceived...
And yes, the code does not always work. But most (if not all) the time it is because I failed to adequately specify my requirements, or because my requirements were too complex.

The wrong code comes mostly from asking a wrong or not complete question. The more precise the question, the better the answer. And scraping the internet is just a - small - part of the models.

I completely agree with this. From the playing around I've done I have serious doubts it is scraping the Internet for examples.
The code in question is always too unique to what I have specified.

Fred vS

  • Hero Member
  • *****
  • Posts: 3177
    • StrumPract is the musicians best friend
...

The code generated seems generally to be based on what I specify, and I've been able to specify very detailed/specific requirements and have it give me working examples that match what I submitted in my prompt.

So specific that I highly doubt it is finding examples to fit my very specific prompts

Hum, I have the same feeling.
Mainly because the AI at first shot dont give the right answer-code.
After some remarks from my part, the AI apologizes and corrects his errors.
When the code is perfectly ok and I ask him something totally different but using the same library or widget, the answer is incredibly good.

But, and that is the key, after closing the chat and re-load it with a new session, AI has lost all his previous knowledge.

I dont know what are the plan of OpenAI, would they integrate some log-chats into their "main-memory" ?
And if yes, what chats will they add, under what condition?

  :-\
« Last Edit: January 11, 2023, 11:27:25 pm by Fred vS »
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

440bx

  • Hero Member
  • *****
  • Posts: 4202
And yes, the code does not always work. But most (if not all) the time it is because I failed to adequately specify my requirements, or because my requirements were too complex.
Which really showcases the shortcomings of AI in the context of writing a program.  A reasonably competent programmer would have found the holes in the requirements/specification and inquired about what the "user" wanted in each case.

if an AI system can't even do that, it is difficult to believe it will be an effective problem solver and solutions provider.
(FPC v3.0.4 and Lazarus 1.8.2) or (FPC v3.2.2 and Lazarus v3.2) on Windows 7 SP1 64bit.

Fred vS

  • Hero Member
  • *****
  • Posts: 3177
    • StrumPract is the musicians best friend
But, and that is the key, after closing the chat and re-load it with a new session, AI has lost all his previous knowledge.

Note that, using https://chat.openai.com/chat
On the left side of the site there are all the previous chats that you have done.

If you load one of the chats were AI became a guru, all his knowledge is still there, ask him something about the subject that he knows because of previous remarks, he will remember all.

So each chat is a kind of "par of intelligence" that could be added in his main brain.
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

nanobit

  • Full Member
  • ***
  • Posts: 162
if an AI system can't even do that, it is difficult to believe it will be an effective problem solver and solutions provider.

Don't underestimate the AI. Much can be solved by further training (data), without new methods.

dbannon

  • Hero Member
  • *****
  • Posts: 2854
    • tomboy-ng, a rewrite of the classic Tomboy
You know that all this ChatGPT does is find the moest often used text in the context of the previous text? It does not have a concept of what is true or false, right or wrong.
It will also use completely wrong examples of code it found on the internet.
Potentially this can lead to more and more wrong code, when people start publishing that wrong code on the net and ChatGPT uses that as input for it's learning capabilities.

OK, so now we all need to publish lots and lots of really bad code, let ChatGPT find it, quote it (without attribution) and become discredited ?

I'm on it already, indeed, I have been doing it for some time ....

Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

Fred vS

  • Hero Member
  • *****
  • Posts: 3177
    • StrumPract is the musicians best friend
But what interests me most is how we can use it as a tool to upgrade the Freepascal/Lazarus-platform on all the items it is lagging behind compared to other more popular platforms.

Contributions based on AI systems for Free Pascal and Lazarus will have to be rejected, because it is not clear what these AI systems used as source for their models and thus they might infringe licenses or copyright.

Because AI needs a good chat before to become a guru, I suggest, dear Sven, to have a serious chat about fpc using https://chat.openai.com/chat.
Ask him more and more complicated things, correct him if he is wrong.
Maybe you will get a new friend and, if you agree, share that chat to us so we can use the new knowledge of AI

 ;)

Dont be afraid.
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

Bogen85

  • Hero Member
  • *****
  • Posts: 595
See my example here.

https://forum.lazarus.freepascal.org/index.php/topic,61772.msg466515.html#msg466515

I can't imagine that it scraped existing online code to come up with what it did.

dbannon

  • Hero Member
  • *****
  • Posts: 2854
    • tomboy-ng, a rewrite of the classic Tomboy
I can't imagine that it scraped existing online code to come up with what it did.
But thats the problem, you cannot be sure. Submit a whole lot of AI code to Lazarus and a year later someone bangs on our door saying we pinched his/her code. When the AI can stamp a suitable Opensource license on its code, then its useful, right now, a curiosity.

Davo

edit: typo
« Last Edit: January 12, 2023, 01:07:42 am by dbannon »
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

440bx

  • Hero Member
  • *****
  • Posts: 4202
Don't underestimate the AI. Much can be solved by further training (data), without new methods.
I don't want to underestimate it but, I don't want to overestimate it either.

(FPC v3.0.4 and Lazarus 1.8.2) or (FPC v3.2.2 and Lazarus v3.2) on Windows 7 SP1 64bit.

 

TinyPortal © 2005-2018