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

World: r3wp

[!REBOL3-OLD1]

Henrik
2-Apr-2009
[12428]
you can still follow my screenshots at http://rebol.hmkdesign.dk/files/r3/gui/
Claude
2-Apr-2009
[12429]
yes i check it often ;-)
Henrik
2-Apr-2009
[12430]
The process now is to clean up the skin, making it as simple as possible 
first (no gradients or prettiness for now), so Carl will be able 
to approve it and so I've started from scratch, fetching in the styles 
one at a time. During this process, I've exposed a few problems and 
solved those, so it was a good idea to do that.
GiuseppeC
2-Apr-2009
[12431]
Just a question: will REBOL3 have more Obejct Oriented capabilities 
than REBOL2 ?
Geomol
2-Apr-2009
[12432]
You can use path (index) with objects in R3, like you can with blocks 
in R2. Like:
o: make object! [a: 1 b: 2]
o/1: 42
Steeve
2-Apr-2009
[12433]
like what ?
Maxim
2-Apr-2009
[12434]
geo, are you implying that path notation for blocks has been removed 
from R3?
Geomol
2-Apr-2009
[12435x2]
But if you think in lines of classes, private/public content etc., 
then I don't think so.
Maxim, no no, you can just also do it with objects.
Steeve
2-Apr-2009
[12437]
private/public ??? who need that
Maxim
2-Apr-2009
[12438x2]
phew!
steeve are you being ironic?
Geomol
2-Apr-2009
[12440]
There are ways to make private data with object in R2 aswell, using 
BIND, if I remember.
Maxim
2-Apr-2009
[12441]
yes you can bind code to two different objects, its quite easy in 
fact.
Steeve
2-Apr-2009
[12442]
but you can't bind properties of one object into another one
Maxim
2-Apr-2009
[12443]
define properties
Steeve
2-Apr-2009
[12444]
no inheritance either
Maxim
2-Apr-2009
[12445]
you can have a function in one object which executes code from anothe 
object using its own values.
Steeve
2-Apr-2009
[12446]
attributes/vars of objects
Geomol
2-Apr-2009
[12447]
What I meant is:

o: context [
	a++: show-a: none
	use [a] [
		a: 0
		a++: does [a: a + 1]
		show-a: does [a]
	]
]


Whis way a is hidden, and you have two methods, one to add 1 to a, 
and one to show a.
Steeve
2-Apr-2009
[12448]
I prefer that

context [
	a: 0
	set 'o context [
		a++: does [a: a +1]
		show-a: does [a]	
	] 
]
Geomol
2-Apr-2009
[12449]
Nice one!
Steeve
2-Apr-2009
[12450]
i use it all the time
Geomol
2-Apr-2009
[12451x2]
And I use that a lot myself too.
Almost all my programs start with:

REBOL [ ...]

context [
...
Steeve
2-Apr-2009
[12453]
so, we don't need that private/public stuff
BrianH
2-Apr-2009
[12454x2]
It is planned to get access controls for object! fields, but we don't 
know how yet (haven't decided).
REBOL 3 already has module encapsulation (as of last week).
Oldes
2-Apr-2009
[12456]
Also in modules.. once there will be basic functionality (if I understood 
well)
Geomol
2-Apr-2009
[12457]
We also have multiple inheritance (kind of):

>> o1: context [a: 1]
>> o2: context [b: 2]
>> o3: make make o1 o2 [c: 3]
>> o3/a
== 1
>> o3/b
== 2
>> o3/c
== 3


I can't remember, what else is in OO theory. But don't we have most?
Steeve
2-Apr-2009
[12458]
its not dynamic inheritance
BrianH
2-Apr-2009
[12459]
It's not. We do dynamic inheritance manually in REBOL. Our objects 
are object-oriented in a different way than class-based langs.
Maxim
2-Apr-2009
[12460x3]
but having classes is MUCH faster. I mean exponentially.  as in liquid 
we are talking about 100 times on large datasets.
and with huge datasets it becomes wholly impossible to work with 
rebol's object system.
accessors would allow us to build ANY OOP theory within.
BrianH
2-Apr-2009
[12463]
You optimize your code differently for prototype-based object-oriented 
languages than you do with class-based.
Maxim
2-Apr-2009
[12464x4]
even hiding liquid's dataflow engine to make it completely invisible 
  :-)
you can't optimise the fact that rebol's static binding has to be. 
 this is both slow and memory intensive.
using classes in liquid I was able to go over 1 million nodes in 
a decent time frame, under 400MB.  using prototypes, I wasn't even 
able to allocate 100000 nodes.
and at 10000 nodes, IIRC it already takes like 10 minutes.
BrianH
2-Apr-2009
[12468]
Accessors are one proposal for the upcoming object revamp. Class-based 
is unlikely, since we can emulate classes just as fast as any other 
non-compiled language.
Maxim
2-Apr-2009
[12469]
10000 (concurrent) nodes in current liquid takes a few seconds to 
allocate  :-)
BrianH
2-Apr-2009
[12470]
You don't have the R3 tricks.
Maxim
2-Apr-2009
[12471x2]
then the liquid classes will be Even faster in R3?  ;-D
if they didn't crash it outright  :-(
BrianH
2-Apr-2009
[12473]
Of course, but only if you get involved in the development discussion 
when we do the object revamp :)
Maxim
2-Apr-2009
[12474]
is there a target on when that will happen?
BrianH
2-Apr-2009
[12475]
No, we are working on modualrizing and codecs right now. I'll keep 
you in the loop :)
Maxim
2-Apr-2009
[12476x2]
if someones give me a ping when the discussions will start, I'll 
be most happy to add my 2 cents.   I hate OOP, but I love to use 
objects.
and I think liquid is a great test bed of one of the most advanced 
object usage in R2 to date.