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

World: r3wp

[!REBOL3]

Steeve
7-May-2010
[2891]
It's not refined in my head yet enough but i think 'IN needs of a 
redesign.

Especially this form allowed by the specs but throwing an error currently.
>> in [obj1 obj2 ...] [a b c d]
== Error!

it could be powerfull, allowing to inherit properties from a hierarchy 
of objects (think about nested gobs with their own context)
But it's not enough...
I would like that the returned block discard the unbound words.
It would be consistent with the single form.
>> in context [a: 1] 'b
== none

I don't know if i'm clear...
BrianH
7-May-2010
[2892x3]
That has already been suggested before (don't remember the ticket), 
though without the "discard the unbound words" feature that would 
break the code that IN context block! usually works with. IIRC it 
was dismissed, because IN is supposed to be a low-level function 
and this would slow it down immensely.
A big O slowdown, from O(n) to O(m * n).
So slow that we are better off not having such a feature, having 
to rewrite our code so we don't need to do that at all.
Steeve
7-May-2010
[2895]
well, if it's discard only the unbound word (words having no context 
at all) there will be no sideeffect I guess
in context [a: 1] unbind [a b c]
BrianH
7-May-2010
[2896]
Remember, IN whatever block! is usually preceded by DO. You don't 
want to remove words from code you are going to DO.
Steeve
7-May-2010
[2897]
or just as an option
BrianH
7-May-2010
[2898x4]
And lit-words and refinements also get bound, so removing them because 
they are unbound would be bad, since they have meaning beyond their 
binding. And adding options to IN will slow it down too; IN is supposed 
to be *fast*.
>> a: [a] same? a in self a
== true

IN something block! is like BIND, not BIND/copy - IN modifies. Don't 
remove stuff from the original.
IN something word doesn't modify though.
I think words are immutable in R3, like integers, tuples and typesets. 
When IN or BIND binds a block I think they replace the words they 
bind with new words that refer to the same symbols, but a new context. 
So IN and BIND never modify words - they replace them.
Steeve
7-May-2010
[2902]
Words Immutable you say ?

>> p: to-path 'a
>> x: reduce [p p p p p p ]
== [a a a a a a]
>> p/1: 'b
>> x
== [b b b b b b]

lol...
BrianH
7-May-2010
[2903]
Those are the bindings that the words point to. I am actually talking 
about word!, lit-word!, ... values themselves.
Steeve
7-May-2010
[2904]
Was just a joke
BrianH
7-May-2010
[2905x2]
You can't change the binding of a word. You can't change the symbol 
of a word. Either will result in a new word. There isn't anything 
else that makes up a word. The only thing you can change is the value 
slot that the word points to, but you can't change *which* value 
slot the word points to, just the contents of the slot.
And that value slot is not part of the word :)
Steeve
7-May-2010
[2907]
hey stop i'm in your front side :)
BrianH
7-May-2010
[2908]
Sorry, it was just weird that I just realized this now :)
Steeve
7-May-2010
[2909x2]
don't want to be hurt...
I was in your brain just know, was weird enough... :)
Pekr
7-May-2010
[2911]
A99 released ...
Steeve
7-May-2010
[2912]
A99 downloaded...
BrianH
7-May-2010
[2913]
Wow, that was quick! :)
Pekr
7-May-2010
[2914]
Carl also adressed my complaint to website - it was kind of difficult 
to get to changelog. Now A99 is propagated even to main page of rebol.com 
 .... small changes, but helpful ...
BrianH
7-May-2010
[2915]
Tested, it's good!
GiuseppeC
7-May-2010
[2916]
It seems that the migration of GUI to the external host is more difficult 
that expected.
Maxim
7-May-2010
[2917]
yes Carls is struggling, but by what I hear, he really is committed 
to doing it.   he WANTS to do it... its just that he's realizing 
how deeply rooted the view code is... all kinds of tricks now have 
to be architectured and properly APIed.
Terry
7-May-2010
[2918]
Anyway to return the key used in a map when using find values-of 
map! ?
Paul
7-May-2010
[2919x4]
Carl is suddently on FIRE!!!!   Go Carl Go!!!!
Wouldn' t it be nice to do something like this:
a:   5
b: a < 10

where b gets set to the value of a instead of true?
We may have to include a new keyword such as bool to the mix just 
to get true or false when desired.

b: bool a < 10
Just a thought.
Maxim
7-May-2010
[2923]
bool: func [val][not not val]
;-)
Paul
7-May-2010
[2924x3]
:-)
See wouldn't that be a better way to do things?
That seems to be in line with simple thigns should be simple to do.
BrianH
8-May-2010
[2927]
BOOL: :TRUE?
Paul
8-May-2010
[2928]
Yeah forgot we have that in R3.  But we still can't do as I showed 
above.
Maxim
8-May-2010
[2929]
yay TRUE? is in R3 :-)
BrianH
8-May-2010
[2930]
Oh, you are right Paul, I was looking at Maxim's code, sorry. You 
want Icon-style conditionals, not TRUE?. Not sure how to fake that.
Paul
8-May-2010
[2931]
It's a feature I use in C# often.
Andreas
8-May-2010
[2932]
How, in C#?
Paul
8-May-2010
[2933x2]
The feature I use often is a reference to the boolean stuff.  We 
can do that part in REBOL already - always have been as far as I 
can remember.
It wasn't a reference to the code piece that I stated earlier.
Claude
8-May-2010
[2935x2]
R3 problem with é !!!!
>> upgrade
Fetching upgrade check ...

Script: "REBOL 3.0 Version Upgrade" Version: 1.0.1 Date: 7-Apr-2009
Checking for updates...

R3 current version: 2.100.99.4.2 
It was released on: 8-May-2010/0:13:33 

Your version is current.

** Script error: invalid argument: %/home/ramcla/Téléchargements/
** Where: change-dir all either applier do try upgrade
** Near: change-dir dir
BrianH
9-May-2010
[2937x2]
Paul, I don't understand your request. For the code:
      b: a < 10

and the request "where b gets set to the value of a instead of true?", 
there are at least two ways to interpret *why* b would be set to 
the value of a. Either you want the op < to return the value of a 
rather than true (Icon-style comparison behavior, which C# doesn't 
have) or you want the code to be equivalent to (b: a) < 10, different 
precedence levels for op evaluation (which C# does have), or something 
completely different that I don't get. Which interpretation is what 
you meant?
Claude, where is R3 getting the path %/home/ramcla/Téléchargements/ 
? And are you encoding é in Unicode or Latin1?
Claude
9-May-2010
[2939]
brianH in /etc/default/local i have  LANG="fr_BE.UTF-8"   (ubuntu 
lucid 10.4)
Paul
9-May-2010
[2940]
Brian I don't know Icon so I can't say if it is the same behavior. 
 However, what I was saying is that it would be nice to see if the 
expression is true then the value of the expression be assign to 
the set-word.   A change like this would have to happen at the parsing 
level of the code.  You couldn't just modify the operator.