Recent

Author Topic: ChatGPT and ObjectPascal in Lazarus IDE  (Read 6386 times)

TBMan

  • Sr. Member
  • ****
  • Posts: 343
Re: ChatGPT and ObjectPascal in Lazarus IDE
« Reply #30 on: July 10, 2025, 01:22:01 pm »
Quote
... I'm learning how flow fields work using ChatgPT and youtube. Those two things are just another form of research.

Are there no humans still alive. To discuss flow fields or other pascal related things with? I don’t think that AI is a good substitute for mentors, teachers , personal relationships etc. Yet it’s being misused as substitutes for all these things. 

I would like to know what a flow field is but I’m not interested in talking to machines. What can I do?


Well, you could ask on a programming forum, there must be some somewhere. Oh wait........ :D

Or use Google.  You've never used google (or another search engine online?)

https://www.youtube.com/watch?app=desktop&v=zr6ObNVgytk

Many retired hobbyists (like me) don't have access to teachers, have mentors or even know other programmers to talk to.
Barry

Newest game (clone),
Missile Commander:
https://www.youtube.com/watch?v=tgKz0cxog-k

paule32

  • Hero Member
  • *****
  • Posts: 645
  • One in all. But, not all in one.
Re: ChatGPT and ObjectPascal in Lazarus IDE
« Reply #31 on: July 10, 2025, 01:36:23 pm »
programming is not a challenge.
programming is not a have must job
programming is a desire to let activate the minds for creative work
programming is not a thing that all workers/hobbiest is familar with - you must learn it - and when you have fun on it, then you could be done a developer.
not all developers produce good code (that is a individual thing - to show in a challenge, what, and how dirty a hack to something is done)
learn programming with AI can be help, but it don't swipe the learning on scratch with pillepalle examples.
programming can be frustrated - for beginners with no mentor.
I had a good mentor which I will thanks him for all this what I could learn from him.
I thanks all the people around the "one" world called "Earth" that sit in Forums and give hints and other feedback to calm down a little bit.
If you have no fun at programming then stop it and search for an other Hobby
MS-IIS - Internet Information Server, Apache, PHP/HTML/CSS, MinGW-32/64 MSys2 GNU C/C++ 13 (-stdc++20), FPC 3.2.2
A Friend in need, is a Friend indeed.

440bx

  • Hero Member
  • *****
  • Posts: 6063
Re: ChatGPT and ObjectPascal in Lazarus IDE
« Reply #32 on: July 10, 2025, 02:19:17 pm »
Based on some comments I've read in multiple threads, I believe that A.I can be useful for some things.

AFAIC, A.I is missing the most important feature an analysis engine (human or other) _must_ have and that is, to state: "I don't know how to do that".    Until it can do that, it's like asking a question to a politician... the quality of the answer can vary a great deal (and that's an understatement), IOW, the trustworthiness of the answer is very dubious.

Probably ok for people who live in Utah, I've heard they have a lot of salt there which could come in handy when dealing with A.I.

FPC v3.2.2 and Lazarus v4.0rc3 on Windows 7 SP1 64bit.

Thaddy

  • Hero Member
  • *****
  • Posts: 18728
  • To Europe: simply sell USA bonds: dollar collapses
Re: ChatGPT and ObjectPascal in Lazarus IDE
« Reply #33 on: July 10, 2025, 03:11:18 pm »
That is true: "I don't know how to do that" is missing in their vocabulary and replaced by "Hallucination".
If Europe sells their USA bonds the USD will collapse. Europe can affort that given average state debts. The USA can't affort that. Just an advice...

RayoGlauco

  • Full Member
  • ***
  • Posts: 223
  • Beers: 1567
Re: ChatGPT and ObjectPascal in Lazarus IDE
« Reply #34 on: July 10, 2025, 03:21:04 pm »
I've asked ChatGPT several times to generate code in Pascal for me. Usually, the code it generates always has some errors. Some errors involve basic issues, such as trying to treat binary data as if it were alphanumeric. Anyway, it serves as a starting point for me, and sometimes it reveals a different approach than the one I initially had.
One thing that surprises me a lot is that when the problem to be solved includes data tables, ChatGPT often generates tables with several incorrectly transcribed codes.
To err is human, but to really mess things up, you need a computer.

Zvoni

  • Hero Member
  • *****
  • Posts: 3242
Re: ChatGPT and ObjectPascal in Lazarus IDE
« Reply #35 on: July 10, 2025, 03:59:03 pm »
The Problem is not People using AI to "generate" Pascal-Code

The Problem is people using AI to "generate" Pascal-Code and NOT understanding the Result!
because those people only understand
"It doesn't compile"
"It compiles, but It's not doing what i want"

Even Thaddy admits using AI.
The difference between him and many others: He can actually read the result and judge "Yeah, that's complete garbage" or "Oh, nice...hmmmm."

99% of all those people asking AI to generate Pascal-Code and then coming here "It doesn't compile", have no clue about the algorithm they actually need.
They have no plan whatsoever how to approach the problem.

Because if you know the algorithm you need, if you have a plan how to approach the problem, then it doesn't really matter if you use an Abacus, Pascal, C++, Rust, Python, Visual Basic or a programmable Calculator.

And asking AI is then more out of curiosity
« Last Edit: July 10, 2025, 04:02:30 pm by Zvoni »
One System to rule them all, One Code to find them,
One IDE to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------
Code is like a joke: If you have to explain it, it's bad

paule32

  • Hero Member
  • *****
  • Posts: 645
  • One in all. But, not all in one.
