hi,
it seems now, with 0.37, that pd cannot find usual help files because it systematically prepends "help-" to the searched file, mm, that's annoying for the tons of objects that register their own help files in separate directory like pidip/my-help-file.pd.
from s_path.c : strcpy(realname, "help-");
results into :
tried /usr/local/pd-0.37-test7/pidip/help-help_pdp_imgloader.pd and
failed
tried
/usr/local/pd-0.37-test7/doc/5.reference/help-help_pdp_imgloader.pd and failed
sorry, couldn't find help for "help_pdp_imgloader.pd"
sorry, but the error message is even wrong. i'd rather this rule be removed if you don't mind.
cheers, sevy
On Sunday, Sep 14, 2003, at 22:16 America/New_York, Yves Degoyon wrote:
hi,
it seems now, with 0.37, that pd cannot find usual help files because it systematically prepends "help-" to the searched file, mm, that's annoying for the tons of objects that register their own help files in separate directory like pidip/my-help-file.pd.
from s_path.c : strcpy(realname, "help-");
results into :
tried /usr/local/pd-0.37-test7/pidip/help-help_pdp_imgloader.pd and
failed
tried
/usr/local/pd-0.37-test7/doc/5.reference/help-help_pdp_imgloader.pd and failed
sorry, couldn't find help for "help_pdp_imgloader.pd"
sorry, but the error message is even wrong. i'd rather this rule be removed if you don't mind.
The whole 'help-' thing is a bit of a mess right now since Pd is automatically prepending help- to the name of the help file, even if it was declared with a class_sethelpsymbol() with a help- already prepended. So I see a couple options to remedy the situation:
1) #if PD_MINOR_VERSION < 37 || !defined(PD_MINOR_VERSION) class_sethelpsymbol(audience_class_tilde, gensym("help-audience~.pd")); #endif (but that's a whooole lot of objects to edit, basically almost every object in the CVS)
2) /* strcpy(realname, "help-"); */ /* strncat(realname, name, MAXPDSTRING-5); */ strncat(realname, name, MAXPDSTRING); ... post("sorry, couldn't find help for "%s"", realname); (there is probably a better way to do this, but you get the idea)
3) writing code to only prepend 'help-' if it isn't already there.
#2 sounds like the easiest and most expedient option, but I don't know entirely what the repercussions would be, if any. #3 sounds like the best for the long haul. #1 sounds like a ton of menial work.
.hc
I tried to remove the "help-" prefix and got into severe (but stupid) problems... The reason they're there is so that abstractions won't try to load themselves when you ask for help on them. But I should have designed the "sethelp" feature not to prepend the name. Now it's too complicated to back out of that (100s of names I would break again by taking it out!)
I did fix the wording of the error message at least... cheers Miller
On Sun, Sep 14, 2003 at 10:16:06PM -0400, Yves Degoyon wrote:
hi,
it seems now, with 0.37, that pd cannot find usual help files because it systematically prepends "help-" to the searched file, mm, that's annoying for the tons of objects that register their own help files in separate directory like pidip/my-help-file.pd.
from s_path.c : strcpy(realname, "help-");
results into :
tried /usr/local/pd-0.37-test7/pidip/help-help_pdp_imgloader.pd and
failed
tried
/usr/local/pd-0.37-test7/doc/5.reference/help-help_pdp_imgloader.pd and failed
sorry, couldn't find help for "help_pdp_imgloader.pd"
sorry, but the error message is even wrong. i'd rather this rule be removed if you don't mind.
cheers, sevy
PD-dev mailing list PD-dev@iem.at http://iem.at/cgi-bin/mailman/listinfo/pd-dev
Hello all,
I've always been of the opinion that PD help documents should be:
a) named "help-"& objectname &".pd (actually, just objectname&".pd was fine with me, but I enjoyed the change in 0.37)
b) never group two or more objects (such as the "help-acoustics.pd" document)
c) always located in the doc/5.reference folder regardless of 'native' or 'external' relationship to PD
d) be accessible from within PD (i.e. a .pd document)
Would these rules simplify or complicate the problem?
Regards, Dave Sabine
-----Original Message----- From: pd-dev-admin@iem.at [mailto:pd-dev-admin@iem.at] On Behalf Of Miller Puckette Sent: September 15, 2003 10:44 PM To: Yves Degoyon Cc: pd-dev@iem.kug.ac.at Subject: Re: [PD-dev] pd 0.37 and help patches
I tried to remove the "help-" prefix and got into severe (but stupid) problems... The reason they're there is so that abstractions won't try to load themselves when you ask for help on them. But I should have designed the "sethelp" feature not to prepend the name. Now it's too complicated to back out of that (100s of names I would break again by taking it out!)
I did fix the wording of the error message at least... cheers Miller
hi,
I see! I renamed my .../doc/5.reference/zexy folder to .../doc/5.reference/help-zexy and all helpfiles can be opened again.
marius.
I tried to remove the "help-" prefix and got into severe (but stupid) problems... The reason they're there is so that abstractions won't try to load themselves when you ask for help on them. But I should have
designed
the "sethelp" feature not to prepend the name. Now it's too complicated
to
back out of that (100s of names I would break again by taking it out!)
I did fix the wording of the error message at least... cheers Miller
Hallo, Miller Puckette hat gesagt: // Miller Puckette wrote:
I tried to remove the "help-" prefix and got into severe (but stupid) problems... The reason they're there is so that abstractions won't try to load themselves when you ask for help on them. But I should have designed the "sethelp" feature not to prepend the name. Now it's too complicated to back out of that (100s of names I would break again by taking it out!)
I could try to come up with a clever regular expression (from my web devel. days) for replacing all in one go. Is it just about adding "help-" back into the object sources?
ciao
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Le 16 Septembre 2003 05:02, Frank Barknecht a écrit :
Hallo,
Miller Puckette hat gesagt: // Miller Puckette wrote:
I tried to remove the "help-" prefix and got into severe (but stupid) problems... The reason they're there is so that abstractions won't try to load themselves when you ask for help on them. But I should have designed the "sethelp" feature not to prepend the name. Now it's too complicated to back out of that (100s of names I would break again by taking it out!)
I could try to come up with a clever regular expression (from my web devel. days) for replacing all in one go. Is it just about adding "help-" back into the object sources?
I use a perl script to remove all "help-" prefix before compiling PD, because it's easier to browse the documentation without the "help-" prefix. About the abstraction problem, why do abstractions needs separate help patches?
- -- Marc
Hi Marc,
You have to have a separate name for abstraction help patches because (as of version 0.37) Pd looks in the directory the patch came from for the help window. This allows people to "bundle" several extern versions, plus a fallback abstraction, plus the help window, all in one directory for easy installation.
cheers Miller
On Tue, Sep 16, 2003 at 09:27:26AM -0400, Marc Lavalle wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Le 16 Septembre 2003 05:02, Frank Barknecht a écrit :
Hallo,
Miller Puckette hat gesagt: // Miller Puckette wrote:
I tried to remove the "help-" prefix and got into severe (but stupid) problems... The reason they're there is so that abstractions won't try to load themselves when you ask for help on them. But I should have designed the "sethelp" feature not to prepend the name. Now it's too complicated to back out of that (100s of names I would break again by taking it out!)
I could try to come up with a clever regular expression (from my web devel. days) for replacing all in one go. Is it just about adding "help-" back into the object sources?
I use a perl script to remove all "help-" prefix before compiling PD, because it's easier to browse the documentation without the "help-" prefix. About the abstraction problem, why do abstractions needs separate help patches?
Marc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQE/Zw++QdzoeKQ0PccRAnmSAJ9Y/sq+LumeMnD94wt3dW90kGsGuwCeIPVs AjK2/KMkHcsiA6xNauHCse4= =WPcS -----END PGP SIGNATURE-----
PD-dev mailing list PD-dev@iem.at http://iem.at/cgi-bin/mailman/listinfo/pd-dev
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Le 16 Septembre 2003 12:01, vous avez écrit :
Hi Marc,
You have to have a separate name for abstraction help patches because (as of version 0.37) Pd looks in the directory the patch came from for the help window. This allows people to "bundle" several extern versions, plus a fallback abstraction, plus the help window, all in one directory for easy installation.
I like to embed help, comments and even examples in my abstactions, so I don't have to provide a seperate help patch. But I understand your point. Then maybe using "-help.pd" as a suffix instead of "help-" as a prefix would be a better idea, for readability, but I guess that's totally subjective. Another solution would be to use a different extension for help patches, something like ".pdh".
- -- Marc
Now why didn't I think of that?
OK, so as not to uproot people again I'll make it search for both, but let's regard "metro-help.pd", etc., as the preferred form.
cheers Miller
On Tue, Sep 16, 2003 at 12:35:18PM -0400, Marc Lavalle wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Le 16 Septembre 2003 12:01, vous avez écrit :
Hi Marc,
You have to have a separate name for abstraction help patches because (as of version 0.37) Pd looks in the directory the patch came from for the help window. This allows people to "bundle" several extern versions, plus a fallback abstraction, plus the help window, all in one directory for easy installation.
I like to embed help, comments and even examples in my abstactions, so I don't have to provide a seperate help patch. But I understand your point. Then maybe using "-help.pd" as a suffix instead of "help-" as a prefix would be a better idea, for readability, but I guess that's totally subjective. Another solution would be to use a different extension for help patches, something like ".pdh".
Marc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQE/ZzvGQdzoeKQ0PccRAuXTAJ4turTlhiCvx3abATCiZZfErgusWQCgq4Z8 /aVWcQ3y42FN6aYXPsYfUCs= =WsXu -----END PGP SIGNATURE-----
PD-dev mailing list PD-dev@iem.at http://iem.at/cgi-bin/mailman/listinfo/pd-dev
So... Frank... feel like writing some fearsome regex for this? Let's see what cases I can come up with:
This is my format:
PACKAGE: HELP FILE NAME SETHELPSYMBOL
ext13: *.pd class_sethelpsymbol(*_class, gensym("*")); ggee: *.pd (no class_sethelpsymbol)
maxlib: help-*.pd #ifndef MAXLIB class_sethelpsymbol(*_class, gensym("help-*.pd")); #else class_sethelpsymbol(*_class, gensym("maxlib/help-*.pd")); #endif
unauthorized: help-*.pd class_sethelpsymbol(*_class, gensym("help-*.pd"));
zexy: *.pd class_sethelpsymbol(*_class, gensym("zexy/*"));
There are other cases, but that's just what I came up with quickly.
.hc
On Tuesday, Sep 16, 2003, at 13:55 America/New_York, Miller Puckette wrote:
Now why didn't I think of that?
OK, so as not to uproot people again I'll make it search for both, but let's regard "metro-help.pd", etc., as the preferred form.
cheers Miller
On Tue, Sep 16, 2003 at 12:35:18PM -0400, Marc Lavalle wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Le 16 Septembre 2003 12:01, vous avez écrit :
Hi Marc,
You have to have a separate name for abstraction help patches because (as of version 0.37) Pd looks in the directory the patch came from for the help window. This allows people to "bundle" several extern versions, plus a fallback abstraction, plus the help window, all in one directory for easy installation.
I like to embed help, comments and even examples in my abstactions, so I don't have to provide a seperate help patch. But I understand your point. Then maybe using "-help.pd" as a suffix instead of "help-" as a prefix would be a better idea, for readability, but I guess that's totally subjective. Another solution would be to use a different extension for help patches, something like ".pdh".
Marc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQE/ZzvGQdzoeKQ0PccRAuXTAJ4turTlhiCvx3abATCiZZfErgusWQCgq4Z8 /aVWcQ3y42FN6aYXPsYfUCs= =WsXu -----END PGP SIGNATURE-----
PD-dev mailing list PD-dev@iem.at http://iem.at/cgi-bin/mailman/listinfo/pd-dev
PD-dev mailing list PD-dev@iem.at http://iem.at/cgi-bin/mailman/listinfo/pd-dev
Hallo, Hans-Christoph Steiner hat gesagt: // Hans-Christoph Steiner wrote:
So... Frank... feel like writing some fearsome regex for this? Let's see what cases I can come up with:
Well, as those are from different packages using different idioms, several regexps would be the easiest. In Pd itself everything is done the same way.
This is my format:
PACKAGE: HELP FILE NAME SETHELPSYMBOL
ext13: *.pd class_sethelpsymbol(*_class, gensym("*"));
replace 'class_sethelpsymbol(*_class, gensym("' with for example 'class_sethelpsymbol(*_class, gensym("help-' to add "help-" It's not really hard.
ggee: *.pd (no class_sethelpsymbol)
Uses the default, so nothing to do.
maxlib: help-*.pd #ifndef MAXLIB class_sethelpsymbol(*_class, gensym("help-*.pd")); #else class_sethelpsymbol(*_class, gensym("maxlib/help-*.pd")); #endif
This is tricky at a first look. But basically it also just is: s/(class_sethelpsymbol.*?)help-*.pd/$1*.pd/ or similar.
To append "-help" to the end of the file use:
$ perl -pi.bak -e 's/(class_sethelpsymbol.*?)help-*.pd/$1*-help.pd/' maxlib/*.c
This is a bit naive in that it assumes that the help-symbol definition is on one line. It's too late here to think about how to do multiline regexps. You probably just have to search for a closing brace.
unauthorized: help-*.pd class_sethelpsymbol(*_class, gensym("help-*.pd"));
See maxlib.
zexy: *.pd class_sethelpsymbol(*_class, gensym("zexy/*"));
See maxlib.
There are other cases, but that's just what I came up with quickly.
I think, external packages should be fixed by the maintainers. If there is a consensus, things should be rather easy to adapt.
ciao
On Tuesday, Sep 16, 2003, at 17:43 America/New_York, Frank Barknecht wrote:
Hallo, Hans-Christoph Steiner hat gesagt: // Hans-Christoph Steiner wrote:
So... Frank... feel like writing some fearsome regex for this? Let's see what cases I can come up with:
Well, as those are from different packages using different idioms, several regexps would be the easiest. In Pd itself everything is done the same way.
I was hoping to see a super-human regex with lots crazy chars! ;) I am sure it makes more sense to do them individually. But I just thought of something: the regex would ideally put in an "#if PD_MINOR_VERSION <37" and maintain a working version for both >=0.37 and <0.37. But this could be a real pain. So how tied are we to supporting old versions?
This is my format:
PACKAGE: HELP FILE NAME SETHELPSYMBOL
ext13: *.pd class_sethelpsymbol(*_class, gensym("*"));
replace 'class_sethelpsymbol(*_class, gensym("' with for example 'class_sethelpsymbol(*_class, gensym("help-' to add "help-" It's not really hard.
ggee: *.pd (no class_sethelpsymbol)
Uses the default, so nothing to do.
The files have to be renamed to *-help.pd though.
maxlib: help-*.pd #ifndef MAXLIB class_sethelpsymbol(*_class, gensym("help-*.pd")); #else class_sethelpsymbol(*_class, gensym("maxlib/help-*.pd")); #endif
This is tricky at a first look. But basically it also just is: s/(class_sethelpsymbol.*?)help-*.pd/$1*.pd/ or similar.
To append "-help" to the end of the file use:
$ perl -pi.bak -e 's/(class_sethelpsymbol.*?)help-*.pd/$1*-help.pd/' maxlib/*.c
This is a bit naive in that it assumes that the help-symbol definition is on one line. It's too late here to think about how to do multiline regexps. You probably just have to search for a closing brace.
Based on my informal poll, I think every class_sethelpsymbol I saw was on one line. But it would be best if the regex was multi-line aware... I haven't done much with multi-line regexs so I don't think I could offer much help.
unauthorized: help-*.pd class_sethelpsymbol(*_class, gensym("help-*.pd"));
See maxlib.
zexy: *.pd class_sethelpsymbol(*_class, gensym("zexy/*"));
See maxlib.
There are other cases, but that's just what I came up with quickly.
I think, external packages should be fixed by the maintainers. If there is a consensus, things should be rather easy to adapt.
This, in combination with Marc's perl script for renaming the files themselves, and looks like we have a solution. Marc: does your script rename help-*.pd files to *-help.pd also?
I think it would probably be easiest once we have the regexs and the perl script if someone just did all of the help files in CVS, unless anyone objects. I am willing (I think...) to do this with perl script and regex in hand. I am very eager to have a fully functional version of my new MacOS X distro. Then I can settle in and start some Pd projects that I have for October.
.hc
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Le 16 Septembre 2003 15:22, Hans-Christoph Steiner a écrit :
So... Frank... feel like writing some fearsome regex for this?
I already have perl scripts for that purpose. They're crude, but they work well. I must go now, but I'll check that later. - -- Marc
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Le 16 Septembre 2003 18:08, Marc Lavallée a écrit :
Le 16 Septembre 2003 15:22, Hans-Christoph Steiner a écrit :
So... Frank... feel like writing some fearsome regex for this?
I already have perl scripts for that purpose. They're crude, but they work well. I must go now, but I'll check that later.
Ok, here's the perl script (only one). It modifies the PD source files and rename the help patches with a "help-" prefix or a "-help" suffix, and it tries to move all help patches from a library into a a correspondant help subfolder. I use it successfully with both the PD source code and the pd-externals package. To learn how to use it, read the source... It should work on Linux, MacOSX and Cygwin.
- -- Marc
On Tue, 16 Sep 2003, Hans-Christoph Steiner wrote:
So... Frank... feel like writing some fearsome regex for this? Let's see what cases I can come up with:
Actually the point of the CVS would be that those who put code up there maintain it. Which means the problem should solve itself.
.. yes wishful thinking ...
Guenter
This is my format:
PACKAGE: HELP FILE NAME SETHELPSYMBOL
ext13: *.pd class_sethelpsymbol(*_class, gensym("*"));
ggee: *.pd (no class_sethelpsymbol)
maxlib: help-*.pd #ifndef MAXLIB class_sethelpsymbol(*_class, gensym("help-*.pd")); #else class_sethelpsymbol(*_class, gensym("maxlib/help-*.pd")); #endif
unauthorized: help-*.pd class_sethelpsymbol(*_class, gensym("help-*.pd"));
zexy: *.pd class_sethelpsymbol(*_class, gensym("zexy/*"));
There are other cases, but that's just what I came up with quickly.
.hc
On Tuesday, Sep 16, 2003, at 13:55 America/New_York, Miller Puckette wrote:
Now why didn't I think of that?
OK, so as not to uproot people again I'll make it search for both, but let's regard "metro-help.pd", etc., as the preferred form.
cheers Miller
On Tue, Sep 16, 2003 at 12:35:18PM -0400, Marc Lavalle wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Le 16 Septembre 2003 12:01, vous avez �crit :
Hi Marc,
You have to have a separate name for abstraction help patches because (as of version 0.37) Pd looks in the directory the patch came from for the help window. This allows people to "bundle" several extern versions, plus a fallback abstraction, plus the help window, all in one directory for easy installation.
I like to embed help, comments and even examples in my abstactions, so I don't have to provide a seperate help patch. But I understand your point. Then maybe using "-help.pd" as a suffix instead of "help-" as a prefix would be a better idea, for readability, but I guess that's totally subjective. Another solution would be to use a different extension for help patches, something like ".pdh".
Marc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQE/ZzvGQdzoeKQ0PccRAuXTAJ4turTlhiCvx3abATCiZZfErgusWQCgq4Z8 /aVWcQ3y42FN6aYXPsYfUCs= =WsXu -----END PGP SIGNATURE-----
PD-dev mailing list PD-dev@iem.at http://iem.at/cgi-bin/mailman/listinfo/pd-dev
PD-dev mailing list PD-dev@iem.at http://iem.at/cgi-bin/mailman/listinfo/pd-dev
PD-dev mailing list PD-dev@iem.at http://iem.at/cgi-bin/mailman/listinfo/pd-dev
Hallo, Marc Lavallée hat gesagt: // Marc Lavallée wrote:
About the abstraction problem, why do abstractions needs separate help patches?
I'd love help patches for abstractions and I will try it tomorrow if it is possible now. Abstractions can get quite difficult and compilcated and it is very useful to have a reference patch for complex abstractions.
ciao
Marc Lavallée wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Le 16 Septembre 2003 05:02, Frank Barknecht a écrit :
Hallo,
Miller Puckette hat gesagt: // Miller Puckette wrote:
I tried to remove the "help-" prefix and got into severe (but stupid) problems... The reason they're there is so that abstractions won't try to load themselves when you ask for help on them. But I should have designed the "sethelp" feature not to prepend the name. Now it's too complicated to back out of that (100s of names I would break again by taking it out!)
I could try to come up with a clever regular expression (from my web devel. days) for replacing all in one go. Is it just about adding "help-" back into the object sources?
I use a perl script to remove all "help-" prefix before compiling PD, because it's easier to browse the documentation without the "help-" prefix. About the abstraction problem, why do abstractions needs separate help patches?
i don't really see the point here, i've never seen any help patch for an abstraction, still it's boring not to be able to set up your own help patches in a separate directory ( i thought gem's people would complain ).
anyway, why changing rules ?? ( well no rules, no rules is better )
cheers, sevy