From: Steven Arnold Date: 2005-09-18T01:06:49+09:00 Subject: macros/little languages? Hi, I have just recently learned Ruby and I really enjoy it. One thing I have not found that would be nice is a facility for easily developing little languages based on Ruby, sometimes referred to as a macro facility. I say "based on Ruby" because I would like to be able to specify that a certain block is to be interpreted as standard Ruby. For example, it might be nice if I could do something like: defworkflow MyAction conditions end action end cleanup end end This might be the beginning of a general workflow system. A workflow action has certain conditions that must hold before its action can be invoked; an action that then can take place; and cleanup to take care of any loose ends. So my questions: (1) Are there any tools out there that do something like this now? (2) Is there any way to get Ruby to compile a block of code programmatically without executing it? I.e. compile the code and return me the bytecodes. (3) Given a set of bytecodes, is there a programmatic way to cause Ruby to execute them? Thanks in advance, steve