Forum: Ruby RubyMacros 0.1.4 Released

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Caleb C. (Guest)
on 2009-05-22 20:37
(Received via mailing list)
RubyMacros version 0.1.4 has been released!

* <>
* <>

RubyMacros is a lisp-like macro pre-processor for Ruby. More than just a
purely textual substitution scheme, RubyMacros can manipulate and morph
Ruby parse trees (in the form of RedParse Nodes) at parse time in just
any way you see fit. Macros are programmed in ruby itself.

 * Powerful and easy metaprogramming
 * Create better DSLs
 * Manipulate syntax trees to suit yourself
 * Access local variables and other caller context unavailable to
 * Macros as inline methods: should be slightly faster than equivalent

Although in theory already as powerful as lisp macros, the current
implementation has a number of problems which added together make it
a proof of concept or toy at this point:
 * pre-processing is very, very slow (because of RedParse)
 * macro calls must be inside some sort of method;
 * straight out macro calls at the top level won't work
 * macros can't have blocks or receivers
 * some ruby syntax is unsupported in files using macros
 * files using macros must be loaded via Macro.require;
 * Kernel#require will not recognize macros
 * macros cannot be scoped
 * no variable (or other) hygiene


### 0.1.4 / 2009-05-21
* 1 Major Enhancement:
  * line numbers are now preserved in preprocessed code;
  *   backtraces should make more sense.
* 1 Minor Enhancement:
  * updated to keep in sync with the latest RedParse api (sigh)

* <>
* <>
This topic is locked and can not be replied to.