On 09/02/14 07:59, Jonathan Wilkes wrote:
On 02/08/2014 01:40 PM, Martin Peach wrote:
A few years ago I implemented a patch for strings in Pd that adds a string or blob type that allows (I think) for what you are describing. I believe it's still part of Pd extended, but Miller didn't like it for some reason.
...
I prefer to manipulate strings in a another language as it just seems like a lot of work to make it happen with boxes and wires when you can just call string functions in a high level language.
...
Kind of like building a Turing machine holes-in-paper-tape version of a program, it can be an interesting exercise but practically it's useless.
Read in transcript of congressional testimony on NSA surveillance. Split into one string for each line. Read one line every second. If a line contains the word "terrorism" make a sound. User takes a drink.
Totally useful. :)
What is it about boxes connected with lines that you think makes this difficult?
Perhaps it is the long term and very well established resistance to adding a few types to the message syntax ... integers capable of indexing reasonable file lengths, strings which don't flood the symbol table, floats that aren't in danger of being truncated, bytes or chars which won't trigger parsing issues. Matrices are available via an external library (gridflow, within its own externals including non-native print and so forth) and GPU video access is possible via GEM with its private message syntax, but core Pd is very focussed on what it originally set out to do. There have been some moves on this, just very slow and careful ones.
A graphical dataflow language is very nice for dealing with DSP and with control and interaction logic, and for doing so in a bunch of machines distributed over a network. Pd has lots of good ways to receive and send control messages and link with hardware and other programs. But dataflow and procedural algorithms are quite different and parsing strings is a very common thing to do when programming ... if you are familiar with the procedural way and have a good set of tools available to abstract the details then its easier to just go with what you know.
It would be nice to be able to do this natively, especially since many Pd programmers are not that familiar with procedural programming. It is certainly practical and worthwhile to extend Pd for this but that requires some of the things that have been long put off till later for a very very long time. Meanwhile the Lua external provides the way to do what remains problematic natively (as much due to policy as anything else) and anyone capable of adding functionality to Pd will find it much much easier to use Lau than to engage in a huge and perhaps fruitless effort to push it into Pd.
Simon