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

World: r3wp

[!REBOL3-OLD1]

Pavel
14-Nov-2009
[19658x3]
1. TCP question: where to get complete list of event types? lookup, 
connect , wrote, read, close .... what else, does exists the complete 
list? 
2. Is it possible to get other devices event types
3. is it possible to define "own" events?
Whwhere are the events defined?
Are the device events the same as GUI-events (meaning the machanism 
is the same or different)
Maxim
14-Nov-2009
[19661x3]
AFAIK, that will all be revealed within the host code shake down 
 :-)


devices are defined in the host and will be extensible, eventually. 
 they all use the same low-level/high-level api using fully async 
handlers.
geomol, AFAIK, Carl doesn't use the same compilers on different plaforms, 
so that will invariably produce different results for the same C 
code.
I've read often that intel optimisations in compilers make some C 
code faster than assembly because they'll use special shortcuts in 
the cpu when they discover specific coding patterns.
PeterWood
14-Nov-2009
[19664]
If functions like ADD and SUBTRACT are slower

 - I'm not sure whether you mean are slower under Mac OS X  or slower 
 than + and -. ADD, SUBTRACT etc. are much slower than +.-.

Results on an old 1ghz ThinkPad:

 >> a: 1. b: 2. dt [loop 10000000 [divide multiply add a b a b]]
== 0:00:21.5

>> a: 1. b: 2. dt [loop 10000000 [a + b * a / b]]
== 0:00:17.25

>> a: 1. b: 2. dt [loop 10000000 [divide multiply add a b a b]]
== 0:00:20.625

>> a: 1. b: 2. dt [loop 10000000 [a + b * a / b]]
== 0:00:17
BrianH
14-Nov-2009
[19665x2]
We mean slower on R3 than they are on R2. We need comparisons of 
both inline and prefix forms if we are going to optimize R3.
And we need platform-specific data too. It doesn't make sense to 
compare Windows and OSX, but it does make sense to compare R2 and 
R3 with each other on the same computer and OS. For that matter, 
there may be OSX version issues too.
PeterWood
14-Nov-2009
[19667]
The prefix forms in R3 are only about 20% slower than the inline 
forms in Mac OS X whereas they are over 50% slower in R2:

R2 results:
>> a: 1. b: 2. dt [loop 10000000 [divide multiply add a b a b]]

== 0:00:06.096334
>> a: 1. b: 2. dt [loop 10000000 [a + b * a / b]]              

== 0:00:03.679331

R3
>> a: 1. b: 2. dt [loop 10000000 [divide multiply add a b a b]]

== 0:00:06.72179

  >> a: 1. b: 2. dt [loop 10000000 [a + b * a / b]]                
    

== 0:00:05.521236
BrianH
14-Nov-2009
[19668]
Interesting... It looks like the op! changes weren't as bad for overhead 
as I thought :)
Maxim
14-Nov-2009
[19669]
from my persepective, ops are now 150% slower than before.. this 
is VERY unfortunate.
BrianH
14-Nov-2009
[19670x2]
From my perspective, DO is faster than before because of reduced 
complexity, and user-defined ops are possible now because they handle 
their own redirection instead  of DO special-casing it. An acceptable 
tradeoff.
It's a big picture balance thing. The optimizations were rebalanced 
in the change from R2 to R3 in order to increase overall power and 
speed of REBOL. REBOL has never been a math engine (not its focus), 
but now it can be because of extensions. Everything is a tradeoff.
Maxim
14-Nov-2009
[19672x2]
notice I said "unfortunate" and not "unnacceptable"   ;-P
as you say, given the choice between how its in R3 and R2... "I would 
do it all again"  ;-)
BrianH
14-Nov-2009
[19674]
Yes, but you said VERY, and that is what I was disputing. Only the 
ratio has changed. Overall performance has improved, which in many 
cases makes up for the increased overhead of Unicode and 64bit integers, 
among other things.
Maxim
15-Nov-2009
[19675]
a nice parallel to R3 is python 3... just about every issue we have 
is also an issue in  P3 (unicode, R2 forward for example :-)... it 
took 3 years to build, and remember that python has NO graphics, 
only core release.   Also P3 has much less fundamental changes than 
R3 has, so in comparison, R3's implementation is at par with other 
interpreter updates.... except they are whole teams, where R3 is 
a very small team.


http://broadcast.oreilly.com/2009/01/the-evolution-of-python-3.html


