Sunday, March 07, 2010

Added functions to betterbatch and debugging on the horizon

I was expecting function to be not so hard (just another way of
running a few steps) but it took a little bit of time all the same.

I got it implemented (though no tests for it yet) and it seems OK, I
will know better how it works when I get around to using it (hopefully
in the next week). Weekends for the tool and weekdays for using the
tool in production :)

With this addition I think the language definition is more or less
complete I think. I can imagine tweaking it a bit, fixing bugs etc,
but I don't expect to implement many other language constructs.

One of the next things that I am planning to implement is a simple
debugger (step through statements, print variable value, maybe change
variable values, etc). I was expecting this to be a fairly major
undertaking but again Python and it's community come to the rescue.
Right on cue

a) Catherine Devlin mentioned cmd2 on her blog,
which made me look at cmd in the Python standard library
b) I found the Python documentation a bit dry (or else I had very
little patience) so googled for some examples - and Doug Hellmann's
excellent PyMOTW (
if you don't know it - bookmark it!) popped up with some good examples
and great documentation.

I found that I was able to throw together a simple debugger (next,
print_var, print_vars, etc)

So this means that a debugger is really easy to write - and is a much smaller task than I was hoping. Maybe next weekend I get the debugger implementation finished.

No comments:

Post a Comment