AI Zone Admin Forum Add your forum

NEWS: Chatbots.org survey on 3000 US and UK consumers shows it is time for chatbot integration in customer service!read more..

OpenEuphoria programming language
 
 

I stated before that I was thinking about using Python for AI coding. However, several years ago I dabbled with RapidEuphoria, a very flexible dynamic language. It had a very impressive internal data representation called ‘sequences’, a little bit like LISP:

Arrays in many languages are constrained to have a xed number of elements, and those elements must all be of the same type. Euphoria eliminates both of those restrictions by dening all arrays (sequences) as a list of zero or more Euphoria objects whose element count can be changed at any time. You can easily add a new structure to the employee sequence above, or store an unusually long name in the NAME eld and Euphoria will take care of it for you. If you wish, you can store a variety of dierent employee “structures”, with dierent sizes, all in one sequence. However, when you retrieve a sequence element, it is not guaranteed to be of any type. You, as a programmer, need to check that the retrieved data is of the type you’d expect, Euphoria will not. The only thing it will check is whether an assignment is
legal. For example, if you try to assign a sequence to an integer variable, Euphoria will complain at the time your code does the assignment.

Not only can a Euphoria program represent all conventional data structures but you can create very useful, flexible structures that would be hard to declare in many other languages.

It seems to have more similarities to Lisp/Scheme. Because of this it seems like a great language for building AI-systems.

Back in the days it was a commercial package (albeit cheap) and I bought a license for it. A few years back they went Open Source (and changed the name from RapidEuphoria to OpenEuphoria) and the latest version has just been released a few months ago: http://openeuphoria.org/news/16.wc

 

 
  [ # 1 ]

Python is my language of choice. Lists (and dictionaries) in python have the same flexibility as Euphoria objects. And even more—you can assign a variable to data of any type and switch types as you like. (Though this can be dangerous as well!) How well supported is OpenEuphoria?

 

 
  [ # 2 ]

OpenEuphoria is nowhere near as popular (and therefore supported) as Python is. I did a quick search for some comparison information; it seems that functionality-wise Euphoria and Python are pretty much on par, each having their strong points. However, it seems that Euphoria code is much more compact then Python and that Euphoria beats Python (by a ling streak) when it comes to computational speed: http://www.rapideuphoria.com/bench.txt

As for the data-handling, it seems indeed that there are great similarities between Euphoria’s sequences and Python’s tuples.

 

 
  [ # 3 ]

http://www.devtopics.com/euphoria-obscure-programming-language-of-the-month/

Euphoria is not object-oriented, yet it achieves many of the benefits of OO languages in a simpler way.

 

 
  [ # 4 ]

I found a nice article about Euphoria. Especially some references towards LISP are interesting.

http://www.juliepetrusa.com/Euphoria.htm

 

 
  login or register to react