World: r3wp
[Core] Discuss core issues
older newer | first last |
Anton 11-Feb-2007 [7124] | Ok, then fork the entire code and cut away chunks until it no longer displays the problem. |
Maxim 11-Feb-2007 [7125x2] | ehh impossible... we are talking bout an entire app here... 200-300kb of code. probably... and the problem occurs within an event loop. |
but look at the simplicity of the two lines above... can you image a way in which the select would return none and the find would return the object? | |
Anton 11-Feb-2007 [7127x2] | (not impossible - that technique works when I can think of nothing else). |
A confusion between lit-words and words maybe ? | |
Maxim 11-Feb-2007 [7129x2] | hum... |
unfortunatetely, I can't print the block, cause the objects have nested objects, and that causes an out of memory err, If I try to mold it :-( | |
Anton 11-Feb-2007 [7131x2] | write clipboard:// mold/all blk and paste it (and mold/all VAL) into a new editor window. |
Ah.. | |
Maxim 11-Feb-2007 [7133] | the actual app takes very little ram, but the objects, have bidirectional linking... so I guess the mold never reaches the end. |
Anton 11-Feb-2007 [7134] | Ok, then, for your test, before molding, process each object to set none all fields which could recurse. |
Maxim 11-Feb-2007 [7135x4] | hum... I'll try my inspector... maybe it can help me a bit... |
oops... closed altme by mistake... the inspector basically has the same problem... | |
I'm trying some block alterations... | |
wrt lit-word vs word... find is reacting as expected.... select is numb like a frog on ice | |
Anton 11-Feb-2007 [7139] | Maybe check that BLK really has the expected types in the correct order. |
Maxim 11-Feb-2007 [7140x6] | oh my... I just found it... same? :select get in system/words 'select == false |
seems some code redefines select somewhere... >:-( | |
well, thanks for bearing with me... your words vs lit-words idea... got me probing differently.. | |
strangely, I can't trace where that is happeneing... willl try to protect the word... | |
well, as usually protect doesn't help... arrgh. | |
(as usuall) | |
Anton 11-Feb-2007 [7146] | protect doesn't help ? Is SELECT redefined despite being protected ? |
Maxim 11-Feb-2007 [7147x5] | well, protect, only helps within the global context... which is why I wish there was /HARD mode which protected ANY setup of a specific word. |
probably also can protect word within a context... but at that point, the damage is usually done. | |
I've discoverd another way to discover where a set occurs... within objects, you look at the first... and the natural order of words, is a telling clue... | |
first self | |
well found it... and its a biggie :-( deep within glayout... well... its actually pretty easy for fix there, though. | |
Maxim 12-Feb-2007 [7152] | why the hell did I use select... its actually quite strange that this is the first time I've hit this snag in 3 years though ! |
Anton 12-Feb-2007 [7153x2] | I should just point out that only the system/words object can grow dynamically. |
Other objects have fixed order of words. | |
Maxim 12-Feb-2007 [7155] | the issue is that as it is a commonly used feature, although easy to fix within glayout... many references to in my apps will break... ahh... |
Anton 12-Feb-2007 [7156] | The order does not change after the initial SET. |
Maxim 12-Feb-2007 [7157] | yes. |
Anton 12-Feb-2007 [7158] | >> set 'var-1 1 == 1 >> set 'var-2 2 == 2 >> set 'var-1 3 == 3 >> print mold skip tail first system/words -4 [Comments in-obj var-1 var-2] |
Maxim 12-Feb-2007 [7159x4] | how the hell did I not realise I was overiding such a core word? sometimes the obvious just slips by... when you're looking the other way ' :-/ |
yes anton, which is why I discovered where it was being set... after a func called 'layout (this one voluntarily being an override) | |
It would be nice in R3 if we could remove things from an object when deriving with make... (we can , sort of, using the 'THIRD accessor on an object and editing it....) | |
but when the object is being created by another controler (like in view) then we can't really... | |
PeterWood 12-Feb-2007 [7163] | So you'd really like Rebol to have the equivalent of JavaScript's Delete operator? |
Maxim 12-Feb-2007 [7164x2] | hum don't know about it... but if I could do obj: make/without ref-obj [] [select] We could already shrink our objects, when its needed. |
binding would then have to replace any object-local bindings of select to the global context and raise an error if it doesn't exist, as it would if you had tried to define a new object with select undefined in any place. | |
PeterWood 12-Feb-2007 [7166x2] | One think that I like in JavaScript is the flexibility to freely add and remove members from object instances and object prototypes . |
think -> thing | |
Maxim 12-Feb-2007 [7168x2] | it is usefull only when it is something which is not automatic like in python, where its nightmarish. |
if you inadvertently typo , then you create a new member! talk about hard to debug errors!! | |
Joe 13-Feb-2007 [7170] | how does the path native work ? I couldn't find it in the rebol dictionary |
BrianH 13-Feb-2007 [7171] | Joe, that native is an accidently exposed internal function. It has no use externally. |
Henrik 14-Feb-2007 [7172] | If I'm calling a function with many different refinements and the function has to work recursively and all refinements must be maintained throughout recursion, is there an easy way to get the function call with all refinements? I'm using: >> f: func [/a /b] [to-path remove-each p reduce ['f all [a 'a] all [b 'b]] [none? p]] >> f == f >> f/a == f/a >> f/b/a == f/a/b ; lose refinement order |
Anton 14-Feb-2007 [7173] | I'm not sure if this helps but I sometimes make a wrapper function which calls the actual recursive function. The wrapper could take the refinements and set some flags in a context shared by all calls to the inner recursion function. |
older newer | first last |