World: r3wp
[!REBOL3]
older newer | first last |
BrianH 25-Feb-2010 [1049] | 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 |
Paul 28-Feb-2010 [1082x4] | hehe yeah - I thought there might be something like that. |
Is there a new method to send email in R3? | |
Ok doesn't look like it. Looks like we have to build a new send function for R3. | |
dehex doesn't totally totally decode urls. | |
Graham 28-Feb-2010 [1086x2] | I use 'use a lot attached usually to GUI buttons. Wonder if it's worthwhile to have a version like funct that automatically makes all set words local so that we don't have to declare them |
Or, I could just create anonymous functions as in 'do funct [][ ............. ] | |
Paul 28-Feb-2010 [1088] | I built my own decoder for the query-string and it works pretty good. But I was wondering what the /only refinement is for construct. This looks new in R3. |
Pekr 1-Mar-2010 [1089] | I really wonder what's RT cooking (or not) right now :-) The silence is really strange ... |
Paul 1-Mar-2010 [1090] | They probably had to break away and do some projects to pay some bills. |
sqlab 1-Mar-2010 [1091] | Is there a list of words reserved for parse, as >> parse "a b" [ copy limit to " " ] ** Script error: PARSE - command cannot be used as variable: limit ** Where: parse ** Near: parse "a b" [copy limit to " "] >> parse "a b" [ limit ] ** Internal error: reserved for future use (or not yet implemented) ** Where: parse ** Near: parse "a b" [limit] |
BrianH 1-Mar-2010 [1092x3] | CONSTRUCT by default translates the built-in logic words to logic values, unset values to none, lit-words to words, and lit-paths to paths. This makes it easier to use it to handle headers. CONSTRUCT/only doesn't do any of those things - it only constructs the object with the data provided. |
Sqlab, 'limit is reserved for a planned parse ooperation that Carl doesn't know how to implement yet. | |
Sunanda, once again you seem to be the best source for CureCode tickets that show off the most subtle distinctions in REBOL semantics, even if most of those tickets have to be dismissed. The latest example is bug#1506, where you give an example of wanting to catch an error before it is an error. Great stuff :) | |
Sunanda 2-Mar-2010 [1095] | Thanks for the kind words, Brian, But I am not sure we can yet agree on the issue involved. I've added my response to your detailed analysis: http://www.curecode.org/rebol3/ticket.rsp?id=1506 Without the ability to catch _all_ errors, REBOL is vulnerable to sudden, unexpected and unhandlable crashes. |
Paul 2-Mar-2010 [1096x3] | attempt needs to as lean as possible since it could be within loops being called a lot. So I would propose that another solution might be to add another function. Like to DEFUSE the block being passed to ATTEMPT. So you can do something like ATTEMPT DEFUSE [some block] The defuse function would return/pass the defused block to attempt to be evaluated. |
This way your only evaluating the DEFUSE code when needed so that ATTEMPT is free to be used in loops in controlled code. | |
Also, thanks for the explanation Brian, I see you answered my question regarding Construct. | |
older newer | first last |