Is using this forum free or do people have to be subscribers?
I read recently that AI (whatever this was as there is no 1 supercomputer) will run out of text next year. It has then read everything that is available. It would be the first time that “someone” has read everything but it proves that’s not the amount that we read that is important.
I'll give it a chance to read some of my muses - that should either teach it something totally useless, or blow its mind!!
Sometimes I think people ask the question to chatgpt or similar and then post it on here. It often has a similar "feel" to something that was copied from a website or textbook.
Doncaster, South Yorkshire. Soil type: sandy, well-drained
I agree @JennyJ … I’ve a feeling that there are folk out there using this forum as a try out before they set up their own marketing website on which there’ll be a Query answering page to draw people in.
Gardening in Central Norfolk on improved gritty moraine over chalk ... free-draining.
Interesting Panorama program on AI on their iPlayer (I think it was broadcast last night anyway - EDITED TO ADD - I think this is it - https://www.bbc.co.uk/iplayer/episode/m001ph7q/panorama-beyond-human-artificial-intelligence-and-us).It threw up a few questions (the brain scanning bit was intriguing) - and how the chat bots 'understand' language. I tried to get ChatGPT (other bots are available) to write a bit of code using plain english - and telling it what target computer language I wanted.
This is what I got:
OK.
The question then is - could I say some thing like:
1) The language I want is Cobol
2) Define a variable for holding non-numeric data of variable length.
3) Store the text 'Hello World' In that variable
4) Display the content of that variable, in bold, in the centre of the screen. Keep it there for 10 seconds, then clear the screen and display 'Goodbye' in the centre of the screen and terminate the program.
The scenario you've described involves a series of instructions that you want to be translated into COBOL programming language. While the idea of expressing programming tasks in natural language is appealing, it's important to note that a direct, comprehensive translation from natural language to a programming language like COBOL is still challenging due to the reasons mentioned earlier.
However, I can certainly help you understand how the steps you've outlined might be translated into COBOL-like code:
cobol
IDENTIFICATION DIVISION.
PROGRAM-ID. HelloWorld.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 TEXT-VARIABLE PIC X(100).
01 DISPLAY-TIME PIC 99.
PROCEDURE DIVISION.
MOVE "Hello World" TO TEXT-VARIABLE.
MOVE 10 TO DISPLAY-TIME.
DISPLAY FUNCTION BOLD-ON, CENTER TEXT-VARIABLE
AFTER 1 LINES, COLUMN 1 SIZE 100.
DISPLAY SPACE AFTER 10 SECONDS, ERASE.
DISPLAY FUNCTION BOLD-ON, CENTER "Goodbye"
AFTER 1 LINES, COLUMN 1 SIZE 100.
STOP RUN.
Please note that the above code is a simplification and might not cover all possible nuances of COBOL programming. COBOL is known for its structured syntax and specific keywords, so achieving precise translation from natural language to COBOL requires understanding both the natural language intent and the COBOL syntax.
In practice, while there are efforts to create programming languages with more English-like syntax, they often retain a distinct syntax and structure to ensure unambiguous communication with the computer.
OK. Can you then do the same with a target of JAVA?
Sure, I can provide a Java-like representation of the steps you've outlined. Just keep in mind that while Java has a more familiar syntax for many people, the process of converting natural language into a programming language still involves adhering to the language's specific syntax rules.
Here's how your instructions might be translated into a Java-like code snippet:
Please note that the above code uses standard Java syntax, but it might not perfectly replicate the intended behavior due to the nature of some of the tasks you've described, such as clearing the screen. Java's capabilities for directly manipulating terminal screens are somewhat limited compared to COBOL, which was often used for mainframe systems.
Additionally, Java doesn't provide native support for bold or center formatting in console output. The above code uses HTML-style formatting tags for illustrative purposes, but in reality, console output formatting in Java can be more complex and might require additional libraries or approaches.
Fascinating. It takes me back to James Burke in the 70s/80s and Connections - I think he did a bit on giving someone instructions to get up from a chair, go to a tap and fill a glass with water and then drink that water. Obviously, lots of things to think about in that scenario - but it seems to be the same now for me to write computer code. I can use English as an interface and achieve something that is potentially usable (the code needs checking still, but it's early days).
Posts
Hal didn’t do very well did he. But then he was programmed by a human, they’re not even that these days, 😀
A robot may not injure a human being or, through inaction, allow a human being to come to harm. A robot must obey orders.
Gardening in Central Norfolk on improved gritty moraine over chalk ... free-draining.
The scenario you've described involves a series of instructions that you want to be translated into COBOL programming language. While the idea of expressing programming tasks in natural language is appealing, it's important to note that a direct, comprehensive translation from natural language to a programming language like COBOL is still challenging due to the reasons mentioned earlier.
However, I can certainly help you understand how the steps you've outlined might be translated into COBOL-like code:
Please note that the above code is a simplification and might not cover all possible nuances of COBOL programming. COBOL is known for its structured syntax and specific keywords, so achieving precise translation from natural language to COBOL requires understanding both the natural language intent and the COBOL syntax.
In practice, while there are efforts to create programming languages with more English-like syntax, they often retain a distinct syntax and structure to ensure unambiguous communication with the computer.
Sure, I can provide a Java-like representation of the steps you've outlined. Just keep in mind that while Java has a more familiar syntax for many people, the process of converting natural language into a programming language still involves adhering to the language's specific syntax rules.
Here's how your instructions might be translated into a Java-like code snippet:
Please note that the above code uses standard Java syntax, but it might not perfectly replicate the intended behavior due to the nature of some of the tasks you've described, such as clearing the screen. Java's capabilities for directly manipulating terminal screens are somewhat limited compared to COBOL, which was often used for mainframe systems.
Additionally, Java doesn't provide native support for bold or center formatting in console output. The above code uses HTML-style formatting tags for illustrative purposes, but in reality, console output formatting in Java can be more complex and might require additional libraries or approaches.