Proffie meets Chat GPT

Just for grins, I prompted ChatGPT to “check a config for errors”. The unimpressive response given below.

The code provided seems to be a configuration file for a lightsaber or similar electronic device. While I cannot execute or compile the code directly, I can help identify potential errors based on common mistakes and syntax issues.

Here are some observations and potential issues:

Header file inclusion: Ensure that the header file “proffieboard_v2_config.h” and “…/props/SABER_SA22C_BUTTONS.H” exist in the specified locations and contain valid code.

Undefined macros: Make sure all macros defined with #define are used appropriately throughout the code.

Trailing commas in arrays: There are several arrays defined with multiple elements, and some of them have trailing commas after the last element. While some compilers may tolerate this, it’s generally safer to remove them, especially if you’re targeting multiple compilers.

Syntax errors in presets: The presets seem to define complex data structures. Ensure that each preset definition is properly enclosed within curly braces {} and terminated with a comma , except for the last one. Also, check for missing or mismatched parentheses, square brackets, and angle brackets.

Incomplete statements: Some lines in the presets definition span multiple lines. Ensure that all statements are complete and properly terminated.

Comments: Add comments to clarify the purpose of each section and any complex logic. Comments can greatly improve code readability and maintainability.

Variable declarations: Verify that all variables used in the presets are properly declared and initialized.

String literals: Ensure that all string literals are properly enclosed within double quotes " ".

Function calls: Check that all function calls are correctly formatted with the appropriate number and type of arguments.

Conditional compilation: Verify that conditional compilation directives (#ifdef, #endif) are used correctly and consistently.

Mismatched data types: Ensure that the data types of variables and function arguments match their intended usage.

Unused variables: Remove any unused variables or macros to keep the code clean and maintainable.

After addressing these potential issues, you should test the code thoroughly to ensure that it behaves as expected. If you encounter any specific errors or issues during compilation or execution, feel free to ask for further assistance with those particular problems.

I’ve tried the same. Do you know which version of chatGPT? I’ve only used 3.5, which mostly hallucinates or acts as a search engine, and I’ve been told 4 turbo, which is paywalled, is very good.

The AI needs to be trained properly and so the more people that ask about Proffie and give detailed directions the better it should get. Training them is kinda fun because you can add “in the style of”. So you can say “please attempt to solve this problem and present the outcome in Yoda’s speech pattern” and it does that :slight_smile:

1 Like

LyleStyle, It was the same, 3.5. The first couple configs I tried were apparently “Too Long”! I was thinking, this AI is a cry baby…lol
Not so smart if you ask me.hehe

Chat gpt can also offer changes to accomplish specific goals and gives links to helpful references… at least the reference links have been helpful. I’m still trying to test the offered suggestion… i asked chat gpt how i could get speak blade id to trigger more often, it suggested modifying the event2 function in the prop file. Just having some trouble finding where that is… and didn’t get a chance to ask chatgpt…

1 Like

One thing it does well is present first drafts with stylistic changes but consistent content. It also helps you scale concepts. So If you want to explain Proffie to programmers you can create an initial and quite complete presentation, and then ask the AI to re-write it using common standards for 5th graders. So yeah, it’s dumb but it does things you don’t want to do.

1 Like

Yeah, I was kidding. It’s been amazing the few times I have tried using it. Even in this case it, it did pretty well for just feeding it only five words, “check a config for errors.”
I used some mathgpt app the other day that was wonderful. It worked out some complex problems in seconds.

1 Like