hello everyone,

i'm working on the next release of DRP and was just curious if any of
you have any suggestions/bugs/feature requests?

thus far i have added
 - the ability to load rules from files
 - filters on a rule basis, so you can define a method which runs after
or before all rule methods for some rule
 - a new syntax which will allow for much smarter display/navigation of
generated programs in the future

and am working on something like attributes in attribute grammars
although i'm not sure yet if it'll get included.
and also will be trying to get inheritance to work properly where
inherited classes of an extended class not only inherit
rule methods but can redifine them and add new ones.

a sneak peak at the new version from the symbolic regression example:

  def bin_op_print x, y
    puts x, y
    [x,y]
  end
  pre_rule_filter :bin_op, :bin_op_print

  define_rules :require => 'math_basic' do # math_basic rules in file
loaded

    max_depth 2..4

    # using these rules from file,  with current max_depth weight etc
    bin_op :multiply, :subtract, :divide, :add
    bin_op :exp do |x,y|
      x**y
    end

    # note you can still have them anonymous but you are better off
naming them
    # because then you can look at a stack trace and see something
meaningful
    # plus i'll be adding some tools for that purpose at some future
date

    bin_op do |x,y|  ...  end

    expr do
      #puts "op(expr,expr)"
      bin_op(expr, expr)
    end
    expr do
      #puts "@input"
      @input
    end
    expr do
      #puts "map"
      map -5..5, :i_lin
    end

  end

-- 
Posted via http://www.ruby-forum.com/.