[PD-dev] Refactoring Pure Data

Mathieu Bouchard matju at artengine.ca
Wed Sep 13 01:01:26 CEST 2006


On Tue, 12 Sep 2006, Miller Puckette wrote:

> My top priority for Pd is to finish getting the 'language' defined.  I 
> don't see this as an open-ended pursuit

If Pd isn't open-ended then it will have to be superceded...

> another year or so of fooling with 'data structures' seems to be the 
> main remaining thing.

... and I mean especially because you don't realize what's left to be 
changed in the language.

> I don't see much point in rewriting existing code

You should distinguish between several "degrees" of rewriting, or in other 
words, not conflate refactoring and plain rewriting. Not doing so 
constitutes a strawman argument.

> I want to do some heavy run-time profiling to find out what really needs 
> improvement.

I don't see why improving the speed of pd should be your main concern, 
especially considering your disgust for SIMD.

> I think Vincent is right on about the need for better error handling.

I've improved some of this: I changed error() and fprintf() and post() to 
pd_error() where it can be done, so that they can be found with the "Find 
Last Error" feature. Also I removed class names from error messages 
because those are redundant if you "Find Last Error", and misleading if 
they were telling the wrong classname like some of yours.

My future plans include getting error messages translated in Deutsch, 
Bokmål, Français, etc.; and making them hyperlinked, as a faster Find Last 
Error that doesn't just find the last one; and also choosing one of the 
possible error handling schemes.

> This is also, partly, a design issue, since patches themselves sometimes 
> need a mechanism for detecting errors.

I've described several possibilities for such mechanisms in various mails 
to pd-list and pd-dev in the last years. Got no answers. I need it in 
order to be able to implement a significant portion of PureUnity. Before 
then I'll most likely reread what Winston&Horn's LISP book has to say 
about error handling.

> the data traversal objects need to get finalized first.

A lot of error statements are in the data traversal classes' code or in 
other code that they commonly use. This could be a nice testbed for better 
error handling.

  _ _ __ ___ _____ ________ _____________ _____________________ ...
| Mathieu Bouchard - tél:+1.514.383.3801 - http://artengine.ca/matju
| Freelance Digital Arts Engineer, Montréal QC Canada


More information about the Pd-dev mailing list