Recent

Author Topic: IDE + AI : IDE = IDE : Notepad (Follow-up to "AI or DIE")  (Read 3399 times)

Manlio

  • Full Member
  • ***
  • Posts: 170
  • Pascal dev
IDE + AI : IDE = IDE : Notepad (Follow-up to "AI or DIE")
« on: September 02, 2025, 11:23:46 am »
A couple of years ago I wrote a post titled "AI or DIE" about the necessity of integrating one or more AI engines with the Lazarus IDE in order for this ecosystem to have some chances of long-term survival.

20 months later, I stand 100% behind every single point I made at the time, and further propose this formula:

    IDE + AI : IDE = IDE : Notepad

In case the meaning is not completely clear, I'm saying that today, adding an AI helper to an IDE is as massive an improvement as was the advent of IDEs in the era of Notepad-like plain text editors.

Fun fact: I'm so old that for the first 15 years of my Pascal programming I did write all my code in the equivalent of Notepad. Then Delphi 1.0 was released with the first (buggy but) modern IDE, and it started a new era for Pascal programmers. Nobody ever wanted to write code in Notepad again. And what is happening now is the dawn of a major new era in programming, the addition of AI tools to the IDE.

For example, have you tried Cursor?

If not, clear the rest of the day and catch up with the only way it will make sense to use IDEs in the not-too-distant future.

Now, I may be wrong but I also have the feeling that adding some integrated AI tools to Lazarus should not be too difficult. It's basically a matter of giving the AI engine access to some local folders (or to git repos, like Cursor) and let it do its thing. As of now I wouldn't know where to start, but can someone make some suggestions? Give it a try? Even the most basic form of AI integration would be a major step forward. Afterwards, additional features may be gradually added as per popular demand.

I realize that this is a completely volunteer-based project, but still, AI integration is of such major strategic importance for our common future. Can we at least discuss the matter in stronger and more urgent terms, and encourage those who have the ability to do so, to take some initial steps?

Thank you all and best wishes to all

Manlio

PS: The original AI or DIE post: https://forum.lazarus.freepascal.org/index.php/topic,65711.msg501095.html

manlio mazzon gmail

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 12536
  • FPC developer.
Re: IDE + AI : IDE = IDE : Notepad (Follow-up to "AI or DIE")
« Reply #1 on: September 02, 2025, 11:32:36 am »
And I stand by post (the second in the thread back then). I might also add that the availability of free online AI engines might begin to wain now that peak AI is (almost?) reached, and there is a risk the APIs might all disappear behind subscriptions.
« Last Edit: September 02, 2025, 12:05:46 pm by marcov »

Thaddy

  • Hero Member
  • *****
  • Posts: 18363
  • Here stood a man who saw the Elbe and jumped it.
Re: IDE + AI : IDE = IDE : Notepad (Follow-up to "AI or DIE")
« Reply #2 on: September 02, 2025, 04:27:37 pm »
Adding it is not too difficult indeed. But I wonder if I need that workflow.
Although I have code for DeepSeek and OpenAI that should integrate quite easily.
The biggest problem is to teach users that they need a key...
« Last Edit: September 02, 2025, 04:29:59 pm by Thaddy »
Due to censorship, I changed this to "Nelly the Elephant". Keeps the message clear.

Thaddy

  • Hero Member
  • *****
  • Posts: 18363
  • Here stood a man who saw the Elbe and jumped it.
Re: IDE + AI : IDE = IDE : Notepad (Follow-up to "AI or DIE")
« Reply #3 on: September 02, 2025, 04:31:17 pm »
and there is a risk the APIs might all disappear behind subscriptions.
No. eventually ms will offer it for free anyway. (As it does now, to a certain extend)
Due to censorship, I changed this to "Nelly the Elephant". Keeps the message clear.

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 12536
  • FPC developer.
