I just saw the alternate loader patch and really like that idea. It would be handy to write externals in any script language too. Since IOhannes and I have also just written alternate loaders of sorts (HEX and libdir), it would be good to incorporate these two patches with yours and get it into the Pd-extended builds to try it out.
There isn't enough info for me to include your patch, to start with, a diff -uw (with context) would make for a more flexible patch. Also, I didn't see how to add new loader functions (I've never worked with pointers to functions in C).
You can see IO's and my patches in CVS in packages/patches. loaderHEX-0.39-1.patch and libdir-0.38-4.patch. Both apply smoothly to 0.38.4 and pd in CVS.
.hc
________________________________________________________________________ ____
"[W]e have invented the technology to eliminate scarcity, but we are deliberately throwing it away to benefit those who profit from scarcity." -John Gilmore
Hans-Christoph Steiner schrieb:
I just saw the alternate loader patch and really like that idea. It would be handy to write externals in any script language too. Since IOhannes and I have also just written alternate loaders of sorts (HEX and libdir), it would be good to incorporate these two patches with yours and get it into the Pd-extended builds to try it out.
true
There isn't enough info for me to include your patch, to start with, a diff -uw (with context) would make for a more flexible patch. Also, I didn't see how to add new loader functions (I've never worked with pointers to functions in C).
i updated the tracker item with a -uw patch and a small usage example. I hope things are clearer now - it's simplistic.
You can see IO's and my patches in CVS in packages/patches. loaderHEX-0.39-1.patch and libdir-0.38-4.patch. Both apply smoothly to 0.38.4 and pd in CVS.
don't forget that i'm under Windows where patching tools are not that comfortable. Also, i never work with Miller's version, so i can't be sure whether the patch applies ok there.
best greetings, Thomas
On 23 Nov 2005, at 11:25, Thomas Grill wrote:
Hans-Christoph Steiner schrieb:
I just saw the alternate loader patch and really like that idea. It would be handy to write externals in any script language too. Since IOhannes and I have also just written alternate loaders of sorts (HEX and libdir), it would be good to incorporate these two patches with yours and get it into the Pd-extended builds to try it out.
true
What do you guys mean by 'any scripting language'? Do you mean that literally, as in one would be able to use python or ruby or perl or whatever to write a PD external?!
cheers,
d
-- David Plans Casal Researcher, UEA Studios d.casal at uea dot ac dot uk http://www.davidcasal.com
Hi David,
I just saw the alternate loader patch and really like that idea. It would be handy to write externals in any script language too. Since IOhannes and I have also just written alternate loaders of sorts (HEX and libdir), it would be good to incorporate these two patches with yours and get it into the Pd-extended builds to try it out.
true
What do you guys mean by 'any scripting language'? Do you mean that literally, as in one would be able to use python or ruby or perl or whatever to write a PD external?!
yes... the problem now is that there has to be a host object (like pyext) to load a script which then acts like a PD external. This could be handled much more direct if a scripted external could be loaded in class scope (as opposed to object scope). You could, for example, just type [myext.py 1 2 3] to load your Python-scripted myext external then. Clearly, it's a longer way to get there, but modifying the class loader is the first step.
best greetings, Thomas
On 23 Nov 2005, at 11:42, Thomas Grill wrote:
yes... the problem now is that there has to be a host object (like pyext) to load a script which then acts like a PD external. This could be handled much more direct if a scripted external could be loaded in class scope (as opposed to object scope). You could, for example, just type [myext.py 1 2 3] to load your Python-scripted myext external then. Clearly, it's a longer way to get there, but modifying the class loader is the first step.
Wow. That's really great. Can't wait!
d
-- David Plans Casal Researcher, UEA Studios d.casal at uea dot ac dot uk http://www.davidcasal.com
On Nov 23, 2005, at 6:25 AM, Thomas Grill wrote:
Hans-Christoph Steiner schrieb:
I just saw the alternate loader patch and really like that idea. It would be handy to write externals in any script language too. Since IOhannes and I have also just written alternate loaders of sorts (HEX and libdir), it would be good to incorporate these two patches with yours and get it into the Pd-extended builds to try it out.
true
There isn't enough info for me to include your patch, to start with, a diff -uw (with context) would make for a more flexible patch. Also, I didn't see how to add new loader functions (I've never worked with pointers to functions in C).
i updated the tracker item with a -uw patch and a small usage example. I hope things are clearer now - it's simplistic.
You can see IO's and my patches in CVS in packages/patches. loaderHEX-0.39-1.patch and libdir-0.38-4.patch. Both apply smoothly to 0.38.4 and pd in CVS.
don't forget that i'm under Windows where patching tools are not that comfortable. Also, i never work with Miller's version, so i can't be sure whether the patch applies ok there.
In case you are interested, it doesn't apply to the HEAD of pd MAIN.
hans@sla:src > patch < ~/cvs/pure-data/packages/patches/testing/loader-uw.patch (Stripping trailing CRs from patch.) patching file m_pd.h Hunk #1 succeeded at 429 with fuzz 2 (offset -68 lines). (Stripping trailing CRs from patch.) patching file s_loader.c Hunk #1 FAILED at 46. Hunk #2 FAILED at 72. Hunk #3 FAILED at 118. Hunk #4 FAILED at 143. Hunk #5 FAILED at 156. Hunk #6 FAILED at 169. 6 out of 6 hunks FAILED -- saving rejects to file s_loader.c.rej
.hc
________________________________________________________________________ ____
¡El pueblo unido jamás será vencido!
On Nov 23, 2005, at 6:25 AM, Thomas Grill wrote:
Hans-Christoph Steiner schrieb:
I just saw the alternate loader patch and really like that idea. It would be handy to write externals in any script language too. Since IOhannes and I have also just written alternate loaders of sorts (HEX and libdir), it would be good to incorporate these two patches with yours and get it into the Pd-extended builds to try it out.
true
There isn't enough info for me to include your patch, to start with, a diff -uw (with context) would make for a more flexible patch. Also, I didn't see how to add new loader functions (I've never worked with pointers to functions in C).
i updated the tracker item with a -uw patch and a small usage example. I hope things are clearer now - it's simplistic.
Thanks, I'll check it out.
You can see IO's and my patches in CVS in packages/patches. loaderHEX-0.39-1.patch and libdir-0.38-4.patch. Both apply smoothly to 0.38.4 and pd in CVS.
don't forget that i'm under Windows where patching tools are not that comfortable. Also, i never work with Miller's version, so i can't be sure whether the patch applies ok there.
That's what Cygwin is for! Now you have no excuse ;)
.hc
________________________________________________________________________ ____
There is no way to peace, peace is the way. -A.J. Muste
On Wed, 23 Nov 2005, Hans-Christoph Steiner wrote:
I just saw the alternate loader patch and really like that idea. It would be handy to write externals in any script language too.
How so? Is there now a hook so that pyext can register the .py suffix, and gridflow, the .rb suffix? How does it work?
____________________________________________________________________ Mathieu Bouchard - tél:+1.514.383.3801 - http://artengine.ca/matju Freelance Digital Arts Engineer, Montréal QC Canada
On Nov 23, 2005, at 11:49 AM, Mathieu Bouchard wrote:
On Wed, 23 Nov 2005, Hans-Christoph Steiner wrote:
I just saw the alternate loader patch and really like that idea. It would be handy to write externals in any script language too.
How so? Is there now a hook so that pyext can register the .py suffix, and gridflow, the .rb suffix? How does it work?
Check out Thomas' patch on the patch tracker website.
.hc ________________________________________________________________________ ____
¡El pueblo unido jamás será vencido!
Hi Mathieu,
I just saw the alternate loader patch and really like that idea. It would be handy to write externals in any script language too.
How so? Is there now a hook so that pyext can register the .py suffix, and gridflow, the .rb suffix? How does it work?
see the example in the patch tracker. You are registering a loader hook, which can react on a classname it recognizes, e.g. one with a .rb ending.
all the best, Thomas