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

World: r3wp

[Tech News] Interesting technology

Dockimbel
3-Sep-2008
[3304x2]
Function values
(sorry)
BrianH
3-Sep-2008
[3306x3]
Right. Functions are values in REBOL, and how they are interpreted 
(or compiled) depends on their datatype.
By the way, DELECT uses some of the same techniques that rebcode 
did to be fast.
The new function binding model in R3 makes Rebcode not as fast in 
R3 as it was in R2, if it uses the same semantic model. In order 
to be worth including we would have to change the semantic model 
accordingly.
Dockimbel
3-Sep-2008
[3309]
I would choose block-level for a JIT compilation in REBOL, that would 
allow to compile more semantics than at function level. For example 
[do append [print] "hello"] could be compiled using block-level JIT.
BrianH
3-Sep-2008
[3310]
I would keep the DO dialect as is - it would be faster that way, 
because Java is only faster after you factor out JIT overhead. By 
having the compilation overhead at function creation time you could 
plan for it accordingly.
Dockimbel
3-Sep-2008
[3311x2]
I don't agree for Java JIT overhead. Programs spend most of their 
time in loops where JIT overhead becomes rapidly unnoticeable (loops 
compiled code is cached).
Btw, I guess that Java JIT compiler can run in their own thread, 
so also being able to take real advantage from multi-core CPU.
BrianH
3-Sep-2008
[3313x2]
There would be 2 things you would have to give up in a compilable 
dialect of REBOL, if you want it to be worth it:

- Code blocks that aren't statically determinable at function creation 
time (unlike your example above, which could be partially evaluated)

- Functions that could be edited in place, or hot-patched (already 
gone in R3)

If you don't give these up you would be adding compilation overhead. 
Admittedly, Java isn't the right language to emulate here - Forth 
or other stack languages would be better, as they are closer to the 
REBOL execution model and compiled Forth can be drastically faster 
than the best Java code.
There are several functions in REBOL that operate on their argument 
blocks following the DO model. If you make those functions require 
a literal block you could compile REBOL as-is.
Dockimbel
3-Sep-2008
[3315]
Forth vs Java: well maybe it was very true 10 years ago, but since 
then, the gap is closing with some great  improvements in compilation 
like Java's Hotspot VM.
BrianH
3-Sep-2008
[3316x2]
That's why I mentioned "other stack languages". There has been a 
lot of research in that camp too - they just name their languages 
other names than Forth. I think that some of the research in type-inferenced 
stack languages will eventually make Java and .NET faster too.
Remember, the JVM and CLR are both stack engnes.
Dockimbel
3-Sep-2008
[3318]
Code blocks that aren't statically determinable at function creation 
time

. I agree, but if you look at most of the code written in REBOL (including 
mine or Carl's), it doesn't fall into that case. So, I guess that 
most of REBOL written code can be compiled. Maybe the compiler could 
be made smart enough to figure out what code can or cannot be compiled.
BrianH
3-Sep-2008
[3319x2]
Yup (I've already given this some thought). Hand-optimized code may 
have to be reoptimized though, and this includes some of the optimizations 
that I made to some of the mezzanine functions. You would speed things 
up drastically by using explicit type checking or get-words to filter 
out theoretical function value evaluation.
The fewer possible interpretations of a particular piece of REBOL 
code, the faster the compiler could make it. Inflexibility is what 
makes Java fast, not compilation.
Dockimbel
3-Sep-2008
[3321x3]
Inflexibility is what makes Java easier to compile. ;-)
I've also thought about all that quite often, it's a really fascinating 
topic.
Need to go to sleep, thanks for the nice chat Brian.
BrianH
3-Sep-2008
[3324x2]
Java code that is as powerful as REBOL code is slower than REBOL. 
If you restrict what your REBOL code does to what Java can do it 
will be slower with the current interpreter. You only get speed out 
of REBOL by writing REBOL code.
Good night :)
shadwolf
3-Sep-2008
[3326x4]
the comicis great i was the first one to propose Carl to do something 
like that as presentation for R3 technos
what i like in the  comic is how they present the deferent technologies 
aspect how they are deal to day what is the problem and then what 
is the solution apported by the new point of view introdiced into 
chrome
for example java script -> slow because it's part of the asynchronous 
rendering system and because the javascript systeme reads over and 
over the same code to execute it
solution introduced in chrome javascript runs in a new VM  that read 
the code once transform it into hiden object and then into natural 
code wich is runed again and again  and the VM  is a speparated process 
to focus the resources where they are needed
Graham
4-Sep-2008
[3330]
This is annoying.  I used the Chrome options to make it the default 
browser, but when I use 'browse from rebol, it still invokes FF 3.
shadwolf
4-Sep-2008
[3331x2]
you have restart windows since you made the change ?
that's stroed into registry
Graham
4-Sep-2008
[3333]
oops .. let me try.
shadwolf
4-Sep-2008
[3334x3]
maybe too they didn't impact on the right registry entry that's a 
beta version ...  that's normal if there is some hum things missing
for me that work i set  chrome as default webbrowser and when i use 
the WWW key on my keyboard that calls chrome
every time you are running another wbebrowser they ask you if you 
want to change the default to the curent one
Graham
4-Sep-2008
[3337]
Nope... still is the default browser but rebol is calling FF
BrianH
4-Sep-2008
[3338]
Does your start menu have a reference to your default browser? If 
so and it is Firefox, then Chrome is missing something.
Graham
4-Sep-2008
[3339]
start menu points to Chrome
Pekr
4-Sep-2008
[3340]
haha, just read comics - it is kind of cool way to explain some features 
... except the fact, how they turned inability to have properly threaded 
app into advantage talking about processes. While they claim single 
process (and address space) app will not release memory properly 
on one hand, on the other hand they mention overhead of data copy 
needed for their task based aproach, and somehow mysteriously they 
claim that "overtime it means less memory bloat"
BrianH
4-Sep-2008
[3341x2]
I'm afraid that their discussion of the effects of memory fragmentation 
is a real issue in memory management systems without compaction or 
other techniques to reduce it. You can have a lot of memory that 
is useless because the free memory is not in large enough chunks.
This is why I have repeatedly requested details about REBOL's recycle 
algorithm. With the wrong algorithm, REBOL could be subject to the 
same problems the comic discusses, like delays and fragmentation.
Pekr
4-Sep-2008
[3343]
yes, most probably true. IIRC Ladislav discussed that topic with 
Carl, but I don't remember the details. GC will be part of closed 
source part of R3, no?
BrianH
4-Sep-2008
[3344]
I would assume so, with the exception of the part which requests 
memory from the OS. It could still be documented though.
Robert
4-Sep-2008
[3345]
Guys, nice chat but can we move to group performance or something 
like this? I like TechNews because it's just about that and no noise...
Henrik
12-Sep-2008
[3346]
http://news.cnet.com/8301-17939_109-10037202-2.html

Nice text input method for touch screens.
Graham
12-Sep-2008
[3347x2]
Very nice
I guess we can do that in Rebol too.
Kaj
12-Sep-2008
[3349]
Head over to FreshMeat now if you wanna see Cheyenne, QM and R/S
Graham
12-Sep-2008
[3350]
url might be good
Kaj
12-Sep-2008
[3351x3]
Shall I be nasty and say http://google.com? :-)
OK, for those who have no idea what FM is:
http://freshmeat.net/