World: r3wp
[RAMBO] The REBOL bug and enhancement database
older newer | first last |
Anton 14-Jan-2005 [103x5] | What if you want to generate code, eg: >> reduce ['return: [integer!]] == [return [integer!]] ; I wanted this ---> [return: [integer!]] |
I know you can use to-set-word, but that's not very concise is it ? | |
But as Ladislav pointed out above, it seems that 'return: would have to be interpreted as a new datatype ( a lit-set-word! ) | |
Maybe it's not worth it now to add such a new datatype.. or maybe it does not hurt at all, speedwise, because if the parser is going to catch the syntax error above then it may as well just assign the new datatype. The cost, I think, will be in maintaining a new datatype; bug-testing, docs etc. So ok, I agree with Gabriele. | |
Ok, I posted RAMBO Ticket #-131 (waiting to be reviewed) | |
Ladislav 15-Jan-2005 [108] | Anton: What if you want to generate code, eg: >> reduce ['return: [integer!]] try reduce [first [return:] [integer!]] |
Anton 15-Jan-2005 [109] | Yes, that's better, but still a workaround.. thanks :) |
Geomol 15-Jan-2005 [110] | If you want something to be reduced and not others, you can use compose. |
Ladislav 16-Jan-2005 [111] | or use my http://www.fm.vslib.cz/~ladislav/rebol/build.r |
Anton 16-Jan-2005 [112] | Ok thanks, but it's no longer a problem.. :) I just noticed that it's a strange inconsistency, that's all. |
Maxim 21-Jan-2005 [113x3] | just found a nasty bug! if you call browse 5 times in any of the rebol view beta versions, rebol crashes. |
on window 2k... not sure about other platforms | |
I posted it on RAMBO... | |
PhilB 21-Jan-2005 [116] | Same Happens here on rvdraw57e.exe & WinXp proffessional |
Anton 21-Jan-2005 [117] | I get the same as PhilB: "**Crash : expand series overflow" rvdraw57e, WinXP |
Anton 26-Jan-2005 [118x3] | Alan just found this issue: |
>> site: http://www.dom.com/ == http://www.dom.com/ >> site/1.r ** Syntax Error: Invalid decimal -- 1.r ** Near: (line 1) site/1.r >> site/1-r ** Syntax Error: Invalid date -- 1-r ** Near: (line 1) site/1-r >> site/1-1-1r == http://www.dom.com/1-Jan-2001 >> site/1_r ** Syntax Error: Invalid integer -- 1_r ** Near: (line 1) site/1_r | |
Actually, just looks like the rebol lexical parser doesn't like it. Something I can live with. Just work around using JOIN. | |
Romano 27-Jan-2005 [121x2] | Anton, what 1.r should be, for you? |
standard (= load known) rebol words cannot start with a number ('1a is not permitted). | |
Anton 29-Jan-2005 [123] | Yes, that is what I realised. |
Romano 29-Jan-2005 [124] | the rebol parser could be more relaxed (what it is not an integer, an url, a file and so on) must be a word!, but so you will never see an error! for invalid integer! invalid url! and so on, and the parser would be also more slow |
Anton 30-Jan-2005 [125] | Ah yes, that makes sense. |
Anton 6-Feb-2005 [126x7] | RAMBO ticket #3244 http://www.rebol.net/cgi-bin/rambo.r?id=3244& On WinXP: With Rebol/View 1.2.57.3.1c & e betas I can no longer demonstrate the bug. :-) The older View 1.2.56.3.1agg9 still crashes at about 9000 for me. |
View 1.2.57.3.1c completed successfully three times in different sessions, and three times in the same session. View 1.2.58.3.1e completed successfully twice. | |
The test code just scans HKLM, I wonder if I dare scan the entire registry ? | |
But I would like to stress-test by starting several rebol sessions to compete for the same keys at (hopefully) the same time. | |
In Firefox, the Example code section in the link above is shown with an extra newline for every line. Looking at the rambo-generated source: | |
<pre>rebol [ <br> { <br> 2.1.24 crashes windows XP at n = 214 in my system <br> } <br>] <br>n: 0 <br>scan: func [name blk /local y][ <br> probe name <br> probe n: n + 1 <br>; write clipboard:// name ;if this line is not commented, crash appears after more iterations <br> foreach x blk [ <br> y: list-reg/HKLM join name [x "\"] <br> if y [scan join name [x "\"] y] <br> ] <br>] <br> <br>scan "" list-reg/HKLM {} <br>halt <br></pre> | |
You can see all the <br> tags, which are not needed when using the <pre> tag, as far as I know. (I thought html tags in the scope of a <pre> tag were supposed to be ignored). | |
Izkata 6-Feb-2005 [133x2] | If they are, then only some are ignored - I know <a> tags still work insire <pre> tags. |
inside* | |
Oldes 9-Feb-2005 [135x2] | #3626 - path-thru - I'm using "_query_" instead of #"?" char in the path and "_atport_" to recognize different port of the url |
so the file may look like %localhost_atport_88/test.php_query_id=100 | |
Romano 9-Feb-2005 [137x6] | anton: yes, seems that the crash is gone |
#3623 the proposed split-path fails in some situations | |
for example here: %file or here: %e./ | |
this is a different version which use parse and is > 4X on my system | |
rebol[ Author: "Romano Paolo Tenca" Date: 10/02/2005 ] split-path-3: func [ "Splits a file or URL pos. Returns a block containing path and target." target [file! url!] /local dir pos ][ parse/all target [ [#"/" | 1 2 #"." opt #"/"] end (dir: dirize target) | pos: any [thru #"/" [end | pos:]] ( all [empty? dir: copy/part target at target index? pos dir: %./] all [find [%. %..] pos: to file! pos insert tail pos #"/"] ) ] reduce [dir pos] ] | |
it also fix this split-path bug: >> split-path %"" ** Script Error: Out of range or past end ** Where: split-path ** Near: last target >> split-path-3 %"" == [%./ %""] | |
Anton 10-Feb-2005 [143x5] | Oldes, good ideas. Do you think the "?" -> "%3F" is a replacement which is more prone to collision (than a longer string such as "_query_" ) ? |
Or perhaps you think it could cause problems of automatic decoding when ( if it ever happens ), the public cache path is converted back to a URL! ? | |
Anyway, I think the "?" replacement is the one that fixes the most common problem. I think ports are not such a common problem. Obviously you needed it to work for something..., but I wonder what your opinion on it was. We shall need to make a total solution at some stage... | |
Gosh! now I think it might be better to replace the "?" with a slash "_query/" (<-- note the slash), so it becomes a new directory. | |
eg: path-thru http://www.dom.com/cgi.r?hello ;== view-root/public/www.dom.com/cgi.r/hello | |
Allen 10-Feb-2005 [148] | Anton, if you do that, how do you convert it back? |
Anton 10-Feb-2005 [149x4] | I guess you can't, unless you know more. I just leapt at that idea because I thought it would reduce the amount of repetition in path and filenames. |
(so all the cgi.r queries would be grouped as files in the cgi.r/ directory) | |
Mmm.. similar to Oldes' method, you could replace "?" -> "_query/", then directories that end with "_query/" are converted back to "?" | |
Ahha! I just re-read my previous post... :) Duh! | |
older newer | first last |