POV-Ray : Newsgroups : povray.general : General AI code notes Server Time
2 Nov 2025 07:54:42 EST (-0500)
  General AI code notes (Message 1 to 2 of 2)  
From: Bald Eagle
Subject: General AI code notes
Date: 1 Nov 2025 10:10:00
Message: <web.6906146e76bfff7a1f9dae3025979125@news.povray.org>
Just some clarifications and (hopefully) helpful notes about AI-generated code.

Without direction, AI will just spit out anything it "thinks" works.

But we all know that SDL is "special".

At least with GPT-5, I can tell it to remember my coding style, and give it
certain rules to follow.

If you see code with lowercase identifiers, then it's probably from before I
puzzled all of that out.

I've tried to have it generate code with capitalized identifiers, and prepending
all of the ID's with the type:  S_ for scalar, V_ for vector, Arr_ for array,
etc.

It also sometimes drops * for multiplication and just concatenates two ID's
together - just insert that * and that line of code should work.

It tries to do c++ style "functions", both by writing multi-line code with
#declares or #locals, and also by naming the output value and providing that as
part of the input parameters.

Just change
#macro MacroName (ID1, ID2, ID3)

#end

to

#macro MacroName (ID1, ID2)

ID3
#end

and then in the macro call, change:

MacroName (ID1, ID2, ID3)

to

#declare ID3 = MacroName (ID1, ID2);

- BE


Post a reply to this message

From: Leroy
Subject: Re: General AI code notes
Date: 1 Nov 2025 13:15:00
Message: <web.69063ee3fb26d9db8def9c7f712fc00@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> Just some clarifications and (hopefully) helpful notes about AI-generated code.
>
> Without direction, AI will just spit out anything it "thinks" works.
>

True! It does spits out a lot of stuff, like vomit. And like vomit there are
things there that could be useful, but You don't want to touch it.


> But we all know that SDL is "special".
>
> At least with GPT-5, I can tell it to remember my coding style, and give it
> certain rules to follow.
>
> If you see code with lowercase identifiers, then it's probably from before I
> puzzled all of that out.
>
> I've tried to have it generate code with capitalized identifiers, and prepending
> all of the ID's with the type:  S_ for scalar, V_ for vector, Arr_ for array,
> etc.
>
> It also sometimes drops * for multiplication and just concatenates two ID's
> together - just insert that * and that line of code should work.
>
> It tries to do c++ style "functions", both by writing multi-line code with
> #declares or #locals, and also by naming the output value and providing that as
> - BE

It did write a function that was really a macro.
LLMs (large language model) don't really understand anything.

Have fun!


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.