Recent

Author Topic: FPC releases and A.I  (Read 9424 times)

Curt Carpenter

  • Hero Member
  • *****
  • Posts: 756
Re: FPC releases and A.I
« Reply #15 on: March 29, 2026, 05:17:28 am »
Fascinating.  Way beyond my pay grade, but fascinating.

Is the compiler that was produced easily "human readable" as a body of code, or is it a black box that just works, with an input and an output?

440bx

  • Hero Member
  • *****
  • Posts: 6524
Re: FPC releases and A.I
« Reply #16 on: March 29, 2026, 05:36:52 am »
Is the compiler that was produced easily "human readable" as a body of code, or is it a black box that just works, with an input and an output?
The source is publicly available at:
https://github.com/anthropics/claudes-c-compiler

You can examine the source there thus reaching your own conclusion.

I've only casually perused it and, from that casual inspection, I'd say it looks quite good.  I'd say it's better commented than what I'd expect from the average C programmer (I don't know the commenting habits of Rust programmers, therefore I cannot make a comparison with the average Rust programmer.)
FPC v3.2.2 and Lazarus v4.0rc3 on Windows 7 SP1 64bit.

C0m3b4ck

  • New Member
  • *
  • Posts: 30
  • Open-source programs for Windows 95-11 and Linux
    • Github
Re: FPC releases and A.I
« Reply #17 on: March 29, 2026, 07:33:43 am »
An AI trained on tons of C compilers managed to create a C compiler? Wow, that boggles the mind.
Can you do what that A.I thing did ?... it does not boggle my mind but, it is a very respectable accomplishment that only a very small percentage of humans manage to do.

Ok, imagine Linus Torvalds writing his own kernel in the 90s - skilled and talented man, am I right? Now imagine Linus Torvalds in 2026 who has seen, read and understood EVERY SINGLE AVAILABLE PIECE OF CODE EVER before writing his kernel - ehhh, what a freeloader, he definitely copied it from someone else 10000%. The second Linus is AI.

If you think the AI generated the compiler first try... it probably took them ~300 attempts.

You see the difference?The two edges AI has is 1. much greater processing power 2. being trained on THE WHOLE INTERNET AND EVERY BOOK FROM SHADOW LIBRARIES
I am not downplaying AI, I just think you should not worship it like tech bros - it has EVERY SINGLE piece of code EVER, so it is quite smart and will copy from what it learned.
By the way, you call it an AI model not an AI thing, the model in question was probably Claude 4.X
Github profile - https://github.com/C0m3b4ck | YouTube Channel - https://youtube.com/@PrinterFixer
Current Pascal project - https://github.com/C0m3b4ck/BookwormPascal - library book management app

Still making sure I support Win95 for its users out there...

Thaddy

  • Hero Member
  • *****
  • Posts: 19235
  • Glad to be alive.
Re: FPC releases and A.I
« Reply #18 on: March 29, 2026, 08:43:04 am »
I wonder if the compiler can be used to write a version of rust  :)
The code is very organised and superficially I can't see any code that intentionally obfuscates (as per the average C/C++ programmer)
objects are fine constructs. You can even initialize them with constructors.

440bx

  • Hero Member
  • *****
  • Posts: 6524
Re: FPC releases and A.I
« Reply #19 on: March 29, 2026, 09:15:06 am »
@C0m3b4ck

Reportedly it took about 2000 Claude sessions before getting to the desired result.  Read the text quoted by valdir.marcos in the 3rd post in this thread.

Just about every compiler ever written is a direct or indirect copy of somebody else's work.  No one is born knowing everything... every compiler writer has learned the techniques from reading books, previous compiler implementations and so on.  That's what A.I does in many cases.  NOTE: the previous sentence does NOT mean that there aren't times when A.I will dispense something that is a straight copy of somebody else's work, which is at the very least unethical and quite likely bordering on illegal if not blatantly illegal but, it doesn't look like that happened in the production of that compiler.

You make it sound like the C compiler it produced is a copy of prior art and, TTBOMK, there is no foundation for that implicit claim.  If parts of that compiler were copied from some other compiler, no doubt someone would have pointed it out and quite likely someone would consider legal action as a result.  The A.I thing basically did what a human being does, use knowledge to produce code and, the source of its knowledge is pretty much the same as for a human being and (usually) no one complains about that.

