World: r3wp
[Core] Discuss core issues
older newer | first last |
Ladislav 7-Jan-2005 [39] | your trouble is, that the evaluation of X doesn't have the same effect as if you replace X by its value. The evaluation of X only yields a set-word instead of setting anything. If you really want to set a word 'y, then there are two ways: set x 'z do compose [(x) 'z] |
rolf 7-Jan-2005 [40] | OK thanks, I understand. 'set is simple. I did not try 'do compose' until now. II tried 'do' and 'do reduce' without succes. |
Ryan 7-Jan-2005 [41x2] | How about this one: |
>> dir? http:/www.google.com/ ** Access Error: Cannot connect to mail.pacific.net ** Where: open-proto ** Near: dir? http:/www.google.com/ | |
Ammon 7-Jan-2005 [43] | Hm... I think you got something stuck in your event system somewhere... >> dir? http://www.google.com connecting to: www.google.com == false |
Ryan 7-Jan-2005 [44x3] | Your right... |
>> system/version == 1.2.57.3.1 | |
(you were right about the editor too, 1 night was too little) | |
Gabriele 8-Jan-2005 [47] | http:// not http:/ |
Ryan 8-Jan-2005 [48x2] | >> dir? http://www.google.com/ == false |
The devils are in the details! | |
Scott 8-Jan-2005 [50] | Ryan: What are you trying to achieve? (Or is it humor that has eluded me?) |
Ryan 8-Jan-2005 [51] | Just curious if it looked up the site for a directory. part of my rebol editor I am working on. |
DideC 8-Jan-2005 [52] | Gabriele mean that in your post at 5:30 am you miss a slash in the url (http:/ instead of http://) |
Ryan 8-Jan-2005 [53] | Yep, that was it. |
Pekr 10-Jan-2005 [54x6] | does sort use bubble sort? |
I mean - for sort/compare | |
I will have following block structure: | |
blk: [[name "pekr" other [cz "aaa" en "bbbb"]] [name "adiana" other [en "ddd" cz "aab"]]] | |
using sort/compare blk func [a b] [a/other/cz < b/other/cz], it will survive different location of 'cz field, as it cleverly uses path navigation. That is nice. I just wonder about different case ... let's say I have object templates, which change once per period of xy months ... I also have IOS, so lots of record synced around. My plan was, that each object would carry its version info. I wonder what to do in case, where new object template version will extend object structure, e.g. adding phone-num field ... | |
If I would try to run sort, it would crash ... I wonder if I should check each object at its usage, and if instance is of older structure, update it first - adding new fields, not removing older ones (questionable, maybe they should be removed, or sort problem would not be gone anyway) | |
Anton 10-Jan-2005 [60] | I don't think it uses bubble sort. That is a very slow algorithm. It's probably quick sort or shell sort. |
Pekr 10-Jan-2005 [61] | I really liked its path understanding - so I don't need to keep fields at the same position. I like blocks better than objects :-) |
Anton 10-Jan-2005 [62x2] | You have to be careful using /compare. I don' t think it's good to use just a logic! value for the swap condition. I think you need to specity -1, 0, 1 as values... I forget, you must look it up. |
by "crash" do you mean crashing the rebol interpreter ? | |
Pekr 10-Jan-2005 [64] | ? dunno understand what you are talking about .... I tested it with few records and it worked ... I used example from rebol.com doc ... |
Anton 10-Jan-2005 [65] | do you have a simple example. |
Sunanda 10-Jan-2005 [66] | Logic! works fine if you have unique key values. +1 0 -1 is for ensuring stable sorting when key values are not unique. |
Anton 10-Jan-2005 [67x3] | ah yes.. that's right. When you sort an already sorted list, some equal values would swap around sometimes. |
(I should say keys, not values...) | |
(that's an unstable sort) | |
Sunanda 10-Jan-2005 [70] | sort/compare/all/skip -- will crash earlier versions of REBOL...One reason not to use blocks. It should work with recent versions. Is that your problem, Petr? |
Anton 10-Jan-2005 [71] | how do you remember that so quickly Sunanda ? (what's your indexing method?) |
Pekr 10-Jan-2005 [72] | no, no Crashes, even with older version, but tested only with 3 records ... |
Anton 10-Jan-2005 [73] | show us the simplest crashing example code |
Pekr 10-Jan-2005 [74] | my "problem" was, I wante some kind of "tolerant" mode of sort, that it would not scream if some record would not contain field to test, so it would e.g. add those records to the end :-) |
Anton 10-Jan-2005 [75] | so not a crash, just a rebol error, then ? |
Pekr 10-Jan-2005 [76x2] | yes, of course ... |
it was me choosing incorrect word, sorry ... | |
Anton 10-Jan-2005 [78] | I would say you have to write your own sort. I have done this... let's see. |
Pekr 10-Jan-2005 [79x2] | I just wanted to load small text files (representing records) into block, then sort them. But as life goes on, your system evolves and I can imagine, that your e.g. Contact database will be extended by e.g. cell-phone2 record. But your previous records are already synced across tens of users. I wanted to sort and wondered, what to do about old records ... |
I know it would be probably safer to rebuild all records, I just wondered if I could live without doing so .... | |
Anton 10-Jan-2005 [81] | yeah, just pre-scan... if the cost is not too high. Is the record access slow ? |
Pekr 10-Jan-2005 [82] | no, I think not .... I am waiting for RIF anyway ... |
Sunanda 10-Jan-2005 [83] | Anton -- I had to debug the problems with Sort/all/skip/compare -- code that worked on one platform, but failed on another. It got burned into the brain. |
Pekr 10-Jan-2005 [84] | In Silesion group, late today I will post about what I have in plan and will "complain" a bit about IOS ... it is so primitive db vise, that it is not much usable ... |
Sunanda 10-Jan-2005 [85] | Petr, for fault tolerance, something like: sort/compare ...... func [a b] [ attempt [return a/x < b/x] return false] |
Pekr 10-Jan-2005 [86x3] | excelent - it does not return error, block is sorted, now I have to find out, what it did with record, which is missing field agains which I did compare .... |
why is there "return false"? | |
hmm, that return false seems to change search results ... | |
older newer | first last |