P3 did require updating MANY modules, so most of the team probably 
worked on that instead of the language itself.
BrianH
15-Nov-2009
[19676]
Yery little work was done on the language itself, mostly on libraries. 
Within its limits Python 2 was good enough for Python devs, at least 
syntactically. All they had to change was libraries and some internals. 
Still significant, but not on the scale of the R3 changes.
Maxim
15-Nov-2009
[19677]
yep... and it took 3 years  ;-)
BrianH
15-Nov-2009
[19678]
Most languages are going through the revamp nowadays, due to the 
Unicode and concurrency crisis, and the extent of the changes attempted 
varies from language to language.


Python 3 is on the more minimal end of the spectrum: Only Unicode 
changes, not paying attention to concurrency at all, focus on backwards 
compatibiity, no significant syntaxtic changes (the standards for 
syntax among Python devs is low), minor cleanups to its libraries. 
And it took them 3 years to do it :(


Perl 6 is on the more extreme end of the spectrum: Major changes 
in everything, including syntax, several complete system structure 
revamps going on at once, major semantics changes (not sure about 
the concurrency). Perl had an entire history of not being designed 
at all, so they had a lot of crap to get rid of. Which they replaced 
with much more new stuff (Perl doesn't know how to say No). 10+ years 
into the project, with no end in sight.


R3 started closer to the minimal end of the spectrum because we hadn't 
really been keeping track of how far behind we had gotten - not far 
behind the others, far behind our potential. As the scope of the 
changes needed became more apparent, the project rapidly went way 
towards the Perl 6 end of the spectrum. However, we had to do a couple 
restarts along the way. The current round has only been going for 
2 years, but gone way past the level of changes in Python 3, and 
has approached the level of change in Perl 6.

We had some advantages though:

- REBOL has been more designed than those others, over the years. 
That means that we are redesigining rather than designing.

- R3's primary designer is mainly into operating systems, so R3 is 
built like an OS, which makes more ambitious changes possible.

- We decided that R2 will be continue to be maintained as a separate 
project, so we don't need to stay backwards compatible.

- REBOL's design process knows how to say No, so we aren't falling 
into the Perl 6 trap.


All of these are why we have been able to accomplish so much in such 
a short time, with so little resources. It's taking a lot of time 
and effort to get the community to realize that R3 is a community 
project, so we've had to make the best use of the resources available, 
even when it meant taking some time off from developing to build 
the infrastruuctre for community development. This process work has 
paid off dramatically, so much so that comparing pace of development 
more than a year ago to that nowadays is completely irrelevant :)
Maxim
15-Nov-2009
[19679x2]
and when Carl gives us the host he says now compiles again, comparing 
the next 12 month's R3 development will make the entire 10 years 
of REBOL development seem irrelevant.
;-)
BrianH
15-Nov-2009
[19681]
:D
Maxim
15-Nov-2009
[19682]
Not everyone realizes that Carl has spent a long time building a 
very strong lever.... might not be pretty... but its damn straight 
;-)


now he's about to give us a chance at holding that lever as a group 
and leverage all the work.  He's been putting all the effort to putting 
the pivot of the lever (the fulcrum) as close to one end as possible... 
so R3 will be very strong and allow to do much more heavy lifting 
than R2 ever could.


now we just have to paint the lever and make it all shiny (gui) put 
a nice handle on it (the host) and even add a few more handles to 
it (threads).


most of that... we can do as as group with a few helping hands working 
together  :-)
BrianH
15-Nov-2009
[19683]
Being able to say No was a really big deal. It is why we had to build 
our own VCS and developer communications infrastructure, with moderation 
and ranking built in. We didn't have the benefit of years or decades 
of established community development, like Perl or Python - we had 
to do this from scratch. The only way we have been able to make such 
ambitious changes so quickly and cleanly is through some group discipline 
and politeness, and that means we need to have a counter-pressure 
against flame wars and development fights. We would have never managed 
to get this far without DevBase (R3 chat) and CureCode :)
Reichart
15-Nov-2009
[19684]
Other than "Glue" (which is "still" my choice for a name for REBOL), 
I have to admit that "Level" is another good name.
Arie
16-Nov-2009
[19685]
Question about R3 GUI. On this page http://www.rebol.net/wiki/GUI_Example_-_Move_a_window
 is an example for moving a window. After moving it with button "Move 