I don't worship A.I at all but, I give credit where credit is due.  Some of these A.I things (I know you prefer "models") have demonstrated being tools that can very effectively assist in software development.   That said, I would very strongly advice never to use A.I to create software the human being isn't well versed in, e.g, someone who doesn't know how to write a compiler would be very ill advised to use A.I to develop a compiler, simply because the individual lacks the knowledge to spot the inevitable mistakes/deficiencies the A.I thing (model) will make.

The fact is, developing a full fledged C compiler in 2 weeks that can compile and produce a functional instance of the Linux kernel is impressive.  The low cost is also impressive.

It wouldn't surprise me at all if in the near future software development companies specifically asked for experience using a particular A.I model (specific thing) because, for instance, just knowing how to write a compiler won't be good enough, the compiler writer will need to know how to write a compiler (which a compiler writer definitely should know) but also, use a particular/specific A.I model for its development.  The reason I anticipate that is, a full fledged C compiler for $20,000 (plus the cost of the human A.I "manager") is an unheard of bargain and, that cannot be accomplished without A.I assistance.   IOW, programming knowledge _without_ the ability to effectively drive an A.I model will simply be _not_ cost effective.

In that C compiler the part that I am particularly curious about is how well the compiler optimizes code.  As you pointed out, writing a scanner and a parser is a piece of cake, there is a ton of books describing multiple methods to get that done (not to mention Lex and Yacc to produce quite a bit of the code.) The code generator is a different ballgame.  A naive code generator is easy but something that selects the correct optimizations for a particular section of code while taking into account the "idiosyncrasies" of the particular processor is a completely different ballgame and, the knowledge for that stuff is either very difficult to find or often cannot be found at all, you need to figure it out by extensive testing. I'll eventually have a look at what and how well the A.I thing did in that area.

A.I is a tool and, it seems that, in the near future a reasonably high level of proficiency in its use will be required for a programmer to not only be effective but also be a reasonable business investment as an employee.



I wonder if the compiler can be used to write a version of rust  :)
If it can compile the Linux kernel, it must be capable of implementing a compiler for Rust.
FPC v3.2.2 and Lazarus v4.0rc3 on Windows 7 SP1 64bit.

robert rozee

  • Sr. Member
  • ****
  • Posts: 376
Re: FPC releases and A.I
« Reply #20 on: March 29, 2026, 11:11:53 am »
It wouldn't surprise me at all if in the near future software development companies...

it wouldn't surprise me at all if in the near future ... a law firm used an AI agent to search through all the (billions of lines of) open source software publicly available on the internet to find fragments of source code that match against the source code of copyrighted commercial software. for each match found, the law firm would then initiate legal action against the open source author to extract licensing fees and/or take ownership of the (formerly) open source software.

as to obtaining access to the source code of copyrighted commercial software for making comparison against: i could see the law firm approaching the owners of large libraries of copyright commercial software to obtain access to their libraries on the basis of a 50/50 split of the profits from litigation, thereby obtaining billions of lines of copyright commercial software source code for training their AI agent on.

and how close a 'match' would be required to fulfill the legal definition of breach of copyright? well that i guess is to be determined - but no doubt would be a simple numeric value (n lines of code matching) to be passed as a parameter into the AI agent.

we live in interesting times.


cheers,
rob   :-)

Curt Carpenter

  • Hero Member
  • *****
  • Posts: 756
Re: FPC releases and A.I
« Reply #21 on: March 29, 2026, 05:10:16 pm »
Is the compiler that was produced easily "human readable" as a body of code, or is it a black box that just works, with an input and an output?
The source is publicly available at:
https://github.com/anthropics/claudes-c-compiler

You can examine the source there thus reaching your own conclusion.

I've only casually perused it and, from that casual inspection, I'd say it looks quite good.  I'd say it's better commented than what I'd expect from the average C programmer (I don't know the commenting habits of Rust programmers, therefore I cannot make a comparison with the average Rust programmer.)

Thank you for the link.  My familiarity with C is superficial, but what I scanned certainly looked readable, and the whole project appeared to be organized in a human-friendly way.  I could imagine someone (human) tasked with maintaining it and doing so without much trouble.

Don't know how anyone can look at this and not be impressed -- and be driven to thoughts that the programming world is on the cusp of some truly dramatic change.  I don't think Robert Rozee's observation about the legal issues can prevent it.  Slow it down maybe, force it into some contortions -- but it sure looks to me like the genie is out of the bottle.



marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 12888
  • FPC developer.
Re: FPC releases and A.I
« Reply #22 on: March 29, 2026, 05:21:16 pm »
I have absolutely no love for AI assisted coding and I don't want to be bother by it in a project I do for enjoyment.
I have no love for A.I either and if I didn't enjoy programming I wouldn't do it.  It just seems that A.I might be a helpful tool and, it looks like we can use all the help we can get.  Maybe it could be used to do some of the grunt work which very few programmers, if any, enjoy doing.

