« first day (2160 days earlier)      last day (1620 days later) » 

7:47 AM
If ever you wanted to learn #REBOL, there is no better website on earth than this one to do so: https://timeserieslord.github.io/rvc/
 
 
5 hours later…
12:26 PM
ah, that person was banned on the Gitter Red rooms for the second time already ...
 
@pekr Shame, it seems that someone there is/was genuinely interested ...
 
not at all
His knowledge towards the history of languages was indeed impressive. But his behaviour less so. Rude to ppl, calling names. He used the name vexerciser before the timeserioslord
here's one of his replies: "So why are you guys such fags? That name-here is a such a twat. Guys who cling to cliques are weak-willed and weak-minded. Someone like me is superior to guys like you and your dummy friends. That is why you huddle together and banish guys like me."
 
12:43 PM
Just take a look at his Twitter. It speaks for itself.
 
2
Q: Convert a block of strings to a block in Red

MufferawHow to convert a block of strings into a block? To change this: keep rejoin['circle " " coord " " 5 " "]]] ["circle 10x10 5 " "circle 20x20 5 " "circle 30x30 5 "] to this: [circle 10x10 5 circle 20x20 5 circle 30x30 5] I want to change it so it can be used with VID. view [ size 80...

1
A: Convert a block of strings to a block in Red

rebolekTo convert string! to Red code, you need to LOAD it: red>> load "circle 10x10 5 " == [circle 10x10 5] So for block of string!s, just load them in loop: collect [ foreach arg ["circle 10x10 5 " "circle 20x20 5 " "circle 30x30 5 "] [ keep load arg ] ] == [circle 10x10 5 circle 2...

 
1:25 PM
0
A: Convert a block of strings to a block in Red

Geeky IYou can also use load rejoin to convert ["set " "of " "spaced " "strings"] to red>> load rejoin ["circle 10x10 5 " "circle 20x20 5 " "circle 30x30 5 "] == [circle 10x10 5 circle 20x20 5 circle 30x30 5] Best thing to do is not have a block of strings in the first place and try to use literals ...

 
 
1 hour later…
2:27 PM
@RebolBot
1 + 2 * 3
 
@ShixinZeng Can you be a little more specific?
; Brought to you by: try.rebol.nl
; rebol.com/r3/docs/errors/script-no-value.html
    *** ERROR
** Script error: >> has no value
** Where:
** Near: try load/all join %/users/try-REBOL/data/ system/script/args...
; Brought to you by: try.rebol.nl
== 9
 
>> 1 + x: 2 * 3
 
; Brought to you by: try.rebol.nl
== 7
 
@HostileFork In Ren-C "1 + 2 * 3" gives me "7"
is this intentional?
 
>> 1 + (x: 2) * 3
 
2:29 PM
; Brought to you by: try.rebol.nl
== 9
 
There is some debate about that particular change ...
 
I think I missed that one
 
@ShixinZeng It's a good idea for a number of reasons; in my view the simpler rule makes it easier to do things like the PROBE for example and have it not be "invasive" in the sense that the prefix-nature of probe alters the expression. But it also permits a stack-based optimization for SET-WORD! so it doesn't need to recurse Do_Core().
 
Not sure how much that affect our code, as I've said, I am trying to avoid doing <r3-legacy>
 
2:40 PM
@ShixinZeng The cases where it affects = are easy enough to find (you'll get errors where you didn't before), but the math ones might require manual inspection if you frequently exploited the "counterintuitive" precedence. In my own case, I tended to use parentheses since (1 + 2) * 3 would be more widely understood.
>> 1 + probe 2 * 3
 
; Brought to you by: try.rebol.nl
6
== 7
 
>> 1 + 2 * 3
 
; Brought to you by: try.rebol.nl
== 9
 
Giving the same answer there is better, IMO.
 
2:55 PM
@DaviddenHaring noticed this issue when he was trying to run rebol.com/speed.r
@HostileFork but is this right?
>> 1 / 2 * 3
== 0.16666666666666666
>> 1 / 2 * 3
 
; Brought to you by: try.rebol.nl
== 1.5
 
>> 1 / 2 * 3
== 0.16666666666666666

>> 1 / x: 2 * 3
== 0.16666666666666666

>> 1 / x: probe 2 * 3
6
== 0.16666666666666666
@ShixinZeng Yes, that's more consistent IMO.
 
@HostileFork so what's the precedence rule?
or the evaluation order?
 
There is no rule, it simply doesn't do anything odd in reaction to infix.
>> divide 1 2 * 3
 
; Brought to you by: try.rebol.nl
== 0.16666666666666666
 
3:08 PM
>> divide 1 x: 2 * 3
 
; Brought to you by: try.rebol.nl
== 0.16666666666666666
 
if there is no rule, how can one write the math expression?
 
I mean to say there's no rule different from the prefix rule, in the sense of how lookahead is handled.
This is why divide 1 2 * 3 and 1 / 2 * 3 come up with the same answer, and why divide 1 probe 2 * 3 and 1 / probe 2 * 3 come up with the same answer.
 
So when someone write "1 / 2 * 3", he/she needs to think "divide 1 multiply 2 3"?
 
>> 1 + 2 * 3
 
3:11 PM
; Brought to you by: try.rebol.nl
== 9
 
>> 2 * 3 + 1
 
; Brought to you by: try.rebol.nl
== 7
 
@ShixinZeng Rebol never had precedence; that's not what this detail was about.
You've always had to parenthesize your expressions to get control over precedence.
 
Yep, I understand that, it's always left to right
 
Left to right!
 
3:12 PM
So all this is about is taking away a little wrench in behavior that related to lookahead.
 
Well, what I was trying to say is that "1 / 2 * 3 = 0.1666666666" is VERY VERY counterintuitive
 
I guess I don't understand how much less counterintuitive that is than "1 + 2 * 3 => 9" and "2 * 3 + 1 => 7"
There's also MATH, remember
 
at least that has a rule that you can teach an elementary school student to understand: left to right
 
The classic speed.r is completely broken in Ren-C. That's a red flag when it's due to a simple math expression.
 
I think you haven't looked hard enough at the fact that it's not that simple. The infix lookahead mechanic doesn't hold up beyond what you are looking at as simple examples. And also, there is MATH in Ren-C
>> math [1 / 2 * 3]
== 1.5
 
3:19 PM
>> 1 / 2 * 3 + 1
== 0.125
So this becomes right to left
 
>> divide 1 multiply 2 add 3 1
 
; Brought to you by: try.rebol.nl
== 0.125
 
I see that, but that's mathematically equivalent to evaluate from right to left
@DaviddenHaring anyway, I guess your preference of "add 1 1" over "1 + 1" is a good one :-)
 
>> 1 / multiply 2 3 + 1
 
; Brought to you by: try.rebol.nl
== 0.125
 
3:26 PM
>> 1 / (2 * (3 + 1))
 
; Brought to you by: try.rebol.nl
== 0.125
 
I see that you just made ops aliases to the functions with infix
 
When it comes to pleasing people who don't have prior experience with Rebol, MATH as a dialect is the better answer than the particular warping of the evaluator that was used as an attempt to make a few examples "work".
@DaviddenHaring Please do note that these things are discussed, tracked, and in this case just one switch. I'm open to discussing it, but this wasn't done for no reason--so if we're going to talk about it let's do so with all the information on the table.
@ShixinZeng @DaviddenHaring It's not the most critical change from my point of view, but I do feel it improves the language. Yet if on some of these switches we end up flipping the bit for pragmatic reasons in favor of a legacy behavior...then that is what we do. But the point is to work out the design, know the tradeoffs, and at least be able to explain them thoroughly.
 
3:47 PM
I am still interested in how you would explain to a new learner that "1 / 2 * 3" gives "0.16666666"
 
I would ask them to make the realization that you did; that there isn't a bending for infix any different than the function call itself. And then I'd ask you how to explain to a new learner that 10 = 5 + 5 is an error while 10 = probe 5 + 5 is true. And then I would ask if Rebol's evaluator can really satisfy those thinking about classic math expressions, or if the dialect math [1 / 2 * 3] is a superior direction. :-/
I think that is the insight a new learner will get the most out of--that Rebol isn't constrained by the usual rules.
 
"10 = 5 + 5" is an error because it evaluates from left to right, not very intuitive, but there is still a simple rule/explanation
 
But you're saying that the moment you use anything that isn't infix, the rule changes. The rule isn't left to right at all; that's a gloss that applies in the somewhat rare case of using only infix operations. The moment you mix anything else in you have to learn the real rule, which is a twisty lookahead thing that's not about left to right at all.
Infix done properly can give Rebol great magic powers. Neat operators and such that blend in with the language's model of evaluation cleanly. But done improperly it can't grant those powers as easily or compose as well. It just does a pretty lousy job of being the MATH dialect with conventional precedence new users actually want.
And when people learn how to say math [1 + 2 * 3 + 4 / 2] they might learn how to dialect their code even moreso. Maybe they've got several math expressions and want anything in parentheses to be evaluated using it, like compose... so they don't have to keep saying MATH over and over.
 
4:10 PM
I can see that might be needed
 
And even better... we have a MATH now. Maybe not the greatest, but it's in there.
So it's a place to talk about these expectations which apply very particularly to math expressions... it can do whatever people expect without being constrained by the evaluator rules.
And we already know from users classic complaints about Rebol, the old way didn't do "what they expected". It's just that those who got used to Rebol got used to it. Though I am skeptical of just how used to it they are in terms of being able to predict expressions if quizzed when they are mixed up a little and not pure infix.
 
I see, I think I need to take a look at MATH
 
@ShixinZeng Note MATH can do an expansion, if you have a calculation you want to run a number of times or something:
>> math/only [1 + 2 * 3]
== [add 1 multiply 2 3]

>> math/only [2 * 3 + 1]
== [add multiply 2 3 1]
 
4:26 PM
interesting
So math doesn't take functions?
>> math [1 + sine 0]
== _
 
@ShixinZeng Bug. That should work.
It's not something that's getting a lot of use or testing; it got thrown in there to start the conversation. It just complained to me about /translate... I think originally that was the refinement name and I thought /only might be better.
math/expand, math/translate, math/only... hm
 
I see
 
Be back in a bit...
 
talk to you later
 
5:02 PM
@HostileFork I have tried to explain shift and reduce, that's what's going on here, not MATH, please stop saying infix is MATH.
We know it's not math, it's evaluation of a Rebol expression, whether it's numbers or not.
It just so happens that the common infix operators are math-ish, but that is all.
And yes, shift and reduce could probably be described as a twisty lookahead thing.
But not if we want to be productive.
BTW, "left to right" is another way of saying "prioritizing reduction over shifting".
Hrm. Looks like Rebol 3 Alpha only contains "math-ish" operators, dangit. I thought there was at least one other.
Anyways, the equality operators do transcend math, but, for them, shifting and reducing is a non-issue.
I guess the bottom line is I simply prefer to read set-words as acting like an invisible open parenthesis, and that that is different from the default left-to-right parsing of infix.
 
5:29 PM
In this I think it is detracting to think of extending infix to non-binary forms, for the shift/reduce re-prioritization only makes sense in the 1D chaining case.
Which probably means infix is really only good for math, pries foot from mouth, sorry HF.
OK, I'm not perfect, I thought I was wrong once, append is a classic chaining operator, perfect for infix, I retract my retraction, sorry again!
But maybe that operator isn't in Rebol for a reason ... anyone?
 
 
1 hour later…
7:00 PM
@ShixinZeng Well, my predilection towards prefix math fits nicely into @HostileFork vision of the future. :)
2
Agreeing to this and writing new code is one thing. Breaking our existing code is what worries me.
 
 
1 hour later…
8:12 PM
@DaviddenHaring We could write scanners to point out expressions where the semantics changed if it is leading to problems. It's just a question of when that's worthwhile vs. looking over the code and maybe just parenthesizing it to be safe.
And when code is meant to be left as <r3-legacy> vs. taking the upgrade plunge.
@MarkI You are overstating the sophistication of what is going on in R3-Alpha. The simple rule is that it looks ahead for infix operators unless it is already in the midst of processing an infix operation.
@MarkI Okay, on this note of infix not just being about math... what do you think x: default 2 + 3 should be?
Noting that in this new case, default is an infix operator...whose left hand argument is a quoted SET-WORD! and whose second argument is whatever you want to set the default to.
"looks ahead for infix operators in nested evaluations" I mean. e.g. it's when it processes a recursion for a function argument during an infix evaluation that it suppresses the lookahead.
I will also re-iterate for those who haven't quite absorbed it, Ren-C does not have an idea of infix nor of OP!. It has a mode of SET which allows the binding of a function to a word the option of one unit of lookback.
This means something like (+ 1 2 3 4) can be made to work as an arbitrary summer, by looking back and noticing there is no previous element to be added and then processing variadic input...while behaving as normal infix if there is something to look back and see.
 
8:49 PM
>> foo: function [a b c] [print [a b c]]

>> foo 1 2 + 3 4 * 5
1 5 20

>> bar: enfix :foo ;-- or set/lookback 'bar :foo

>> 1 bar 2 + 3 4 * 5
1 5 20
 
9:20 PM
Evaluation on Rebol3 Porting Guide ("Ren-C" branch)
The <| operator is an infix variadic function which evaluates to its left hand side, but still runs all the expressions on the right. >> 10 + 20 <| print "Hello" 100 + 200 Hello == 30 ...
✍ 1 comment
^-- another example of where the flat, consistent form of evaluation helps build something great. I just haven't seen any slam dunks out of the R3-Alpha behavior...while seeing things I think are outright bad, such as the 10 = probe 5 + 5 working and then you take the probe out and it stops working. :-/
And though I don't particularly want to make this an argument for doing things one way or another, it is more efficient, and permits the stack-based handling of things like a: b: c: d: e: f: 10 where that's all done in a tight loop in a single call to Do_Core().
 
 
2 hours later…
11:27 PM
@giuliolunati Okay, two bugs closed for you...any more while I'm available? :-)
 

« first day (2160 days earlier)      last day (1620 days later) »