r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[!REBOL3-OLD1]

BrianH
22-Sep-2009
[17902]
Only some words can be infix, depending on the semantics of the operation. 
& and | (whatever they are eventually called) can be infix. The rest 
have to be prefix.
Maxim
22-Sep-2009
[17903]
I'm sorry, but the |  will just end up being


 [   complex rule with its own  "|" symbols ] | [   complex rule with 
 its own  "|" symbols] | [  complex rule with its own  "|" symbols 
  ]  so really the use of "|" jusy adds clutter and ambuiguity.
BrianH
22-Sep-2009
[17904]
When you don't have a descriptive term that covers an idea, you use 
a symbol and tell someone to learn it.
Maxim
22-Sep-2009
[17905]
but the idea about REBOL has always been to be anal about FINDING 
those terms... Carl himself has admitted to using up more time choosing 
mezz names than coding them.
BrianH
22-Sep-2009
[17906x2]
PARSE already has a lot of | symbols, and the operation currently 
proposed to be named | actually ties intto the current semantics 
of those | operations.
currently proposed to be named +
Pekr
22-Sep-2009
[17908]
what are you talking about? You want to change the meaning-of, or 
replace | symbol? :-)
BrianH
22-Sep-2009
[17909x2]
I'm having trouble typing because of AltME freezes.
Pekr, *you* want to change the | symbol. Or rather, you want to do 
something exactly equivalent, changing the corresponding & operation 
to STAY.
Pekr
22-Sep-2009
[17911x4]
| is visually good ... it is like wall dividing slots ... it fits 
... the + is more complex. Guru stuff, which we will have difficulcy 
to explain. Maybe it can't be done the other way. So - user has to 
learn what does it do by examples, get used to it, and then maybe, 
he will understand it, once he sees it in the code. The only question 
is, if eventually naming it, or changing the syntax to achieve the 
same, could be done more elegantly, which I start to doubt.
There is NO & operation ...
... not in current parse. Just in parse theory. I don't care about 
the theories.
... you are just using those excuses. Simply put - if you want STAY 
instead of AND or &, then we will throw it back to you, accusing 
you of the need to change already used | symbol by giving it a name 
:-)
BrianH
22-Sep-2009
[17915]
Proposed. Originally, Peta renamed & to AND since he (she?) thought 
that a spelled-out word was required by the dialect. Then I changed 
AND to AT since I didn't know infix operations were possible. Then 
Carl changed AT to STAY, since he didn't see the point. Then he realized 
what the operation meant and changed it back to &, what it should 
have been in the first place since it is the opposite of |.
Pekr
22-Sep-2009
[17916]
I was always thinking about parse being an alien in the parsing world. 
It was just Peta who introduced us to the TDPL, PEG and other terms, 
trying to fit it to various theories. My opinion is - if such changes 
will not lead to eventual direct usage of already existing parse 
rules somewhere out there, then I don't really care about all those 
theories. We are already unique, and I don't want parse to go back 
adhering to some "standards". It feels the same, like changing feel, 
face, facet and all the naming to fit more general naming convention 
of the outer programming world ...
BrianH
22-Sep-2009
[17917x4]
TDPL wasn't used, and PEG was created to describe parsers like PARSE, 
and 5 years later than PARSE was.
The rest of the world is catching up with where PARSE has been for 
10 years.,
And the reason we are adopting operations from PEG, TDPL and GTDPL 
is because they fit into PARSE's semantics and are useful.
It's just filling in the blanks.
Maxim
22-Sep-2009
[17921]
sorry NOT for +
Pekr
22-Sep-2009
[17922]
I just want parse to stay readable for average man. The more symbols 
we add, the less readable the code might be at first sight. We should 
be carefull, or Larry Wall steps-in commenting R3 arrival, stating 
that R3 added even more punctuation :-)
Maxim
22-Sep-2009
[17923x2]
although for "&" I agree, it really is just a single letter symbol 
which means AND, which in this case is right.
especially if the rule is infix (which it seems it will be  :-)
BrianH
22-Sep-2009
[17925]
Perl 6 has already surpassed PARSE in its own category: their "regex" 
engine is a PEG parser, and has useful stuff we're adding now.
Maxim
22-Sep-2009
[17926]
parse hasn't really evolved for what... 10 years?
BrianH
22-Sep-2009
[17927]
PARSE was unique, but is becoming less so.
Maxim
22-Sep-2009
[17928]
I always thought it would be one of the first thing R3 would work 
on.
BrianH
22-Sep-2009
[17929]
PARSE added OPT and BREAK more recently than 10 years ago, and bugs 
were fixed, but otherwise unchanged.
Maxim
22-Sep-2009
[17930x3]
I do thing BRANCH is the better term for the either / + keyword
thing = think
or  BASED-ON    :-)
BrianH
22-Sep-2009
[17933]
This seems like a really good candidate for a symbol, but finding 
a prefix one is tough. If it could be postfix we could use ?, or 
even +. Postfix would look like infix, or rather like C's ?: when 
combined visually with the next | character.
Maxim
22-Sep-2009
[17934]
I saw BASED-ON as a prefix symbol.

