Hello.
(Sorry if this is a stoopid question but I could not find any answer on the list...)
How can I escape the space character in a symbol ????
'' is forbidden in pd... so what's the alternative ? It looks like ' and " are also not allowed...
Cheers. _y
Currently, there is no way to do an escape. There is some discussion about trying to implement a "quoting" method that would allows spaces...
I attached an example of how you can convert a list of symbols (and numbers) into a single symbol, which would include spaces. It depends on an external from 'zexy' (part of the extended stuff).
Mike
On Fri, Feb 6, 2009 at 8:28 PM, y yvan.pd@gmail.com wrote:
Hello.
(Sorry if this is a stoopid question but I could not find any answer on the list...)
How can I escape the space character in a symbol ????
'' is forbidden in pd... so what's the alternative ? It looks like ' and " are also not allowed...
Cheers. _y
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Yeah I know some ways to get around this with extended but I'm more into the vanilla-way-of-life =) I would love having a "quoting" method and/or an escaping character like \ . Of course I have no idea about the difficulty to implement that and I just found a message from Herr Puckette saying:
"I'm against adding a general escape mechanism, because I think it's better to find a design that obviate teh need for it..."
I still think that [open my\ file.txt( or [open "my file.txt"( is more elegant than dealing with a couple of messages and something like [addspace( in between though...
Cheers,
_y
Mike McGonagle wrote:
Currently, there is no way to do an escape. There is some discussion about trying to implement a "quoting" method that would allows spaces...
I attached an example of how you can convert a list of symbols (and numbers) into a single symbol, which would include spaces. It depends on an external from 'zexy' (part of the extended stuff).
I just make this abs and help to transform message with space to
symbol using pure-pd objects.
Based on the list-abs list-l2s.
++
Jack
Le 7 févr. 09 à 14:14, y a écrit :
Yeah I know some ways to get around this with extended but I'm more
into the vanilla-way-of-life =) I would love having a "quoting" method and/or an escaping character
like \ . Of course I have no idea about the difficulty to implement that and I just found a message from Herr Puckette saying:"I'm against adding a general escape mechanism, because I think it's better to find a design that obviate teh need for it..."
I still think that [open my\ file.txt( or [open "my file.txt"( is more elegant than dealing with a couple of messages and
something like [addspace( in between though...Cheers,
_y
Mike McGonagle wrote:
Currently, there is no way to do an escape. There is some discussion about trying to implement a "quoting" method that would allows spaces...
I attached an example of how you can convert a list of symbols (and numbers) into a single symbol, which would include spaces. It depends on an external from 'zexy' (part of the extended stuff).
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/ listinfo/pd-list
Thanks for your effort Jack, but somehow I cannot get your abstraction working. It also does not work if I try with a basic example without spaces in the filename... Am I missing something ?
(And [symbol] is part of pddp)
Cheers, _y
Jack wrote:
I just make this abs and help to transform message with space to symbol using pure-pd objects. Based on the list-abs list-l2s. ++
Oops, of course ! I forget to attach it. ++
Jack
Le 7 févr. 09 à 18:00, Steffen Juul a écrit :
On 07/02/2009, at 17.38, y wrote:
Am I missing something ?
does the Pd console tell you that list-drip was not created? list- drip is part of list-abs.
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/ listinfo/pd-list
On Sat, 7 Feb 2009, y wrote:
"I'm against adding a general escape mechanism, because I think it's better to find a design that obviate teh need for it..."
see also: http://lists.puredata.info/pipermail/pd-list/2005-07/029546.html http://lists.puredata.info/pipermail/pd-list/2005-07/029556.html
Basically, it's really rare among popular programming languages to get away with not having some kind of escape mechanism or else something nearly equivalent to an escape mechanism which isn't taking much more room than a plain string.
In Pd, your only way to handle this without editing .pd files in a text editor, is to use multiple objects just for constructing the string... and before Pd 0.40 it also required externals.
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard - tél:+1.514.383.3801, Montréal, Québec
On Feb 8, 2009, at 9:29 AM, Mathieu Bouchard wrote:
On Sat, 7 Feb 2009, y wrote:
"I'm against adding a general escape mechanism, because I think it's better to find a design that obviate teh need for it..."
see also: http://lists.puredata.info/pipermail/pd-list/2005-07/029546.html http://lists.puredata.info/pipermail/pd-list/2005-07/029556.html
Basically, it's really rare among popular programming languages to
get away with not having some kind of escape mechanism or else
something nearly equivalent to an escape mechanism which isn't
taking much more room than a plain string.In Pd, your only way to handle this without editing .pd files in a
text editor, is to use multiple objects just for constructing the
string... and before Pd 0.40 it also required externals.
Do you have any examples of full-fledged languages that don't have an
escaping mechanism?
.hc
All information should be free. - the hacker ethic
On Sun, Feb 08, 2009 at 10:05:31PM -0500, Hans-Christoph Steiner wrote:
On Feb 8, 2009, at 9:29 AM, Mathieu Bouchard wrote:
On Sat, 7 Feb 2009, y wrote:
"I'm against adding a general escape mechanism, because I think it's better to find a design that obviate teh need for it..."
see also: http://lists.puredata.info/pipermail/pd-list/2005-07/029546.html http://lists.puredata.info/pipermail/pd-list/2005-07/029556.html
Basically, it's really rare among popular programming languages to
get away with not having some kind of escape mechanism or else
something nearly equivalent to an escape mechanism which isn't
taking much more room than a plain string.In Pd, your only way to handle this without editing .pd files in a
text editor, is to use multiple objects just for constructing the
string... and before Pd 0.40 it also required externals.Do you have any examples of full-fledged languages that don't have an
escaping mechanism?
Escaping mechanism would be rad. Also nice would be built-in support for the following data types/structures:
Also nice would be a standard syntax for expressing these data such as json or yaml, or something similar to C or another modern language. Pd's symbols-delimited-by-spaces approach is one of the big reasons why building synthesizers & effects is the only task I ever choose Pd for. Luckily it does that task extremely well. The other reasons are lack of introspection, and lack of dynamic patching that is non-buggy and consistent. (oh, and the fact that [netsend] and [netreceive] are both one-way communicators that should have been a single two-way communication external).
Almost every modern language has at least one of these basic features, and that is why I still stubbornly refuse to call Pd a programming language. It may be turing complete, but it's not useful for general purpose programming. It definately could be though, and the irony is that if it supported all of these general programming language features, it would be a lot easier to build synthesizers too.
Note that I criticize it because I love it. :)
Best,
Chris.
On Mon, 9 Feb 2009, Chris McCormick wrote:
Almost every modern language has at least one of these basic features, and that is why I still stubbornly refuse to call Pd a programming language. It may be turing complete, but it's not useful for general purpose programming. It definately could be though, and the irony is that if it supported all of these general programming language features, it would be a lot easier to build synthesizers too.
That irony is also the reason why special-purpose programming languages are less adapted to survive than special-purpose libraries (in general-purpose programming languages) are.
It's also why pretty much any special-purpose computer died or evolved into a general-purpose computer, long long ago. Even general-purpose CPUs in special-purpose devices encourage the conversion of that device into a general-purpose device. Look at mobile "phones"... or any game console running Linux.
But there are people who still want to believe in it. It led to a flurry of so-called "web programming languages", which are basically undistinguishable from non-web programming languages.
Note that I criticize it because I love it. :)
But how many people don't understand that?
(If you criticise it, it must be because you Hate Freedom!)
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard - tél:+1.514.383.3801, Montréal, Québec
On Sun, 8 Feb 2009, Hans-Christoph Steiner wrote:
Do you have any examples of full-fledged languages that don't have an escaping mechanism?
I used to make rather large programmes using QuickBASIC, which had doublequote-delimited strings in which you could have spaces, but newlines had to be made using a CHR$(13) function call and then concatenated using +.
The equivalent in Pd is more cumbersome because plugging several boxes together is more cumbersome than writing something grammatical, which is why [expr] is used so much, for example. It's also more cumbersome because space is a frequent character but there are very few languages that forbid it in string literals and/or symbols. LOGO (except ColorLOGO) was like this, but had also other features to compensate, that Pd doesn't have.
It can also be a speed issue, but with Pd 0.40, a $1$2$3$4$5$6$7$8$9 message box can do it in one pass, just like how the several [sprintf] externals can do it because they're not limited the way [makefilename] is.
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard - tél:+1.514.383.3801, Montréal, Québec