Re: IDE + AI : IDE = IDE : Notepad (Follow-up to "AI or DIE")
« Reply #4 on: September 02, 2025, 04:32:09 pm »
and there is a risk the APIs might all disappear behind subscriptions.
No. eventually ms will offer it for free anyway. (As it does now, to a certain extend)

I'm not so sure they won't (1) make it for windows users only. (2) maybe even push it into office 365 subscription

440bx

  • Hero Member
  • *****
  • Posts: 5820
Re: IDE + AI : IDE = IDE : Notepad (Follow-up to "AI or DIE")
« Reply #5 on: September 02, 2025, 04:49:14 pm »
any facility that produces _wrong_ results is not useful.  A.I is too often among them.

From what I've seen of A.I, unless you ask for something really simple, it rarely produces something that is correct and ready to use.  Quite often the result requires modification by the programmer which means the programmer has to review that code and realize what is wrong with it and make the necessary corrections and hopefully not miss any.    I'm far from convinced this improves programming.  IOW, not only I have to detect the mistakes I made but, I have to detect the mistakes an A.I engine made.  Sounds like more work to me.

As far as using Notepad for programming, there were programming editors that gave Notepad a run for its money (or lack of money) since before Notepad even existed.  I still use one of those editors and the only IDE editor I consider usable for a short time is Lazarus.  When it comes to editing, the Wang dedicated word processor available back in 1982 was a better editor by several orders of magnitude than any editor available today.  We've gone backwards.

The same thing is true with debugging.  Back in 2001/2002, SoftICE provided a debugging environment that is, productivity-wise, several orders of magnitude beyond any offerings today.

Maybe A.I might have a place as a glorified editor macro facility, because when it comes to generating code, it still leaves a lot to desire.

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

Thaddy

  • Hero Member
  • *****
  • Posts: 18363
  • Here stood a man who saw the Elbe and jumped it.
Re: IDE + AI : IDE = IDE : Notepad (Follow-up to "AI or DIE")
« Reply #6 on: September 02, 2025, 05:17:14 pm »
edlin is often overlooked as a programming editor.
Due to censorship, I changed this to "Nelly the Elephant". Keeps the message clear.

Dzandaa

  • Hero Member
  • *****
  • Posts: 501
  • From C# to Lazarus
Re: IDE + AI : IDE = IDE : Notepad (Follow-up to "AI or DIE")
« Reply #7 on: September 02, 2025, 07:15:34 pm »
Hi,

I love these discussions about "AI" why not ask them to create the executable of a program that It would write in Pascal?

@Manlio:

Why integrate AI into Lazarus?
If you absolutely want to use AI, simply open a browser and ask it to write the program.

I spent my afternoon asking an AI to write me "function(S: Single):String"
Single = IEEE 754 single-precision 32-bit without using any floating-point math functions.
Just Div, shl, shr, and, or, etc...
None of it solutions were valid.
Have AIs forgotten binary???

Just a joke :)

B->

Regards,
Dzandaa

CharlyTango

  • Full Member
  • ***
  • Posts: 169
Re: IDE + AI : IDE = IDE : Notepad (Follow-up to "AI or DIE")
« Reply #8 on: September 03, 2025, 11:41:51 am »
Since many people want AI in Lazarus, I asked AI what she thinks about it;


While artificial intelligence (AI) tools are revolutionizing code generation in modern programming environments, using them for software development in Lazarus—especially in a commercial context—raises a number of serious legal, copyright, and confidentiality issues.

Copyright and Source Code Ownership

AI code generators are typically trained on huge datasets from public and private code repositories. They can output code snippets that are identical or highly similar to copyrighted or licensed code, often without necessary attribution or license compliance. This creates a real risk of unintentionally violating licensing terms—such as GPL or other copyleft licenses—which might legally obligate the company to disclose its own proprietary source code or restrict how it can distribute software. Furthermore, works generated primarily by AI may not qualify for copyright protection at all if they lack significant human creative input, leaving them exposed to free use by third parties.

Confidentiality & Trade Secrets

