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

World: r3wp

[!REBOL3-OLD1]

Oldes
27-May-2009
[14411]
hm.. than it's ok... BUT there are no spaces inside the string, so 
why /all ?
BrianH
27-May-2009
[14412]
Because it's a bug.
Oldes
27-May-2009
[14413]
yes... I was slower than you:)
BrianH
27-May-2009
[14414x2]
A bug in PARSE.
Sorry, my AltME is slow today.
Steeve
27-May-2009
[14416]
well, actually i didn't found the bug, it's Brian
BrianH
27-May-2009
[14417]
In R2 the underlying data of strings and binaries is the same: bytes. 
In R3, strings are made up of Unicode codepoints, binaries of bytes.
Oldes
27-May-2009
[14418]
Anyway.. I almost always use parse with /all in R2.
Steeve
27-May-2009
[14419]
me too
BrianH
27-May-2009
[14420]
Same here. I never was good at predicting what PARSE without /all 
would do, exactly.
Steeve
27-May-2009
[14421]
yep, it's why i didn't saw that bug in R3
shadwolf
27-May-2009
[14422]
we need serrious doc on parse i'm sure i could use parse more if 
i had some serrious explain of it
Oldes
27-May-2009
[14423]
Parse is the main reason why I use REBOL:)
shadwolf
27-May-2009
[14424x8]
I too i love parse and i'm sad to not understand it enough to exploit 
it to its extend
oldes i'm doing irc client with colot text support that's fun i tool 
your irc-core as base
and that's the kind of application where the use of parse to colorise 
the text would be fantastique
oldes i'm doing irc client with color text support that's fun i took 
your irc-core as base
actually i'm thinking about the best way to handle client side texte 
in color
for example i would like to make it something like 1 color for server 
messages then 1 color for each chat you enter in
and 1 color for private message
you could enter 5 différente channel and see them all in the same 
window no need to switch channel to follow it
Oldes
27-May-2009
[14432]
I prefere multiple channels:)
shadwolf
27-May-2009
[14433x4]
hum ... yeah but that's a pain to have to switch betwin them
i think i will do that anyway since it's so usual way to handle chatting
i just hope memory will not explode lol
i will do a treeview with the server name as root and as leaf channel 
name you entered clickin on root you have the server messages displayed 
clicking on leaf you have the channel displayed
Steeve
27-May-2009
[14437]
Wow, reduce/into, compose/into at least...
Great improvement !
Maxim
27-May-2009
[14438x2]
yes that is major !
thanks Brian!
BrianH
28-May-2009
[14440]
I've been waiting for this siince last year. I posted a comment about 
usage :)
Graham
28-May-2009
[14441]
retro-fittable to R2 ?
BrianH
28-May-2009
[14442x3]
We'll see. Native changes to R2 are not as easy as mezzanine changes. 
This one doesn't seem to depend on new R3 structures, but...
R2 is not really in new-native-feature mode for the forseeable future, 
but we'll see what can be backported.
Changes in individual functions are more likely than changes in types 
or data structures.
Steeve
28-May-2009
[14445x5]
it's curious that Carl is not aware of the "chaining" use of INSERT 
!!!!
If we don't have the "chaining"  behavior with reduce/into, then 
we will lost some speed in loops (because of the need to update the 
index of the serie separatly after each iteration).
Curious objection from Carl (The users may be unable to understand 
how to use it) 
Uh ?????
i want some proofs that we actually use "chaining" insertions ?
I can send him some dozen of old scripts if he wants... :-)
*he wants
BrianH
28-May-2009
[14450x2]
He's aware of the value of chaining, but is wary of the "bug" reports 
he already gets about INSERT. Apparently there is some tiny amount 
of overhead too, which for a function as low-level as REDUCE might 
matter. "Penny wise, pound foolish" - I'm trying to convince him 
otherwise.
We can save much more overhead by replacing chained inserts in the 
mezzanines. COMPOSE/into will have massive impact :)
Steeve
28-May-2009
[14452]
Actually, the first optimization i do in my scripts which need speed 
and low memory usage, is to remove all the reduce and compose usage.
It's always the first thing i do
BrianH
28-May-2009
[14453]
Now, you will be replacing REDUCE and COMPOSE with REDUCE/into and 
COMPOSE/into and preallocated or reused buffers :)
Maxim
28-May-2009
[14454x3]
but this optimization isn't always possible.  when nests are deep 
and composes are chained within each other, you can't just chain 
insert and remain sane  ;-)
with liquid-paint, this would have MASSIVE impact.
although liquid-paint is already much faster than AGG and lazy so 
the gains might not be as noticeable, but still I can't wait to have 
time to try and port my stuff to R3, it does seem to be much more 
series stable, by all accounts.
BrianH
28-May-2009
[14457]
Nested REDUCE and COMPOSE is not that common outside of code generation 
and nested data structure creation. I do that a lot, but I write 
my own mezzanines and some of them compile internally. I can think 
of many mezzanines that could be sped up with /into.
Steeve
28-May-2009
[14458x2]
See this line of code i do to rebuild a draw block in area-tc (it's 
called thousand times when the style is scrolled)


    out-style: insert insert insert insert insert insert insert insert 
    out-style
					'pen color/2 'fill-pen color/2 'box

     as-pair abs-x 7 as-pair (f/x * length? str) + abs-x 7 + f/y 3

Insane ;-)
it's slower than a reduce, but it's save memory, a lot.
BrianH
28-May-2009
[14460]
Seriously, post that code to the blog comments right away, with the 
COMPOSE/into equivalent. We need examples.