PyMacroLanguage

PyML? {Plooflaargah <http://inamidst.com/eph/projname}? Doesn't matter. The idea is to create a wiki-programming language, for one person. What you do is you have a general purpose interpreter for a programming language, which has a set of extremely simple rules: i) START is the code to execute on the start of the file; ii) for each line in the file, if it matches REGEXP, you execute that code; iii) FINISH is the code to execute at the end of the file

In that way, you build up a programming language as you go along. For example, the first thing you might do is: language.bind('^#', lambda: 0) to set up comments. Then you might have: def start(self): self.globals = {} \n language.bind(START, start) and def set(self, m): self.globals[m.group(1)] = m.group(2) \n language.bind('(\S+) = (.+)', set) etc.

The idea is that you try to build up your own programming language from scratch based upon the devices that you most commonly use, and you learn a little about programming whilst you're doing it.

Dangers: a poorly constructed language might mean that you won't be using it for much, which means that it'll be beside the point. It'd be good only if you have the volition to invest in it.

* Posted by sbp on #d8uv.com at 2005-05-13 00:16:06 UTC.
Christopher Schmidt, and other various and sundry characters.
All code which runs this thing was stolen from sbp. Based on the original nœts site, circa 2003. Design by d8uv, xover, with help from the works of Eric Meyer. Any other people who were involved are also credited and thanked here, in this very small space: . Thank you.