Re: [PD-dev] BUG: namespace prefixes broken in 0.40

2006-11-01 Thread Mathieu Bouchard

On Wed, 1 Nov 2006, Hans-Christoph Steiner wrote:


 [declare -import (foo bar)] - GF-style nested lists
 [declare -import foo bar] - use dash-prefixed symbols as delimiters
 [declare, import foo bar] - use comma as delimiter


One very important aspect of Pd is its very minimal syntax.


It depends on which part of Pd you're looking at. Let's say that you're 
looking at everything that confirms your point; then you're not looking at 
datastructures. For example:


  [plot -y amp(0:100)(0:100) a 500 2 5 30]

I advocate use of consistent syntax all over pd. Consistency is more 
important than minimality. If pd's syntax is too minimal, it encourages 
small syntax hacks that aren't portable to the rest of the pd system, such 
as -y amp(0:100)(0:100).



I think its quite important to preserve that.


Pd's syntax doesn't so much deserve to be called simple ... simplistic 
is more like it. Any non-recursive grammar is bound to get to a dead-end 
in which small syntax hacks proliferate.


but I don't really like any of the above options.  Pd is not Ruby, Tcl, 
C, UNIX, etc. and it shouldn't follow those conventions without really 
good reasons to break the current syntax.


This is called Not Invented Here, the concept that one system should not 
borrow conventions from another system. It's an important concept that has 
been used for designing many systems, and ironically, one that many 
systems designers have borrowed from each other. 
(http://en.wikipedia.org/wiki/Not_Invented_Here)


It's not possible to break the current syntax because there's no current 
syntax.



Adding commas and () in object boxes is totally unprecedented


GridFlow is a precedent for both initbang commas and nested lists, but it 
doesn't count because it was not designed by Miller. There is also 
precedent for @ keywords in the work of Thomas Grill and also of Joshua K 
Clayton but it doesn't count because it was not designed by Miller. There 
is also precedent for - keywords in the work of Krzysztof Czaja but it 
doesn't count because it was not designed by Miller.



and I can't see any benefit.


because it's not designed by Miller and because you're not thinking about 
any of the other object classes that could benefit from those syntax 
extensions. Even though [plot] would have needed it, [plot] introduces its 
own precedent which is sufficient justification by itself, because it was 
designed by Miller.


I definitely agree we should have a standard way of doing this kind of 
thing,


By reading you, I doubt that you mean that we should have a standard way 
of doing keyword arguments. Is it that you are only thinking about 
namespaces and nothing else? I'm not only thinking about namespaces. 
You're replying to a mail where more than just namespaces are considered.


Perhaps this extended syntax is useful in other situations, but I think 
this situation could easily be taken care of using only current syntax:


Right, we don't absolutely need keyword arguments, nested lists and 
initbang messages in objectboxes. I'm only talking about those things 
because a syntax similar to keyword arguments has been proposed and 
because I've seen similar patterns occur in the pd world, but I don't mean 
the pd world that has just Miller in it, I mean all externals, and not 
just the subset of pd-extended that agrees with Miller's practice (minus 
[plot]).


I think it could make more sense to have the global settings controlled by 
messages.



[;pd import foo bar( [;pd path foo bar(


[import foo bar(
 |
[s $0-canvas]

[namecanvas $0-canvas]

 _ _ __ ___ _  _ _ ...
| Mathieu Bouchard - tél:+1.514.383.3801 - http://artengine.ca/matju
| Freelance Digital Arts Engineer, Montréal QC Canada___
PD-dev mailing list
PD-dev@iem.at
http://lists.puredata.info/listinfo/pd-dev


[PD-dev] [ pure-data-Bugs-1371511 ] declaration of `y1' shadows a global declaration

2006-11-01 Thread SourceForge.net
Bugs item #1371511, was opened at 2005-12-01 23:41
Message generated for change (Comment added) made by sf-robot
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detailatid=478070aid=1371511group_id=55736

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: puredata
Group: None
Status: Closed
Resolution: None
Priority: 5
Private: No
Submitted By: Hans-Christoph Steiner (eighthave)
Assigned to: Miller Puckette (millerpuckette)
Summary: declaration of `y1' shadows a global declaration

Initial Comment:

When using math.h on Darwin, the y1 variable causes
lots of warnings.

../../pd/src/g_canvas.h:247: warning: declaration of
`y1' shadows a global declaration
/usr/include/architecture/ppc/math.h:483: warning:
shadowed declaration is here

Renaming y1 in g_canvas.h would fix this problem.

--

Comment By: SourceForge Robot (sf-robot)
Date: 2006-11-01 19:20

Message:
Logged In: YES 
user_id=1312539

This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).

--

Comment By: Mathieu Bouchard (matju)
Date: 2006-10-18 06:47

Message:
Logged In: YES 
user_id=801174

Whatever about calling functions y0,y1,yn, they've been
there since almost the beginning of unix. They're Bessel
functions defined in math.h. You won't be able to move
them out of it. This suggests that the -Wshadow warning is
of questionable use. I'd turn it off, personally.


--

Comment By: IOhannes m zm�lnig (zmoelnig)
Date: 2006-10-18 01:33

Message:
Logged In: YES 
user_id=564396

a) has this been fixed already? (i cannot reproduce this
anymore; also the pd(-extended) buildlogs do not show this
warning)
b) i don't think that this is a bug in pd; no global include
file (/usr/include/architecture/ppc/math.h) should use
global variable names like i, y1 and the like.

--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detailatid=478070aid=1371511group_id=55736

___
PD-dev mailing list
PD-dev@iem.at
http://lists.puredata.info/listinfo/pd-dev