based-on rule | yay | nay
BrianH
22-Sep-2009
[17935]
Then [a ? b | c] would be equivalent to [a b | not a c].
Pekr
22-Sep-2009
[17936]
possible name for +  might be: ELSE or OTHERWISE :-)
BrianH
22-Sep-2009
[17937]
Not in prefix it wouldn't be.
Maxim
22-Sep-2009
[17938x2]
brian:   post fix ? is  actually not bad... and since condition rule 
is traversed anyways (either its true or false) .... it probably 
doable...
yeah so far, the only prefix term which reads well IMHO is BASED-ON
BrianH
22-Sep-2009
[17940]
What I don't know is whether it is possible to do postfix anything 
- failure might cause backtracking before the ? is reached.
Pekr
22-Sep-2009
[17941]
I really like, like in the end we are going to decode it for the 
users in documentation - "Now, you parse user, please read following 
syntax as - EITHER rule A is matched, THEN B is evaluated ELSE C 
is valuate" ... yet we will pretend, that we came up with some cool 
symbol to express what we just had to explain in human words :-)
Maxim
22-Sep-2009
[17942x3]
no we won't use either... cause that is not what is happeneing.
;-)
attempts to match a rule, AND runs first rule if it matched OR second 
rule if it did not.
Pekr
22-Sep-2009
[17945x2]
no? how do you explain [a b | not a c] then? I thought that - EITHER 
(IF) A is mathed, then B is being matched, or C is being matched 
(by being matched I mean - evaluated, hence might fail)
Max - who decides, what EITHER mean in parse context? We do. I can 
say - don't use COPY, as this is not what is happening (in REBOL's 
copy function semantics equivalence)
Maxim
22-Sep-2009
[17947]
but copy actually does copy what is being parsed.  either isn't comparing 
a value like the if PARSE statement.
Pekr
22-Sep-2009
[17948]
Max - you are NOT in REBOL level, so free yourself from pedantic 
"EITHER uses this syntax" equivalence, or dismiss COPY keyword too 
- it absolutly does not fit REBOL and even today on blog I had to 
fix Ingo's type, where he ommited to provide parse COPY with word 
to copy to ;-)
Maxim
22-Sep-2009
[17949]
but in the end,  I just dont want it to be +  which is the worst... 
 even  "?"  prefix is better
Pekr
22-Sep-2009
[17950x2]
Once again - free yourself from REBOL, gee. Who said said EITHER 
should compare anything? Copy breaks normal copy rebol logic. VID 
'at command is completly different in semantic meaning to REBOL 'AT. 
So - how is that that for EITHER we do care about what it means in 
REBOL? The word EXACTLY expresses what you are doing ...
If you want to be so pedantic, let's exclude all word from parse, 
which have different meaning in REBOL. It means COPY, TO ... any 
other candidate? ;-)