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:Aug 7, 2008 11:36:25 pm
List:at.iem.pd-list

Sorry all for my silence!! I've been deadly busy this week and it looks like it will continue for another few days. But, rest assured, my obsession cannot be squashed and we'll need plenty of criticism to make a useful guide, so fire away :).

Everyone's suggestions are wonderful so far. I'm so glad to have you all contributing. I'm going to start by organizing this thread by categories (as soon as I get the wikipage issue figured out, below), and then it should be pretty clear which are most chaotic (in a good way) and which need more input.

On Tue, Jul 29, 2008 at 10:35 AM, Hans-Christoph Steiner <ha@eds.org> wrote:

Can I suggest using the MoinMoin wiki syntax? IMHO the python wikis all have weak syntax compared to MediaWiki, but MoinMoin is the closest to MediaWiki, which is a widely used and relatively easy to use syntax. It is also what is used in most of the rest of the 'docs' section. To use MoinMoin, the page has to be a "wiki page". A regular Plone "page" doesn't allow it for some reason.

Hey, I am getting: Site error This site encountered an error trying to fulfill your request. The errors were:

Error Type BadRequest Error Value The id "outline" is reserved. Request made at 2008/08/03 10:45:39.063 GMT+2

when I try to add a wiki page to the Style Guide folder. Could you or IOhannes try, maybe?

I just discovered that you fixed it IOhannes, thanks very much! Back to work then. Cheers Luke

Best Luke

Also, to make an index page for that folder, create a page called "FrontPage" or "index_html" IIRC. I think that would be a good place to lay out all of the things that are relevant to the style guide, like a survey of programming elements. Then people can make their own style pages for things that are a matter of opinion. And hopefully at the end, we can come up with something unified.

.hc

On Jul 29, 2008, at 2:30 AM, Luke Iannini wrote:

Okay, here it is: http://puredata.info/docs/style-guide

On Mon, Jul 28, 2008 at 1:39 PM, Hans-Christoph Steiner <ha@eds.org> wrote:

I think a style guide is a great idea. There have been some discussions along these lines in the past. I'd say just start a "wiki folder" on puredata.info in the /docs/ section and edit it up. Something like /docs/style-guide/ I think that the main page could lay out all of the possible realms of style, like dollar arguments, abstractions, subpatches, inlets/outlets, trigger, etc. Then the next step people can create sub-pages that outline all of their styles. Then ultimately, things would be organized into a single style-guide.

.hc

On Jul 27, 2008, at 9:34 PM, 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/

The only one I have seen so far for Pd covers best practices for layout. I'd want to include that, but also codify naming, arguments, common idioms, and so on.

I've begun to collect some of my practices to start things off. 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] * * 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) * 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]. * When working with stereo, Left and Right pairs are written with Le and Ri appended (to distinguish them from an R denoting "receive", above)

Programming recommendations * To invert a toggle, use [== 0] * Use the loadbang of the parent of both abstractions to initialize two or more interdependent abstractions

[1] I think of this like emulating the "self" convention in Python

And so on... Cheers Luke

Terrorism is not an enemy. It cannot be defeated. It's a tactic. It's about as sensible to say we declare war on night attacks and expect we're going to win that war. We're not going to win the war on terrorism. - retired U.S. Army general, William Odom

Looking at things from a more basic level, you can come up with a more direct solution... It may sound small in theory, but it in practice, it can change entire economies. - Amy Smith