World: r3wp
[!REBOL3-OLD1]
older newer | first last |
[unknown: 5] 7-Feb-2009 [10727] | Really, that is it. I think there would be much more involvement if the UI was much better. I think the problem is that Carl is still in honeymoon stage with RebDev and doesn't yet understand how much work is still really needed to get it embraced. At this point I think ALTME is far better medium than RebDev. |
BrianH 7-Feb-2009 [10728] | AltME is horrible for useful, focused discussions. No threading, no subtopics, no moderation. R3 chat is already better for that. |
[unknown: 5] 7-Feb-2009 [10729x3] | Evals could be improved dramatically to be a very cool function. |
Well in a sense ALTME has as much threading as RebDev by the means of groups. | |
I still think a better solution would be a darknet forum that way Carl doesn't have to worry about spammers. | |
BrianH 7-Feb-2009 [10732] | Not really. The lack of moderation is the real killer though - you can't move or delete messages when they are off-topic in AltME. |
[unknown: 5] 7-Feb-2009 [10733] | Yeah but that can be resolved by careful inclusion of the darknet members. |
BrianH 7-Feb-2009 [10734] | In theory, the ranking of R3 chat can be used to get rid of spammers. |
Chris 7-Feb-2009 [10735] | Is 'dirize/off an option? |
BrianH 7-Feb-2009 [10736] | Chris, yes, but that would double the code of DIRIZE and add refinement checking overhead to every call, so the effect is worse. |
Chris 7-Feb-2009 [10737x2] | Assuming 'dirize asserts a state on a file (dirized or not). |
It's one logic check vs. an extra function. | |
[unknown: 5] 7-Feb-2009 [10739] | Brian, that is the way I like to see you thinking. |
BrianH 7-Feb-2009 [10740] | Dirize only works on the file! value, not the file referred to by the file! value. It would be adding one logic check plus the entire contents of an extra function. The code added would actually be more. |
[unknown: 5] 7-Feb-2009 [10741] | Always think of the impact of a function regardless of size when it is done in a large loop. All of those extra checks add up. |
BrianH 7-Feb-2009 [10742] | Yup. That's why they have me work on mezzanines :) |
[unknown: 5] 7-Feb-2009 [10743] | hehe |
Chris 7-Feb-2009 [10744] | It's also one less function to learn. |
BrianH 7-Feb-2009 [10745x3] | Adding an option to a function that changes its behavior makes it harder to learn than a seperate function. The only thing you have to remember with a new function is the name. You have to do refinement processing in your head too, remember :) |
It's easy to learn simple functions, but hard to learn complex ones. | |
Of course it takes a lot of work to make a function simple to learn and use. | |
Chris 7-Feb-2009 [10748x2] | dirize: func [file [file! url!] /off][ file: back tail file either file = %/ [ all [off remove file] ][ any [off append file %/] ] head file ] |
I guess it's a bit wordy. | |
BrianH 7-Feb-2009 [10750x2] | You forgot the copy, but that is a good alternative. |
It's slower (one more compare). We'll have to see which one is chosen. | |
Chris 7-Feb-2009 [10752x2] | It also shifts the index twice, whether the function needs it or not. |
Three times, sorry : ) | |
BrianH 7-Feb-2009 [10754x2] | The one compare is dwarfed by the copy overhead though. Shifting the index only has significant overhead for ports, not series. |
The list! type is gone from R3, and that was the only type with index overhead. | |
sqlab 7-Feb-2009 [10756] | dirize: func [file [file! url!] /off /local l][ l: last file either l = #"/" [ all [off remove back tail file] ][ any [off append file %/] ] file ] that should be a little bit faster |
Chris 7-Feb-2009 [10757x4] | ; Might also be faster than mine: dirize: func [file [file! url!] /off][ file: back tail file all [ file = %/ = off either off [remove file][append file %/] ] head file ] |
(again, no copy) | |
Hmm, maybe not. | |
The pitfalls of none vs. false. | |
sqlab 7-Feb-2009 [10761] | dirize: func [file [file! url!] /off ][ file: copy file either #"/" = last file [ all [off remove back tail file] ][ any [off append file %/] ] file ] |
[unknown: 5] 7-Feb-2009 [10762x4] | dirize: func [file [url! file!] /off][ head remove back tail make file either off [file][compose [(file) "/"]] ] |
dirize: func [file [url! file!] /off][ to type? file head remove back tail make file! either off [file][compose [(file) "/"]] ] | |
still a bit buggy but throwing it out there to play with. | |
dirize: func [file [url! file!] /off][ to type? file head remove back tail make file! either all [off #"/" = last file][file][compose [(file) "/"]] ] | |
Anton 8-Feb-2009 [10766] | Eh.. I prefer BrianH's separate UNDIRIZE (or FILEILZE) function than this /OFF refinement. |
Henrik 8-Feb-2009 [10767] | I agree with Anton. IMHO, one should not build refinements that invert the behavior of a function. Refinements should extend a function's existing behavior, similar to what COPY vs. COPY/DEEP does. |
Janko 8-Feb-2009 [10768] | in that light ... does this solve >>exists? ; exists?/dir ; exists?/file exists?/...<< does this solve that problem too? >>- Using both DIR? and EXISTS? means two QUERY calls, which has overhead, particularly for networked files.<< |
Henrik 8-Feb-2009 [10769] | that's where I would use separate functions for each operation. no need for multiple queries or curious refinements. |
Janko 8-Feb-2009 [10770x2] | maybe I understood Brian wrong.. I thought in current situatuion you need to call exists? somepath and dir? somepath to know that something exists and is a directory (which also means two query calls I suppose) |
will R3 have a way to define custom infix words? | |
Anton 8-Feb-2009 [10772] | Janko, yes, the current situation is exactly that; to know that a directory exists, you need to call exists? and dir?, which causes two QUERY calls. |
Chris 8-Feb-2009 [10773x4] | Re: /off - it's not that different from 'trace or 'new-line. It switches a mode, albeit using a refinement instead of a value. |
Dirized is a state that 'dirize alters. | |
In R2, there are only two 'un verbs: 'unset and 'unprotect. 'undirize seems contrived (yep, dirize is contrived too, but necessary for a state that has no other name). | |
R2 Core, that is... | |
older newer | first last |