ChatGPT for programming
|
03-29-2023, 12:27 AM
Post: #1
|
|||
|
|||
ChatGPT for programming
Hello friend, I was exploring this chatGPT and if you can teach it to program in user, system and ml and PPL is a tool with which I create, you can polish and improve various programs
|
|||
03-29-2023, 02:56 AM
Post: #2
|
|||
|
|||
RE: ChatGPT for programming
(03-29-2023 12:27 AM)hpmin48gx Wrote: Hello friend, I was exploring this chatGPT and if you can teach it to program in user, system and ml and PPL is a tool with which I create, you can polish and improve various programs Lot of members of this forum already tried to use this AI tool to elaborate some easy programme and the results are disappointing. ChatGTP is essentially an expensive parrot which shoots columns of "RLC 0" and "GTO a" that are meaningless. If you like, you can try yourself and see. Good luck! Put a calculator into your life! |
|||
03-29-2023, 02:25 PM
Post: #3
|
|||
|
|||
RE: ChatGPT for programming
My experience using ChatGPT as an RPN and RPL programming assistant has been positive.
Some relevant questions for those who have had disappointing results using ChatGPT as a programming aid are: 1) Did you use ChatGPT3.5 or ChatGPT4? ChatGPT4 is vastly improved for writing code. 2) Did you try varying an unsuccessful initial prompt? 3) As important as initial prompt wording, is whether you continued the conversation with ChatGPT to inform it of errors. ChatGPT responds to being told about errors by trying to correct them (and by apologizing ) and often (but not always) succeeds. Providing ChatGPT with some context or guidance about the type of error can help. While ChatGPT, including ChatGPT4, still can make a lot of programming errors, what it does correctly right now is jaw-dropping. And at the astounding rate that it's improving, I wouldn't want to bet against it. |
|||
03-29-2023, 03:24 PM
(This post was last modified: 03-29-2023 03:44 PM by Roberto Volpi.)
Post: #4
|
|||
|
|||
RE: ChatGPT for programming
(03-29-2023 02:25 PM)carey Wrote: My experience using ChatGPT as an RPN and RPL programming assistant has been positive. Well, there are threads already about it: https://www.hpmuseum.org/forum/thread-19351.html https://www.hpmuseum.org/forum/thread-19446.html People far more experts than me have already given their opinions. Furthermore, it is important to specify exactly what "positive experience" really means. If negotiating with a PC is your scope, you can have a very good time, as ChatGTP has a spiffing sense of humor in its answers, but I question its ability to compile decent code for a HP calculator. But maybe I am wrong, so we are going to see soon tons of programmes submitted by you and other users in this forum. Peace. Put a calculator into your life! |
|||
03-29-2023, 03:58 PM
(This post was last modified: 03-29-2023 04:01 PM by carey.)
Post: #5
|
|||
|
|||
RE: ChatGPT for programming
(03-29-2023 03:24 PM)Roberto Volpi Wrote:Thank you for your reply and threads links! Note however that the threads are to comments posted in 2022 and before ChatGPT4. Anyone can just try ChatGPT4 and not rely on the opinion of others (including my own!). Importantly, it's not restricted to experts!(03-29-2023 02:25 PM)carey Wrote: My experience using ChatGPT as an RPN and RPL programming assistant has been positive. Programming is a fun activity and doesn't need ChatGPT, but for programs that go beyond recreational math, where the output might actually matter, it can be helpful in many ways as long as it is not relied on entirely (at least at present! ). |
|||
03-29-2023, 08:28 PM
(This post was last modified: 03-29-2023 08:29 PM by pier4r.)
Post: #6
|
|||
|
|||
RE: ChatGPT for programming
The problem with LLM is that they need to be trained on something. The best training data is natural language. For code, the more niche it becomes, the harder it gets (be it GPT 3,5 or GPT4).
Let's be honest there isn't the same amount of code in RPN as there is in python on the internet. Anyway I find that the biggest help would be using it for languages. Like "summarize this report", "provide me an outline for an article", "expand those ideas", "correct this paragraph", "describe this situation", "provide alternatives to this text" and so on. Even better with recommendations on (again) popular topics. Code of course is ok too, but mostly in common languages, otherwise one stays there fixing things a lot. It is great to get a start. Further one can ask about facts, like summaries of articles or books (a sort of review, before reading them). Anyway one still has to be educated in the field. Examples (just asked, as of 2023-03-29). Quote:could you provide me a summary of Galley Slave from Asimov?That's wrong (and I recommend the short story!) Quote:could you provide me a summary of "praises of idleness" of B. Russell?That is mostly correct, and I suggest you to read the original article. https://harpers.org/archive/1932/10/in-p...-idleness/ Quote:Could you provide a summary of "Feeling of power" from Asimov ?that's wrong again (and again I recommend the short story). This to say, GPT is jaw dropping for the fact that is able to form sentences that are much better than mine. That is the command of the language is incredible for an algorithm, even if the system doesn't know the meaning of things. Nonetheless when asked about facts, reasoning and so on, it may contain errors that are not easy to spot if one is not good already. Thus one needs to be good or prepared. How do I know if the summary is wrong, if I didn't read the original thing? How do I know that the code is wrong if I cannot code well? And so on. Wikis are great, Contribute :) |
|||
03-29-2023, 08:42 PM
Post: #7
|
|||
|
|||
RE: ChatGPT for programming
Wikis are great, Contribute :) |
|||
03-29-2023, 10:44 PM
Post: #8
|
|||
|
|||
RE: ChatGPT for programming
All My Articles & other Materials here: Valentin Albillo's HP Collection |
|||
03-30-2023, 12:37 AM
(This post was last modified: 03-30-2023 01:40 AM by TallKey.)
Post: #9
|
|||
|
|||
RE: ChatGPT for programming
(03-29-2023 10:44 PM)Valentin Albillo Wrote: . Rewind your clocks to 2003/2004... My rewrite of paragraph 1: Social Media can pose profound risks to society and humanity, as shown by extensive research and acknowledged by society. Social Media could represent a profound change in the history of life on Earth, and should be planned for and managed with commensurate care and resources. Unfortunately, this level of planning and management is not happening, even though last decades have seen these companies locked in an out-of-control race to develop and deploy ever more powerful echo chambers – not even their creators – can understand, predict, or reliably control. *2003/2004 are the launches of Myspace and FB. |
|||
03-30-2023, 01:19 AM
Post: #10
|
|||
|
|||
RE: ChatGPT for programming
Brings to mind the Fail Safe movie/book (Henry Fonda as U.S. president in the movie, JFK implied in the book) from 1964 (less than 2 years after the Cuban Missile Crisis) where the Soviet computer came up with the conclusion that it was an appropriate time to interfere with the Fail Safe communication hardware/system. The increasingly complex, multi-layered system was looked upon as having the inevitable failure. Scary then, scary now…
|
|||
03-30-2023, 02:49 AM
Post: #11
|
|||
|
|||
RE: ChatGPT for programming
.
This interesting 51-page PDF document is also quite on topic: ChatGPT for programming numerical methods
Additionally, we assess if ChatGPT can recognize if given codes are written by humans or machines. To reach this goal, we consider a variety of mathematical problems such as the Poisson equation, the diffusion equation, the incompressible Navier-Stokes equations, compressible inviscid flow, eigenvalue problems, solving linear systems of equations, storing sparse matrices, etc. Furthermore, we exemplify scientific machine learning such as physics-informed neural networks and convolutional neural networks with applications to computational physics. Through these examples, we investigate the successes, failures, and challenges of ChatGPT. Examples of failures are producing singular matrices, operations on arrays with incompatible sizes, programming interruption for relatively long codes, etc. Our outcomes suggest that ChatGPT can successfully program numerical algorithms in different programming languages, but certain limitations and challenges exist that require further improvement of this machine learning model." V. All My Articles & other Materials here: Valentin Albillo's HP Collection |
|||
03-30-2023, 09:09 AM
(This post was last modified: 03-30-2023 09:10 AM by pier4r.)
Post: #12
|
|||
|
|||
RE: ChatGPT for programming
Thank you valentin! Nice point TallKey.
I also asked a little questions. Quote:I want to make a function - pseudocode - that picks randomly between the numbers 0 to 7 and 20 to 23. How would you do it? Then it continues even if I say that the chat identified the problem but didn't solve it in the implementation. The interesting part is that the Issue is indeed recognized. Wikis are great, Contribute :) |
|||
03-30-2023, 09:23 AM
(This post was last modified: 03-30-2023 09:25 AM by Roberto Volpi.)
Post: #13
|
|||
|
|||
RE: ChatGPT for programming
(03-30-2023 09:09 AM)pier4r Wrote: Thank you valentin! Nice point TallKey. Identifying a problem (whatever it means) is not a great achievement. It is important to take into account that ChatGTP is, in a nutshell, a probabilist model to chain words, which meaning is given by the reader. It remember me of a monkey that has been taught with signs language: the monkey can learn sooner or later to master those signs meaning “give me a banana” or similar, but that’s it. Put a calculator into your life! |
|||
03-30-2023, 09:32 AM
Post: #14
|
|||
|
|||
RE: ChatGPT for programming
(03-30-2023 09:23 AM)Roberto Volpi Wrote: It is important to take into account that ChatGTP is, in a nutshell, a probabilist model to chain words, which meaning is given by the reader. yes this is known, see for example: https://en.wikipedia.org/wiki/Chinese_room Anyway I find what you describe a bit reductive. Imagine a database with all the answers that you need (in chess for example, a tablebase for endgames). They aren't intelligent but they provide answers anyway. My point was not on the "uh they are intelligent" (they may be according to some definition), rather "they identify points" (based on statistics or whatever other approach) and provide useful answers. Like calculators, they aren't smart, but they can solve problems. If the number of problem solved grows and grows, then the utility of a solution can skyrocket. The very fact that the language is well understood (despite my broken english) is incredible. For me GPT is incredible in languages (I use it to correct me!), less so in more technical stuff. Wikis are great, Contribute :) |
|||
03-31-2023, 01:26 AM
(This post was last modified: 03-31-2023 02:34 AM by pascal_meheut.)
Post: #15
|
|||
|
|||
RE: ChatGPT for programming
(03-30-2023 09:23 AM)Roberto Volpi Wrote: Identifying a problem (whatever it means) is not a great achievement. It seems to me you are wrong and misinformed. Such IAs have already been evaluated as tools to improve professional programmers productivity and the results are beyond impressive and never seen before. As most of the critics following you line of thought, you never define the very generic words you use to despise IA performance. Here is what a monkey cannot do: - help me code something I do not know when using a new API. ChatGPT did it last week and btw, I have been coding for the last 40 years, still do it professionally every day. And maybe you used some of my code if you ever played with the WP-34c emulators - solve "is there n and m integers where 2^n = 10^m" and give the exact answer - answer IT questions asked on a forum (tried that week too to help a newbie who had problem with multiple Python versions on Linux) - write the history of MRI and when asked, give more details about a specific period - behave like an interviewer to help someone train when applying to a job - pass misc exams such as LSAT, SAT math, AP Biology, AP Calculus BC, Uniform Bar Exam, Graduate Record Examination. Can you do so? And so many other things including "speak many, many languages, both human and programming". But you can still think that you are very smart and despise IA. You would be very disappointed when you discover that except for writing RPN code, their performance is better than yours in so many fields. |
|||
03-31-2023, 03:36 AM
Post: #16
|
|||
|
|||
RE: ChatGPT for programming
(03-31-2023 01:26 AM)pascal_meheut Wrote:(03-30-2023 09:23 AM)Roberto Volpi Wrote: Identifying a problem (whatever it means) is not a great achievement. Well, in this case I can't wait to see those new prodigious programmes compiled by ChatGTP for HP35S in this forum. Put a calculator into your life! |
|||
03-31-2023, 03:49 AM
Post: #17
|
|||
|
|||
RE: ChatGPT for programming
I do wonder how well it would recreate the HP 35 firmware.
All the data is in the model, so nothing novel is required. Pauli |
|||
03-31-2023, 05:54 AM
Post: #18
|
|||
|
|||
RE: ChatGPT for programming
(03-31-2023 03:49 AM)Paul Dale Wrote: I do wonder how well it would recreate the HP 35 firmware. It would not. It can do impressive things and be a very useful tool to increase our productivity. But it cannot do everything of course. This is a new tool and the smart thing to do is to learn what it can do, what it cannot, how to use it best. It takes some time to do so, an open mind, to read about it, etc. One can also reject it because it is new and explain why this is either useless or dangerous like people in the past did with writings, the Gutenberg printer, trains, cars, pencils, pocket calculators, computers, Internet, smartphone and many other things. |
|||
03-31-2023, 09:49 AM
Post: #19
|
|||
|
|||
RE: ChatGPT for programming
(03-31-2023 01:26 AM)pascal_meheut Wrote: - solve "is there n and m integers where 2^n = 10^m" and give the exact answer I was intrigued by this and asked, likely my version is a bit more trolling that yours (I use the free account, I have the playground account of the API but I don't want to go there every time) Quote:is there n and m integers where 2^n = 10^m ? I agree with the rest of the point that one should see the strong points of the solution and use those. For example natural language as I already said. The Interview mockup is also interesting. Wikis are great, Contribute :) |
|||
03-31-2023, 09:55 AM
Post: #20
|
|||
|
|||
RE: ChatGPT for programming
[quote='pier4r' pid='170800' dateline='1680256184']
I was intrigued by this and asked, likely my version is a bit more trolling that yours (I use the free account, I have the playground account of the API but I don't want to go there every time) [quote] ChatGPT is not very good with such problems. GPT-4 is much better and it is the one I quoted. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 4 Guest(s)