Re: ChatGPT and ObjectPascal in Lazarus IDE
« Reply #36 on: July 10, 2025, 04:05:49 pm »
@Zvoni:

in this Context... your Signature sweets me...  :-\
MS-IIS - Internet Information Server, Apache, PHP/HTML/CSS, MinGW-32/64 MSys2 GNU C/C++ 13 (-stdc++20), FPC 3.2.2
A Friend in need, is a Friend indeed.

Joanna

  • Hero Member
  • *****
  • Posts: 1415
Re: ChatGPT and ObjectPascal in Lazarus IDE
« Reply #37 on: July 10, 2025, 04:06:45 pm »
Tbman thanks for link, It reminds me of programming bots in computer games.
Even if chatgpt worked perfectly which it apparently doesn’t it’s a Faustian deal at best. The ability to think of how to solve Programming problems is a skill which like any other skill will atrophy if not used.

Suppose that you were a mountaineer who could climb any mountain and you discovered that it’s so much more efficient just to drive up mountain in a car to the top. After awhile you would not be a mountaineer anymore and would be limited to mountains with car roads.

Zvoni nobody needs to know programming anymore, we have AI !  :D

TBMan

  • Sr. Member
  • ****
  • Posts: 343
Re: ChatGPT and ObjectPascal in Lazarus IDE
« Reply #38 on: July 10, 2025, 04:15:40 pm »
Tbman thanks for link, It reminds me of programming bots in computer games.


It's neat stuff. I'm also starting to look at Wave Function Collapse algorithms. I don't know how far I will get, but I am going to try to learn how it all works. I remember an old PC game, Empire https://en.wikipedia.org/wiki/Empire_(1977_video_game) - I think the map maker included with the game used it.

Here's Wave Function Collapse:
https://www.youtube.com/watch?v=qRtrj6Pua2A
Barry

Newest game (clone),
Missile Commander:
https://www.youtube.com/watch?v=tgKz0cxog-k

Igor

  • Sr. Member
  • ****
  • Posts: 385
Re: ChatGPT and ObjectPascal in Lazarus IDE
« Reply #39 on: July 10, 2025, 09:45:21 pm »
I just finished coding web app in PHP using Anthropic Claude 4. It includes about 18 modules, 170 KB of code (PHP, JS, CSS, JSON). Writing the code mainly worked almost perfectly.
It seems that AI is best at handling web code. Also I found that Claude Sonnet 4 works better than ChatGPT o3.
« Last Edit: July 10, 2025, 10:00:55 pm by Igor »

zeljko

  • Hero Member
  • *****
  • Posts: 1826
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: ChatGPT and ObjectPascal in Lazarus IDE
« Reply #40 on: July 10, 2025, 10:09:18 pm »
In that case AI finished coding, not you.

gidesa

  • Full Member
  • ***
  • Posts: 212
Re: ChatGPT and ObjectPascal in Lazarus IDE
« Reply #41 on: July 11, 2025, 12:40:21 pm »
It seems that AI is best at handling web code.

Obviously. Generic/generalist LLM (I prefer writing of LLM, AI is a false description as of today) , as all public free services, are trained on generalist code data sets, as github. Where web languages (and C, C++, Python, Javascript, ...) are much much much more present than Pascal. The same web itself is an enormous dataset of Html\Css\Javascript.
And I think that, in general, total of Pascal code lines today is many many times fewer than for mainstream languages. So probably it's impossible to have a LLM  trained on Pascal as good as on other languages. LLM is simple matter of quantity.

Thaddy

  • Hero Member
  • *****
  • Posts: 18728
  • To Europe: simply sell USA bonds: dollar collapses
Re: ChatGPT and ObjectPascal in Lazarus IDE
« Reply #42 on: July 11, 2025, 12:47:05 pm »
You can't generalize "AI" because the models differ too much. AI as such is an empty term.
There are at least three that work well with FreePascal. DeepSeek is a winner, but CoPilot and its nephew chatGPT ain't bad.
Not to write code but to review code.
« Last Edit: July 11, 2025, 12:50:37 pm by Thaddy »
If Europe sells their USA bonds the USD will collapse. Europe can affort that given average state debts. The USA can't affort that. Just an advice...

gidesa

  • Full Member
  • ***
  • Posts: 212
Re: ChatGPT and ObjectPascal in Lazarus IDE
« Reply #43 on: July 11, 2025, 01:13:09 pm »
You can't generalize "AI" because the models differ too much. AI as such is an empty term.

"Generalist" LLM in the sense that it's not trained on a strictly specialized dataset.
I imagine that big companies, just now, have their specialized  LLM for coding. Maybe
trained only on their code, not on a "big soup" as github or similar.
Yes, (public avalaible) models differ very much. But (public avalaible) models do (or want to do)  the same things.
They are different solutions of same requirements/problems.
Maybe there are public avalaible models/services very specialized on a narrow sector, I don't know.
But sadly it's not Pascal.
 

Thaddy

  • Hero Member
  • *****
  • Posts: 18728
  • To Europe: simply sell USA bonds: dollar collapses
Re: ChatGPT and ObjectPascal in Lazarus IDE
« Reply #44 on: July 11, 2025, 02:03:36 pm »
But sadly it's not Pascal.
That is not true. The models and engines I mentioned do FreePascal in detail.
Often wrong... but helpful for pointers. Deepseek even gives you extreme details about its reasoning.. (that is why I like it and can correct it) and tries to use the compiler logic itself.
If Europe sells their USA bonds the USD will collapse. Europe can affort that given average state debts. The USA can't affort that. Just an advice...

 

TinyPortal © 2005-2018