We would like to build a community for Small Basic programmers of any age who like to code. Everyone from total beginner to guru is welcome. Click here to register and share your programming journey!


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
AI learns Small Basic
#29
Here is a fragment of my conversation with ChatGPT-4.5:
=====

Human:
Today, I want to discuss with you the topic of SYNTAX, which would be as convenient as possible for use in scripts that I could write for you, Ji, describing in detail the sequences of your actions that I need.
Please describe to me what you consider to be the most convenient syntax for these scripts.

-----

Artificial Intelligence:
For the script syntax to be convenient and understandable for both you (as a human) and me (AI), it is important to combine simplicity, unambiguity, and ease of interpretation.

General principles of convenient syntax:
1. Step-by-step structure
- Each line is one clear command.
- Sequential execution from top to bottom.
Example:
Create a variable X
Assign X the value 10
Output the value of X

2. Clear separation of commands and parameters
- Commands are verbs, actions.
- Parameters are nouns, clearly defined.
Example:
Open file "Report.txt"
Write text "Hello World!" to file "Report.txt"
Close file "Report.txt"

3. Use of simple and understandable keywords
- Natural language for commands.
- Clear keywords: Create, Assign, Output, Combine, Compare, Repeat, Finish, etc.
Example:
Create a string variable "message"
Assign the variable "message" the value "Good afternoon, Ji!"
Output "message"

4. Naming variables
- Simple but descriptive variable names.
- Use of underscores if necessary.
Example:
Create a numeric variable "air_temperature"

5. Working with data types
- Explicit indication of data types (string, numeric, logical, array).
Example:
Create a logical variable "rain"
Assign the variable "rain" the value True

6. Use of comments (optional)
- If necessary, use // or # for comments. They help to understand the purpose of each part of the script.
Example:
// Here we set the initial data
Create a numeric variable "counter"
Assign "counter" the value 0

7. Convenient formatting for reading and editing
- Commands on separate lines.
- Use of blank lines between logical command blocks.
Example:
Create a variable "X"
Assign "X" the value 5

Create a variable "Y"
Assign "Y" the value 10

Combine "X" and "Y" into a string "Z"
Output "Z"
---

Final recommendation on syntax:
The most convenient option is a simple, structured, and understandable language based on natural language, similar to human speech, but with clear logic and structure.

Example of a fully convenient script:
// Preparing variables
Create a numeric variable "age"
Assign the variable "age" the value 30

Create a string variable "name"
Assign the variable "name" the value "Eugene"

// Forming a message
Create a string variable "message"
Combine "Hello, " + variable "name" + "! Your age: " + variable "age" and assign the result to "message"

// Output result
Output the value of the variable "message"
---

Why is this option convenient:
It will be easy for you to write and read scripts.
It will be easy for me to interpret, execute, and also find and correct errors.
=====

Damn it, if THIS isn't Mind, then WHAT is it?  Huh
Reply


Messages In This Thread
AI learns Small Basic - by AbsoluteBeginner - 10-24-2024, 01:02 PM
RE: AI learns Small Basic - by z-s - 10-24-2024, 03:34 PM
RE: AI learns Small Basic - by AbsoluteBeginner - 10-24-2024, 04:37 PM
RE: AI learns Small Basic - by AbsoluteBeginner - 11-16-2024, 08:54 AM
RE: AI learns Small Basic - by litdev - 11-16-2024, 10:50 AM
RE: AI learns Small Basic - by AbsoluteBeginner - 11-16-2024, 11:44 AM
RE: AI learns Small Basic - by jrmrhrb00 - 11-20-2024, 12:14 AM
RE: AI learns Small Basic - by AbsoluteBeginner - 01-09-2025, 09:26 AM
RE: AI learns Small Basic - by AbsoluteBeginner - 02-17-2025, 05:38 PM
RE: AI learns Small Basic - by litdev - 02-17-2025, 07:37 PM
RE: AI learns Small Basic - by AbsoluteBeginner - 02-17-2025, 08:32 PM
RE: AI learns Small Basic - by z-s - 02-18-2025, 04:05 AM
RE: AI learns Small Basic - by AbsoluteBeginner - 02-18-2025, 06:11 AM
RE: AI learns Small Basic - by z-s - 02-19-2025, 04:16 AM
RE: AI learns Small Basic - by AbsoluteBeginner - 02-19-2025, 08:28 AM
RE: AI learns Small Basic - by z-s - 02-19-2025, 08:30 AM
RE: AI learns Small Basic - by jrmrhrb00 - 02-19-2025, 01:08 PM
RE: AI learns Small Basic - by litdev - 02-19-2025, 01:27 PM
RE: AI learns Small Basic - by jrmrhrb00 - 02-19-2025, 03:02 PM
RE: AI learns Small Basic - by litdev - 02-19-2025, 03:20 PM
RE: AI learns Small Basic - by AbsoluteBeginner - 02-19-2025, 05:25 PM
RE: AI learns Small Basic - by jrmrhrb00 - 02-20-2025, 12:23 AM
RE: AI learns Small Basic - by z-s - 02-24-2025, 10:37 AM
RE: AI learns Small Basic - by jrmrhrb00 - 02-24-2025, 01:53 PM
RE: AI learns Small Basic - by AbsoluteBeginner - 03-11-2025, 08:18 AM
RE: AI learns Small Basic - by litdev - 03-11-2025, 09:56 AM
RE: AI learns Small Basic - by AbsoluteBeginner - 03-11-2025, 10:23 PM
RE: AI learns Small Basic - by litdev - 03-12-2025, 09:23 AM
RE: AI learns Small Basic - by AbsoluteBeginner - 03-12-2025, 09:46 PM
RE: AI learns Small Basic - by litdev - Yesterday, 09:54 AM
RE: AI learns Small Basic - by AbsoluteBeginner - Yesterday, 12:12 PM
RE: AI learns Small Basic - by litdev - Yesterday, 12:39 PM
RE: AI learns Small Basic - by AbsoluteBeginner - Yesterday, 01:09 PM
RE: AI learns Small Basic - by litdev - Yesterday, 01:21 PM
RE: AI learns Small Basic - by AbsoluteBeginner - Yesterday, 04:40 PM

Forum Jump:


Users browsing this thread: 3 Guest(s)