Explore Courses Blog Tutorials Interview Questions
0 votes
in AI and Deep Learning by (50.2k points)

A new web application may require adding Artificial Intelligence (AI) in the future, e.g. using ProLog. I know it can be done from a Java environment, but I am wondering about the opportunities with modern web languages like Ruby or Python. The latter is considered to be "more scientific" (at least used in that environment), but using Google there seems to be a preliminary ProLog implementation for both.

Any suggestions on modern (open source) web languages (like Python or Ruby) in combination with AI?

1 Answer

0 votes
by (108k points)

Python has all the most suitable packages and things for numeric computing.

But why is the Python ecosystem better? What leads to that? I believe that it has to do with the fact that Python was designed from the beginning so extension modules could be written in C—Not just the ability to call C libraries, but to write 3rd-party modules that behave exactly like Python modules in the runtime. This is also possible in Ruby, but I have the impression it was opened up for the creation of extension packages somewhat later. In Python, the creation of C extensions is commonplace, and Python was originally very popular with veteran C programmers who used the language as high-level “glue” for their fast C libraries. This was also how it got its start in numeric computing: Scientists who knew C wrote extensions using C and Fortran for doing advanced vector and matrix operations that now serve as the foundation for Python’s numeric stack. It had these libraries long before any other dynamic languages could do these kinds of things efficiently, and it’s been building up from that foundation for a long time.

I think the culture of C extensions around Python is the main reason it has become more popular than Ruby and all other dynamic languages, especially in this domain. Some might argue that Python syntax is easier to learn, but Ruby syntax is also very nice, so I don’t see this as being as big a deal as compared to a language like Perl.

I would recommend this Ruby on Rails course online by Intellipaat.

Browse Categories