World: r3wp
[Core] Discuss core issues
older newer | first last |
Pekr 17-Apr-2007 [7555] | what negativity? I put smiley to what I said ;-) It is just clear, that most new system experience new bugs, no? It will be the same for R3, so looking forward to R3.1 already :-) |
Maxim 17-Apr-2007 [7556x2] | I know... was just pulling your leg... so you will come and see all those crashes at the devcon? yes? |
you know, you and I in the same room will make some space-time continuum bubble, which will make R3 even more crash prone ;-) all of that negativity swirling around like a maelstrom. | |
Pekr 17-Apr-2007 [7558] | I will save my energy for next year's devcon -imagine - hundreds of new R3 users around the world and then elite (current community members) telling stories about R2 and old, not always so good, days :-) |
Maxim 17-Apr-2007 [7559x3] | you could hide in ladislav's luggage ;-) |
and call in sick ;-) | |
MULTI-SWITCH: New function in the code-snippet check list. | |
Graham 17-Apr-2007 [7562] | If you have a series of nested objects, how do you get the value of say, the nth nested object? is there something like : get in object 'obj1/obj2/obj3/obj4/....objn/parameter |
Henrik 17-Apr-2007 [7563] | perhaps if you convert the path to a block? |
Graham 17-Apr-2007 [7564] | Just wondering if there will be a shortcut method of accessing an object |
Henrik 17-Apr-2007 [7565x3] | >> to-block 'i/hate/icecream/yes/i/do == [i hate icecream yes i do] |
>> to-path head clear at to-block 'i/hate/icecream/yes/i/do 4 == i/hate/icecream | |
>> pick 'i/hate/icecream/yes/i/do 3 == icecream | |
Graham 17-Apr-2007 [7568] | This is not accessing the object |
Henrik 17-Apr-2007 [7569] | no, but it's cool. I didn't know you could do this :-) |
btiffin 17-Apr-2007 [7570x2] | Graham; I've never looked to close at the code, but maybe the ROAM tool from the viewtop has some hints. |
s/to close/too close/ | |
Henrik 17-Apr-2007 [7572x2] | >> mold/all to-email "" == "" Is there a problem here or am I putting too much faith in mold/all? |
or perhaps putting too much faith in the email! datatype :-) | |
Graham 17-Apr-2007 [7574] | latter |
Henrik 17-Apr-2007 [7575x2] | so, don't use the email datatype in an object and mold/all when you save it. |
or use it if you consider data loss a feature :-) | |
Maxim 17-Apr-2007 [7577x2] | this is a big bug.... even a proper email doesn't get serialized. :-( |
actually its more like don't use an email type AT ALL ! | |
Ashley 18-Apr-2007 [7579] | I've had a mental lapse. How do I get the follwing to work: >> a: func [b /local v] [v: 1 do b] >> a [print v] |
Anton 18-Apr-2007 [7580] | do bind b 'v ? |
Ashley 18-Apr-2007 [7581] | Thanks, exactly what I was trying to remember. |
Oldes 18-Apr-2007 [7582x2] | is there any better way how to make from nasted block flat one than this one: >> a: [] b: [[1 2][3 4]] forall b [append a b/1] a == [1 2 3 4] |
is this what you would expect? >> rejoin [[1 2][3 4]] == [1 2 [3 4]] | |
Henrik 18-Apr-2007 [7584] | >> load reform [[1 2][3 4]] == [1 2 3 4] It may not be sufficient |
Oldes 18-Apr-2007 [7585x2] | hm... it's much more faster, maybe I can use it:) |
no.. I cannot use it... load reform [["a" 1][b c]] == [a 1 b c] ;;;I need ["a" 1 b c] | |
Henrik 18-Apr-2007 [7587x2] | yes, it destroys strings |
>> load trim/with mold/all [["1" 2][3 4]] "[]" == ["1" 2 3 4 ] | |
Oldes 18-Apr-2007 [7589] | hm.. but it looks ugly:) I will rather stay with the forall loop |
Henrik 18-Apr-2007 [7590] | ugly, but is it slower? |
Oldes 18-Apr-2007 [7591x3] | it's still faster |
ok.. I will use func flat-block: func[b][load trim/with mold/all b "[]"] | |
than it will be readable enough, I hope:) | |
Henrik 18-Apr-2007 [7594] | I've seen worse code than that :-) |
Anton 18-Apr-2007 [7595x2] | Oldes, avoid FORALL, maybe WHILE is much faster. |
>> a: copy b == [[1 2] [3 4]] >> while [not tail? a][a: change/part a a/1 1] a: head a == [1 2 3 4] | |
Ladislav 18-Apr-2007 [7597] | flatten: func [ block [block!] /local result pos rule item ] [ result: make block! 0 parse block rule: [ any [ pos: block! :pos into rule | skip (insert/only tail result first pos) ] ] result ] |
Anton 18-Apr-2007 [7598] | Ladislav's is recursive so that may be better. |
Maxim 18-Apr-2007 [7599x2] | anton, why do you say to avoid forall? |
just speed? | |
Oldes 18-Apr-2007 [7601] | I choosed Anton version which is as fast as the load version (but I somehow don't know if it's good just to convert to string and load).. and I don't need recursive (which is fine, but slower).. and maxim... yes.. just speed (it's a shortcut for forskip anyway)... on the 'while version is good that the 'change is automatically skiping to the position after change. |
Maxim 18-Apr-2007 [7602] | ok, I knew for the forskip, I just wanted to know if there where any other reasons (some sort of general rule) |
Ladislav 18-Apr-2007 [7603x2] | Oldes: "which is fine but slower" - apparently you didn't do any measurements :-) |
(or, maybe you did, but used different computer) | |
older newer | first last |