A Chat with ChatGPT: Peerless Intelligence

AI Thread Summary
ChatGPT is effective for conversationally presenting information and assisting with code conversion inquiries, such as converting Matlab and Fortran code to Julia. While manual conversion is often recommended for accuracy and understanding, tools like "MATLAB.jl" and community-created scripts can aid the process. However, there are no official tools like "f2j" for Fortran to Julia conversion, and users should be cautious of compatibility issues. ChatGPT may provide incorrect information, including non-existent URLs for tools, highlighting its limitations in delivering specific factual content. The potential integration of Wolfram Alpha with ChatGPT is anticipated to enhance its factual accuracy and analytical capabilities.
Messages
15,437
Reaction score
10,135
I recently ran a chat session with ChatGPT. For me, ChatGPT is best used in searching for things and having the results presented in a conversational readable manner.

In my chat, I was curious about conversion tools for other code into Julia code. I asked ChatGPT and got these responses:

NOTE: (The dialog below was also run through Grammarly in preparation for this post which caught some minor mistakes and rewrote a couple of sentences)

---- ChatGPT session ------------------------------

How to convert MatLab code to Julia?


Converting Matlab code to Julia code can be done manually by going through the Matlab code and rewriting it in Julia. However, there are also tools available that can assist in this process. One such tool is the "MATLAB-to-Julia" tool, a Python script that converts a subset of Matlab code to Julia.

Another alternative is using the package "MATLAB.jl," which provides a Julia interface to MATLAB using the MATLAB Engine API for Python.

It's recommended to test the code after conversion and ensure it runs correctly and produces the same output as the original Matlab code.

How to convert FORTRAN code to Julia?

Converting Fortran code to Julia code can be done manually by going through the Fortran code and rewriting it in Julia. However, there are also tools available that can assist in this process.

One such tool is the "f2j" tool, a Fortran to Julia translator. It's a python script that can convert a subset of Fortran code to Julia. Another alternative is using the package "Fortran.jl" which aims to provide an easy and efficient way to call Fortran code from Julia.

It's recommended to test the code after conversion and ensure it runs correctly and produces the same output as the original Fortran code.

It's also good to be aware that Julia and Fortran have some differences in syntax and behavior so that you might encounter some compatibility issues.

What is the URL of the f2j tool?

I apologize for the confusion. There isn't an official "f2j" tool for converting Fortran code to Julia. It was a mistake in my previous response. Some community-made projects might help with this task, but it needs to be an official tool.

A possible alternative is using a general-purpose code translator such as "Translate" from Rosetta Code. It's a tool that allows you to translate code from one programming language to another.

It's also good to note that manually converting the code might be the best option, as it will give you a better understanding of the code and ensure that it works correctly in Julia.

What is the URL for the rosetta code translate tool?

I'm very sorry for my previous statement. Rosetta Code does not have a tool for code translation. Rosetta Code is a website that provides a collection of example code snippets for different programming languages. The website can be accessed at the following URL:

https://rosettacode.org/

Other general-purpose code translator tools are available, such as "code translator" or "code converter," that can be found with a simple web search. Still, they might need help to handle all the specificities of Fortran and Julia, and you should expect some errors or compatibility issues when using them.

It's also good to note that manually converting the code might be the best option, as it will give you a better understanding of the code and ensure that it works correctly in Julia.

What is the URL for MATLAB-to-Julia" tool?

I'm very sorry for any confusion. The MATLAB-to-Julia tool I mentioned in the previous response is not an official tool or a specific package, it was a mistake in my previous response. Some community-made projects might help with this task, but they are not official tools. Some of these projects can be found on GitHub or other open-source platforms.

An alternative to this would be using the package "MATLAB.jl," which provides a Julia interface to MATLAB by using the MATLAB Engine API for Python. This package allows you to call MATLAB functions and scripts directly from Julia, which can help convert MATLAB code to Julia code. You can find more information on how to use the package and its documentation on the following link:

https://github.com/JuliaInterop/MATLAB.jl

It's also good to note that manually converting the code might be the best option, as it will give you a better understanding of the code and ensure that it works correctly in Julia.

---- End of ChatGPT session ------------------------------

You can see that ChatGPT rephrases the question and then proceeds to answer it. I suspect that fits in with the predictive generative text algorithm ie special logic rephrases the question followed by using it as a seed to begin the generative/predictive part.

ChatGPT has no problem giving you believable but demonstrably false information and then apologizes for it when called out, as seen in its providing URL's for non-existent code conversion tools.
 
  • Like
Likes anorlunda and jack action
Computer science news on Phys.org
jedishrfu said:
ChatGPT has no problem giving you believable but demonstrably false information and then apologizes for it when called out, as seen in its providing URL's for non-existent code conversion tools.
That seems consistent with the language basis for ChatGPT. When answers need language and regurgitated advice, it does well. I read in the news that ChatGPT did well on bar exams, medical licensing exams, and MBA graduate exams. When answers require specific facts , or analysis, it is weak. In some...hat union may fortify the AI's weakest areas.
 
We had a tour guide who told us to feel free to ask him anything. If he knows the answer he'll tell us and if not he'll make something up.
 
  • Like
Likes Wrichik Basu and Vanadium 50
Here’s Sixty Symbols take on ChatGPT using GCSE questions from physics and math

 
  • Like
  • Haha
Likes Jarvis323, gleem and Tom.G
In my discussions elsewhere, I've noticed a lot of disagreement regarding AI. A question that comes up is, "Is AI hype?" Unfortunately, when this question is asked, the one asking, as far as I can tell, may mean one of three things which can lead to lots of confusion. I'll list them out now for clarity. 1. Can AI do everything a human can do and how close are we to that? 2. Are corporations and governments using the promise of AI to gain more power for themselves? 3. Are AI and transhumans...
Thread 'ChatGPT Examples, Good and Bad'
I've been experimenting with ChatGPT. Some results are good, some very very bad. I think examples can help expose the properties of this AI. Maybe you can post some of your favorite examples and tell us what they reveal about the properties of this AI. (I had problems with copy/paste of text and formatting, so I'm posting my examples as screen shots. That is a promising start. :smile: But then I provided values V=1, R1=1, R2=2, R3=3 and asked for the value of I. At first, it said...
i am customizing a Linux distro [arch] into love os which I am building to impress my crush. I had an idea to integrate an ai model into the Linux system so it can speak like me but romantically. but I don't know what or how to do. I don't know the basic concept of Linux but yet I am customizing my os purely relying on chat gpt and perplexity. when i ask chat gpt about this it said to fine tune an ai model and integrate to the Linux distro and my friend said for the data to be fed to the ai...
Back
Top