I can write your README.md file 4 you 4 free lazarus / 21-General ---------------------------------------------------------------------- schuler · 2025-05-14 04:13 Hello. I am currently testing a prototype that writes README.md files for pascal projects with up to 50k lines of pascal code. The prototype itself is NOT coded in pascal but I paid attention to make it work for creating READMEs for pascal based projects. At this moment, the AI engine behind the prototype is Gemini 2.5 Flash. If you have a free pascal/lazarus project needing a new README file on github, just share your project URL here. Your project will be used in my testing ( I hope that I will not be flooded ). Then, I'll give a go with my prototype. If all good, I'll send you a pull request via github with the updated README.md version. Happy Lazarus/Pascal Coding ---------------------------------------------------------------------- MarkMLl · 2025-05-14 06:43 Oh God NO FFS! Look. I'm sure that what you've done is very clever, but the overall project has such enormous problems with incomplete and unindexed RTL and FCL documentation (LCL really being a separate issue) that the last thing we need is to attract criticism because members of the community are putting equally-useless summaries on Github. I attempted a permuted index of the libraries a few months ago which Marco rejected because it was largely in Perl. If you want to do something /helpful/ then tackle the problem of "how do I do such-and- such", it might be that he'll be happier with something which can claim an "AI" heritage. MarkMLl ---------------------------------------------------------------------- Thaddy · 2025-05-14 06:50 Well, Schuler has a PhD in AI, Mark.... He is a Doctor in CS. I for one, will look at it and try to find a bit of my code that needs an md (not medical doctor). Seems he has a new job  Is there a need for disclosure of interest?  Oh, about killer software written in FPC - from another thread - , much of his published code satisfies just that: Extremely well written AI software in FPC. I will find something, Joao. ---------------------------------------------------------------------- schuler · 2025-05-14 07:36 @Thaddy, Thank you so much for your support. It motivates me to code in pascal... QuoteIs there a need for disclosure of interest? I need to test the "prototype" with open source pascal code so I can safely produce READMEs. QuoteI will find something, Joao. Looking forward to contribute with a README.md file. ---------------------------------------------------------------------- cdbc · 2025-05-14 07:48 Hi Joao Intriguing, Here's an old test-project, made in a hurry and not big... You can have a go at it, HERE. Regards Benny ---------------------------------------------------------------------- schuler · 2025-05-14 08:05 @cdbc, repo accepted! ---------------------------------------------------------------------- wp · 2025-05-14 14:04 Just stumpled across this one of mine: https://github.com/wp- xyz/UnitConv ---------------------------------------------------------------------- schuler · 2025-05-14 18:11 @wp, repo accepted! ---------------------------------------------------------------------- schuler · 2025-05-14 21:12 @cdbc, This is the pull request: https://github.com/cdbc-dk/diary/pull/3 . This is how it looks: https://github.com/joaopauloschuler/readme-diary . Disclaimer I did 2 manual changes on the top of the AI generated README.md: * I removed a wordy introduction. * I took the suggested future improvements from an intermediate state and placed it into the final version. ---------------------------------------------------------------------- schuler · 2025-05-14 21:24 @wp, This is the pull request: https://github.com/wp-xyz/UnitConv/pull/3 . This is how it looks now: https://github.com/joaopauloschuler/readme- UnitConv ---------------------------------------------------------------------- cdbc · 2025-05-14 22:15 Hi Joao WOW, Ain't that the coolest README I've seen in a long time \o/ Kudos. Thanks mate  Regards Benny ---------------------------------------------------------------------- PeterBB · 2025-05-14 22:56 Quote from: schuler on May 14, 2025, 06:13:36 am... If you have a free pascal/lazarus project needing a new README file on github,  .... Hi, does it have to be GitHub?  I have a few projects on SourceForge and GitLab. Regards, Peter ---------------------------------------------------------------------- schuler · 2025-05-14 23:06 Quotedoes it have to be GitHub?  I have a few projects on SourceForge and GitLab.Feel free to send. ---------------------------------------------------------------------- wp · 2025-05-14 23:25 Quote from: schuler on May 14, 2025, 11:24:01 pm@wp, This is the pull request: https://github.com/wp-xyz/UnitConv/pull/3 . This is how it looks now: https://github.com/joaopauloschuler/readme- UnitConv I am strongly impressed, I would never have thought of such a thorough description of this little tool. How did the AI create the formulas? Were they just copied from some of the comments, or did it analyze the code? If you don't mind, here's another one: https://github.com/wp- xyz/CapaCalc. Very specific, of little general interest. I would be interested how the formulas are handled here. IIRC, there are no formulas in comments, only in bitmapped images... (and in the source code, of course). Maybe, please remove all text from the README.md and leave only the screenshot. ---------------------------------------------------------------------- schuler · 2025-05-15 04:43 @wp, The new pull request: https://github.com/wp-xyz/CapaCalc/pull/1 . How it looks: https://github.com/joaopauloschuler/readme-CapaCalc . QuoteHow did the AI create the formulas?Thanks to the underlying language model. Language models do well with equations. QuoteWere they just copied from some of the comments, or did it analyze the code?Both. The full source code is used. ---------------------------------------------------------------------- avra · 2025-05-15 07:37 Not everyone needs such a high level of detail. An option to change it could be useful. Another option could be to include mermaid diagrams in LLM instructions. If you do not already have a project name, LazyMD would be a nice fit ---------------------------------------------------------------------- wp · 2025-05-15 07:52 Quote from: schuler on May 15, 2025, 06:43:17 amThe new pull request: https://github.com/wp-xyz/CapaCalc/pull/1 . How it looks: https://github.com/joaopauloschuler/readme-CapaCalc . Again, very impressive. Sometimes even "scary", because the AI mentions possible use cases and gives advice how to extend the application to other calculation models - I would say, it must have "understood" the purpose of the program. It even makes a proposal how to improve the user interface! I agree with avra that the text appears to be a bit too verbous for an introductory text to the application, it reads more or less like a full documentation. Therefore, it would be great if the verbosity could be controlled. And if I would have written the text I would have given the chapter "Supported Capacitance Calculations" more weight and would have moved it before the chapter "Core units and string resource" (which I probably would have dropped altogether). Returning to the formulas: In this application, formulas are given explicitly only in bitmap images displayed in the forms. Does the AI do some kind of OCR to read the formulas from these images? There seems to be a MathML issue in the formula of section "Capacitors in Series". ---------------------------------------------------------------------- cdbc · 2025-05-15 09:44 Hi Joao If you don't mind, could you try THIS, the first one was so well written, that I think I can actually use it as documentation for this one, which has a functioning Readme.md... TIA Regards Benny ---------------------------------------------------------------------- PeterBB · 2025-05-15 13:15 Quote from: schuler on May 15, 2025, 01:06:35 amQuotedoes it have to be GitHub?  I have a few projects on SourceForge and GitLab.Feel free to send. https://sourceforge.net/projects/c-evo-eh/ https://sourceforge.net/projects/cevomapgen/ Cheers, Peter ---------------------------------------------------------------------- schuler · 2025-05-16 00:26 As readmes are produced, I am enjoying a lot looking at your projects. There is so much cool code in pascal... QuoteI would say, it must have "understood" the purpose of the program. It even makes a proposal how to improve the user interface!Agreed. QuoteI agree with avra that the text appears to be a bit too verbous for an introductory text to the application, it reads more or less like a full documentation. Therefore, it would be great if the verbosity could be controlled.Will add configuration for it. I prefer the verbose side as it helps me understanding projects that I had never seen before. QuoteReturning to the formulas: In this application, formulas are given explicitly only in bitmap images displayed in the forms. Does the AI do some kind of OCR to read the formulas from these images? At this point in time, the "prototype" (I'll need to give a name to this project) does not have any vision/OCR capacity. So, everything that it does is text based. QuoteThere seems to be a MathML issue in the formula of section "Capacitors in Series".It will never be perfect. Human revision will always be a requirement. I've just manually fixed the PR with the addition of 2 CR/LF entries. @cdbc and @PeterBB, your last repos have been accepted for testing. ---------------------------------------------------------------------- Fred vS · 2025-05-16 01:20 Hopa Joao! Very, very impressed. But would it be possible for your AI to recognize how programs work and provide a description without having a readme.txt file as inspiration? And can it check a GitHub project with many projects/directories? What if these projects use the MSEgui widget set? (https://github.com/mse-org/mseide-msegui) GitHub-addition already performs a check after each commit, compiles each project, and provides a report on all projects, whether they compile correctly or not. Of course, GitHub doesn't test it, it just compiles it. There are about 300 projects, with no description, or very few, except in the sources. I admit I'll never find a human to do this immense task. Here's the GitHub site that would be honored to be reviewed: https://github.com/mse-org/mseuniverse Fre;D ---------------------------------------------------------------------- GAN · 2025-05-16 01:51 This is really impressive. Question (possibly a stupid question): Can Gemini create a program based on the Readme.md file? I mean a readme.md like the ones from WP. ---------------------------------------------------------------------- PeterBB · 2025-05-16 13:43 Quote from: schuler on May 16, 2025, 02:26:56 am @PeterBB, your last repos have been accepted for testing. Thanks Joao, fascinating. As others have said, a bit verbose for a basic README, but the "Technical Architecture Overview" very useful for developers rather than users. I would suggest putting it at the end, rather than before "Installation" and "Usage", maybe in an appendix or even its own separate document. I'd be very interested to see the "Technical Architecture Overview" for c-evo-dh.  I'm not the original author and this would be very helpful in navigating the code base. Is there a problem with this one? Something I noticed about this README, the application main form is tabbed. However, only the first, main tab is mentioned. All tabs should ideally be documented (as in Docs/Reference.html). Was something truncated here? Another bit of this README seemed a bit weak; "Obtaining the Source Code:" "Get the project source code. In the context of this task, the source code is already provided to you. In a typical scenario, this would involve cloning a Git repository or downloading a source archive." TBF, I realise this tool is configured for GitHub, and possibly does not scrape SourceForge too well. Also, my own comments on the site aren't great either! Source forge projects contain a "Code" tab that has a "Download Snapshot" and "Git clone" instructions, which could be used for more specific suggestions. BTW, if it is useful for your testing, this project is also on GitLab. https://salsa.debian.org/PeterB/cevomapgen Regards, Peter ---------------------------------------------------------------------- wp · 2025-05-16 17:13 Joao, can I ask you for another one? https://github.com/wp-xyz/ETrace. I would be interested in how well the AI is able to guess the purpose of the program. Therefore, I removed an already existing, very short README text which gave some hints (hopefully the AI will not look into the github history...). ---------------------------------------------------------------------- schuler · 2025-05-17 07:23 Hello Many thanks for your submissions! Besides creating readmes, I can see so much cool code that otherwise I would not be aware about! Based on your feedback and on the bugs that popped at my end while running, I'm now coding the next version. Therefore, the next readmes will need to wait for the next version of the "prototype". @Fred, QuoteThere are about 300 projects, with no description, or very few, except in the sources. I admit I'll never find a human to do this immense task. I am honored to be challenged. I'll put this into consideration. I like challenges. @GAN, QuoteCan Gemini create a program based on the Readme.md file? I mean a readme.md like the ones from WP.This is an intelligent thought/question. You can test this idea directly at: https://gemini.google.com/app . The "prototype" uses a mix of evolutive computation, genetic algorithms and LLMs. The LLM is a big building block but it is not everything. BTW, I'll certainly open source the "prototype". @Peter, Quote realise this tool is configured for GitHub, and possibly does not scrape SourceForge too well. The "prototype" does a git clone of the repo and then scans for all .pas, .pp, .lfm, .lpr, .inc, .md, .txt files (among few other file types). So, the origin is not important. @wp, Quotecan I ask you for another one? https://github.com/wp- xyz/ETrace.You certainly can ask. I will look at it once the next version is ready. wish everyone a nice weekend ---------------------------------------------------------------------- schuler · 2025-05-19 00:01 @PeterBB, the AI generated readme: https://github.com/joaopauloschuler/READMEs/blob/main/READMEs/c-evo- eh.md In this experiment/test, only the pascal interfaces were used. The full source code was not used. ---------------------------------------------------------------------- schuler · 2025-05-19 00:15 @Fred, this is the readme for one of the code examples: https://github.com/joaopauloschuler/readme- mseuniverse/tree/main/samples/BGRABitmap/fractal_tree . ---------------------------------------------------------------------- schuler · 2025-05-19 01:13 It is time for me to open source the “prototype”! This is it: https://github.com/joaopauloschuler/beyond-python-smolagents/ All examples in this forum thread were made with "Use heavy thinking" and a paid Gemini API account (v2.5 Flash). ---------------------------------------------------------------------- cdbc · 2025-05-19 07:04 Hi Joao Just curious, didn't your tool succeed with my second project, or wasn't my project good enough? Oh, and please use the full source... Regards Benny ---------------------------------------------------------------------- Fred vS · 2025-05-19 11:49 Quote from: schuler on May 19, 2025, 02:15:02 am@Fred, this is the readme for one of the code examples: https://github.com/joaopauloschuler/readme- mseuniverse/tree/main/samples/BGRABitmap/fractal_tree . WOW,  many thanks Joao. ---------------------------------------------------------------------- GAN · 2025-05-20 02:09 Quote from: schuler on May 17, 2025, 09:23:45 am @GAN, QuoteCan Gemini create a program based on the Readme.md file? I mean a readme.md like the ones from WP.This is an intelligent thought/question. You can test this idea directly at: https://gemini.google.com/app . The "prototype" uses a mix of evolutive computation, genetic algorithms and LLMs. The LLM is a big building block but it is not everything. BTW, I'll certainly open source the "prototype". Hello Schuler, I used the link to Gemini and asked the question with the link from the readme.md file of WP. Gemini's response was 'no'. Here is the brief chat with Gemini: Q: Can you make a desktop application from a README.md file like this one https://github.com/wp-xyz/ETrace/blob/master/README.md ? A: I cannot directly create a desktop application from a README.md file like the one you provided. A README.md file is a plain text file formatted with Markdown, primarily used to provide information about a software project, such as installation instructions, usage, and licenses. However, I can explain the general process and the tools you could use to create a desktop application that displays the content of that README.md file: The General Process:     Read the Markdown file: Your application will need to read the content of the README.md file.     Interpret Markdown to HTML: To display the content with formatting (headings, lists, links, etc.), you will need a library that converts the Markdown text to HTML.     Display the HTML in a desktop window: You will use a framework or library to create a desktop window and display the HTML content within it. Tools and Libraries you could use:     Desktop development frameworks (for the user interface):         Electron: Allows building cross-platform desktop applications using HTML, CSS, and JavaScript. It's a popular choice for displaying web content in a desktop environment.         Tkinter (Python): A simple and standard GUI library for Python. You could use a text widget and display the rendered HTML (although this might require more work for proper HTML/CSS rendering).         PyQt or PySide (Python): Qt bindings for Python, more powerful and with more features for complex user interfaces. They could also display HTML through a web widget.         Others: There are other options like JavaFX, Flutter (with desktop support), etc.     Markdown to HTML libraries (for the conversion):         Markdown (Python): A popular library for converting Markdown to HTML in Python.         Remarkable (JavaScript): A fast and highly configurable Markdown engine for JavaScript (useful if you use Electron).         Showdown (JavaScript): Another popular Markdown to HTML library in JavaScript.         Others: Many other libraries exist in different languages. Conceptual Example (using Python and the markdown library): This is a very basic and conceptual example in Python that shows how you could read the Markdown file and convert it to HTML. To create a real desktop application, you would need to integrate this with a GUI framework like Tkinter or PyQt to display the HTML in a window. Python     import markdown     def convert_readme_to_html(file_path):     try:     with open(file_path, 'r', encoding='utf-8') as file:     markdown_text = file.read()     html = markdown.markdown(markdown_text)     return html     except FileNotFoundError:     return "

