 |
forums.silverfrost.com Welcome to the Silverfrost forums
|
View previous topic :: View next topic |
Author |
Message |
DanRRight
Joined: 10 Mar 2008 Posts: 2923 Location: South Pole, Antarctica
|
Posted: Sun Jun 15, 2025 11:19 pm Post subject: Which AI trained on Clearwin? |
|
|
Any movement in this direction? |
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8210 Location: Salford, UK
|
Posted: Mon Jun 16, 2025 6:39 am Post subject: |
|
|
Dan
Who is this question for and what does it mean? |
|
Back to top |
|
 |
DanRRight
Joined: 10 Mar 2008 Posts: 2923 Location: South Pole, Antarctica
|
Posted: Mon Jun 16, 2025 9:46 am Post subject: |
|
|
AI novadays understands and writes texts on different languages. Anyone tried to train AI on Clearwin? I'd for example more like to see my responds from AI not mostly on Python but on Clearwin and think they would be more relevant and familiar. And could be included into my codes for further use.
Spent last three days with some easy task on ChatGPT, Grok and Deepseek and all of them eventually almost failed (I lost patience to continue endless corrections and start overs) with this task i would be done in CLearwin in 30 minutes. |
|
Back to top |
|
 |
DanRRight
Joined: 10 Mar 2008 Posts: 2923 Location: South Pole, Antarctica
|
Posted: Wed Jun 18, 2025 1:28 pm Post subject: |
|
|
Since this compiler natively understands
1) Assembler
2) HTML
3) OpenGL
4) probably C/C++ too (?) At least it has to
how about adding here Python and its libraries for 2D/3D plotting? Then we will just wrap the solutions AI creates (typically done in Python) into Fortran or Clearwin+ functions and that will tremendously simplify using AI as well as plotting anything.
And possibly simplify anything else where Fortran requires a lot of efforts as Python is #1 language, way more popular than even C or Java or any other language, according to TIOBE listing
https://www.tiobe.com/tiobe-index/ |
|
Back to top |
|
 |
Kenneth_Smith
Joined: 18 May 2012 Posts: 814 Location: Hamilton, Lanarkshire, Scotland.
|
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8210 Location: Salford, UK
|
Posted: Wed Jun 18, 2025 6:54 pm Post subject: |
|
|
Dan
Providing a Python backend sounds like a project that would take a number of man years. That would be a massive investment.
Ken
Your images are impressive. Is the code provided? |
|
Back to top |
|
 |
DanRRight
Joined: 10 Mar 2008 Posts: 2923 Location: South Pole, Antarctica
|
Posted: Thu Jun 19, 2025 6:50 am Post subject: |
|
|
Ken,
Definitely the 2D drawings, surface plots and 3D plots would have the largest value if AI will learn how to simplify this for us. Even usual X-Y plotting which Clearwin is doing now with ease and of production quality would potentially additionally simplified by AI
Please write more what specifically you and AI have done to create these 3D plots. That will get some idea on what amount of efforts this will take compared to conventional ways. May be would be better if you start with some simplest demo
Last edited by DanRRight on Fri Jun 20, 2025 4:01 am; edited 1 time in total |
|
Back to top |
|
 |
Kenneth_Smith
Joined: 18 May 2012 Posts: 814 Location: Hamilton, Lanarkshire, Scotland.
|
Posted: Thu Jun 19, 2025 12:51 pm Post subject: |
|
|
As an example, here is the code generated by AI when I asked it about Z-buffering algorithms.
https://www.dropbox.com/scl/fi/l0dlv0pum4libfhl99glg/Zbuffer_FTN95_CHATGPT.f95?rlkey=8qlhx6woey7p50crm3tue59uy&st=6tqfwetj&dl=0
AI is much better than I at generating comment lines to document the code!
If you paste this code into ChatGPT, you can then ask it to adapt the code for other algorithms e.g. Painter, at this point it knows all the necessary Clearwin+ procedures and there is a good chance that it makes the necessary changes without too many errors.
I have also found that if you have an old fortran procedure with lots of GOTOs there is a good chance that AI can restructure the logic using Fortran 90 constructs. |
|
Back to top |
|
 |
