atom feed55 messages in at.iem.pd-listRe: [PD] Idiomatic Pd
FromSent OnAttachments
Luke IanniniJul 27, 2008 6:33 pm 
Luigi RensinghoffJul 28, 2008 4:01 am 
Hans-Christoph SteinerJul 28, 2008 1:39 pm 
Chris McCormickJul 28, 2008 7:48 pm 
Luke IanniniJul 28, 2008 9:48 pm 
Frank BarknechtJul 28, 2008 10:31 pm 
Luke IanniniJul 28, 2008 11:07 pm 
Luke IanniniJul 28, 2008 11:29 pm 
Frank BarknechtJul 28, 2008 11:53 pm 
IOhannes m zmoelnigJul 29, 2008 12:13 am 
Matt BarberJul 29, 2008 12:18 am 
Frank BarknechtJul 29, 2008 1:04 am 
Enrique ErneJul 29, 2008 5:01 am 
marius schebellaJul 29, 2008 7:01 am 
Matt BarberJul 29, 2008 7:28 am 
Frank BarknechtJul 29, 2008 8:39 am 
Matt BarberJul 29, 2008 9:41 am 
Hans-Christoph SteinerJul 29, 2008 10:29 am 
Hans-Christoph SteinerJul 29, 2008 10:33 am 
Hans-Christoph SteinerJul 29, 2008 10:34 am 
Frank BarknechtJul 29, 2008 11:04 am 
marius schebellaJul 29, 2008 11:23 am 
marius schebellaJul 29, 2008 11:25 am 
Hans-Christoph SteinerJul 29, 2008 12:09 pm 
Hans-Christoph SteinerJul 29, 2008 12:10 pm 
Mike McGonagleJul 29, 2008 12:40 pm 
Matt BarberJul 29, 2008 12:43 pm 
Thomas MayerJul 29, 2008 12:53 pm 
Matt BarberJul 29, 2008 1:28 pm 
Hans-Christoph SteinerJul 29, 2008 4:47 pm 
Frank BarknechtJul 30, 2008 12:16 am 
Frank BarknechtJul 30, 2008 1:01 am 
Chris McCormickJul 30, 2008 1:46 am 
Hans-Christoph SteinerJul 30, 2008 9:12 am 
Frank BarknechtJul 30, 2008 10:10 am 
marius schebellaJul 30, 2008 12:14 pm 
Frank BarknechtJul 30, 2008 12:34 pm 
Roman HaefeliJul 30, 2008 4:49 pm 
marius schebellaJul 30, 2008 6:08 pm 
Hans-Christoph SteinerJul 30, 2008 8:31 pm 
Hans-Christoph SteinerJul 30, 2008 8:44 pm 
Frank BarknechtJul 30, 2008 11:20 pm 
IOhannes m zmoelnigJul 31, 2008 12:33 am 
Damian StewartJul 31, 2008 1:11 am 
Roman HaefeliJul 31, 2008 1:16 am 
Matt BarberJul 31, 2008 1:24 am 
Roman HaefeliJul 31, 2008 1:56 am 
Matt BarberJul 31, 2008 3:29 am 
Frank BarknechtJul 31, 2008 8:14 am 
Hans-Christoph SteinerAug 1, 2008 1:48 pm.pd
Luke IanniniAug 3, 2008 2:02 am 
marius schebellaAug 3, 2008 12:32 pm 
Luke IanniniAug 7, 2008 11:36 pm 
IOhannes m zmölnigAug 7, 2008 11:54 pm 
Luke IanniniSep 19, 2008 4:53 am 
Subject:Re: [PD] Idiomatic Pd
From:Luke Iannini (luke@gmail.com)
Date:Jul 28, 2008 11:07:35 pm
List:at.iem.pd-list

Yo,

On Mon, Jul 28, 2008 at 10:31 PM, Frank Barknecht <fb@footils.org> wrote:

Hallo, Luke Iannini hat gesagt: // Luke Iannini wrote:

There are some amazing sets of abstractions being released recently, which has served to highlight the many extant styles of patching. I was wondering if there was interest in establishing a set of guidelines for patching in the vein of PEP 8 for Python; I've found that document to be very relaxing as it is a standardized approach to OCD. More seriously, it greatly helps when reading other people's code or collaborating. http://www.python.org/dev/peps/pep-0008/

I think, it would be important to first collect every possible style element in the wild and document what people are using in reality. That would be interesting. I'm not too much in favour of a style "guide" however. Let people be creative.

Agreed! Regarding the guide, well, no one is going to be kicked out of the community or have their patches burned for not adhering to the styleguide : ). If you would like to be creative in your lettering you are as free as ever to do so.

But, I think many people (including myself) would rather be creative in the functionality rather than the syntax, and for people such as that, they might as well all do the same thing so they don't invent even more arbitrary ways when they didn't really care to do so.

I've begun to collect some of my practices to start things off.

I added where I do things different.

I was hoping we could all lazy-vote the document together in this thread and I'll then compile it into a PdPedia/Pd.info document. So, feel free to object to or replace my propositions.

Style: * If giving $0 as an argument to an abstraction, it is always first in the argument list [1]

I often put it last (and it's specified to be that way e.g. in Memento)

My reasoning here is that $0 is probably the most common thing to pass to an abstraction, but abstractions have varying numbers of arguments, so $0 will sometimes be $3, sometimes $2, sometimes $7, and that swings my brain around. Putting it in the first slot means that $1 gains a sort of second meaning as "my parent's $0", which I think is handy.

And, the same memory-assistance applies to my numeric-ordering proposition as well; I usually remember how many arguments an abstraction has better than what order they're in, so when they're all taken from their parent I know it will be [mychild $0 $1 $2].

* * When possible, pass parent arguments in numeric order, like [child $0 $1 $2 other1 other2] etc. * Sends and Receives are written in camelCase, with "R" appended to complementary receives (e.g. in GUIs, $0mySlider for the send and $0mySliderR for the receive)

I use the underscore style sometimes but often a simple "dash" style: "r some-thing" instead of camelCase. My reason: It doesn't need any Shift-key-combinations on German keyboards, and I find camelCase hard to read.

When I want to name matching send/receive pairs I use $0-some-s and $0-some-r.

* When prepending $0 to a symbol, only add a "-" to separate it from another number, like [r $0-1stSend]. Otherwise the symbol should immediately follow, like [r $0mySend].

I always seperate $0 with a $0-dash. $0myGod is easy to misunderstand.

That's all cool, and I think you are in the majority on that. I think I just took camelCase because it reminded me of Smalltalk and Cocoa, which remind me of Pd : ).

Thanks for the comments Luke

* When working with stereo, Left and Right pairs are written with Le and Ri appended (to distinguish them from an R denoting "receive", above)

Nice idea. I never did that, though.

Ciao