[PD] towards better diff [was: Portuguese translation of the PD manual]

Mathieu Bouchard matju at artengine.ca
Sat Aug 14 01:58:36 CEST 2010

On Sat, 14 Aug 2010, Pedro Lopes wrote:

> How could pd's file structure could be easily changed to being more 
> "diffable"? Have you organized any thoughts on that?

First I thought about major changes to pd, replacing the object linked 
list of each canvas, by a std::map structure or anything else allowing to 
skip numbers. That way, for example, deleting an object doesn't have to 
renumber all following objects (in the sequence) such that all the 
'connect' lines involving the following objects have to change every time. 
The way I made it, you could also edit an object box's text (or a 
comment's text) while keeping it at the same place in the list. It's not a 
big change to the file format, but rather, a big change in pd's source 

But then, there are solutions that are more approachable from the 
perspective of writing only new externals or abstractions.

If comments are replaced by externals that store a hidden serial number or 
random number, then you can keep track of their changes without need for 
them to stay in the same order. I can write a small programme for doing 
that from the commandline, the problem being more how to write the 
external exactly.

Then there's the question of where to store the translation. When there 
are only two languages (or a few) it's tempting to put them all in the 
same file (the external would save and load each comment's English, 
French, Portuguese and German text all at once consecutively).

But for more languages and more people organised more loosely (and with a 
file format that doesn't work well with SVN) then it might be better to 
store translations in a separate file (how?).

  _ _ __ ___ _____ ________ _____________ _____________________ ...
| Mathieu Bouchard, Montréal, Québec. téléphone: +1.514.383.3801

More information about the Pd-list mailing list