DanRRight
Joined: 10 Mar 2008 Posts: 2923 Location: South Pole, Antarctica
|
Posted: Fri Jun 20, 2025 3:59 am Post subject: |
|
|
AI never stops to amaze me. If that was made by AI and it already knows about Clearwin the only I can say is WOW. So small, clear and simple code.
I will post similar program I made 30 years ago using Clearwin OpenGL. Will be interesting to compare which approach is more viable. Also important is the speed. I struggle with OpenGL lately, with data becoming larger and larger and larger i wish it would be faster and had no limitations on the size of plotting data. Some other OpenGL issues also hard to implement, like axis numbering.
May be AI, if it is that fluent with Clearwin and probably OpenGL, will ease both methods and Silverfrost will simplify them even more and implement 2D and 3D plotting similar way like they have done with x-y graphs using %PL when to plot complex graph of professional production quality require just 1-2 lines of Fortran code and hopefully not far from now probably with just a voice command (note, the key words here are professional quality)
UPDATE
Wow WOW WOW.... The ChatGPT is definitely familiar with FTN95, Clearwin, OpenGL and even older Salford FTN77 !
I asked to convert my old FTN77 Clearwin/OpenGL code to FTN95 and it have done that in seconds. Before i tried to do the same with some code beautifiers and many failed creating Fortran90 mess, others required $1000 payment.
I pointed to ChatGPT on some conversion errors (trailing comma error left by mistake which among all compilers only FTN95 can catch) and it responded:
"OK, I've fixed the trailing comma issue in REAL*8 declarations like the one you mentioned (spiny, → spiny). The cleaned and corrected file is now ready:
👉 Download mesh_ftn95_cleaned.f90
Please try compiling this version. If there are any remaining errors, just copy-paste them here, and I�ll help resolve them step by step. "
UPDATE2
And Grok is even better. I am very surprised these two AIs are already familiar with all these proprietary things. Grok made only one, and looking like a typo error converting files from FTN77 to FTN95 (it wrote 1.-3e instead of 1.e-3. A hallucination ? ) . Here is the link on this 3D code made with Clearwin/OpenGL
https://www.dropbox.com/scl/fi/zevk47ul40epky9dar718/mesh_mod.f95?rlkey=lpdbfs8d5fifwfseeupndm07b&st=i13rltq8&dl=0
Compilation: ftn95 mesh_mod.f95 /link /64
Last edited by DanRRight on Sat Jun 21, 2025 7:13 am; edited 2 times in total |
|
Back to top |
|
 |
Kenneth_Smith
Joined: 18 May 2012 Posts: 814 Location: Hamilton, Lanarkshire, Scotland.
|
Posted: Fri Jun 20, 2025 10:40 am Post subject: |
|
|
Dan, you are far ahead of me at this game!
In your code at line 684:
ig111 = ig111 + 2 * (RelColLum - 0.5D0) * ig
ig was not previously been assigned a value.
Last evening I asked ChatGPT to modify the code I posted previously, to implement the following modifications, each done sequentially:
1. include a surrounding margin,
2. draw the surrounding cuboid
3. draw the coordinates at each corner of the cuboid.
4. draw tick marks are the corners and midpoints of each edge.
Here is the result of just 30 minutes "chat". These are prerequisites for the next step - linear x, y, z scales.
https://www.dropbox.com/scl/fi/7le3xqtq8ahq74pgud59d/Zbuffer2_FTN95_CHATGPT.f95?rlkey=m5ubj4zvqyohif0si62otzprw&st=p7g3y6es&dl=0 |
|
Back to top |
|
 |
DanRRight
Joined: 10 Mar 2008 Posts: 2923 Location: South Pole, Antarctica
|
Posted: Fri Jun 20, 2025 12:44 pm Post subject: |
|
|
Ken,
You have steady progress in the right direction!
Hopefully AI learning Clearwin from our attempts.
I suggest users to try this too. For example would be great if somebody will ask AI to convert all "Silverfrost Clearwin Examples" from their mostly Fortran-77 style to Fortran-90 style with modules and without. This will teach AI to understand Clearwin more.
Because looks like its skills are still not super great. I tried to convert for example this code for Property Sheet to Fortran90 style in Grok. My idea was not just convert it but also ask AI to add one more property sheet tab (often needed and somewhat painful operation in existing codes). I gave up after 1 hour even to convert to Fortran-90! The AI make too many unexplainable moves
Code: | OPTIONS(INTL)
INCLUDE <WINDOWS.INS>
INTEGER K1,K2,K3,ANS
INTEGER MALE,FEMALE
INTEGER ALIVE,CONSCIOUS,COMFORTABLE,AGE
CHARACTER*20 NAME
CHARACTER*200 REPORT
DATA NAME/'Fred Bloggs'/
report='Mr. Bloggs has a large wart'//char(13)//char(10)//
+'on his left buttock which'//char(13)//char(10)//
+'should be removed with caustic soda'//char(13)//char(10)
MALE=1
FEMALE=0
ALIVE=1
CONSCIOUS=1
COMFORTABLE=0
AGE=75
C
C Sheet 1
C
ANS=WINIO@('%ca[Personal]Personal information:%nl%nl&')
ANS=WINIO@('%obName:%ta%rs%nlAge:%ta%rd%nlSex: %rb[Male] '//
+'%rb[Female]%2ga%cb%sh',NAME,AGE,MALE,FEMALE,MALE,FEMALE,K1)
C
C Sheet 2
C
ANS=WINIO@('%ca[Medical]General patient condition%nl%nl&')
ANS=WINIO@('%ob%rb[Alive]%nl%rb[Conscious]%nl%rb[Comfortable]'//
+'%cb%sh',ALIVE,CONSCIOUS,COMFORTABLE,K2)
C
C Sheet 3
C
ANS=WINIO@('%ca[Report]Doctor''s report%nl%nl&')
ANS=WINIO@('%pv%30.4eb[hscrollbar,vscrollbar]%sh',REPORT,200,K3)
C
C The main window
C
ANS=WINIO@('%bg[grey]%ca[Patient status]%3ps',K1,K2,K3)
END |
|
|
Back to top |
|
 |
