Csound Csound-dev Csound-tekno Search About

[Cs-dev] Functions and parenthesis

Date2013-08-03 20:33
FromAndres Cabrera
Subject[Cs-dev] Functions and parenthesis
AttachmentsNone  None  
Hi,

Some examples in CsoundQt broke because of the new limitation in function syntax, where spaces are not allowed between the function name and the parenthesis. It would be great if spaces were allowed, as it seems to me this is actually a change that breaks backward compatibility with older orcs. It's not a big problem now when we are all aware of the change but it might be a time waster some years from today when someone tries to recycle old code...

Cheers,
Andrés

Date2013-08-03 20:40
Fromjpff@cs.bath.ac.uk
SubjectRe: [Cs-dev] Functions and parenthesis
The problem is ambiguity

aaa  bbb (ccc)

is that opcode aaa with argument bbbb(ccc), or is it opcode bbb delivering
aaa from ccc

It is Rory's reported problem.  The space after a function was OK as there
were a liited number of functions, but now everything is/could  be a
function.

The only way I know to fix it like to suggest will also remove the
"functional" syntac form.  We coud have two parsers.....

> Hi,
>
> Some examples in CsoundQt broke because of the new limitation in function
> syntax, where spaces are not allowed between the function name and the
> parenthesis. It would be great if spaces were allowed, as it seems to me
> this is actually a change that breaks backward compatibility with older
> orcs. It's not a big problem now when we are all aware of the change but
> it
> might be a time waster some years from today when someone tries to recycle
> old code...
>
> Cheers,
> Andrés
> ------------------------------------------------------------------------------
> Get your SQL database under version control now!
> Version control is standard for application code, but databases havent
> caught up. So what steps can you take to put your SQL databases under
> version control? Why should you start doing it? Read more to find out.
> http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk_______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>



------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent 
caught up. So what steps can you take to put your SQL databases under 
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-08-03 20:53
FromAndres Cabrera
SubjectRe: [Cs-dev] Functions and parenthesis
AttachmentsNone  None  
Thanks for the explanation. I also see no way around it.

Maybe the error message can give some information. How about if the unexpected character is '(' mention that there can be no space for functions?

Cheers,
Andrés






On Sat, Aug 3, 2013 at 12:40 PM, <jpff@cs.bath.ac.uk> wrote:
The problem is ambiguity

aaa  bbb (ccc)

is that opcode aaa with argument bbbb(ccc), or is it opcode bbb delivering
aaa from ccc

It is Rory's reported problem.  The space after a function was OK as there
were a liited number of functions, but now everything is/could  be a
function.

The only way I know to fix it like to suggest will also remove the
"functional" syntac form.  We coud have two parsers.....

> Hi,
>
> Some examples in CsoundQt broke because of the new limitation in function
> syntax, where spaces are not allowed between the function name and the
> parenthesis. It would be great if spaces were allowed, as it seems to me
> this is actually a change that breaks backward compatibility with older
> orcs. It's not a big problem now when we are all aware of the change but
> it
> might be a time waster some years from today when someone tries to recycle
> old code...
>
> Cheers,
> Andrés
> ------------------------------------------------------------------------------
> Get your SQL database under version control now!
> Version control is standard for application code, but databases havent
> caught up. So what steps can you take to put your SQL databases under
> version control? Why should you start doing it? Read more to find out.
> http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk_______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>



------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent
caught up. So what steps can you take to put your SQL databases under
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel


Date2013-08-03 20:58
FromVictor Lazzarini
SubjectRe: [Cs-dev] Functions and parenthesis
AttachmentsNone  None  
Could we just not allow (var) as an opcode argument? If not allowing that fixes the function space parenthesis issue, then
it's a toss up between the two.

Victor

On 3 Aug 2013, at 20:53, Andres Cabrera wrote:

Thanks for the explanation. I also see no way around it.

Maybe the error message can give some information. How about if the unexpected character is '(' mention that there can be no space for functions?

Cheers,
Andrés






On Sat, Aug 3, 2013 at 12:40 PM, <jpff@cs.bath.ac.uk> wrote:
The problem is ambiguity

aaa  bbb (ccc)

is that opcode aaa with argument bbbb(ccc), or is it opcode bbb delivering
aaa from ccc

It is Rory's reported problem.  The space after a function was OK as there
were a liited number of functions, but now everything is/could  be a
function.

The only way I know to fix it like to suggest will also remove the
"functional" syntac form.  We coud have two parsers.....

> Hi,
>
> Some examples in CsoundQt broke because of the new limitation in function
> syntax, where spaces are not allowed between the function name and the
> parenthesis. It would be great if spaces were allowed, as it seems to me
> this is actually a change that breaks backward compatibility with older
> orcs. It's not a big problem now when we are all aware of the change but
> it
> might be a time waster some years from today when someone tries to recycle
> old code...
>
> Cheers,
> Andrés
> ------------------------------------------------------------------------------
> Get your SQL database under version control now!
> Version control is standard for application code, but databases havent
> caught up. So what steps can you take to put your SQL databases under
> version control? Why should you start doing it? Read more to find out.
> http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk_______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>



------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent
caught up. So what steps can you take to put your SQL databases under
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel

------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent
caught up. So what steps can you take to put your SQL databases under
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie




Date2013-08-04 10:33
Fromjpff@cs.bath.ac.uk
SubjectRe: [Cs-dev] Functions and parenthesis
> Could we just not allow (var) as an opcode argument? If not allowing that
> fixes the function space parenthesis issue, then
> it's a toss up between the two.
>
> Victor

Not as simple as that.  What about

aaa bbb (ccc+ddd)*eee



------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent 
caught up. So what steps can you take to put your SQL databases under 
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net