World: r3wp
[!REBOL3]
older newer | first last |
Rebolek 1-Mar-2011 [7561] | You should try it, it's not bad. |
Ladislav 1-Mar-2011 [7562x2] | Do not have any code where it would be of any advantage |
As far as the maintainability of the code goes, it shall be noted, that CASE/ALL is one of the worst constructs to test. | |
Henrik 1-Mar-2011 [7564] | I have two CASE/ALLs in NLPP (Ladislav knows what NLPP is). :-) |
Ladislav 1-Mar-2011 [7565] | http://www.saphirion.com/downloads/files/saphirion_nlpp.pdf |
Henrik 1-Mar-2011 [7566] | Nevertheless, the code could be replaced, if needed, but it looks to be working ok with CASE/ALL. |
BrianH 1-Mar-2011 [7567x3] | I've never had a problem with CASE itself, /all or not. If it is tough to test I've never seen it. |
There are a few functions in R3 that take the form of a CASE/all followed by a CASE. SAVE is one such function, though it has a series of IF statements at its beginning leftover from before that could be made more efficient by adding to the beginning of the CASE/all. | |
CASE/all is no more difficult to test than the series of IF statements it replaces. Easier to analyze, because it's more structured. | |
Ladislav 1-Mar-2011 [7570x3] | CASE/all is no more difficult to test than the series of IF statements it replaces. - yes, sure that is true |
As to why CASE/ALL is hard to test: for example, if you have 10 cases in a CASE statement, and use 10 different tests for testing such a code, then, to be as thorough when CASE/ALL using 10 cases you would need 1024 tests. | |
sorry for the formulation, but I hope the idea is clear | |
Sunanda 2-Mar-2011 [7573] | Is this a problem, or a change in execution model? b: reduce ['now] do first b (nothing on console) do do first b == 2-Mar-2011/13:10:13 R2 will respond with the date with only one DO |
Ladislav 2-Mar-2011 [7574] | A change in execution model |
Andreas 2-Mar-2011 [7575] | Anyone knows if error printing is currently hookable in R3? I.e. is there a function somewhere which is called by the interpreter when an error! escapes to the top-level? |
BrianH 3-Mar-2011 [7576] | Not currently. |
Rebolek 3-Mar-2011 [7577] | Bug? >> a: context [f: does [print b] b: none] == make object! [ f: make function! [[][print b]] b: none ] >> c: context [b: make map! [m 4]] == make object! [ b: make map! [ m 4 ] ] >> a1: make a c == make object! [ f: make function! [[][print b]] b: make map! [ m 4 ] ] >> a1/f none |
BrianH 3-Mar-2011 [7578x2] | Appears to be a bug. I'm writing the ticket now. |
See here for details: http://issue.cc/r3/1863 | |
GrahamC 4-Mar-2011 [7580x2] | Does tab for path completion not work anymore ? |
Or, did it never work? | |
Rebolek 4-Mar-2011 [7582] | never worked in R3 |
GrahamC 4-Mar-2011 [7583x2] | ok. |
How bad would it be to have a strict version of rebol vs a relaxed version. I'm thinking of things like skip which require an integer and choke on none ... | |
BrianH 4-Mar-2011 [7585x2] | It would be bad to have a non-strict version, as someone might use it. |
That's only bad if their scripts were published or used by others. | |
Rebolek 4-Mar-2011 [7587x2] | Can I create object from block of words and values? |
*blocks of... like - words: [a b] values [1 2] | |
Sunanda 4-Mar-2011 [7589] | This is one (fairly manual) way: words: [a b] values: [1 2] obj: make object! [] for n 1 length? words 1 [ append obj words/:n set in obj words/:n values/:n ] |
BrianH 4-Mar-2011 [7590] | set bind/new/copy words obj values |
Rebolek 4-Mar-2011 [7591x2] | yes..I though that there may be some fast native function for it ;) |
ah, thanks! | |
BrianH 4-Mar-2011 [7593] | The /copy is only necessary if you will be reusing the words block. |
Sunanda 4-Mar-2011 [7594] | This line of code (complete with typo of extra colon on the ONLY) works in R2 a: copy [] insert/only: a 8 But, in R3, it acts as a no-op Neither behaviour seems reasonable -- why not a syntax error? |
BrianH 4-Mar-2011 [7595] | There is a ticket about that already. |
Sunanda 4-Mar-2011 [7596] | Thanks -- must have missed that one. |
BrianH 4-Mar-2011 [7597] | See http://issue.cc/r3/1558and http://issue.cc/r3/1559 |
Claude 5-Mar-2011 [7598] | the rebol3-gui of RMA is on a good way. now we would like a R3 fixe to have the GUI on Linux & Mac !!!!! |
Rebolek 5-Mar-2011 [7599] | Is there some good documentation about ports and schemes? Finding anything on rebol.com is almost impossible. |
Gregg 5-Mar-2011 [7600] | I don't know of anything current from RT, but maybe these will help: http://www.rebol.net/docs/prot-http.html http://www.rebol.net/docs/ http://www.compkarori.co.nz:8000/Rebol3/Schemes/Http |
Rebolek 5-Mar-2011 [7601] | Thanks! I also found this useful doc http://www.rebol.net/wiki/Schemes:Notes |
Pekr 5-Mar-2011 [7602x2] | There were imo better docs. I'll try to find my previous posts, I gathered some links ... |
http://www.rebol.net/wiki/Ports http://www.rebol.net/wiki/Port_Examples http://www.rebol.net/r3blogs/0130.html- More about Port layers - the OSI Model http://www.rebol.net/r3blogs/0129.html- Simple TCP example: HTTP web page transfer http://www.rebol.net/r3blogs/0128.html- Skip and Seek on ports http://www.rebol.net/wiki/TCP_Port_Details | |
Gregg 5-Mar-2011 [7604] | Should we copy these to the REBOL 3 Schemes group? |
GiuseppeC 5-Mar-2011 [7605x2] | I have not understood REBOL response of Sunanda question b: reduce ['now] do first b (nothing on console) do b ==6-Mar-2011/0:48:32+1:00 do do first b == 6-Mar-2011/0:48:32+1:00 Why 2 "DO" are needed when you use FIRST ? Which is the difference ? |
The same for DO B/1. Which is the difference between the WORD "now" used by "DO B" and the WORD "now" you get from DO B/1 ? | |
BrianH 5-Mar-2011 [7607x4] | In R3, DO of a word! value is basically equivalent to GET of the word. So in the example above, the first DO performs a GET of 'now, retrieving the value assigned to it, the NOW function. Then the second DO of the value of the NOW function performs that function. |
If you DO a block, it interprets the block. In that case, the word is inline so it is evaluated as an inline word, as a GET then a DO. | |
So, getting rid of the distracting REDUCE, the first line is this: b: [now] It is a block with a word! value in it. In the context that the word is bound to, the function value NOW is assigned to that word. You can either have a dialect processor like DO interpret the block: do b or you can treat the block like data and interpret the data yourself, emulating the dialect processor (all of these lines are equivalent): do do first b do do b/1 do get b/1 | |
Note that those lines are equivalent for that particular data. For other data, they may or not be equivalent. | |
older newer | first last |