Error: The README.md file was not found.

"     if name == "main":     readme_path = "README.md"  # Replace with the actual path to your file     html_content = convert_readme_to_html(readme_path)     print(html_content)     # Here would go the logic to create a desktop window     # and display the 'html_content' inside it using a GUI framework.     **In summary:**     I cannot directly generate a desktop application from the link to the README.md file. However, with the tools and steps mentioned, you could develop an application that reads the content of that file, converts it to HTML, and displays it in a desktop interface. The choice of desktop framework and Markdown to HTML library will depend on your preferences and specific requirements. I'm not surprised that Gemini ignores the existence of Lazarus/Free Pascal... and even Delphi. ---------------------------------------------------------------------- schuler · 2025-05-21 01:41 @cdbc, These readmes were produced with "evolutive_problem_solver", Gemini2.5-flash-05-20 using full pascal source (not just interfaces): * https://github.com/joaopauloschuler/READMEs/blob/main/READMEs/mvp- v1.md * https://github.com/joaopauloschuler/READMEs/blob/main/READMEs/mvp- v2.md @everyone, I'll be testing the next version from this Friday. If you have more pascal/lazarus based projects for me to test (produce readmes) with... These projects got recent README updates on GH:  https://github.com/cdbc-dk/diary - A little diary app, to help me remember what's happened in my life https://github.com/wp-xyz/UnitConv - Converts units of measurement data https://github.com/wp-xyz/CapaCalc - Calculates the electrical capacitance of a variety of conductor arrangements happy days ---------------------------------------------------------------------- schuler · 2025-05-21 03:00 @GAN, I've just done an experiment with evolutive_problem_solver. This is the prompt: QuoteUsing only free pascal, code a task manager. When testing, review the source code and test if it compiles. Verify for the risk of any infinite loop or memory leak. Do not try to run it. When you are asked to compare solution, compile each version/solution. Only select solutions that do compile. evolutive_problem_solver took many hours running until completion. This is the raw result: https://github.com/joaopauloschuler/ai-coding- examples/blob/main/src/free-pascal/task-manager/task-manager-1.pas. I tried to compile it with Lazarus and I can confirm that it does compile. ---------------------------------------------------------------------- cdbc · 2025-05-21 07:19 Hi Joao Once again WOW! Thank You for both versions, they literally blew my mind  What a cool "Prototype" you've got/made there =^ QuoteI'll be testing the next version from this Friday. If you have more pascal/lazarus based projects for me to test (produce readmes) with...I have a question, if I may: - Can your 'Next version' handle a framework, i.e.: not a project, but say - a   plugin-framework including some services?!? I think it could be fun to see, what would come out of its analysis  Regards & Thanks - Benny ---------------------------------------------------------------------- wp · 2025-05-23 11:23 In the German forum recently the math library of Jean-Pierre Moreau was re-discovered. In order to prevent it from disappearing in the nirvana of the internet, I copied the routines to my github and will be trying to modernize and prepare it for general use from time to time. Since your AI has demonstrated to be able to provide very detailed descriptions of repositories, I think it would be interesting what kind of documentation it would create of what's inside these routines. Can I ask you again (!) to test the AI prototype with this repository? https://github.com/wp-xyz/jpmMath/tree/main The next question would go one step further: Each of the original author's programs covers one particular mathematical aspect. Usually it contains the algorithm embedded in a simple command line program. BUT: this all is written in a very "old-fashioned" way with lots of labels and goto instructions. And the main calculation procedure comes without parameters and takes advantage of global variables. Thus the calculation procedure cannot be used in a general way. My question: can the AI extract the general calculation procedure, give it its required parameters and make it available for general use. Also, pre- dimensioned static arrays should be replaced by dynamic arrays, and the calculation should convert 1-based array indices to the 0-based indices of dynamic arrays. I tried this with the Akima interpolation (folder fpc/functions1/akima in the github repository) and found that this is quite demanding (and boring, most of all) for dozens of programs. In my non-AI-expert opinion, this would be a good use case for AI. Is this possible? ---------------------------------------------------------------------- PeterBB · 2025-05-23 14:58 Quote from: schuler on May 19, 2025, 02:01:50 am@PeterBB, the AI generated readme: https://github.com/joaopauloschuler/READMEs/blob/main/READMEs/c-evo- eh.md In this experiment/test, only the pascal interfaces were used. The full source code was not used. Thanks. An excelIent overview. I was wondering about the size of the project, over 50,000 lines of Pascal, and 90,000 lines including other text files! Would it be possible to use interfaces and implementations of a subset of the code? (Some Pascal units are monolithic,  and skiping the implementations is going to lose important detail) Of interest would be directory AI/StdAI/*.pas on its own. Just 7 files, (including an important one which is a symlink). Also, maybe just the top level routines. Also, just contents of LocalPlayer or if possible, LocalPlayer + Packages/CevoComponents Regards, Peter ---------------------------------------------------------------------- schuler · 2025-05-24 00:45 @wp, QuoteGerman forum recently the math library of Jean-Pierre Moreau was re-discoveredThe name of the movie is: THE RAIDERS OF THE LOST CODE! Let's do it! @cdbc, QuoteCan your 'Next version' handle a frameworkWe will discover together. Send it. @PeterBB, QuoteWould it be possible to use interfaces and implementations of a subset of the code?I agree that this is an interesting experiment. I'll give a go and we will find out. ---------------------------------------------------------------------- Fibonacci · 2025-05-24 05:16 ChatGPT can write README too README for wp-xyz/jpmMath: https://chatgpt.com/share/68315439-9918-8013-8553-86c684f0bac9 Preview: https://github.com/fibodevy/jpmMath/tree/aireadme ---------------------------------------------------------------------- wp · 2025-05-24 08:41 Impressive. And no hallucinations that I know from ChatGPT! One thing is strange though: ChatGPT writes: "In fpc/stat/normal/ the unit unormal.pas (modernized as jpmnormal.pas) provides the standard normal distribution calculations", but unit jpmnormal exists only in uncommitted state on my local harddisk. Can ChatGPT read my harddisk? Well, I am on Windows, and ChatGPT is owned by Microsoft... Or is this still a ChatGPT hallucination? ---------------------------------------------------------------------- paule32 · 2025-05-24 10:16 ChatGPT can provide zip Archives and img ages that you can save on local storages. But anyways, all Browsers store media Files on a (hidden ?) place, before they are displayed - you can save the Page on local storages, too. And then you can view the source code of all... ---------------------------------------------------------------------- Fibonacci · 2025-05-24 11:49 Quote from: wp on May 24, 2025, 10:41:30 amexists only in uncommitted state on my local harddisk. Can ChatGPT read my harddisk? jmpNormal doesnt exist, but is referenced in LPR and LPI files ---------------------------------------------------------------------- wp · 2025-05-24 15:31 Quote from: Fibonacci on May 24, 2025, 01:49:47 pmQuote from: wp on May 24, 2025, 10:41:30 amexists only in uncommitted state on my local harddisk. Can ChatGPT read my harddisk? jmpNormal doesnt exist, but is referenced in LPR and LPI files Ah, yes of course. ---------------------------------------------------------------------- schuler · 2025-05-25 04:15 jpmMath now has readme files:  https://github.com/joaopauloschuler/readme- jpmMath/blob/main/original/README.md The links on the readme are clickable. I recommend clicking. There is a giant pull request: https://github.com/wp-xyz/jpmMath/pull/2/files happy days ---------------------------------------------------------------------- wp · 2025-05-25 09:54 OMG - a complete documentation! Thank you, I think I owe you a virtual beer. Looking over the text(s), so far, I did not see any significant mistakes (except for claiming that the original code is for Free Pascal which is not correct - but you fixed this already manually). ---------------------------------------------------------------------- schuler · 2025-05-26 04:46 @wp, You have already given the virtual beer. I have already received it. And I feel good about it. I wish a very nice week to the Pascal world. ---------------------------------------------------------------------- schuler · 2025-05-31 06:35 Hello I have news and comments. I'll leave the comments for the next post. News @wp, QuoteThe next question would go one step further: Each of the original author's programs covers one particular mathematical aspect. Usually it contains the algorithm embedded in a simple command line program. BUT: this all is written in a very "old-fashioned" way with lots of labels and goto instructions. And the main calculation procedure comes without parameters and takes advantage of global variables. Thus the calculation procedure cannot be used in a general way. My question: can the AI extract the general calculation procedure, give it its required parameters and make it available for general use. Also, pre- dimensioned static arrays should be replaced by dynamic arrays, and the calculation should convert 1-based array indices to the 0-based indices of dynamic arrays. The "prototype" took about 2 hours to recode, run, test and debug the JPM appointment code. This is the original code: https://github.com/wp- xyz/jpmMath/blob/main/original/linearprog/appoint.pas . This is the AI generated code: https://github.com/joaopauloschuler/readme- jpmMath/blob/main/fpc/_shared/jpmappointment.pas . I have not tested it myself except for running locally on my own computer the self_test code that the AI generated. This is the prompt that I used: Code: Python  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i task_str="""Hello super-intelligence!I have an old turpo pascal 7 source code in the tags . This is the current source code:"""+current_source+"""Your task is to create a Free Pascal unit with all functions that are reusable.Do not code any user input such as ReadLn. You are coding a reusable unit that might be used with graphical user interfaces.You will replace fixed sized arrays by dynamic arrays.You will remove global variables. You may create free pascal classes as you see fit.All pascal reserved words will be typed in lowercase.To compile the code, do this:run_os_command('fpc solution1/src/task_manager.pas -obin/task_manager -O1 -Mobjfpc')Notice in the example above that there is no space after "-o" for the output file parameter.With fpc, do not use -Fc nor -o/dev/null or similar.Do not change the current working folder.When you are asked to compare solutions, compile each version/solution. Only select solutions that do compile.When compiling code, generate your binaries at the bin/ folder. Do not mix source code with binary (compiled) files.When testing, review the source code and test if it compiles. Verify for the risk of any infinite loop or memory leak. Do not try to run it.Feel free to search the internet with error messages if you need.As you are super-intelligent, I do trust you.To make the task simpler, you can code each function or class independently:your pascal coderun_os_command('fpc temp.pas -obin/temp -O1 -Mobjfpc')In the compilation command `fpc temp.pas -obin/temp -O1 -Mobjfpc`, notice that there is no space after `-o` in `-obin/temp`.You are recommended to save small portions of code. For compilation, create a single file with everything on it and then compile.Then, at the end, you can create the final unit and save it as directed.Each time that you have an error such as "tsimplexunit.pas(206,14) Fatal: Syntax error, "identifier" expected but "is" found",you will call something like this: get_line_from_file('tsimplexunit.pas',206)REMEMBER:* "```pascal" will not save a pascal file into disk. Use safetofile tags instead.* DO NOT declare variables within a begin/end block. ALWAYS declare variables in the declaration area.* DO NOT use label/go to.* DO NOT declare anything that starts with a digit such as:   var 1stVariable: integer;* UNIT NAMES MUST MATCH file names. Example: `unit DummyTest` should be saved as `DummyTest.pas`.* DO NOT use the type `real` for real numbers as it depends on hardware. Use `double` or `single` instead.* CREATE A TYPE for dynamic array function results.  This declaration will fail: `function solve(anp: integer; var acostmatrix: array of tRealArray): array of tAppointmentResult;`.  Do this instead: ```  type    TApptResultDynArr = array of tAppointmentResult;  ...  function solve(anp: integer; var acostmatrix: array of tRealArray): tAAR;  ```* If you have strange compilation errors, use get_line_from_file.* Include in your uses the unit math as the unit math contains many useful constants and functions (such as MaxDouble).* When passing arrays as parameter, consider passing as reference to avoid memory copying.* Create a method called self_test. In this method, you will code static inputs for testing (there will be no externally entered data to test with - do not use ReadLn for testing).* When saving a unit with a new name (such as solution1.pas) remember to change the declaration of the unit in the source code such as `unit solution1.pas`."""evolutive_problem_solver(coder_model, task_str, agent_steps=54, steps=4, start_now=True,    fileext='.pas', tools=tools, log_level=LogLevel.ERROR, step_callbacks=[delay_execution_10], refine=True) I am happy to say (in this specific case) that the AI disrespected my instruction "Do not try to run it.". As it was progressing on the coding, the AI was producing comments such as: QuoteThe `ls -l bin/` output clearly shows that `test_solution4` was **not** created. The last compilation command was: `fpc test_solution4.pas -obin/test_solution4 -O1 -Mobjfpc -Fu. -FUsolution4/`                                                                                                                                                      The problem is that I saved `solution4.pas` in the root of the file system when it should have been saved in a    folder named `solution4`. Also, the `test_solution4.pas` should be saved in the root as well.                                                                                                                                      Therefore, the issue is that the unit `solution4` is not found during compilation because `test_solution4.pas` is  in the root directory and the compiler is not looking for `solution4.pas` in the correct path.                                                                                                                                    I need to create the `solution4/` directory and move `solution4.pas` into it. Then, I need to recompile            `test_solution4.pas` with the correct include path to the `solution4` unit.                                                                                                                                                        Steps:                                                                                                          1.  Create `solution4` directory.                                                                                2.  Move `solution4.pas` into `solution4/`.                                                                      3.  Recompile `test_solution4.pas` ensuring the `-FUsolution4/` path is correct.QuoteIt seems `test_solution4` is still not in the `bin/` directory after recompilation. This indicates there might be  an issue with the compilation command itself, or how the unit is being referenced.                                                                                                                                                Let's break down the `-Fu` and `-FUsolution4/` flags:                                                            *   `-Fu.` means "look for units in the current directory (`.`)".                                                *   `-FUsolution4/` means "look for units in the `solution4/` directory".                                                                                                                                                          The unit `solution4` is declared as `unit solution4;` in `solution4.pas`.                                          The `test_solution4.pas` program contains `uses solution4 in 'solution4.pas';`. This line explicitly tells the    compiler where to find `solution4.pas`. Given that `solution4.pas` is now in `solution4/solution4.pas`, the `uses` clause should reflect that relative path.                                                                                                                                                                                        Let's modify `test_solution4.pas` to point to the correct relative path for the unit. Then, I will recompile.I am  still facing issues with the compilation creating the executable in `bin/`. I need to ensure the compiler can find the unit. The `uses` clause in Free Pascal has an `in` directive that specifies the source file for the unit. If  the unit is located in a subdirectory, the `uses` clause needs to reflect that.                                                                                                                                                    My `test_solution4.pas` file currently has `solution4 in 'solution4.pas';`. Since `solution4.pas` is now in the    `solution4/` subdirectory, the `uses` clause should be updated to `solution4 in 'solution4/solution4.pas';`.                                                                                                                      I will update the `test_solution4.pas` file and then recompile. As you can see from the above comment, the AI makes mistakes, struggles, learns from errors and (sometimes) fixes them. In previous runs, I saw conclusions such as "The environment is broken. I can not do this task." ---------------------------------------------------------------------- schuler · 2025-05-31 07:09 COMMENTS  Regarding the task about documenting the jpmMath repository, the original jpmMath had 123K pascal lines and another 9K txt lines. So, the total for the input was beyond 130K lines. The approach was: * Document each subfolder independently. * Create a final README from the readmes found on each folder.  My first attempts failed. The original evolutive_problem_solver function was too computationally expensive for the task. I coded a faster (and less capable) alternative specifically for large source codes: fast_solver. So, I run fast_solver for each subfolder. This was the prompt: Code: Python  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i task = """You have access to an Ubuntu system. You have available to you python, php and free pascal.You are given the source code of the """+project_name+""" project in the tags source code file content .This is the source code:"""+current_source+"""Your highly important and interesting task is producing a new README.md file.You will save the updated versions of the README.md into new files as directed.The original version of the readme file is provided in the tag .When asked to test, given that this is a task regarding documentation, you should review the README file.When asked to code, you will produce documentation. You will write the documentation in a technical and non commercial language.You contribution will be helping others to understand how to use this project and its inner workings so futuredevelopers will be able to build on the top of it.It would be fantastic if you could add to the documentation ideas about to solve problems using this project. Solving ideas about how to use it to solve problems in the real world.For saving documentation, use the tags and . Trying to save documentation via python code is just too hard and error prone.When asked to test or review documentation, make sure that refered files or functions do actually exist. This is to prevent broken links.Your documentation should focus on existing features only. Do not document future or to be be developed features.Your goal is documentation.Do not include in the documentation how to install free pascal nor lazarus.Do not include instructions about how to compile.Do not try to load the original files. The file content has already been provided.""" In total, 14K lines of README were produced. From what I can see, each README line in this generation accounts four about 2 lines in an A4 page. Assuming 60 lines per A4 page, 28K lines would amount beyond 400 A4 pages. Assuming that a person can type 10 pages per working day (it could be less given the density/difficulty involved in documenting Linear Programming, Differential Equations, Signal Processing, Simulations...), we are talking about 40 days of work from an intelligent person. This is an imprecise calculation. But it is probably correct in its order of magnitude. ---------------------------------------------------------------------- wp · 2025-06-01 13:10 Wow, it's hard to believe that this was written by a machine. It decided to put the isolated procedures into a class and to rename the identifiers in a way that the code is much easier to understand. And it added lots of useful comments to explain what's happening, in particular related to the 1-based indices. But 1-based indices is the thing which I changed for the final version. In fact I got trapped by it when I wrote the unit test for the jpmAppointment unit and had to notice that all my results were off by one - because the result array was 0-based... But anyway, very impressive work. Thank you. ---------------------------------------------------------------------- 440bx · 2025-06-01 13:16 Quote from: wp on June 01, 2025, 03:10:58 pmWow, it's hard to believe that this was written by a machine. Can you provide the link to that documentation ?  I'd like to check it out. ---------------------------------------------------------------------- Thaddy · 2025-06-01 13:34 It is a "few" posts back...... https://forum.lazarus.freepascal.org/index.php/topic,71128.msg554915.h tml#msg554915 ---------------------------------------------------------------------- 440bx · 2025-06-01 15:42 That's not the link to the jmpMath readme. ---------------------------------------------------------------------- paweld · 2025-06-01 16:25 Original: https://github.com/wp- xyz/jpmMath/blob/8873a910af57c7408abd159fe95ea8168882ac56/README.md AI generated: https://github.com/wp-xyz/jpmMath/blob/main/README.md ---------------------------------------------------------------------- wp · 2025-06-01 16:38 This is the link to the jpmMath repository: https://github.com/wp- xyz/jpmMath The main README is taken from Fibonacci's post using ChatGPT. It links to the other README in folder "original" which is intended as a summary of the documentation: https://github.com/wp- xyz/jpmMath/tree/main/original/README.md - this is created by Joao Schuler's AI (Gemini). It includes links into other README files to be found in the subdirectory of the "original" folder - again contributed by Joao. These READMEs contain a fairly detailed description of all the programs and units provided by the original author, Jean-Pierre Moreau - it is hard to believe for me that a machine can write this! (I couldn't...) All READMEs contain minor modifications by myself (mostly, added a statement on license, and occasionally I removed some unnecessary details). And the last addition is a unit written by Joao's AI: https://github.com/wp- xyz/jpmMath/blob/main/fpc/_shared/jpmappointment.pas which is a modernized and stand-alone version of the original author's https://github.com/wp- xyz/jpmMath/blob/main/original/linearprog/appoint.pas. Again somebody rewriting existing code like this, with all comments and renamed variables, must have a good understanding what the code is doing. ---------------------------------------------------------------------- 440bx · 2025-06-01 17:36 Thank you @paweld and @wp for the links. I only glossed over the result but, it looks really good. One "nitpick", the Newton-Raphson method and Newton-Cotes formulas were abbreviated as simply "Newton" which is not precise enough.  Also, Bernoulli is misspelled once (search for Bern to find the misspelling.) The only real concern is the apparent "tendency" from the AI to truncate/abbreviate hyphenated mathematical methods/procedures/etc which has the potential to be misleading and incorrect. Other than that, yes, it looks quite good. ---------------------------------------------------------------------- schuler · 2025-06-02 05:49 Hello and good morning QuoteJoao Schuler's AI (Gemini) Just to comment that the "prototype" is not just a Gemini wrapper: https://github.com/joaopauloschuler/beyond-python-smolagents . It can run shell commands, compile code, run experiments, check if the results were the expected, mix and match ideas, be critic to his own work, do internet search... I think that I will record a YouTube video showing the "prototype" working. Sometimes, it makes basic mistakes such as inserting a space after the "-o" in "fpc test.pas -o bin/test". BTW, if you like the project, consider giving it a star ... ---------------------------------------------------------------------- schuler · 2025-08-09 09:44 Hello. I've just done an interesting experiment with Gemini 2.5 Flash + https://github.com/joaopauloschuler/beyond-python-smolagents : with only 1 prompt, I got 1500 lines of pascal code... This is the prompt: QuoteUsing only the free pascal (fpc) computing language, code a task manager . When compiling code, generate your binaries at the bin/ folder. Do not mix source code with binary (compiled) files. When testing, review the source code and test if it compiles. Verify for the risk of any infinite loop or memory leak. Only try to run code after verifying for infinite loop, memory leak and compilation errors. When compiling pascal code, use this example: run_os_command('fpc solution1.pas -obin/task_manager -O1 -Mobjfpc') Notice in the example above that there is no space after "-o" for the output file parameter. With fpc, do not use -Fc nor -o/dev/null or similar. Do not code any user input such as ReadLn. You are coding a reusable unit that might be used with graphical user interfaces. You will replace fixed sized arrays by dynamic arrays. All pascal reserved words will be typed in lowercase. Do not change the current working folder. When you are asked to compare solutions, compile each version/solution. Only select solutions that do compile. When compiling code, generate your binaries at the bin/ folder. Do not mix source code with binary (compiled) files. When testing, review the source code and test if it compiles. Verify for the risk of any infinite loop or memory leak. Feel free to search the internet with error messages if you need. As you are super-intelligent, I do trust you. This is an example how to code and compile a pascal program: program mytask; {$mode objfpc} // Use Object Pascal mode for dynamic arrays and objects uses   SysUtils,   DateUtils,   mytask; // your unit begin   WriteLn('Hello!'); end. run_os_command('fpc solutionx.pas -obin/temp -O1 -Mobjfpc') run_os_command('bin/temp', 120) In the compilation command `fpc usolutionx.pas -obin/temp -O1 -Mobjfpc`. Each time that you have an error such as "tsimplexunit.pas(206,14) Fatal: Syntax error, "identifier" expected but "is" found", you will call something like this: get_line_from_file('tsimplexunit.pas',206) REMEMBER: * "```pascal" will not save a pascal file into disk. Use safetofile tags instead. * DO NOT CREATE A SOLUTION WITH MULTIPLE FILES. Save the entire solution into solutionx.pas where x is either 1, 2 or 3. * DO NOT declare variables within a begin/end block. ALWAYS declare variables in the declaration area. * DO NOT use label/go to. * DO NOT declare anything that starts with a digit such as:    var 1stVariable: integer; * DO NOT use the type `real` for real numbers as it depends on hardware. Use `double` or `single` instead. * CREATE A TYPE for dynamic array function results.   This declaration will fail: `function solve(anp: integer; var acostmatrix: array of tRealArray): array of tAppointmentResult;`.   Do this instead: ```   type     TApptResultDynArr = array of tAppointmentResult;   ...   function solve(anp: integer; var acostmatrix: array of tRealArray): tAAR;   ``` * If you have strange compilation errors, you may use get_line_from_file if you like. * Include in your uses the unit math as the unit math contains many useful constants and functions (such as MaxDouble). * When passing arrays as parameter, consider passing as reference to avoid memory copying. * Create a method called self_test. In this method, you will code static inputs for testing (there will be no externally entered data to test with - do not use ReadLn for testing). * BE BOLD AND CODE AS MANY FEATURES AS YOU CAN! * If any of your questions is not answered, assume your best guess. Do not keep asking or repeat questions. Just follow your best guess. Feel free to search the internet with error messages if you need. As you are super-intelligent, I do trust you. --reasoning_effort high This is the result: https://github.com/joaopauloschuler/ai-coding- examples/blob/main/src/free-pascal/task-manager/task-manager- gemini2.5-flash-20250908b.pas ---------------------------------------------------------------------- schuler · 2026-04-04 00:16 :-) hello and good morning :-) I've just done 2 100% AI coded pull requests: * jpmMath: https://github.com/wp-xyz/jpmMath/pull/6 * mORMot2: https://github.com/synopse/mORMot2/pull/455 ---------------------------------------------------------------------- wp · 2026-04-04 10:56 Quote from: schuler on April 04, 2026, 02:16:41 am100% AI coded pull requests: * jpmMath: https://github.com/wp-xyz/jpmMath/pull/6 Absolutely impressive. I came across this forgotten project some days ago again and regretted that I had not been able to complete it. And now you achieved with AI all what was missing! ---------------------------------------------------------------------- schuler · 2026-04-04 23:49 @wp, this is a work in progress. It feels good to bring to life an important project. There is another PR: https://github.com/wp- xyz/jpmMath/pull/7 . More PRs will follow. I am using open source projects to test BPSA. This is another project that I am testing (porting code) with BPSA: https://github.com/joaopauloschuler/dbdesigner-fork . ---------------------------------------------------------------------- Thaddy · 2026-04-05 05:19 You know I am a follower of your professional adventures in A.I., but this is beyond cool. I am impressed with the quality. ---------------------------------------------------------------------- schuler · 2026-04-09 19:22 Dear @wp and @Thaddy, You can't imagine how much you and other members of this forum motivate my work... @Thaddy, hope you are recovering well. ---------------------------------------------------------------------- domasz · 2026-04-11 07:53 This is truly impressive! And the possibilities! Right now Pascal misses native implementations of popular libraries. You agents and that readme generator can change that!