[PD] (breaking symbols) was Re: find a list of numbers in a text file

Jonathan Wilkes jancsika at yahoo.com
Sun Sep 4 22:56:15 CEST 2011


----- Original Message -----

> From: Mathieu Bouchard <matju at artengine.ca>
> To: Jonathan Wilkes <jancsika at yahoo.com>
> Cc: Chris McCormick <chris at mccormick.cx>; Miller Puckette <msp at ucsd.edu>; "pd-list at iem.at" <pd-list at iem.at>
> Sent: Sunday, September 4, 2011 4:07 PM
> Subject: Re: [PD] (breaking symbols) was Re: find a list of numbers in a text file
> 
> On Sun, 4 Sep 2011, Jonathan Wilkes wrote:
> 
>>>  From: Mathieu Bouchard <matju at artengine.ca>
>>>  [max] does output the greater of two numbers.
>> 
>>  Ha!  Then my _misunderstanding_ is that [max 5] = "make 5 the maximum 
> value that can come out of the outlet".  I have to open the help file every 
> time I use [min] [max] to see which is the real behavior, and which the figment 
> of my imagination.
> 
> It's the same max and min as in math textbooks and as in a bunch of 
> programming languages and libraries.
> 
> http://www.cplusplus.com/reference/algorithm/max/
> http://reference.wolfram.com/mathematica/ref/Max.html
> http://developer.gnome.org/glib/2.29/glib-Standard-Macros.html#MAX:CAPS
> http://www.tutorialspoint.com/python/number_min.htm
> http://www.ruby-doc.org/core/classes/Enumerable.html#M001504
> http://php.net/manual/en/function.max.php
> etc
> 
> I don't recall ever seeing any language or library swap the meaning of min 
> and max. It seems to be very standard.

Why would any of them swap it?  It should be standard, and Pd does it 
the standard way.  But there's a reason I get confused by Pd's max and 
min objects and not by the syntax of those other languages:

Pd's syntax stands out against all those examples because it is the only one 
that explicitly shows only a single argument after the function name.  So while I 
could write the Pd syntax as "max y", it really means something more like 
max(x, y) where x is visually represented by a small black rectangle to the 
top left of the word "max".

When I type "max 15" in a box, it seems quite logical for my brain to interpret that 
as "maximum is 15", since I'm used to reading left to right and don't see any value 
but 15 written in the box. That's why I always have to open the help patch to remind 
myself how it works.  There's no such confusion when more than one argument 
is present, which is why, for example, I never have to check expr-help.pd when using 
its "max" function.

-Jonathan

> 
> _______________________________________________________________________
> | Mathieu Bouchard ---- tél: +1.514.383.3801 ---- Villeray, Montréal, QC
>



More information about the Pd-list mailing list