Kenneth_Smith
Joined: 18 May 2012 Posts: 814 Location: Hamilton, Lanarkshire, Scotland.
|
Posted: Fri Jun 20, 2025 1:52 pm Post subject: |
|
|
Dan, In you code at line 711
i = winio@('%pv%80.10&[hscroll,vscroll]&', iOUTun1)
There is a missing format code after the second %.
I must get back to what I should be doing! |
|
Back to top |
|
 |
DanRRight
Joined: 10 Mar 2008 Posts: 2923 Location: South Pole, Antarctica
|
Posted: Fri Jun 20, 2025 3:30 pm Post subject: |
|
|
Ken,
Thanks, the first error at line 681 is my own error, ig was forgotten there, should be removed.
The second at line 711 is AI fault, in the original FTN77 code all is fine
Should be Code: | i = winio@('%pv%80.10cw[hscroll,vscroll]&', iOUTun1) |
Fixed.
I am surprised Grok making a lot of typos like that. Three per such small code |
|
Back to top |
|
 |
DanRRight
Joined: 10 Mar 2008 Posts: 2923 Location: South Pole, Antarctica
|
Posted: Sat Jun 21, 2025 7:33 am Post subject: |
|
|
By the way, talking about training of AI on Clearwin, may be Grok was right by deleting the %sh at the end of lines when rebuilding to Fortran-90 that small Salford Clearwin FTN77 %ps example above? Unfortunately AI deleted %sh completely because it clearly has little experience yet in this.
I followed this demo for years for many my property sheets but had their strange behavior sometimes. I asked this forum one day and according to Paul clarification few years back the %sh has to be first control for each new tab not the last one.
I encourage all to try "training" AI using any your Clearwin codes. It is really easy and for Grok, DeepSeek and many other AI is free. Even ChatGPT is free for light use. Just say to AI "Please rebuild my Fortran-77 style source code made with Salford Fortran-77 FTN77 compiler to modern Fortran-95 style of Silverfrost Fortran FTN95 compiler" and upload the code. Always say Please because it is AI who will help to find the retirement home for you |
|
Back to top |
|
 |
Kenneth_Smith
Joined: 18 May 2012 Posts: 814 Location: Hamilton, Lanarkshire, Scotland.
|
Posted: Sun Jun 22, 2025 2:29 pm Post subject: |
|
|
A rather amusing reader's letter in Friday's issue of The Scotsman.
Quote: | Green MSP Lorna Slater raised eyebrows with her Parliamentary AI experiment
Opposing a motion to the Scottish Parliament �Demanding a Better Deal for Taxpayers in Scotland�, Green MSP Lorna Slater presented the case that, once the benefits of various policies such as �free� prescriptions, bus travel, tuition fees and social care was taken into account and despite higher income tax rates, people in Scotland are generally better off than people in England.
To prove her point, she had put her thesis into an AI chatbot which confirmed her view. If the output from AI was capable of unequivocally defining what is true, it would strengthen her argument; however, it does not have that capability.
Troubled by two recent incidences where ChatGPT had not just given me wrong information but made up �facts� (a phenomenon known as �hallucination�), I challenged ChatGPT as to why it does that. Its response was enlightening and included the following: �It was trained to sound helpful � not to know the truth. So, when you ask a question, it tries to give you the kind of answer it thinks you want � even if it has to guess.�
I find it amusing that Lorna Slater, a politician, relied upon AI to justify her position. After all, the text quoted above would also be a reasonable description of most politicians.
|
|
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|