World: r3wp
[Core] Discuss core issues
older newer | first last |
Graham 24-Mar-2009 [13182x2] | anyone remember where the parse demos showed a calculator dialect ? |
just need simple arithmetic | |
Geomol 24-Mar-2009 [13184] | This? http://www.rebol.com/docs/core23/rebolcore-15.html#section-6 |
Graham 24-Mar-2009 [13185x2] | yes .. thanks |
saves me a few mins writing my own ! | |
Pekr 26-Mar-2009 [13187] | I was trying to help new guy on ML, and just would like to ask - why is there a difference in evaluation when printing a block, and printing first block? >> colors: [red green blue] == [red green blue] >> print colors 255.0.0 0.255.0 0.0.255 >> print first colors red so 'first does not reduce the value, while print itself does? |
Steeve 26-Mar-2009 [13188] | it doesn't come from print behavior but, it's how reduce works reduce first [red] |
PeterWood 26-Mar-2009 [13189] | >> a: 1 == 1 >> type? a == integer! >> type? 'a == word! >> b: [a ] == [a ] >> type? first b == word! >> print a 1 >> print first b a >> print 'a a |
Sunanda 26-Mar-2009 [13190] | Help says print does an evaluate (presumably a reduce) if the value to print is a block....So it is documented behavior: http://www.rebol.com/docs/words/wprint.html |
Pekr 26-Mar-2009 [13191] | ok, thanks .... |
Janeks 27-Mar-2009 [13192] | Hi! Does Rebol suport AUTH=NTLM in IMAP protocol? Thanks in advance! |
Pekr 27-Mar-2009 [13193x2] | I think not. In the past, Doc did some tests, but not sure ... |
http://softinnov.org/rebol/ntlm.shtml | |
Janeks 27-Mar-2009 [13195x2] | Thanks Pekr - I already saw it, but I am thinking how to use them in case of IMAP. |
Is it just like opening port? | |
Pekr 27-Mar-2009 [13197] | Don't know - never worked with it ... |
TomBon 27-Mar-2009 [13198] | trouble with double caret afer forming a string from block. print y: form [KBE RKH CSCD IDJ MNOV LCAPB CWCO ^DJA] KBE RKH CSCD IDJ MNOV LCAPB CWCO ^^DJA how can I avoid the double caret? form, mold or composing the string via foreach etc. doesn't work here. |
Chris 27-Mar-2009 [13199] | >> print y: form [KBE RKH CSCD IDJ MNOV LCAPB CWCO ^DJA] KBE RKH CSCD IDJ MNOV LCAPB CWCO ^DJA |
TomBon 27-Mar-2009 [13200] | sorry I mean a probe... -> probe y: form [KBE RKH CSCD IDJ MNOV LCAPB CWCO ^DJA] |
Chris 27-Mar-2009 [13201] | Any time the string is displayed literally (such as at the console, or mold/save) will you see the double caret. Internally it's a single caret. |
Steeve 27-Mar-2009 [13202] | there is no double caret in the string ^^ is only one char! |
Chris 27-Mar-2009 [13203] | You can - print replace/all mold this_string "^^^^" "^^" |
Steeve 27-Mar-2009 [13204] | As chris states, there is a difference between how rebol show some chars and how they are kept internally |
Chris 27-Mar-2009 [13205] | But there's no way other than a rewrite to get 'probe to display a single caret. |
Steeve 27-Mar-2009 [13206] | same behavior with tab, newline,... a tab is showed as "^-" but internally it's only one char! |
TomBon 27-Mar-2009 [13207] | ahh I see. I need this string to compose a url and get a error. thought by 'probe the second phantom caret was the failure. |
Chris 27-Mar-2009 [13208] | What is the error? |
TomBon 27-Mar-2009 [13209x2] | looks like rebol doesn't accept the caret with a url |
must be encoded | |
Chris 27-Mar-2009 [13211x3] | >> http://foo^bar == http://foo^bar >> to-string http://foo^bar == "http://foo^^bar" >> load to-string http://foo^bar == http://foo^bar |
I think it's 'net-utils/url-parser/parse-url that breaks it. | |
(this is used by the builtin schemes) | |
TomBon 27-Mar-2009 [13214x5] | yes, made a string and then to-url. this helps if the caret is hex-encoded %E5 |
will check for lower level open port... | |
chris, is your previous replace/all snippet working ? | |
ok, the parse needs "^^" "%E5" | |
thx, chris and steeve | |
Chris 28-Mar-2009 [13219] | Is there any string that 'to-time will return an error? |
Dockimbel 28-Mar-2009 [13220x2] | Seems that it never returns an error. |
But it should in this kind of input string : >> to-time "1:111:11" == 2:51:11 | |
Sunanda 28-Mar-2009 [13222x2] | R3 alphas will fail bad strings: >> to-time "" ** Script error: content too short (or just whitespace) >> to-time "x" ** Script error: cannot MAKE/TO time! from: "x" >> to-time "12:12" == 12:12 |
But Dockimbel's issue is unchanged in R3 | |
Dockimbel 28-Mar-2009 [13224] | So, a typo in a user input string could result in returning a wrong time! value without throwing an error. Looks like a bug or at least, a flaw IMO. |
Sunanda 28-Mar-2009 [13225x2] | REBOL has always had a policy of "normalising" times with >59 minutes. Even without the to-time and string: >> 1:111:11 == 2:51:11 |
Ditto with seconds: >> 1:0:5000 == 2:23:20 | |
Dockimbel 28-Mar-2009 [13227] | That looks dangerous to me, some typo can't be detected. |
Sunanda 28-Mar-2009 [13228] | Agreed! |
Henrik 28-Mar-2009 [13229x2] | interestingly, R3 returns: >> 1:0.5000 == 0:01:00.5 |
but the other example is the same | |
Sunanda 28-Mar-2009 [13231] | I think you may have a typo........My example was 1:0:5000 (two colons). I see identical behavior in R2 and R3 |
older newer | first last |