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

World: r3wp

[!REBOL3]

ChristianE
23-Feb-2010
[1032]
Pekr, the procedure you describe works for me on Rebol3 version 2.100.97.3.1. 
My %rebol.r in the same directory is virtually empty.
Graham
24-Feb-2010
[1033x6]
Pekr, same happens to me
Why would chat kill the demo ... unless http is modified or something?
Oldes, this is the R3 group ... so on hold means on hold with R3 
!
Pekr, putting a trace before demo and it doesn't crash.  Very odd.
of course I can't do much with the trace running ...
Still tracing ... seems to be doing a lot with nothing happening. 
 I would have thought the whole GUI would be in a wait
ChristianE
24-Feb-2010
[1039]
I've been misleading, what I wanted to say was: I do not get the 
error Petr describes, the demo comes up.
Graham
24-Feb-2010
[1040]
Still tracing .. what on earth is it doing??
Oldes
24-Feb-2010
[1041]
It's working here on XP
Graham
24-Feb-2010
[1042]
So, the demo comes up okay for you after exiting chat?
PeterWood
24-Feb-2010
[1043x2]
I tried the chat then demo trick under linux and Rebol crashed with 
a segmentation fault. Normally, the demo gives a script error. I 
also tried on Mac OS X but that was okay - the demo gave a script 
error.
This should be reported in CureCode.
Graham
24-Feb-2010
[1045x2]
I was wondering why some messages don't show up on chat.  Eg. #6993
when I do a 'n, but show when I type the number in...
BrianH
25-Feb-2010
[1047x3]
6993 wasn't a message, it was a move of 2 of Paul's messages to the 
right heading. Not every number is a message - everything gets a 
number, including headers, moves, deletes, file operations, etc.
Only messages show with n. Some file operations show with nf. Other 
operations don't show at all, except in effect.
Some messages don't show because they are private messages that don't 
involve you. If you can see those even by entering their numbers 
directly, please report that serious bug.
Mchean
25-Feb-2010
[1050]
any news?
Graham
25-Feb-2010
[1051]
Yes, but can't report it ...
Mchean
26-Feb-2010
[1052]
sigh :)
Graham
26-Feb-2010
[1053x2]
Carl is still tidying up the GUi documents ... taking much longer 
than was expected
and other issues http://twitter.com/rebol3
Robert
27-Feb-2010
[1055]
Is Doc's MySQL driver working in R3? Has anyone tried to get it up 
& running?
ChristianE
27-Feb-2010
[1056]
Petr, Graham, have you checked the >>CHAT >>Q >>DEMO problem after 
Carl has restored the chat server to an up-to-date version? That 
may be related? The sequence still works here.
Graham
27-Feb-2010
[1057]
works for me now...
Steeve
27-Feb-2010
[1058x2]
I think i will change again some habits in the way I code.


It seems that the try/except idiom has better perfs than EITHER if 
you use it  that way:
>> try/except [...frequent case...][...rare case...]

Try this and give me your results...

f1: funct [v][either zero? v [0][1 / v]]
f2: func [v][try/except [1 / v][0]]

print dt [loop 100000 [f1 1]]
print dt [loop 100000 [f1 0]]

print dt [loop 100000 [f2 1]]
print dt [loop 100000 [f2 0]]
if the condition to check is more complex then the gain can be tremendous
BrianH
27-Feb-2010
[1060]
Wow, I never realized what overhead TRY/except has, but that overhead 
seems to be fixed. As long as you can safely run until an error without 
having to roll back changes, that could be a good strategy. Sticking 
to the R3 safety model (generating errors before it matters with 
functions like ASSERT) you can make code that runs faster in the 
default case, and safely always.
Graham
28-Feb-2010
[1061]
We still are stuck in Cathedral mode ...
Pekr
28-Feb-2010
[1062]
:-)
Steeve
28-Feb-2010
[1063x2]
Still need to be confirmed.
What are your results for the test I provided ?
But we can't check anymore for the type of the last happend error 
with try/except.

>> try/except [1 / 0][error? probe system/state/last-error]
none
== false.

it's a problem, we can't have an accurate process error handler.

I think it's a missing feature (or the error is somewhere else in 
the system object).
BrianH
28-Feb-2010
[1065x3]
>> f1: funct [v][either zero? v [0][1 / v]]
>> f2: func [v][try/except [1 / v][0]]
>> print dt [loop 100000 [f1 1]]
0:00:00.063264
>> print dt [loop 100000 [f1 0]]
0:00:00.044331
>>
>> print dt [loop 100000 [f2 1]]
0:00:00.050118
>> print dt [loop 100000 [f2 0]]
0:00:00.124219
>> print dt [loop 100000 [f2 0]]
0:00:00.121766
That last one was so surprising that I ran it again.
But, that overhead should be fixed, regardless of what's in the blocks.
Paul
28-Feb-2010
[1068]
What is the best way to handle HTTP encoding in R3?  For example 
if I get an email that has been encoded as paul%40tretbase.com?  
How could I convert that easily to [paul-:-tretbase-:-com]?  Not sure if 
I need to build my own decoder or if we already have that capability.
BrianH
28-Feb-2010
[1069x7]
I think Power Mezz has some url en/decoding functions.
Or you can look at the source of DECODE-CGI in R2 and make something 
useful of it for your purposes. Nothing built into R3 though.
Sorry, DECODE-CGI won't help.
As parse rules go, it wouldn't be difficult. Try this:
>> hex: charset [#"0" - #"9" #"a" - #"f" #"A" - #"F"]
== make bitset! #{000000000000FFC07E0000007E}

>> parse a: "paul%40tretbase.com" [any [to "%" [b: skip copy x 2 
hex (b: change/part b to-char first debase/base x 16 3) :b | skip]]] 
a
== "[paul-:-tretbase-:-com]"

Now that is a modifying method, but it should be easy to adapt that 
to a copying method.
And that parse rule would work in R2 or R3. We can't R3-optimize 
it yet with the change rule since change rule paren hasn't been implemented 
yet.
With the full change rule it would be this:

>> parse a: "paul%40tretbase.com" [any [to "%" [change [skip copy 
x 2 hex] (to-char first debase/base x 16) | skip]]] a
But that doesn't work yet - no computed changes.
Paul
28-Feb-2010
[1076x5]
Yeah, thanks Brian.  I might role my own.
look like I don't need to
R3 has what I need already.
This works pretty good:

>> dehex "paul%40tretbase.com"
== "[paul-:-tretbase-:-com]"
:-)
amacleod
28-Feb-2010
[1081]
that was easy