Many AI tools process prompts in the cloud. If proprietary source code or confidential algorithms are submitted to an AI assistant, they may leak into external systems or even the AI’s training data, resulting in trade secret loss and competitive disadvantages. This risk is particularly acute for companies working with closed-source or internal software in Lazarus/FPC, where source code secrecy is critical to product strategy.

Legal Uncertainty & Attribution

The laws governing AI-generated code are unsettled and vary regionally. Litigation is ongoing about how much AI-generated code may breach open-source licenses, how much similarity triggers obligations, and whether copyright even applies. Most AI tools also do not reliably track or provide clear sources for their code suggestions, making proper attribution and license compliance difficult for developers.

In summary: Integrating AI-powered coding tools into Lazarus programming can expose your company to potentially severe legal, copyright, and confidentiality risks, especially when handling proprietary source code. Strict review processes, clear company policies, and cautious contracts are mandatory, and in many cases, it is safer not to use AI at all for core software development in Lazarus environments.


Furthermore, AI can never create anything new, but only combines what is already known according to statistical algorithms, which it then feeds back into itself. The result is never excellence, but in the long term less than mediocrity. AI is trained to give answers that are superficially satisfactory, but does not go into depth without the questioner insisting.

I find that the solution lies in routine research, even without AI.

Therefor i asked AI whether AI is a thief -- here is the first answer without arguing that AI seperates itself from the responsibility

AI itself is not a "thief" in the legal sense because it is a tool, not a conscious actor. However, AI can engage in data misuse or data theft if it collects, copies, or processes sensitive or proprietary data without proper consent or authorization. This unauthorized use of data fits the definition of data theft, which involves the unlawful acquisition or use of protected information without permission. So, while AI is not morally or legally equivalent to a thief, its misuse can lead to theft-like consequences and legal violations.

« Last Edit: September 03, 2025, 11:54:18 am by CharlyTango »
Lazarus stable, Win32/64

gidesa

  • Full Member
  • ***
  • Posts: 196
Re: IDE + AI : IDE = IDE : Notepad (Follow-up to "AI or DIE")
« Reply #9 on: September 03, 2025, 05:04:11 pm »
And I stand by post (the second in the thread back then). I might also add that the availability of free online AI engines might begin to wain now that peak AI is (almost?) reached, and there is a risk the APIs might all disappear behind subscriptions.

There are many LLM (also a version of Deepseek, for example) that can be used locally. There are programs that load the LLM, and expose similar (or same) API of ChatGPT as local web services. Example: Koboldcpp.
In simple words, you create your private pseudo-Chatgpt server.
« Last Edit: September 03, 2025, 05:07:02 pm by gidesa »

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 11824
  • Debugger - SynEdit - and more
    • wiki
Re: IDE + AI : IDE = IDE : Notepad (Follow-up to "AI or DIE")
« Reply #10 on: September 03, 2025, 06:45:36 pm »
A couple of years ago I wrote a post titled "AI or DIE" about the necessity of integrating one or more AI engines with the Lazarus IDE in order for this ecosystem to have some chances of long-term survival.

Ok, my reply here may be a slightly different direction from the overall tune for the theme. But, given the extreme broadness of the statement....

Yes, broadness. Saying "Add AI" is like saying "add new switches to a machine" => there is an incredible amount of what those switches could do, or where they could be placed, or what they could be like....

