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

> From: Mathieu Bouchard <[email protected]>
> To: Jonathan Wilkes <[email protected]>
> Cc: Chris McCormick <[email protected]>; Miller Puckette <[email protected]>; 
> "[email protected]" <[email protected]>
> 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 <[email protected]>
>>>  [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
>

_______________________________________________
[email protected] mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list

Reply via email to