World: r3wp
[!REBOL3-OLD1]
older newer | first last |
Pekr 7-Aug-2006 [1126x5] | hmm, not sure .... |
I understood it as follows - R3 will be componentised, RT keeps language (merely a dll), the rest is nearly open ... now the question is, how much is "the rest" :-) | |
I think that there was talk about console, some parts of View, so not sure ... | |
maybe the easier porting will be because there will be nothing like mysql driver inside etc. | |
but - those are just my speculations ... | |
Tomc 7-Aug-2006 [1131] | http://www.rebol.net/article/0284.html |
Pekr 17-Aug-2006 [1132] | hehe, I noticed original R3 announcement doc was updated too on August-7. Now we at least know, what "Long Term" means - the document states Carl would like to see alpha available sometimes in the Fall 2006..... |
Graham 17-Aug-2006 [1133x2] | when's that in months? |
October? | |
Pekr 17-Aug-2006 [1135x2] | difficult to say ... I just wonder, as for alpha, how it happened that first educated guess of author was half a year off? :-) |
anyway - let's say it will be 2006 .... 2007 is gonna be the year of R3, and IIRC 10nth anniversary of Rebol. Devcon 2007 is going to be great I think :-) | |
Ladislav 21-Aug-2006 [1137x3] | What do you think about this test? ; local variable stability [ repeat i 2 [i: 1] ] |
it is interesting, that FOR is able to pass this test: >> for i 1 2 1 [i: 1] == 1 | |
Now the question is, what behaviour we prefer | |
MichaelB 21-Aug-2006 [1140] | the repeat version, as this is what I would expect and call intuitive ... the word 'i gets bound to the block and is always being reset - so an infinite loop so 'for seams to not care or at least keeps the state of 'i for it's own purposes - how should a user know this, even though some assignment like this might flag in most cases a programming error (and in the other case in a for loop one can't manipulate the state of 'i explicitely) |
Henrik 21-Aug-2006 [1141] | I would definitely prefer that 'i is bound to the block. You might want to do adjustments to 'i during the loop, although I don't really use that, but sometimes it can be useful with variable stepping or resetting. |
Anton 21-Aug-2006 [1142] | Yes I prefer repeat too, (my initial thought, at least). Were the bugs/issues with FOR ever fixed ? I can't remember now. |
Cyphre 21-Aug-2006 [1143] | I also vote for the REPEAT behaviour. |
Ladislav 21-Aug-2006 [1144] | Were the bugs/issues with FOR ever fixed ? - no |
Pekr 21-Aug-2006 [1145] | and will there be? :-) |
Ladislav 21-Aug-2006 [1146] | maybe ;-) |
Pekr 21-Aug-2006 [1147] | well, surely, such thing is not main priority in such big task as R3 is :-) |
Volker 21-Aug-2006 [1148] | Silly idea: how to use 'protect for the loop-var? is that to expensive? |
Jerry 21-Aug-2006 [1149] | I would like to know the difference between action! and native!. Thanks! In Carl's REBOL 3 Blog Article #0039, he says that the ordinal functions (first, second, ...) are of the action! type in REBOL 2, and will be of native! type in REBOL 3. |
Gabriele 22-Aug-2006 [1150x2] | actions are like "methods" (if you are familiar with OOP languages) for values. |
i.e. insert series value is like series.insert(value) in oop languages. | |
Pekr 22-Aug-2006 [1152] | and series.insert(value) will not be true in the native instead of action type? |
Gabriele 22-Aug-2006 [1153x2] | a native is more like a C function, an action is more like a C++ method. anyway it's mostly an implementation detail. |
the distinction will make more sense once we get custom types. | |
Henrik 22-Aug-2006 [1155] | so no speed differences? |
Ladislav 22-Aug-2006 [1156] | what do you think about this: repeat i 3 [probe i i: "a"] |
Henrik 22-Aug-2006 [1157] | ladislav, I think that's OK. interestingly, you can skip with decimal! values to make a smaller step than 1. I noticed two funny things though: >> repeat i 3 [probe i i: i - 0.5] 1 0.5 1.11022302462516E-16 -0.5 -1.0 -1.5 -2.0 -2.5 One is that 0 isn't exactly zero and the other thing is that it counts to the absolute value of 'i |
Ladislav 22-Aug-2006 [1158x2] | funny, indeed |
actually the "0 isn't exactly zero" says something else - there is an error in the computation, which is expectable e.g. for 0.3 - 0.1 - 0.1 - 0.1 (binary floating point numbers cannot represent 0.1 exactly), but is not expectable for 1 - 0.5 - 0.5 , because such numbers are exactly representable using binary floating point | |
JaimeVargas 22-Aug-2006 [1160x2] | Humm. I don't like it. It violates the contract for REPEAT. USAGE: REPEAT 'word value body DESCRIPTION: Evaluates a block a number of times or over a series. REPEAT is a native value . ARGUMENTS: word -- Word to set each time (Type: word) value -- Maximum number or series to traverse (Type: integer series) ;;;;; This part of the contract is being broken by the example. body -- Block to evaluate each time (Type: block) |
In my opinion Rebol should prevent the programmer from shooting himself in the foot. Also there are other forms such as FOR and WHILE that can be used for loops with variable steps. Maybe CFOR should be added to the core language. The problem with [ repeat i 3 [probe i i: i - 0.5]] is that it obscures the intention of the programmer. Does he wants to iterate 3 times, or more? This is not clear with such code. | |
Ladislav 23-Aug-2006 [1162] | yes, Jaime, the example may be named "how to shoot yourself in the foot using REPEAT" |
Gabriele 23-Aug-2006 [1163] | Henrik: well, actions need to look into a function table, but natives probably need to check the type. unless the code for the action/native is very small the speed difference is probably unnoticeable. |
Ladislav 23-Aug-2006 [1164x2] | this is "a bit problematic": all [true ()] all [() true] any thoughts? |
actually, it *is* consistent, it only does not cooperate well with IF | |
JaimeVargas 23-Aug-2006 [1166x7] | >> true = all [true ()] ** Script Error: Operator is missing an argument ** Near: true = all [true ()] >> true = all [() true] == true |
>> true = all [true ()] ** Script Error: Operator is missing an argument ** Near: true = all [true ()] >> true = all [() true] == true | |
Hmm. Why the breaking of symmetry? | |
IMHO the behaviors should be consistent. | |
It also seems that in the first case "all [true () ]" is not escaped after the first valid predicate and the parens are still evaluated which sort of explaings the error because unset! is returned. Maybe we need too allow do [()] should return none instead of unset!. | |
After some thoughts the breaking of symmetry is valid in this case. Still the error thrown due to the return unset! value is missleading. | |
Maybe unset! should be expelled from the ALL and ANY natives. After all there is not much that you can do with unset!, but expelling it is going to be hard. Lad, I am curious about your opinion. | |
Anton 23-Aug-2006 [1173x3] | I think I'm happy with ALL and ANY as is. |
Of that repeat example: repeat i 3 [probe i i: "a"] I think that repeat must be checking the datatype and breaking when it is wrong (ie. false = integer? "a"). This can be seen as protecting the user from infinite loops caused by such user mistakes. Jaime is right that this behaviour has not been written into the function description, though. | |
repeat i 3 [?? i i: 3.0] ; different datatype, decimal instead of integer | |
older newer | first last |