World: r3wp
[!REBOL3-OLD1]
older newer | first last |
Maxim 22-Sep-2009 [17834] | but what's the point of AND everything is already AND by default. just put them in a block, so they are and. when you read & it doesn' appear that the parser isn't moving forward. |
BrianH 22-Sep-2009 [17835] | EITHER doesn't work like EITHER, and it needs to be prefix, and use the semantics of Carl's + proposal or it won't work. Suggest a name to be used instead. |
Maxim 22-Sep-2009 [17836x2] | the only thing he's complaining about is putting things in a block... what's the problem with that? |
either [] [] [] can't be more explicit thant that... what is the problem with blocks? or a paren for the condition? really I don't get it. | |
BrianH 22-Sep-2009 [17838x2] | If you see | it doesn't say that the parser is backtracking either. & is the opposite of |. |
To use a tool it sometimes helps to know how. Assume some basic reading of docs will be needed to use a programming language. | |
Pekr 22-Sep-2009 [17840] | BrianH: COPY is NOT COPY, so what? |
BrianH 22-Sep-2009 [17841x3] | EITHER doesn't need to skip past |, so pick another name. It will be prefix. Suggest it in the 249 blog. |
This is not the same thing as a programming language conditional - it is a GTDPL concept. | |
Just like CHECK isn't like IF, it's like ASSERT. | |
Pekr 22-Sep-2009 [17844x4] | I can't suggest anything, as I don't understand what the article is all about. Stuff like - "advance past the next 2 alternate rules on failure." |
And I can tell you - if I - the occassional parse user can't easily decode the meaning by just looking into the examples, there will be many such users ... | |
... and - I don't buy arguments like - it is a GTDPL concept. Our (parse) users will not care about such statements. We are not here to adhere to any academic theories, but to make things usefull. If we wanted to adhere to what the world uses in parsing area, we should go the regular expressions route ... | |
OK, enough. I will wait how it turns out. Let's just remember, that we can go our own way, as parse already does. No need to turn it into obscure other whatever-parse-old-70ties-theory-suggests things ... | |
BrianH 22-Sep-2009 [17848] | Do you get that the concept needs a name, and that obscure concepts also need names? The standard syntax for this concept won't work in REBOL, and the only other comparable parser is the one in Perl 6, and we can't use that syntax either, or its semantics either (it's compiled). This *is* guru stuff - people get PHDs about parsing. Carl's proposal for +'s semantics is the way that this has to work given how REBOL parsing is implemented. |
Maxim 22-Sep-2009 [17849] | the thing I don't *get* maybe you can explain, is where he adds the increment to the '+ ... what does that mean... really I don't grasp it. |
BrianH 22-Sep-2009 [17850] | Now, *that* is obscure. Noone else does that, not even Perl 6. That is unique. |
Maxim 22-Sep-2009 [17851x2] | but what does it mean? |
dang ... I just *got* it... either [ a | b ] [ c ] [ d ] | |
Pekr 22-Sep-2009 [17853] | I don't mind the possibilities, I do care of naming and how long does it take for me to interpret it. If we go + route, we can change NOT to !, add &, II, >, -->, etc. :-) |
BrianH 22-Sep-2009 [17854] | NOT is not going to be !, for the reasons I already mentioned. |
Pekr 22-Sep-2009 [17855] | you see? looking at what Max just posted, I *imediatelly* can understand, what does his code do. |
BrianH 22-Sep-2009 [17856] | & makes more sense than STAY, because it relates to |. Both backtrack. |
Maxim 22-Sep-2009 [17857] | still don't see why the use of blocks is evil when its the way of parse for everything else. |
Pekr 22-Sep-2009 [17858] | Now I don't understand once again - if you are suggesting just changing the name of STAY to &, then please DON't do it! |
BrianH 22-Sep-2009 [17859x3] | Maxim, the a's in Carl's examples aren't involved in the expression. |
Pekr, no, Carl was thinking of changing AND to STAY, but decided against it when he figured out how to make it infix. | |
Maxim, "everything is already AND by default" is not true. Everything is "and then" by default, which is AND with moving forward. What we need is AND without moving forward. An infix & handles that nicely, and is the opposite of the infix | meaning OR. | |
Pekr 22-Sep-2009 [17862] | Ladislav just cheared to how Carl is precious about naming, and he liked STAY and QUOTE. STAY imediatelly expresses its meaning. Changing to to AND makes the situation only worse .... |
BrianH 22-Sep-2009 [17863] | So you want to rename | too? |
Maxim 22-Sep-2009 [17864x3] | brian yes... I am wrapping my head around this... but I have to re-read the STAY proposal before getting too vocal... I'ts been to long since I've read it. |
I actually wouldn't mind it being 'OR | |
(bts... about the 'a yes I didn't use the same vars in sequence... sorry) | |
BrianH 22-Sep-2009 [17867x2] | [+ a | b | c] is equivalent to [a b | not a c] but without the overhead or side effects being executed. |
So, do you have a name for that? | |
Pekr 22-Sep-2009 [17869] | This is really just - EITHER A [b][c], no? |
Maxim 22-Sep-2009 [17870] | [a b | not a c] actually it should say... [ [a b] | [not a c]] sorry but the | doesn't roll back the a it will only roll back the b... its bit me too many times |
BrianH 22-Sep-2009 [17871] | No, because the a is not a condition, it's a rule. |
Maxim 22-Sep-2009 [17872] | what brian means is that the rule is consumed.... its just something that has to be understood. |
BrianH 22-Sep-2009 [17873] | Maxim, the a is rolled back too. |
Pekr 22-Sep-2009 [17874] | COPY is not COPY too, so what? REBOL copy value - PARSE - copy variable to-rule |
Maxim 22-Sep-2009 [17875] | it shoudn't be called EITHER specifically for this reason. |
Pekr 22-Sep-2009 [17876] | Brian - this is not easy to name ... |
Maxim 22-Sep-2009 [17877] | not in my experience... really it says it should and it works.. . until something screws it up... its happened to me COUNTLESS times... I've always had to put my rules in blocks to make sure they don't get fucked up by "|" |
Pekr 22-Sep-2009 [17878] | btw - how will you explain it to the user? Maybe it is just too new, but unless you provided me with [a b | not a c], I was not able to depict [+ a | b | c] |
BrianH 22-Sep-2009 [17879] | OK, let's try an easy one. Try to explain + without usingh the word "addition". Symbols are sed for a reason. |
Maxim 22-Sep-2009 [17880x3] | but its just being picky... the real thing... is what is evil about blocks? |
but you see its not an addition. its "go-over-this-and-accumulate-failure-or-not" | |
here... we have the precise name... its over 30 chars long ;-) | |
Pekr 22-Sep-2009 [17883] | we went too far. We should accept Steeves proposal - allow EITHER to be embraced as using condition OR the rule. Single as that. You can't beat the EITHER name. Thinking here and there, I can't imagine how + could be named, with the used syntax ... |
older newer | first last |