to 100x100" I move it manually to another spot. When I then push 
button "Move to 100x100" again, the window won't move anymore. Is 
that a bug or am I missing something?
Henrik
16-Nov-2009
[19686]
if you put a probe inside the 'do block for the button, is it printed 
like it should?
Arie
16-Nov-2009
[19687]
Henrik: yes, it is!
Gregg
17-Nov-2009
[19688]
Back to ROUND for a moment. It seems so long ago...


I think the goal was to have things make sense to normal people, 
while still allowing Ladislav and John to have their way. :-) Most 
programmers just want results that make sense to them as humans.
Pekr
17-Nov-2009
[19689]
Does Chat system work? Mine shows off-line ...
Geomol
17-Nov-2009
[19690x4]
Most programmers just want results that make sense to them as humans.

I can agree with that. It would be a benefit, if it still make sense, 
when you think a little deeper about it.
I still find the equal operator with its trying to be clever about 
rounding errors in decimals a strange thing. Try this example:

for i 4.0 6.0 0.1 [print i if i = 6.0 [print [i "= 6.0"]]]

The last line output is:

5.99999999999999 = 6.0


So those two numbers are the same for the equal operator. Let's check 
it:

>> 5.99999999999999 = 6.0
== false

Now see what happens, if I let the loop run a little longer:

for i 4.0 7.0 0.1 [print i if i = 7.0 [print [i "= 7.0"]]]


Now the equal test within the loop doesn't become true. The last 
number output is 6.99999999999999, so this number doesn't equals 
7.0, like 5.99999999999999 equals 6.0. I know, we don't see all possible 
decimals, but that's not my point. My point is, that if equal can't 
cope with rounding errors always, then it shouldn't try to do it 
at all. (My opinion.) The current behaviour isn't a good thing for 
the language.
A side note: FOR doesn't allow money! as its start argument in R3. 
It does in R2.
I could of course use == instead of =, and then none of the above 
tests would be true. The reason I find the behaviour strange might 
be the way, PRINT output the numbers.
Ladislav
17-Nov-2009
[19694]
Geomol: you did not read the decimal! documentation. The fact, that 
(print i) prints 5.99999999999999 does not mean you know what I is.
Geomol
17-Nov-2009
[19695]
I probably read it and forgot. I'll read it again. :-)
Ladislav
17-Nov-2009
[19696x2]
after a slight modification I get:


for i 4.0 6.0 0.1 [print i if i = 6.0 [print [mold/all i "= 6.0"]]]
5.9999999999999929 = 6.0
doesn't it look different now?
Geomol
17-Nov-2009
[19698]
I'm questioning the "nearness" in equal. Another example:

>> 0.1 + 0.1 + 0.1 = 0.3
== true
>> 0.1 + 0.1 + 0.1 - 0.3 = 0.0
== false


STRICT-EQUAL returns false for both of these. Is the "nearness" a 
good thing to have from a language design point of view?
Ladislav
17-Nov-2009
[19699]
nearness

 is not equality, it is just symmetric and reflexive (no transitivity)
Geomol
17-Nov-2009
[19700]
I just came across this yet again, when I was preparing scientific 
data using R2. I can deal with it fairly easily in R2 by using money! 
datatype with the FOR function.
Ladislav
17-Nov-2009
[19701]
money! datatype in R2? What is the advantage, when you ignore the 
ability to express the denomination?
Geomol
17-Nov-2009
[19702x2]
I got all the decimals after a while with this:

for a 4.0 5.9 0.1 [print a]

so I changed it to:

for ma $4.0 $5.9 0.1 [a: load next form ma print a]
I'm not sure, why it isn't allowed to write this in R2:

to decimal! $4.0

Maybe just missed. It's fixed in R3.
Paul
17-Nov-2009
[19704x2]
I'm actually messing around with REBOL (actually R2) and been away 
from it so long I forgot a lot of stuff.  Anyway, was wondering how 
R3 is progressing.  I was just using parse and thought about rejoin. 
 For example, if we can parse something such as:

blk: parse "this, simple, csv, string" "," 


wouldn't it be cool to just come back along and rebuild it with something 
such as:

rejoin/csv blk ","
or have any deliminater you specify.
BrianH
17-Nov-2009
[19706x2]
Geomol: "FOR doesn't allow money! as its start argument in R3. It 
does in R2." - Write it up as a wish in CureCode please :)
Paul, that function has been proposed as DELIMIT - not as REJOIN 
because that function needs to be low-level - but hasn't been added 
yet since there is no consensus about the feature set. No consensus 
means it goes in the library rather than the mezzanines. If you can 
make a version that is so awesome that everyone will agree with your 
feature set, we'll add it :)