Sure, other IDE already have some of that. But that is the hype. The what companies can add easily, and push and sell. That is not necessarily related to what might be really useful. (Some may, some may be less...)
Like, sure, I can tell an AI to "write a binary search". But, well I can have cheaper and better (less error prone) with a snippet library.
Well, yes, I am aware AI can do more than just writing snippets (and with "more" I don't mean custom variable names, or something like that).

When we talk "writing of code", then we either have small stuff (snippets), and they may have reasonable (but not guaranteed) quality. Or we talk bigger chunks, and more work to actually proof check the result. Or we talk cases, where we need code that actually does not need to be "bug free", that likely is a use case, albeit a rarer one?

But writing code is just one use case (and IMHO not the most alluring one / so that may depend on individual factors, such as personal abilities). ...

I can think of other thinks an AI could do to help, but I will not start by listing them. I would like to know what other
- use AI for
- would like to use it for, if the tools provided that access to AI

E.g. anything from inspiration to research to verification to support/tooling to .... or really just code writing (and why you think the AI will be quicker than you, even after adding in any time you need to ensure correctness, or why you don't need to).

What I can do

  • Full Member
  • ***
  • Posts: 183
Re: IDE + AI : IDE = IDE : Notepad (Follow-up to "AI or DIE")
« Reply #11 on: September 04, 2025, 02:40:48 pm »
I have a tool called Chatter that I use to communicate with ChatQPT or any other AI
my main question page is broken down into 5 different parts where each part has its own link Query/DataSource so this way I can ask a complex question with very detailed information and if the answer brings up a different question to the same or a history of this part it is very easy to compose a similar or completely different question. This fixes the two biggest errors with chatQPT. Error one the input question box is a large text input box and I am so programed to press enter to feed a new line but that enter sends what ever I have typed as the question. So chat often gets a half A question. The second most common error is if I type a perfect question that is very detailed and get an answer but that answer only brings up another similar question I have to retype the whole thing. Now with chatter I can organize my question from 5 different level [topic][call][line][error][note] and then click [Set] which reads all part and organize a very complex question on my clipboard. What I have found is AI searches everything to gather data to form an answer but I am working on cutting edge stuff and what does get returned is often off topic and very rare that the sample will even run but I have found it a supper powerful user manual that can search old docs, new docs, countless public example. I find Chat extremely helpful.
Quote
IDE + AI : IDE = IDE : Notepad

Dzandaa

  • Hero Member
  • *****
  • Posts: 501
  • From C# to Lazarus
Regards,
Dzandaa

Curt Carpenter

  • Hero Member
  • *****
  • Posts: 677
Re: IDE + AI : IDE = IDE : Notepad (Follow-up to "AI or DIE")
« Reply #13 on: September 08, 2025, 10:01:33 pm »
Quote
I can think of other thinks an AI could do to help, but I will not start by listing them. I would like to know what other - use AI for - would like to use it for, if the tools provided that access to AI.

I may be misunderstanding here, but there was a thread recently about using AI to translate from one language (C) to Pascal.  I think such translators, if say 85% reliable, would be a breakthrough application, at least for me.  There are, for example, some interesting open source instrumentation programs around written in Python that I would love to convert to familiar Pascal without going through the pain of trying to understand them in their original dialect.

I suspect that an AI assist to "peel the onion" in programs that are very object-oriented would be a boon too.  It's so easy to get lost in trying to understand a long string of dependencies.   

440bx

  • Hero Member
  • *****
  • Posts: 5820
Re: IDE + AI : IDE = IDE : Notepad (Follow-up to "AI or DIE")
« Reply #14 on: September 08, 2025, 10:31:22 pm »
I may be misunderstanding here, but there was a thread recently about using AI to translate from one language (C) to Pascal.  I think such translators, if say 85% reliable, would be a breakthrough application, at least for me.
And not just for you but for a lot of programmers.

I started that thread because it seems it would be a "perfect" application for A.I. 

A.I proponents are always saying that the "trick" to A.I is to know how to ask or "phrase the problem".  There is no asking or "phrasing" that is more accurate and detailed than a working program, therefore A.I _should_ (strong emphasis on _should_) be able to do that but, it doesn't look like that's up its alley either.

It would be very nice if A.I could translate some relatively simple C programs to Pascal.  Among the endless uses, it would spare programmers from having to become somewhat proficient in C in order to learn the basics of the Windows API.
FPC v3.2.2 and Lazarus v4.0rc3 on Windows 7 SP1 64bit.

 

TinyPortal © 2005-2018