My 2nd date with ChatGPT
After my previous article with ChatGPT, I continued chatting with it. I was pleasantly surprised to see that it does understand the context, but how I need to find out. In some situations, it does lose it. So, until I know how it does it, when it is correct and in what scenarios it fails to do it, my curiosity will continue to scratch my brain. Here is my conversation with ChatGPT in my 2nd date
Question : Between R and Python, which language is more popular?
Answer :
It is difficult to say which programming language is more popular overall, as different languages are more popular in different fields and among different groups of people. However, in the data science and statistical analysis community, both R and Python are widely used and are considered to be among the most popular programming languages
R is a programming language that is particularly well-suited for statistical analysis and data visualization. It is widely used in academia and research, and is the primary language used in many data analysis and statistical software packages.
Python is a general-purpose programming language that is widely used in many fields, including data science, web development, and scientific computing. It is known for its simplicity, readability, and flexibility, and is often used as a first language for people learning to program.
Both R and Python have strong communities of users and developers, and there are many resources available for learning and using these languages. Ultimately, the choice of which language to use will depend on your specific needs and goals, as well as your personal preferences..
:Question
Question: Does the general-purpose language support multi-threading?
Answer:
Yes, Python is a general-purpose programming language that supports multi-threading
Multi-threading is a technique that allows a program to execute multiple threads concurrently, in order to improve the performance of the program and make better use of available system resources. In Python, the threading module provides support for creating and managing threads.
To create a new thread in Python, you can define a new Thread object and pass it a function or method to be executed as the thread's target. The Thread object can then be started using the start() method, which will run the target function in a new thread.
It kept the context in mind while answering this question. I partially produced the answer above, this time it also spoke about the GIL(Global interpreter lock). So, one thing is sure that the response is not deterministic.
Question : Does the language support object oriented principles?
Answer : Yes, Python is an object-oriented programming (OOP) language and supports all of the major OOP principles
In Python, everything is an object, and objects can have attributes (data) and methods (functions). Python's OOP features include class inheritance, polymorphism, and encapsulation..
It maintained the context again
领英推荐
Question : What about the other language?
Answer : R is a programming language that is primarily used for statistical analysis and data visualization. It is a powerful tool for exploring, manipulating, and visualizing data, and is widely used in fields such as data science, finance, and economics
Like Python, R is an object-oriented programming (OOP) language and supports many of the major OOP principles. In R, objects are created using classes, and objects can have attributes (data) and methods (functions).
I was pleasantly surprised to see it maintained the context again
Question : which of the below mentioned syntax are supported in Python?
Here, i was expecting that it will ask "Which ones", but it failed. It went ahead and answered the question as below
Answer : Here are the syntax elements that are supported in Python
Variables: Variables are used to store values in Python. They are created when you assign a value to them, and the value can be of any data type, such as a number, string, or list. For example::
So, the model is able to do bi-directional context where it is able to use the context from both sides of the sentence and not only that, it seems to be understanding the language like we do. But in some cases, like the above one, it is failing. I need to have more dates with the solution to understand it better. My main objective would be to know where it may fail and in those scenarios, what additional controls can be brought in to gracefully recover from the failure.
Sr. Program Manager | Cyber Security | Cloud Computing | Payments | ServiceNow
1 年Quite interesting Sir !
AVP, Head of DevOps practice at Infosys
1 年Interesting to read about contex
Data enthusiast to the core, a learner at heart
1 年Interesting viewpoints by #chatgpt3 ...imho #Python is yet to evolve as a true #multithreading programming language due to GIL