Maybe, but then start with small, defined problems. Don't try to automate a complex process that requires a lot of opinion/consensus building.  Don't add to the immense echo well of rudderless positive sentiment.

Also, both Pascaldragon and I have already warned several times that merging revisions is not simply building a list and letting some automaton (AI or otherwise) execute the grunt work. If a feature to be merged depends on some other rearrangement, this is not always trivial and needs human attention. And those are usually the hold up. 

As for AI, I see an hypothetical utility more in the analysis and cross-referencing for investigating bugreports, and less in bulk code generation.

Quote
What we instead need is better automation for building, like Jenkins which we indirectly have through alb42 (who mainly tests the Amiga-like platforms, but also some other platforms). If we can get that to automatically generate full releases instead of simply snapshots then that already makes things easier for us.
That makes sense.  Any automation is very likely to be a plus.

I don't expect any noticeable effect on release schedule from such concept.  All built releases still have to be hand checked. For many minor targets, the release build is the only time attention is really spent on them.  And doing robo builds only strips away the difference between snapshots and releases.

Quote
I've had an equally low opinion of A.I but, when I see that it can be used to produced a full fledged C compiler, I have to acknowledge that it is more capable than I thought and might, under the right circumstances, be a useful tool.
Bottom line: I don't know if A.I can be useful in producing an FPC release simply because of the fact that I've never been involved in the production of an FPC release therefore I do not have the knowledge to fully evaluate the task.  When it comes to A.I, my experience with it is very limited but, it does seem like it could be a useful tool in some cases.

Based on what? Did you repeat and evaluate the results (e.g. wrt maintainability) of that compiler generation story ? How much effort went into formulating the problem?

440bx

  • Hero Member
  • *****
  • Posts: 6524
Re: FPC releases and A.I
« Reply #23 on: March 29, 2026, 06:26:40 pm »
@robert rozee

I won't say "in the near future" because as it is, A.I is already being abused.   I would be very surprised if lawyers had not already exploited A.I for "dubious" purposes (such as making money for nothing and other equally questionable goals.)

Yes, it will be quite interesting to see how the whole thing plays out.



@Curt Carpenter

it sure looks to me like the genie is out of the bottle.
I agree and there is no putting it back into the bottle.



@marcov

I very strongly believe that someone should invest time in learning how to walk before attempting to run (particularly if they want to run fast.)

As I stated before, I don't know how much help A.I could be in FPC's release process but, it seems to me that, it could be helpful.  I base that on the fact that if a programmer capable of writing a full fledged compiler was willing to take instructions from me, that would be very helpful in more ways than one.  I would still carefully review what the individual has done to ensure the final product matches the spec and, in addition to that, I would still expect that there will be more work involved than just stating "write me a C compiler that fully meets the C99 standard in xyz language" or "perform all the necessary pending work to get FPC 3.2.4 ready to be released."

I don't expect magic but, given proper instructions I definitely see some potential for A.I to be helpful.  That said, I don't know to which extent.  You probably know that better than I do, if for no other reason that you've been heavily involved in  the release process in the past while I have not.

A.I is just a tool, like a text editor, an IDE or some other thing like that and, just like any tool it will be more helpful for some things than others.  All I'm saying is, it has demonstrated some capabilities that have at least the potential to be very helpful in getting an FPC release done but, since I've never been involved in the release process, I could easily be wrong about that.

One thing that can be stated without any doubt whatsoever is that it shouldn't take 5 years to prepare a bug-fix release (particularly considering there is no shortage of bugs to be fixed.)  The fact that it is taking that long and there is still no release is a _clear_ indication there is _at least_ one major problem in the FPC project.
FPC v3.2.2 and Lazarus v4.0rc3 on Windows 7 SP1 64bit.

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 12888
  • FPC developer.
Re: FPC releases and A.I
« Reply #24 on: March 29, 2026, 09:43:04 pm »
One thing that can be stated without any doubt whatsoever is that it shouldn't take 5 years to prepare a bug-fix release (particularly considering there is no shortage of bugs to be fixed.)  The fact that it is taking that long and there is still no release is a _clear_ indication there is _at least_ one major problem in the FPC project.

As Pascaldragon already mentioned, those problems are staffing related. If we had somebody knowledgable to waste time on training an AI release manager, we could better spend his time getting the actual release out of the door.
« Last Edit: March 29, 2026, 09:48:52 pm by marcov »

