## cgsuite-devel — CGSuite Development Issues

You can subscribe to this list here.

 2003 2004 2005 2006 2007 2008 2011 2012 Jan Feb (36) Mar (38) Apr (13) May (11) Jun (11) Jul (29) Aug Sep Oct (10) Nov (1) Dec (10) Jan (1) Feb Mar (2) Apr (4) May (2) Jun (9) Jul Aug Sep (3) Oct Nov Dec (2) Jan Feb Mar Apr May Jun Jul Aug Sep Oct (1) Nov (5) Dec Jan Feb Mar (30) Apr (12) May (3) Jun Jul Aug Sep (5) Oct (79) Nov (36) Dec (54) Jan Feb (22) Mar (11) Apr (5) May (24) Jun Jul (3) Aug (20) Sep (16) Oct Nov Dec (3) Jan (5) Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec Jan Feb Mar Apr May Jun Jul (12) Aug (122) Sep (10) Oct (8) Nov (5) Dec (13) Jan Feb Mar Apr May (1) Jun Jul Aug Sep Oct Nov Dec
S M T W T F S

1

2

3

4

5

6

7

8

9

10

11
(4)
12
(2)
13
(2)
14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

Showing 8 results of 8

 Re: [cgsuite-devel] Ordinal Sum From: - 2011-10-13 10:01:11 Ordinal sum has cropped up in the analysis of sufficiently many games in the last few years as a that I agree it should be included in the hierarchy. I'm also happy with the proposed order. I'm nervous enough that I tend to use brackets even when not needed. Pity to lose `:' for use in loopy games though. Richard > exponentiation > ordinal sum > unary negation > multiplication, division, modulus > addition, subtraction > > Thanks for the loopy example. > > Neil
 Re: [cgsuite-devel] Ordinal Sum From: Neil McKay - 2011-10-13 06:18:24 I'm happy with (1:2)*3 and the proposed order: exponentiation ordinal sum unary negation multiplication, division, modulus addition, subtraction Thanks for the loopy example. Neil On Wed, Oct 12, 2011 at 2:08 AM, Aaron Siegel wrote: > If unary negation has the same precedence as binary subtraction, one > consequence is that > > * : -1 > > is illegal - you'd have to type > > * : (-1) > > instead. > > But there's a much bigger concern: it's contrary to the convention used by > C, Java, and most other languages that I'm familiar with.  For example, Java > very specifically assigns higher precedence to unary negation than > multiplication: > > http://bmanolov.free.fr/javaoperators.php > > This is a very well-established convention, and I'm extremely reluctant to > go against it.  Out of curiosity I just looked up a few other languages, and > Ruby and Python both use the same precedence as C and Java: (unary negation) >> (multiplication, division) > (binary addition, subtraction).  It's really > quite rare to find a language principle on which C, Java, Ruby and Python > all happen to agree :)  So I think the rationale would have to be > extraordinarily compelling to justify breaking this convention.  I don't see > that here, so I think it's pretty clear that we want to preserve the same > relative ranking of these three operator types. > > Interestingly, Python has a built-in exponentiation primitive, and solves > the "-2^4 problem" exactly the same way as cgsuite: by assigning > exponentiation higher precedence than unary negation.  I'm now pretty > convinced that the ranking of the "standard" arithmetic operators currently > implemented by cgsuite is correct, i.e., strongest to weakest: > > exponentiation > unary negation > multiplication, division, modulus > addition, subtraction > > This leaves only the question of where ordinal sum should be placed - a > question that obviously has no parallel in the other languages.  If it's > weaker than multiplication (as in my original proposal), then it's > necessarily weaker than unary negation - I don't see any way around this. > But there's another possibility: > > exponentiation > ordinal sum > unary negation > multiplication, division, modulus > addition, subtraction > > This means 1:2*3 > > would parse as > > (1:2)*3 > > rather than 1:(2*3).  This seems a bit undesirable, since we have a type of > sum preceding a type of product.  But it's the only way to get ordinal sum > to precede unary negation while still adhering to the established precedence > among the other operators. > > Re loopy games: a "pass" keyword exists!  For example > > {*|pass} > > is equivalent to > > a:{*|a} > > This works for any plumtree, but more complicated loopy games still need > something akin to the : operator.  For example, a 1-point ko > > a:{1|a||0} > > can't be entered using "pass". > > On Tue, Oct 11, 2011 at 7:10 PM, Neil McKay wrote: >> >> I'm more likely to write -1:1 wanting -1/2 than -2; which seems to >> disagree with Michael. On the other hand, if I wrote -g:h I would want >> -(g:h). Overall, I agree with Michael. >> >> As regards loopy games, can we implement a "pass" move? If so, does >> that largely do away with the need for the use of : in loopy games. >> >> Neil >> >> On Tue, Oct 11, 2011 at 3:16 PM, Michael Albert >> wrote: >> >> >> >> 1. Relative operator precedence of unary negation. >> > >> > (much sensible stuff snipped in order to make room for soapbox) >> > >> > I suspect that I am in a minority here, but I have always thought that >> > unary negation should be treated as 'morally' the same as subtraction, >> > i.e. -x is effectively shorthand for >> > >> > 0 - x >> > >> > (I know this doesn't parse in most cases, but it's a mental model not a >> > parser). >> > >> > So I'd strongly prefer: >> > >> > -1:g to mean - (1:g) >> > >> > which also makes the inconsistency go away. >> > >> > But I'm also somewhat with David here. As a practitioner of defensive >> > bracketing in almost all the code I write in almost every language, >> > it's not likely to affect me. >> > >> > M >> > >> > >> > >> > -- >> > Associate Professor Michael Albert >> > Dept. of Computer Science >> > University of Otago, PO Box 56 >> > Dunedin 9054, New Zealand >> > >> > (Ph) +64 3 479 8586 (Fx) +64 3 479 8529 >> > >> > >> > ------------------------------------------------------------------------------ >> > All the data continuously generated in your IT infrastructure contains a >> > definitive record of customers, application performance, security >> > threats, fraudulent activity and more. Splunk takes this data and makes >> > sense of it. Business sense. IT sense. Common sense. >> > http://p.sf.net/sfu/splunk-d2d-oct >> > _______________________________________________ >> > cgsuite-devel mailing list >> > cgsuite-devel@... >> > https://lists.sourceforge.net/lists/listinfo/cgsuite-devel >> > > >
 Re: [cgsuite-devel] Ordinal Sum From: Aaron Siegel - 2011-10-12 05:09:02 Attachments: Message as HTML If unary negation has the same precedence as binary subtraction, one consequence is that * : -1 is illegal - you'd have to type * : (-1) instead. But there's a much bigger concern: it's contrary to the convention used by C, Java, and most other languages that I'm familiar with. For example, Java very specifically assigns higher precedence to unary negation than multiplication: http://bmanolov.free.fr/javaoperators.php This is a very well-established convention, and I'm extremely reluctant to go against it. Out of curiosity I just looked up a few other languages, and Ruby and Python both use the same precedence as C and Java: (unary negation) > (multiplication, division) > (binary addition, subtraction). It's really quite rare to find a language principle on which C, Java, Ruby and Python all happen to agree :) So I think the rationale would have to be extraordinarily compelling to justify breaking this convention. I don't see that here, so I think it's pretty clear that we want to preserve the same relative ranking of these three operator types. Interestingly, Python has a built-in exponentiation primitive, and solves the "-2^4 problem" exactly the same way as cgsuite: by assigning exponentiation higher precedence than unary negation. I'm now pretty convinced that the ranking of the "standard" arithmetic operators currently implemented by cgsuite is correct, i.e., strongest to weakest: exponentiation unary negation multiplication, division, modulus addition, subtraction This leaves only the question of where ordinal sum should be placed - a question that obviously has no parallel in the other languages. If it's weaker than multiplication (as in my original proposal), then it's necessarily weaker than unary negation - I don't see any way around this. But there's another possibility: exponentiation ordinal sum unary negation multiplication, division, modulus addition, subtraction This means 1:2*3 would parse as (1:2)*3 rather than 1:(2*3). This seems a bit undesirable, since we have a type of sum preceding a type of product. But it's the only way to get ordinal sum to precede unary negation while still adhering to the established precedence among the other operators. Re loopy games: a "pass" keyword exists! For example {*|pass} is equivalent to a:{*|a} This works for any plumtree, but more complicated loopy games still need something akin to the : operator. For example, a 1-point ko a:{1|a||0} can't be entered using "pass". On Tue, Oct 11, 2011 at 7:10 PM, Neil McKay wrote: > I'm more likely to write -1:1 wanting -1/2 than -2; which seems to > disagree with Michael. On the other hand, if I wrote -g:h I would want > -(g:h). Overall, I agree with Michael. > > As regards loopy games, can we implement a "pass" move? If so, does > that largely do away with the need for the use of : in loopy games. > > Neil > > On Tue, Oct 11, 2011 at 3:16 PM, Michael Albert > wrote: > >> > >> 1. Relative operator precedence of unary negation. > > > > (much sensible stuff snipped in order to make room for soapbox) > > > > I suspect that I am in a minority here, but I have always thought that > > unary negation should be treated as 'morally' the same as subtraction, > > i.e. -x is effectively shorthand for > > > > 0 - x > > > > (I know this doesn't parse in most cases, but it's a mental model not a > parser). > > > > So I'd strongly prefer: > > > > -1:g to mean - (1:g) > > > > which also makes the inconsistency go away. > > > > But I'm also somewhat with David here. As a practitioner of defensive > > bracketing in almost all the code I write in almost every language, > > it's not likely to affect me. > > > > M > > > > > > > > -- > > Associate Professor Michael Albert > > Dept. of Computer Science > > University of Otago, PO Box 56 > > Dunedin 9054, New Zealand > > > > (Ph) +64 3 479 8586 (Fx) +64 3 479 8529 > > > > > ------------------------------------------------------------------------------ > > All the data continuously generated in your IT infrastructure contains a > > definitive record of customers, application performance, security > > threats, fraudulent activity and more. Splunk takes this data and makes > > sense of it. Business sense. IT sense. Common sense. > > http://p.sf.net/sfu/splunk-d2d-oct > > _______________________________________________ > > cgsuite-devel mailing list > > cgsuite-devel@... > > https://lists.sourceforge.net/lists/listinfo/cgsuite-devel > > >
 Re: [cgsuite-devel] Ordinal Sum From: Neil McKay - 2011-10-12 02:10:46 I'm more likely to write -1:1 wanting -1/2 than -2; which seems to disagree with Michael. On the other hand, if I wrote -g:h I would want -(g:h). Overall, I agree with Michael. As regards loopy games, can we implement a "pass" move? If so, does that largely do away with the need for the use of : in loopy games. Neil On Tue, Oct 11, 2011 at 3:16 PM, Michael Albert wrote: >> >> 1. Relative operator precedence of unary negation. > > (much sensible stuff snipped in order to make room for soapbox) > > I suspect that I am in a minority here, but I have always thought that > unary negation should be treated as 'morally' the same as subtraction, > i.e. -x is effectively shorthand for > > 0 - x > > (I know this doesn't parse in most cases, but it's a mental model not a parser). > > So I'd strongly prefer: > > -1:g to mean - (1:g) > > which also makes the inconsistency go away. > > But I'm also somewhat with David here. As a practitioner of defensive > bracketing in almost all the code I write in almost every language, > it's not likely to affect me. > > M > > > > -- > Associate Professor Michael Albert > Dept. of Computer Science > University of Otago, PO Box 56 > Dunedin 9054, New Zealand > > (Ph) +64 3 479 8586 (Fx) +64 3 479 8529 > > ------------------------------------------------------------------------------ > All the data continuously generated in your IT infrastructure contains a > definitive record of customers, application performance, security > threats, fraudulent activity and more. Splunk takes this data and makes > sense of it. Business sense. IT sense. Common sense. > http://p.sf.net/sfu/splunk-d2d-oct > _______________________________________________ > cgsuite-devel mailing list > cgsuite-devel@... > https://lists.sourceforge.net/lists/listinfo/cgsuite-devel >
 Re: [cgsuite-devel] Ordinal Sum From: Michael Albert - 2011-10-11 18:16:14 > > 1. Relative operator precedence of unary negation. (much sensible stuff snipped in order to make room for soapbox) I suspect that I am in a minority here, but I have always thought that unary negation should be treated as 'morally' the same as subtraction, i.e. -x is effectively shorthand for 0 - x (I know this doesn't parse in most cases, but it's a mental model not a parser). So I'd strongly prefer: -1:g to mean - (1:g) which also makes the inconsistency go away. But I'm also somewhat with David here. As a practitioner of defensive bracketing in almost all the code I write in almost every language, it's not likely to affect me. M -- Associate Professor Michael Albert Dept. of Computer Science University of Otago, PO Box 56 Dunedin 9054, New Zealand (Ph) +64 3 479 8586 (Fx) +64 3 479 8529