Page 1 of 1

Convert a file from python

Posted: Tue Jul 24, 2012 6:09 pm
by rkappler
This is not really homework, I'm a public high school teacher and need help with an idea I have to help my "revisited' students learn logic and mathematical thinking. I am learning Lisp for the sheer joy of it and as I think it will fit into my classroom ideas quite handily (I'd be happy to discuss these off line or in a different post if desired), but I'm only a few weeks into it and this task is, (I think, at this point) beyond my skill level. I have the files I need to do what I want to do, but they're in python, and I really want to stick with Lisp. Can anyone either

a) convert a few python files to Lisp (they aren't terribly long)
b) guide me through converting them
c) look at the python files and give me an idea what exactly they do and how they do it so I can make their conversion part of my learning curve?

I'd really appreciate the help, though I realize it's a rather odd request, and please do accept my apology if this request is inappropriate.

The files are open source so I'm not trying to pull off anything nefarious, they are chatbot files, in particular a parser for AIML.

regards, Richard

Re: Convert a file from python

Posted: Tue Jul 24, 2012 9:29 pm
by nuntius
I can't guarantee any time to look at this, but could you post a link to the files?

Also, if you haven't seen it, you really should look at HtDP and Bootstrap.

Re: Convert a file from python

Posted: Tue Jul 24, 2012 9:39 pm
by rkappler
Sure, and thanks for the reply. It's pyaiml http://pyaiml.sourceforge.net
I understand the aiml files themselves, its just the parser I'm pretty clueless about. Not sure if I should just leave it as a python program and call it from within lisp or write it from scratch in lisp or maybe just use an XML parser?

Regards, Richard

Re: Convert a file from python

Posted: Wed Jul 25, 2012 8:21 pm
by nuntius
Yeah, you're probably best off using a general-purpose XML framework. I can't find any open code for AIML (only the closed Pandorabots).

Here's a list of the latest tags.

Using an XML library, you should be able to quickly get an AIML parser/generator framework put together.
It sounds like you already have a plan for the interpreter.