Graeme

  • Hero Member
  • *****
  • Posts: 1526
    • Graeme on the web
Re: FPC releases and A.I
« Reply #25 on: March 29, 2026, 10:27:01 pm »
The thing is that fpk, who is the release manager for 3.2.4 had said that the fixes branch is frozen (around 1 1/2 years ago) and hadn't yet said that it is free for merges again.
Which clearly shows he is not a suitable person for a release manager role at this moment.
For whatever reason that is. Busy, tired, fed up, pissed off... Makes no difference.

Indeed - that is a ridiculously long amount of time for a fixes branch freeze.  :o  Yikes!
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

Graeme

  • Hero Member
  • *****
  • Posts: 1526
    • Graeme on the web
Re: FPC releases and A.I
« Reply #26 on: March 29, 2026, 10:40:39 pm »
Quote
... and nobody can force you to release FPC 3.2.4. Yes OK, I truly hope somebody will fork FPC project and starts to maintain it with a better attitude.

If the "usual" process takes too much effort for the FPC team, then why not reduce the scope. What's the most popular platforms? Window & Linux?

So then why not limit the scope to making "official releases" that target 90% of FPC users. Users of other platforms will have to follow the instructions on compiling their own compiler and RTL [it's really not hard].

Disclaimer: This suggestion doesn't mean the FPC team need to skimp on quality. I'm assuming there are automated tests that run nightly using VMs to cover all or most platforms FPC supports. Making sure the "fixes" and "main" branches are functional.
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4715
  • I like bugs.
Re: FPC releases and A.I
« Reply #27 on: March 29, 2026, 11:43:32 pm »
If the "usual" process takes too much effort for the FPC team, then why not reduce the scope. What's the most popular platforms? Window & Linux?
Even Linux binaries are not needed because Linux distros build and package binaries for their own repositories.
A source code release + binaries for Windows and maybe MacOS would be enough.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

440bx

  • Hero Member
  • *****
  • Posts: 6524
Re: FPC releases and A.I
« Reply #28 on: March 30, 2026, 01:32:34 am »
As Pascaldragon already mentioned, those problems are staffing related.
I am more than willing to accept that staffing has something, maybe even much, to do with the delay but, it stretches the limits of credibility that it may be the cause for a 4+ year delay (4+, presuming a minimally staffed release takes about a year... which I already consider a stretch.)

If we had somebody knowledgable to waste time on training an AI release manager, we could better spend his time getting the actual release out of the door.
The point of training an A.I to produce an FPC release is to re-use the A.I.  IOW, yes, it's possible that the initial training will add time that would not otherwise be needed but, the time investment is re-usable, which is the point of automating tasks to the extent they can be automated.  Anyway, you do know more about how much an A.I thing could help in getting a release done.  I just find it difficult to believe that something that can write a full C compiler could not be helpful in the making of an FPC release.



One additional point I want to make about the fact that all contributors are volunteers who cannot be "forced" to do anything: yes, it's unlikely any of the developers can be forced to do anything and even if it were possible, the results of forcing someone to do something are usually poor.  IOW, it's rarely a solution in the cases it may be implemented but...

At this point, there are quite a few contributions trapped/blocked in non-released versions of FPC and, that must be discouraging because only a small fraction of programmers will use these features because a large/important percentage of FPC users will stay with formal releases (myself among them.)  The point here is: it must be disheartening to have all this work unused by the majority of users because for one reason or another those efforts are not made available to FPC users as a formal, well tested, release.
FPC v3.2.2 and Lazarus v4.0rc3 on Windows 7 SP1 64bit.

Graeme

  • Hero Member
  • *****
  • Posts: 1526
    • Graeme on the web
Re: FPC releases and A.I
« Reply #29 on: March 30, 2026, 01:42:56 am »
And with reduced scope there might even be time to turn releases into a "train" release schedule. Time based, not feature based.

eg: a 6 or 12 month release schedule with a release-branch freeze 1 (maybe 2) months before a release. If a feature is ready - it's in the next release. If it wasn't, it'll catch the next train, and be in the release after that.

With fpGUI I was also stuck in the rut of "feature" releases, and I had constant issues with feature creep. It had to be perfect, and what about just adding this or than extra feature... In the end it took years to make a release and I got less useful feedback.

I got over that, and now switched to time based releases. It gets features out sooner, and I actually get feedback sooner - because people tend to use "releases" more than "development" branches.
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

 

TinyPortal © 2005-2018