Recent

Author Topic: I can write your README.md file 4 you 4 free  (Read 5310 times)

GAN

  • Sr. Member
  • ****
  • Posts: 382
Re: I can write your README.md file 4 you 4 free
« Reply #30 on: May 20, 2025, 04:09:39 am »

@GAN,
Quote
Can 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 "<p>Error: The README.md file was not found.</p>"

    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.
Lazarus 2.0.8 FPC 3.0.4 Linux Mint Mate 19.3
Zeos 7̶.̶2̶.̶6̶ 7.1.3a-stable - Sqlite 3.32.3 - LazReport

schuler

  • Sr. Member
  • ****
  • Posts: 265
Re: I can write your README.md file 4 you 4 free
« Reply #31 on: May 21, 2025, 03:41:07 am »
@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 :)
« Last Edit: May 21, 2025, 04:26:44 am by schuler »

schuler

  • Sr. Member
  • ****
  • Posts: 265
Re: I can write your README.md file 4 you 4 free
« Reply #32 on: May 21, 2025, 05:00:13 am »
@GAN,
I've just done an experiment with evolutive_problem_solver. This is the prompt:
Quote
Using 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.
« Last Edit: May 21, 2025, 05:03:05 am by schuler »

cdbc

  • Hero Member
  • *****
  • Posts: 2208
    • http://www.cdbc.dk
Re: I can write your README.md file 4 you 4 free
« Reply #33 on: May 21, 2025, 09:19:09 am »
Hi Joao
Once again WOW! Thank You for both versions, they literally blew my mind  8-)
What a cool "Prototype" you've got/made there =^
Quote
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...
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  :D
Regards & Thanks - Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE5 -> FPC 3.2.2 -> Lazarus 3.6 up until Jan 2024 from then on it's both above &: KDE5/QT5 -> FPC 3.3.1 -> Lazarus 4.99

wp

  • Hero Member
  • *****
  • Posts: 12865
Re: I can write your README.md file 4 you 4 free
« Reply #34 on: May 23, 2025, 01:23:12 pm »
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?
« Last Edit: May 23, 2025, 02:09:24 pm by wp »

PeterBB

  • Jr. Member
  • **
  • Posts: 71
Re: I can write your README.md file 4 you 4 free
« Reply #35 on: May 23, 2025, 04:58:05 pm »
@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

  • Sr. Member
  • ****
  • Posts: 265
Re: I can write your README.md file 4 you 4 free
« Reply #36 on: May 24, 2025, 02:45:47 am »
 :)

@wp,
Quote
German forum recently the math library of Jean-Pierre Moreau was re-discovered
The name of the movie is: THE RAIDERS OF THE LOST CODE! Let's do it!

@cdbc,
Quote
Can your 'Next version' handle a framework
We will discover together. Send it.

@PeterBB,
Quote
Would 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.

 :)
« Last Edit: May 24, 2025, 02:47:30 am by schuler »

Fibonacci

  • Hero Member
  • *****
  • Posts: 754
  • Internal Error Hunter
Re: I can write your README.md file 4 you 4 free
« Reply #37 on: May 24, 2025, 07:16:33 am »

wp

  • Hero Member
  • *****
  • Posts: 12865
Re: I can write your README.md file 4 you 4 free
« Reply #38 on: May 24, 2025, 10:41:30 am »
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?
« Last Edit: May 24, 2025, 11:50:07 am by wp »

paule32

  • Hero Member
  • *****
  • Posts: 516
  • One in all. But, not all in one.
Re: I can write your README.md file 4 you 4 free
« Reply #39 on: May 24, 2025, 12:16:01 pm »
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...
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.

Fibonacci

  • Hero Member
  • *****
  • Posts: 754
  • Internal Error Hunter
Re: I can write your README.md file 4 you 4 free
« Reply #40 on: May 24, 2025, 01:49:47 pm »
exists only in uncommitted state on my local harddisk. Can ChatGPT read my harddisk?

 :D

jmpNormal doesnt exist, but is referenced in LPR and LPI files

wp

  • Hero Member
  • *****
  • Posts: 12865
Re: I can write your README.md file 4 you 4 free
« Reply #41 on: May 24, 2025, 05:31:52 pm »
exists only in uncommitted state on my local harddisk. Can ChatGPT read my harddisk?

 :D

jmpNormal doesnt exist, but is referenced in LPR and LPI files
Ah, yes of course.

schuler

  • Sr. Member
  • ****
  • Posts: 265
Re: I can write your README.md file 4 you 4 free
« Reply #42 on: May 25, 2025, 06:15:33 am »
 :) 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

  • Hero Member
  • *****
  • Posts: 12865
Re: I can write your README.md file 4 you 4 free
« Reply #43 on: May 25, 2025, 11:54:41 am »
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

  • Sr. Member
  • ****
  • Posts: 265
Re: I can write your README.md file 4 you 4 free
« Reply #44 on: May 26, 2025, 06:46:08 am »
@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.

 

TinyPortal © 2005-2018