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

World: r3wp

[!REBOL3-OLD1]

Mchean
21-Jan-2009
[9796]
Henrik when i enter chat in R3 console i get Script error: chat has 
no value
Pavel
21-Jan-2009
[9797]
is it available?
Steeve
21-Jan-2009
[9798]
Paul, i can't test the perfs currently, because there is some remaining 
bugs in the file scheme, so that i have to open close the ports each 
time a value is append in the block.
[unknown: 5]
21-Jan-2009
[9799]
Virutual block scheme? - I think it is going to be in R3.
Pavel
21-Jan-2009
[9800]
OK
[unknown: 5]
21-Jan-2009
[9801x4]
Yes, I konw how that is.
In Tretbase, I decide to incorporate a second method that uses just 
the data file and reads blocks from it.
It required that I had to create a block parser.
So it is essential like read/lines but instead it reads blocks.
Henrik
21-Jan-2009
[9805x2]
mchean, it's only available in the latest alpha.
>> source chat
chat: make function! [[
    "Open REBOL DevBase forum/BBS." /local err
][
    print "Fetching chat..."
    if error? err: try [do http://www.rebol.com/r3/chat.rnone] [

        either err/id = 'protocol [print "Cannot load chat from web."] [do 
        err]
    ]
    exit
]]
Steeve
21-Jan-2009
[9807]
Henrik, there is no need to automaticly compress the  data. If you 
want so, just append compressed data in the block.
>> append v-block compress data
Henrik
21-Jan-2009
[9808]
Steeve, that takes up double size on disk, doesn't it?
Steeve
21-Jan-2009
[9809]
don't see your point Henrik, double size compared with what ?
Henrik
21-Jan-2009
[9810]
compared to an actual binary. you said, that data was stored as plain 
REBOL data in the file.
Steeve
21-Jan-2009
[9811]
but if you want to store binary data, just add binary data, i do 
not any conversion, store your data int he format you want
Mchean
21-Jan-2009
[9812]
thanks
Steeve
21-Jan-2009
[9813]
hum, i see your point now henrik, yes even binary data are stored 
as rebol values, so that there take much more space.
Henrik
21-Jan-2009
[9814]
yes, that's what I meant. :-)
Steeve
21-Jan-2009
[9815]
perhaps i will add on option in the scheme to store data as pure 
binaries
Henrik
21-Jan-2009
[9816]
it might be useful in cases where you want to store images and such.
Steeve
21-Jan-2009
[9817]
right
BrianH
21-Jan-2009
[9818x2]
Steeve, aside from the REBOL-syntax-storage aspect, your virtual 
block scheme sounnds like the RIF (REBOL Indexed Files) proposal 
that was at one point intended for inclusion in R3 (and may still 
be).
However, RIF was intended to store its data in Rebin format (binary 
encoding of REBOL values).
Henrik
21-Jan-2009
[9820x2]
BrianH, I'm thinking that Steeve has made his design good enough 
to allow doing that as an option. :-)
thinking = hoping
[unknown: 5]
21-Jan-2009
[9822x4]
So can specify how many blocks of data you want to read at a time? 
 Like say I want to read 10 blocks and stop and then read 10 more 
where that one left off?
Sorry I got distracted - I had to use some mighty puddy on a chair.
I have a function called get-block which I use to handle block reading 
currently.
It can be used on binary data as well as ascii data and will carve 
out the blocks of the buffer.
Henrik
21-Jan-2009
[9826]
It seems rebdev mobile is down right now, so I made a screenshot 
of Steeve's example post:

http://rebol.hmkdesign.dk/files/r3/gui/182.png
[unknown: 5]
21-Jan-2009
[9827x3]
>> a: "this is a test [now a block] garbage [another block with a 
block in it []][and another] garbage..

 == {this is a test [now a block] garbage [another block with a block 
 in it []][and another] garbage..}
>> get-block a
== [now a block]
>> 
 get-block a
== [another block with a block in it []]
>> get-block 
 a
== [and another]
My get-block function just advanced automatically through the string.
anyone know which sort algorithm that R3 uses for it's sort function?
Steeve
21-Jan-2009
[9830]
Paul, yes i do by using  the standard copy/part function.
>> copy/part v-block 10
== [ first-value second-one etc...]

copy is auto advancing in the block, so that if you do several copy/part 
at once , you will get several sub blocks of values.
[unknown: 5]
21-Jan-2009
[9831]
So 10 would equal ten blocks read?
Steeve
21-Jan-2009
[9832]
yes
[unknown: 5]
21-Jan-2009
[9833]
Can it handle newlines in the block contents?
Steeve
21-Jan-2009
[9834x2]
it works in reverse order either.
>> copy/part  tail vblock -10
get the last 10 values of the block
Yes Paul, it does
[unknown: 5]
21-Jan-2009
[9836x2]
Good, it is sounding nice Steeve.  Hope to see it in R3.
Yours sounds like what Chris wants to do.
Steeve
21-Jan-2009
[9838]
even it it's not in core R3, it will be downloadable.
[unknown: 5]
21-Jan-2009
[9839]
Nice Steeve.
Steeve
21-Jan-2009
[9840]
i will release the first version in some days or hours, i need to 
write more documentation
[unknown: 5]
21-Jan-2009
[9841]
Please post in ALTME as well.  I would like to check it out.
Pekr
21-Jan-2009
[9842]
rebdev private msging fixed ..
[unknown: 5]
21-Jan-2009
[9843]
Will R3 introduce function overloading?
BrianH
21-Jan-2009
[9844]
Nope, functions are still values.
[unknown: 5]
21-Jan-2009
[9845]
ok..