On 1/15/08, patrick puredata@11h11.com wrote:
would it be possible to add "tof" to default.pdsettings in the auto-build (for mac os x too).
On a somewhat related note, what do you think about this option?
https://sourceforge.net/tracker/index.php?func=detail&aid=1858772&gr...
I made an -autoload option, which will automatically load all externals starting at some base path. So, it would prevent having to list 39 externals to load. Instead, you would just set a magic autoload directory, and have what you want to be loaded sitting in there ...
Does this seem useful?
-- Russell Bryant
Hallo, Russell Bryant hat gesagt: // Russell Bryant wrote:
On 1/15/08, patrick puredata@11h11.com wrote:
would it be possible to add "tof" to default.pdsettings in the auto-build (for mac os x too).
On a somewhat related note, what do you think about this option?
https://sourceforge.net/tracker/index.php?func=detail&aid=1858772&gr...
I made an -autoload option, which will automatically load all externals starting at some base path. So, it would prevent having to list 39 externals to load. Instead, you would just set a magic autoload directory, and have what you want to be loaded sitting in there ...
Could you elaborate a bit how this works, especially in regard to possible nameclashes e.g. in pd-extended? Those currently are worked around by having the libraries in different subdirectories? Example: Both maxlib and zexy have incompatible versions of [urn], so if you install maxlib and zexy in "extra" and use "-autoload extra", won't you have in fact circumvented the directory-namespace system?
Ciao
Frank Barknecht wrote:
Could you elaborate a bit how this works, especially in regard to possible nameclashes e.g. in pd-extended? Those currently are worked around by having the libraries in different subdirectories? Example: Both maxlib and zexy have incompatible versions of [urn], so if you install maxlib and zexy in "extra" and use "-autoload extra", won't you have in fact circumvented the directory-namespace system?
and don't forget, that for one-object-per-file externals, you will not gain so much anyhow: the "libraries" are loaded on request (when you instantiate the [urn] object for the first time pd will search for an urn.l_i386 (or similar) - you don't need to pre-load it at startup)
fmad.r IOhannes
Hallo, IOhannes m zmoelnig hat gesagt: // IOhannes m zmoelnig wrote:
Frank Barknecht wrote:
Could you elaborate a bit how this works, especially in regard to possible nameclashes e.g. in pd-extended? Those currently are worked around by having the libraries in different subdirectories? Example: Both maxlib and zexy have incompatible versions of [urn], so if you install maxlib and zexy in "extra" and use "-autoload extra", won't you have in fact circumvented the directory-namespace system?
and don't forget, that for one-object-per-file externals, you will not gain so much anyhow: the "libraries" are loaded on request (when you instantiate the [urn] object for the first time pd will search for an urn.l_i386 (or similar) - you don't need to pre-load it at startup)
And how to discern between one-object-per-file object files and many-objects-per-file library files?
Ciao
Frank Barknecht wrote:
And how to discern between one-object-per-file object files and many-objects-per-file library files?
AFAIK, there is no way to do so algorithmically. I was just thinking I would stick my many-objects-per-file libraries in their own directory and use autoload to load them all.
Anyway, it was sort of a quick thing. I wasn't sure if it would end up making sense and being useful, so that's why I brought it up. But it was my first attempt at making something a little easier than installing symlinks per-object or using -lib to load larger libs with multiple objects in them ...
-- Russell
Quoting Russell Bryant russell@russellbryant.net:
I was just thinking I would stick my many-objects-per-file libraries in their own directory and use autoload to load them all.
but when you are using many-objects-per-file libs (like i do, btw), then you usually only have the need to load a few libraries, so the use of the autoloader is not that big.
Anyway, it was sort of a quick thing. I wasn't sure if it would end up making sense and being useful, so that's why I brought it up. But it was my first attempt at making something a little easier than installing symlinks per-object or using -lib to load larger libs with multiple objects in them ...
you can also use [library] to load larger object libs, or [declare]
what might be more useful than the "-autoload" thing is to accept wildcards in the libraries.
e.g. "-lib iem*" would load iemlib1, iemlib2, iem_mp3, iem_t3, iemmatrix and whatelse (but then: how do you only load the "iem*" library :-))
if you have added "/tmp/mylibs" to your path and only want to load ALL the libs in ./extra, you would probably have to do something weird like "-lib ../extra/*" (but probably i am thinking to complicated know) - it's easier if you do it the other way round "-lib /tmp/mylibs/*"
now it is me who is thinking aloud.
mfg.asdr IOhannes
---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program.
On Jan 16, 2008, at 1:03 PM, Russell Bryant wrote:
Frank Barknecht wrote:
And how to discern between one-object-per-file object files and many-objects-per-file library files?
AFAIK, there is no way to do so algorithmically. I was just thinking I would stick my many-objects-per-file libraries in their own directory and use autoload to load them all.
Anyway, it was sort of a quick thing. I wasn't sure if it would end up making sense and being useful, so that's why I brought it up. But it was my first attempt at making something a little easier than installing symlinks per-object or using -lib to load larger libs with multiple objects in them ...
With Pd-extended, the goal is to use the libdir format for everything, then making sure that the libdir format is well supported. The first part is almost done, there are only a handful of exceptions (Gem, PDP, PiDiP...), the second part is a work in progress.
I don't necessarily object to including this autoload functionality, but I wouldn't use it at all in Pd-extended. Here's the way I think this should work in the near future:
- use a default preferences file to load the libs in the same order on all platforms.
- allow patch-local namespaces which can override the global namespace. This will allow people to load libs in a custom order without having to change the default preferences.
The part that remains to be seen is whether the global namespace should have no libraries loaded by default, like Java, etc. do, or whether it is ok to have a standard set of libs loaded by default. The later would be easier for newbies, but may cause more headaches with distribution and name clashes.
.hc
------------------------------------------------------------------------ ----
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
Hans-Christoph Steiner wrote:
With Pd-extended, the goal is to use the libdir format for everything, then making sure that the libdir format is well supported. The first part is almost done, there are only a handful of exceptions (Gem, PDP, PiDiP...), the second part is a work in progress.
I don't necessarily object to including this autoload functionality, but I wouldn't use it at all in Pd-extended. Here's the way I think this should work in the near future:
- use a default preferences file to load the libs in the same order on
all platforms.
- allow patch-local namespaces which can override the global namespace.
This will allow people to load libs in a custom order without having to change the default preferences.
The part that remains to be seen is whether the global namespace should have no libraries loaded by default, like Java, etc. do, or whether it is ok to have a standard set of libs loaded by default. The later would be easier for newbies, but may cause more headaches with distribution and name clashes.
Ok, well this discussion gives me the answer I was looking for. The patch isn't obviously beneficial or even desired. I'm going to close the issue out for now, and maybe I can come up with something different in the future when I have a better understanding of all of the issues involved.
Thanks for the feedback,
-- Russell Bryant
new request: iemmatrix
it's included, but not load at startup. would it be possible to add it with tof in default.pdsettings thanks! pat
I think iemmatrix needs some work, since it has a number of aliases, and aliases currently aren't supported. I am a little hesitant to add everything single library under the sound to load by default since if those libraries change or are removed, names might instantiate different objects, then mayhem ensues.
What's wrong with adding [declare]/[import] to the patch? Or [tof/ blahblah]?
.hc
On Jan 21, 2008, at 4:46 PM, patrick wrote:
new request: iemmatrix
it's included, but not load at startup. would it be possible to add it with tof in default.pdsettings thanks! pat
------------------------------------------------------------------------ ----
'You people have such restrictive dress for women,’ she said, hobbling away in three inch heels and panty hose to finish out another pink-collar temp pool day. - “Hijab Scene #2", by Mohja Kahf
Hans-Christoph Steiner wrote:
I think iemmatrix needs some work, since it has a number of aliases, and aliases currently aren't supported. I am a little hesitant to
what is the problem with aliases? somebody (georg) has created an alias folder some time ago for iemmatrix. i have even updated the build-system of iemmatrix to build objects within this folder (no fear, i did this just now)
which other work is needed for iemmatrix?
add everything single library under the sound to load by default since if those libraries change or are removed, names might instantiate different objects, then mayhem ensues.
how is this not the case when dealing with one-object-per-file libraries which are all loaded by default? afaik, pd-extended per default does load every single lib under the sound.
What's wrong with adding [declare]/[import] to the patch? Or [tof/ blahblah]?
i think [declare]/[import] is definitely the way to go, and no libraries should be loaded by default.
fmgasdr. IOhannes
IOhannes m zmoelnig schrieb:
Hans-Christoph Steiner wrote:
I think iemmatrix needs some work, since it has a number of aliases, and aliases currently aren't supported. I am a little hesitant to
what is the problem with aliases? somebody (georg) has created an alias folder some time ago for iemmatrix.
Yes, at least when I made this alias folder iemmatrix it did work quite well. I also made aliases for iemlib and some more stuff from iem ... so I don't see a problem ... (I agree that maybe in future we should avoid aliases)
What's wrong with adding [declare]/[import] to the patch? Or [tof/ blahblah]?
i think [declare]/[import] is definitely the way to go, and no libraries should be loaded by default.
Also IMHO no library should be loaded by default. If you program in C/Python/... also no libraries are included/imported by default.
LG Georg
Georg Holzmann wrote:
IOhannes m zmoelnig schrieb:
Hans-Christoph Steiner wrote:
I think iemmatrix needs some work, since it has a number of aliases, and aliases currently aren't supported. I am a little hesitant to
what is the problem with aliases? somebody (georg) has created an alias folder some time ago for iemmatrix.
Yes, at least when I made this alias folder iemmatrix it did work quite well. I also made aliases for iemlib and some more stuff from iem ... so I don't see a problem ... (I agree that maybe in future we should avoid aliases)
what is wrong with aliases? why should they be avoided? do you prefer [f] or [float]?
mfga.sdr IOhannes
Hallo!
Yes, at least when I made this alias folder iemmatrix it did work quite well. I also made aliases for iemlib and some more stuff from iem ... so I don't see a problem ... (I agree that maybe in future we should avoid aliases)
what is wrong with aliases? why should they be avoided? do you prefer [f] or [float]?
Ok I have to correct myself: maybe one should use it with care and only if it makes sense ... ;)
LG Georg
On Jan 23, 2008, at 11:00 AM, IOhannes m zmoelnig wrote:
Georg Holzmann wrote:
IOhannes m zmoelnig schrieb:
Hans-Christoph Steiner wrote:
I think iemmatrix needs some work, since it has a number of aliases, and aliases currently aren't supported. I am a little hesitant to
what is the problem with aliases? somebody (georg) has created an alias folder some time ago for iemmatrix.
Yes, at least when I made this alias folder iemmatrix it did work quite well. I also made aliases for iemlib and some more stuff from iem ... so I don't see a problem ... (I agree that maybe in future we should avoid aliases)
what is wrong with aliases? why should they be avoided? do you prefer [f] or [float]?
They are not consistently implemented, so they can cause confusion. Symbols that are selectors and classnames should be consistent everywhere "s" does not mean the same thing everywhere while "send" and "symbol" do. [f 123( and [s blah( don't work. Those are a couple examples.
I think they were only added to Max/Pd as typing shortcuts, which is very weak argument in favor of them. I am not saying we should remove them, but I think they should be avoided as a matter of convention.
What other programming language has aliases?
.hc
------------------------------------------------------------------------ ----
Using ReBirth is like trying to play an 808 with a long stick. - David Zicarelli
Hallo, Hans-Christoph Steiner hat gesagt: // Hans-Christoph Steiner wrote:
I think they were only added to Max/Pd as typing shortcuts, which is very weak argument in favor of them. I am not saying we should remove them, but I think they should be avoided as a matter of convention.
What other programming language has aliases?
It's not that uncommon if you think of operator overloading in C++ and many other languages, or things like "from math import radians as rad" in Python. Shortcuts can be a very strong argument, and especially in a graphical language, [t a a a a a a] often is better than [trigger anything anything anything anything anything anything]
Ciao
On Jan 23, 2008, at 4:50 PM, Frank Barknecht wrote:
Hallo, Hans-Christoph Steiner hat gesagt: // Hans-Christoph Steiner wrote:
I think they were only added to Max/Pd as typing shortcuts, which is very weak argument in favor of them. I am not saying we should remove them, but I think they should be avoided as a matter of convention.
What other programming language has aliases?
It's not that uncommon if you think of operator overloading in C++ and many other languages, or things like "from math import radians as rad" in Python.
Operator overloading is a very different thing. It is allowing a given function name to accept different combos of arguments for the expressed purpose of implementing a given logical idea across a wide range of data types. For example, allowing "+" to work with floats, ints, longs, strings, etc.
Pd's aliases are just typing shortcuts.
Shortcuts can be a very strong argument, and especially in a graphical language, [t a a a a a a] often is better than [trigger anything anything anything anything anything anything]
I find that it is rarely better to use [t a a a a] and I rarely use any aliases. As you have written, good clean patches don't have cables crossing over, for example. I find that [trigger anything anything anything] encourages people to lay out their patches cleanly.
.hc
------------------------------------------------------------------------ ----
There is no way to peace, peace is the way. -A.J. Muste
Hans-Christoph Steiner wrote:
On Jan 23, 2008, at 4:50 PM, Frank Barknecht wrote:
Hallo, Hans-Christoph Steiner hat gesagt: // Hans-Christoph Steiner wrote:
I think they were only added to Max/Pd as typing shortcuts, which is very weak argument in favor of them. I am not saying we should remove them, but I think they should be avoided as a matter of convention.
What other programming language has aliases?
It's not that uncommon if you think of operator overloading in C++ and many other languages, or things like "from math import radians as rad" in Python.
no language with a native support for fixed aliases comes to my mind (apart from max/msp) - but i am sure there are people with more insight into different languages than me.
this doesn't mean that much though, as there are a lot of languages that allow to define custom aliases (which would be a nice feature in Pd too, btw), either by using C-style macros or mechanisms as frank's example.
Pd's aliases are just typing shortcuts.
and there is exactly nothing bad in that.
Shortcuts can be a very strong argument, and especially in a graphical language, [t a a a a a a] often is better than [trigger anything anything anything anything anything anything]
I find that it is rarely better to use [t a a a a] and I rarely use any aliases.
the latter is true. otoh, i never use [trigger anything anything anything anything] and often use aliases. compared to other patches posted on this list, i find my patches clean and readable. this of course doesn't say that much, as i have written them, but then my patches are not totally isolated either.
i still find [trigger anything bang] less readable than [t a b].
so if we were to remove aliases, i would clearly vote to remove the long names...
mfg.asdr IOhannes
Hallo, IOhannes m zmoelnig hat gesagt: // IOhannes m zmoelnig wrote:
Hans-Christoph Steiner wrote:
On Jan 23, 2008, at 4:50 PM, Frank Barknecht wrote:
Hallo, Hans-Christoph Steiner hat gesagt: // Hans-Christoph Steiner wrote:
I think they were only added to Max/Pd as typing shortcuts, which is very weak argument in favor of them. I am not saying we should remove them, but I think they should be avoided as a matter of convention.
What other programming language has aliases?
It's not that uncommon if you think of operator overloading in C++ and many other languages, or things like "from math import radians as rad" in Python.
no language with a native support for fixed aliases comes to my mind (apart from max/msp) - but i am sure there are people with more insight into different languages than me.
I actually do think, that alias names bare some resemblance to operator overloading, but of course Pd doesn't support operator overloading like the other languages, so aliases are the workaround we use. But the use is similar: Operator overloading includes adding an additional name and syntax for a function/method:
A = Matrix.new(m,n) B = Matrix.new(n,m) C = Matrix.multipy(A,B)
now with an overloaded operator* you can also say: C = A*B.
In my eyes that's very similar to the mtx_mul and mtx_* aliases in iemmatrix. True operator overloading of course would mean, that you could user the regular "+" object for matrices in Pd as well.
Shortcuts can be a very strong argument, and especially in a graphical language, [t a a a a a a] often is better than [trigger anything anything anything anything anything anything]
I find that it is rarely better to use [t a a a a] and I rarely use any aliases.
the latter is true. otoh, i never use [trigger anything anything anything anything] and often use aliases.
To each his own, especially with style questions, but I don't know anybody else besides Hans who prefers the long version of triggers.
Ciao
hi hans,
What's wrong with adding [declare]/[import] to the patch? Or [tof/blahblah]?
if we code tof/blahblah in our abstractions, then people who compile tof from scratch and make install it in extra folder = Can't create.
right now there's +-40 externals loaded in pd-extended. i understand your point about not adding all externals, so i will have a look at declare / import.
thanks, pat
On Jan 24, 2008, at 12:18 PM, patrick wrote:
hi hans,
What's wrong with adding [declare]/[import] to the patch? Or [tof/blahblah]?
if we code tof/blahblah in our abstractions, then people who compile tof from scratch and make install it in extra folder = Can't create.
If that person compiles the tof objects manually, then sticks them into extra/tof, then [tof/blahblah] work with any version of Pd.
.hc
right now there's +-40 externals loaded in pd-extended. i understand your point about not adding all externals, so i will have a look at declare / import.
thanks, pat
PD-dev mailing list PD-dev@iem.at http://lists.puredata.info/listinfo/pd-dev
------------------------------------------------------------------------ ----
As we enjoy great advantages from inventions of others, we should be glad of an opportunity to serve others by any invention of ours; and this we should do freely and generously. - Benjamin Franklin
On Thu, 24 Jan 2008, Frank Barknecht wrote:
overloading like the other languages, so aliases are the workaround we use. But the use is similar: Operator overloading includes adding an additional name and syntax for a function/method: A = Matrix.new(m,n) B = Matrix.new(n,m) C = Matrix.multipy(A,B) now with an overloaded operator* you can also say: C = A*B.
You absolutely don't need to have an original name like "multiply" that you alias to "operator*". You can define "operator*" on its own and that's all. It's not like you need any operator to be the shortcut of something already existing.
(JAVA might be different because libraries were first designed without operator support, which was then added later. in that case, "shortcut for..." makes sense)
True operator overloading of course would mean, that you could user the regular "+" object for matrices in Pd as well.
You can't even do that in C++. If you have a class that makes additions, you can't modify that to support other kinds of additions without touching the source file. You can't do that in Python either. You _can_ do it in Ruby.
You may ask yourself what is the proper kind of analogy to do in this context: is a [+] class in pd similar to an Addition class in C++, or is it similar to a + method in a class of numbers? Depends. Pd does some things inside out, so it complicates some comparisons.
To each his own, especially with style questions, but I don't know anybody else besides Hans who prefers the long version of triggers.
Whether it's one or the other, you still have to look up the help file to know what it does. "trigger anything anything" doesn't tell you at all what's going on. Before already knowing Pd, "trigger" sounds like that would be a good name for [bang] and [bng] and such. I'd rather call it a "tee" than a "trigger".
compare with http://plumbing.hardwarestore.com/52-298-abs-fittings/abs-sanitary-tee-45626...
also compare with http://en.wikipedia.org/wiki/Tee_(Unix) but this tee can't pipe to two processes at once, so it's not so similar.
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard - tél:+1.514.383.3801, Montréal QC Canada
On Jan 24, 2008, at 4:14 AM, Frank Barknecht wrote:
Hallo, IOhannes m zmoelnig hat gesagt: // IOhannes m zmoelnig wrote:
Hans-Christoph Steiner wrote:
On Jan 23, 2008, at 4:50 PM, Frank Barknecht wrote:
Hallo, Hans-Christoph Steiner hat gesagt: // Hans-Christoph Steiner wrote:
I think they were only added to Max/Pd as typing shortcuts, which is very weak argument in favor of them. I am not saying we should remove them, but I think they should be avoided as a matter of convention.
What other programming language has aliases?
It's not that uncommon if you think of operator overloading in C+
- and
many other languages, or things like "from math import radians as rad" in Python.
no language with a native support for fixed aliases comes to my mind (apart from max/msp) - but i am sure there are people with more insight into different languages than me.
I actually do think, that alias names bare some resemblance to operator overloading, but of course Pd doesn't support operator overloading like the other languages, so aliases are the workaround we use. But the use is similar: Operator overloading includes adding an additional name and syntax for a function/method:
A = Matrix.new(m,n) B = Matrix.new(n,m) C = Matrix.multipy(A,B)
now with an overloaded operator* you can also say: C = A*B.
In my eyes that's very similar to the mtx_mul and mtx_* aliases in iemmatrix. True operator overloading of course would mean, that you could user the regular "+" object for matrices in Pd as well.
Shortcuts can be a very strong argument, and especially in a graphical language, [t a a a a a a] often is better than [trigger anything anything anything anything anything anything]
I find that it is rarely better to use [t a a a a] and I rarely use any aliases.
the latter is true. otoh, i never use [trigger anything anything anything anything] and often use aliases.
To each his own, especially with style questions, but I don't know anybody else besides Hans who prefers the long version of triggers.
That's what I teach in workshops now, I think it makes for much more readable code for said reasons, so watch out, we are multiplying! :D
.hc
------------------------------------------------------------------------ ----
Computer science is no more related to the computer than astronomy is related to the telescope. -Edsger Dykstra
On Wed, 23 Jan 2008, Frank Barknecht wrote:
It's not that uncommon if you think of operator overloading in C++ and many other languages
Operator overloading is nothing special, really. It's just plain polymorphism, either compile-time or run-time. What makes it seem special is the syntax.
Anyway it's not aliasing, it's the opposite of it: one name for several things rather than several names for one thing.
or things like "from math import radians as rad" in Python.
Yes, that would be an example of aliasing.
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard - tél:+1.514.383.3801, Montréal QC Canada
On Wed, 23 Jan 2008, Hans-Christoph Steiner wrote:
What other programming language has aliases?
Ruby accepts both 'indices' and 'indexes' as selectors in the Array and Hash classes. Ruby has 'alias' as a reserved word.
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard - tél:+1.514.383.3801, Montréal QC Canada
On Jan 24, 2008, at 2:31 PM, Mathieu Bouchard wrote:
On Wed, 23 Jan 2008, Hans-Christoph Steiner wrote:
What other programming language has aliases?
Ruby accepts both 'indices' and 'indexes' as selectors in the Array and Hash classes. Ruby has 'alias' as a reserved word.
I mean aliases for functions. I know of no programming language besides Pd (and maybe Max) that has multiple names for functions that do the exact same thing.
.hc
------------------------------------------------------------------------ ----
As we enjoy great advantages from inventions of others, we should be glad of an opportunity to serve others by any invention of ours; and this we should do freely and generously. - Benjamin Franklin
Hans-Christoph Steiner wrote:
On Jan 24, 2008, at 2:31 PM, Mathieu Bouchard wrote:
On Wed, 23 Jan 2008, Hans-Christoph Steiner wrote:
What other programming language has aliases?
Ruby accepts both 'indices' and 'indexes' as selectors in the Array and Hash classes. Ruby has 'alias' as a reserved word.
I mean aliases for functions. I know of no programming language besides Pd (and maybe Max) that has multiple names for functions that do the exact same thing.
In most languages, you can define your own *local* names/aliases:
C: typedef double (*function)(double); function foo = sin;
Lua: local foo = somepackage.somefunction
Haskell: foo = Module.function
I think most agree that global aliases don't really add much, but local aliases, ie, per "module" or smaller unit (which in Pd would be per abstraction) are very useful.
Claude
On Fri, Jan 25, 2008 at 05:09:35PM -0500, Hans-Christoph Steiner wrote:
On Jan 24, 2008, at 2:31 PM, Mathieu Bouchard wrote:
On Wed, 23 Jan 2008, Hans-Christoph Steiner wrote:
What other programming language has aliases?
Ruby accepts both 'indices' and 'indexes' as selectors in the Array and Hash classes. Ruby has 'alias' as a reserved word.
I mean aliases for functions. I know of no programming language besides Pd (and maybe Max) that has multiple names for functions that do the exact same thing.
Firstly, an index lookup is a function. Secondly, PHP has function aliases as described in my other post. (Since when is [t a a a] an alias of a function anyway? It's two different types of alias - an objectclass and a type. I provided examples of both in my other post).
Best,
Chris.
------------------- http://mccormick.cx
On Fri, 25 Jan 2008, Chris McCormick wrote:
(Since when is [t a a a] an alias of a function anyway? It's two different types of alias - an objectclass and a type. I provided examples of both in my other post).
the first element of an objectbox is not a class name, it's a constructor name, which usually coïncides with a class name, but not necessarily. A constructor name is a selector in a special object known as [objectmaker].
therefore, class aliases and method aliases are the same thing in pd, to the extent that people know and use that fact.
Firstly, an index lookup is a function. Secondly, PHP has function aliases as described in my other post.
I don't understand Hans' argument.
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard - tél:+1.514.383.3801, Montréal QC Canada
On Fri, 25 Jan 2008, Hans-Christoph Steiner wrote:
On Jan 24, 2008, at 2:31 PM, Mathieu Bouchard wrote:
On Wed, 23 Jan 2008, Hans-Christoph Steiner wrote:
What other programming language has aliases?
Ruby accepts both 'indices' and 'indexes' as selectors in the Array and Hash classes. Ruby has 'alias' as a reserved word.
I mean aliases for functions. I know of no programming language besides Pd (and maybe Max) that has multiple names for functions that do the exact same thing.
Ruby has no "functions", and neither does pd. What are you talking about?
selectors/methods is as close to functions you can get in Ruby. It's certainly closer to the concept of function, than pd's concept of object is.
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard - tél:+1.514.383.3801, Montréal QC Canada
On Thu, Jan 24, 2008 at 02:31:26PM -0500, Mathieu Bouchard wrote:
On Wed, 23 Jan 2008, Hans-Christoph Steiner wrote:
What other programming language has aliases?
Ruby accepts both 'indices' and 'indexes' as selectors in the Array and Hash classes. Ruby has 'alias' as a reserved word.
Perl has so many redundant language constructs for doing the same thing multiple ways that it's not even worth mentioning them all (And that is considered by Perl programmers as a major feature of the language).
PHP has aliases for heaps and heaps of functions (eg is_int == is_integer).
Haskell's 'type' keyword effectively creates an alias from sub-types.
Javascript has the 'with' statement that is similar to aliasing and JS also allows you to declare variables/functions/objects in multiple ways with different syntax.
Many languages have a shortened form of if statement that is effectively a low-syntax alias for the regular if statement.
Best,
Chris.
------------------- http://mccormick.cx
On Jan 25, 2008, at 8:36 PM, Chris McCormick wrote:
On Thu, Jan 24, 2008 at 02:31:26PM -0500, Mathieu Bouchard wrote:
On Wed, 23 Jan 2008, Hans-Christoph Steiner wrote:
What other programming language has aliases?
Ruby accepts both 'indices' and 'indexes' as selectors in the Array and Hash classes. Ruby has 'alias' as a reserved word.
Perl has so many redundant language constructs for doing the same thing multiple ways that it's not even worth mentioning them all (And that is considered by Perl programmers as a major feature of the language).
PHP has aliases for heaps and heaps of functions (eg is_int == is_integer).
Haskell's 'type' keyword effectively creates an alias from sub-types.
Javascript has the 'with' statement that is similar to aliasing and JS also allows you to declare variables/functions/objects in multiple ways with different syntax.
Many languages have a shortened form of if statement that is effectively a low-syntax alias for the regular if statement.
Things like #define, #typedef, 'type', etc. are different than Pd's aliases like [f] and [float]. Setting a variable to a function name is also not the same as a permanent alias.
I think these things are useful, while Pd's aliases only save typing a couple of keystrokes. If that happened without causing harm, then I wouldn't have a problem with it. Saving time in making a working program is far more valuable. I think Pd's aliases add work by increasing confusion. For example, everyone says "trigger" yet most people type [t]. Everyone who's responded to this thread unconsciously knows the two are one, but it took us a while to learn that.
As for the layout issues, I think it is akin to segmented patch cords. Why include a feature that encourages bad form 95% of the time? Using [t a b b] vs. [trigger anything bang bang] encourages people to cram lots of stuff into a patch, and to cross cords, when they should be laying things out cleanly and grouping logical chunks into subpatches.
.hc
------------------------------------------------------------------------ ----
On Sat, 2008-01-26 at 12:44 -0500, Hans-Christoph Steiner wrote:
Using [t a b b] vs. [trigger anything bang bang] encourages people to cram lots of stuff into a patch, and to cross cords, when they should be laying things out cleanly and grouping logical chunks into subpatches.
i cannot follow you here. how does [t a b b] encourage people to do what you are claiming it does? how does [trigger anything bang bang] lead to more cleanly layed-out patches? i am a 'hard' [t b b a] user and i don't think, that makes me create ugly, badly layed-out patches.
roman
___________________________________________________________ Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de
On Sat, 26 Jan 2008, Roman Haefeli wrote:
i cannot follow you here. how does [t a b b] encourage people to do what you are claiming it does? how does [trigger anything bang bang] lead to more cleanly layed-out patches? i am a 'hard' [t b b a] user and i don't think, that makes me create ugly, badly layed-out patches.
It doesn't make sense. You don't have to question your own understanding of things nor ask Hans any questions about it.
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard - tél:+1.514.383.3801, Montréal QC Canada
On Jan 26, 2008, at 4:17 PM, Roman Haefeli wrote:
On Sat, 2008-01-26 at 12:44 -0500, Hans-Christoph Steiner wrote:
Using [t a b b] vs. [trigger anything bang bang] encourages people to cram lots of stuff into a patch, and to cross cords, when they should be laying things out cleanly and grouping logical chunks into subpatches.
i cannot follow you here. how does [t a b b] encourage people to do what you are claiming it does? how does [trigger anything bang bang] lead to more cleanly layed-out patches? i am a 'hard' [t b b a] user and i don't think, that makes me create ugly, badly layed-out patches.
I'll have to think about a good example of this, I don't have one off hand. The key part of understanding a patch is understanding the flow and the various sections. Having the trigger spread out when using full words makes it more likely to have the flow cleanly laid out, IMHO. But this is a much lesser problem that the inconsistent definitions of "s", "b", "a", "f", etc.
Even better would be a trigger like jMax's, that just passes the data thru with the right order, and can be an arbitrary size.
.hc
------------------------------------------------------------------------ ----
kill your television
On Fri, 25 Jan 2008, Chris McCormick wrote:
Perl has so many redundant language constructs for doing the same thing multiple ways that it's not even worth mentioning them all (And that is considered by Perl programmers as a major feature of the language).
Onr reason thay it might not worth mentioning here is that the topic is plain aliases: two names for exactly the same thing. In Perl you have considerable overlap of the base constructs, but nothing that completely coïncides. Furthermore it's difficult to decide whether that should be compared, because pd is a language in which the equivalents of most base constructs of Perl are fitting in the pattern of classes and objects: in terms of syntax, Perl and Ruby are large languages, whereas Pd is a very small language, just like Forth, Scheme, Tcl. (Ruby is syntactically large even though many more things are fitting in the class/object pattern than in most other languages... it's that Perl influence).
Many languages have a shortened form of if statement that is effectively a low-syntax alias for the regular if statement.
Many also have && and ||, which are also kinds of "if"s, but it's most flexible in Perl/Ruby, in which those two operators have arbitrary return values instead of just bool, so they can more often be used in practice than in other languages. They have aliases called "and" and "or" which are not plain aliases because they also have different operator precedence. Both languages have a bunch of if-constructs like that but they all cover different syntactic combinations so e.g.
b if a
is not completely equivalent to:
if a then b end
because it's a different order, but then it depends what you want to figure out about redundancy. Maybe we want to categorise language redundancy in a way like this:
1. totally the same use, different name
2. different syntax, different order of arguments, etc.
3. less obvious equivalences (a combination of two constructs is equivalent to another construct or to a combination of two other constructs)
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard - tél:+1.514.383.3801, Montréal QC Canada
On Jan 23, 2008, at 10:52 AM, Georg Holzmann wrote:
IOhannes m zmoelnig schrieb:
Hans-Christoph Steiner wrote:
I think iemmatrix needs some work, since it has a number of aliases, and aliases currently aren't supported. I am a little hesitant to
what is the problem with aliases? somebody (georg) has created an alias folder some time ago for iemmatrix.
Yes, at least when I made this alias folder iemmatrix it did work quite well. I also made aliases for iemlib and some more stuff from iem ... so I don't see a problem ... (I agree that maybe in future we should avoid aliases)
What's wrong with adding [declare]/[import] to the patch? Or [tof/ blahblah]?
i think [declare]/[import] is definitely the way to go, and no libraries should be loaded by default.
Also IMHO no library should be loaded by default. If you program in C/Python/... also no libraries are included/ imported by default.
I am thinking that way too. But I'd like to test it and see how well that works before forcing the change. Plus I think [declare] and [import] need to work a lot better before that can happen.
.hc
------------------------------------------------------------------------ ----
There is no way to peace, peace is the way. -A.J. Muste
On Wed, 2008-01-23 at 16:37 +0100, IOhannes m zmoelnig wrote:
i think [declare]/[import] is definitely the way to go, and no libraries should be loaded by default.
very much agreed, since this is the only way to create portable (between pd distros) patches without pref-editing hassle.
however, this is only possible, if miller does _not_ remove [declare -stdpath] functionality from abstractions.
miller: will that definitely be removed in future (>=0.41) versions of pd?
roman
___________________________________________________________ Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de