World: r3wp
[!REBOL3]
older newer | first last |
Graham 14-May-2010 [3061] | or can we script the login, and download of new messages :) |
Pekr 14-May-2010 [3062] | Can we? Does R3 chat have an API? I mean - there are commands, but can we script it? Dunno how ... |
Graham 14-May-2010 [3063x5] | http://www.rebol.com/r3/chat.r |
Hmm... Script Error: This script needs View 2.100.28 or better to run correctly So, why does a console app need view ? | |
auto-login: func [/force] [ all [ any [force prefs/auto-login] prefs/user prefs/pass attempt [login-serve prefs/user prefs/pass] true ] ] | |
Should be able to modify chat to autologin, check for new messages and then quit. | |
I wonder what sort of flood protection there is ... | |
Pekr 14-May-2010 [3068] | Hmm, so we can only have 255 Windows?I thought I will make small stress-test one day, opening 10K Windows under Vista :-) IIRC, my friends did something like that with AmigaOS, and it still worked :-) http://curecode.org/rebol3/ticket.rsp?id=1610&cursor=1... anyway ... this is imo unnecessary limitation .... |
BrianH 14-May-2010 [3069x2] | Graham: If I want to set something to the index of a series, or something else if it's not there I have to do this b: either a: find series var [ index? a ][ default ] when I'd rather do b: any [ index? find series var default ] So how about letting index? also take none as an argument ? |
Interesting idea, Graham. It's not that dissimilar to the recent proposal that EMPTY? take none. CureCode it :) | |
Maxim 14-May-2010 [3071] | index? none +1 :-) |
Graham 14-May-2010 [3072] | http://www.curecode.org/rebol3/ticket.rsp?id=1611 Done |
BrianH 14-May-2010 [3073x2] | Cool, thanks! We can post a comment to the EMPTY? none blog mentioning this ticket as well :) |
Done. Also tweaked the ticket to be more specific, and added a comment in favor of it. | |
Steeve 14-May-2010 [3075] | I can make a prediction, Gradually, other functions will be modified to propagate the value # none instead of returning an error. This is only the beginning. |
BrianH 14-May-2010 [3076] | Seriously people, get to know and love ASSERT. You are going to miss those errors someday, to help you track down and prevent data corruption. |
Graham 14-May-2010 [3077] | Steeve are you against the idea? |
Steeve 14-May-2010 [3078] | On the contrary, I''ve always been for :) |
Graham 14-May-2010 [3079] | hard to tell :) |
BrianH 14-May-2010 [3080] | My comment also showed the downside: You will no longer be able to rely on INDEX? returning an integer. Though in balance I am in favor. |
Steeve 14-May-2010 [3081] | I dislike useless error bombing, as I already said |
Graham 14-May-2010 [3082x2] | I want to write simpler code too |
I hate having to trap for errors when I always have a default behaviour | |
Steeve 14-May-2010 [3084] | #none is the ideal pass-true value. All your codes would be delighted by such feature |
BrianH 14-May-2010 [3085] | I also dislike useless error bombing. Though I am in favor of *useful* error bombing; not the case here though. |
Steeve 14-May-2010 [3086] | *pass-thru |
BrianH 14-May-2010 [3087x2] | You can thank ASSERT for making LOAD more reliable in R3 than it is in R2. Use it yourself to the same effect :) |
In contrast, I don't think that NONE = INDEX? NONE is *necessarily* an error. You can screen with ASSERT or EITHER when it is. | |
Steeve 14-May-2010 [3089] | Currently, just a bunch of natives have been tweaked in that sense. remove, take, (and some other i can'"t remember now). But there is no reason to restrain the invasion of the pass-thru behavior. Indeed, just stop the propagation when a control flow function is reached :) |
Graham 14-May-2010 [3090] | Is anyone analyzing rebol code to look for awkward sequences that might be solved by changes in functions? |
BrianH 14-May-2010 [3091] | Not systematically yet, but yes on an ad-hoc basis for a few years now. Even during the GUI design phase before the first 2.100 public alpha. |
Steeve 14-May-2010 [3092] | Not so easy to identify, and you have to recruit some Rebolers to your cause, then there is the last obstacle. How to summon Carl... |
BrianH 14-May-2010 [3093] | ...which you do through CureCode, and messages in R3 chat. |
Steeve 14-May-2010 [3094x2] | Don't give all the secrets... |
for free :) | |
BrianH 14-May-2010 [3096x2] | The real problems blocking systematic fixing of awkward code is: - A lack of a large enough set of R3 code to examine. R3 is already different enough from R2 that the code isn't comparable in this way. - Not having metrics for "awkward". We've been eyeballing it so far, and meijeru and I have been the most systematic about that approach. |
But we've made a rather large set of changes to R3 already that fix most of the R2 awkwardness. | |
Steeve 14-May-2010 [3098x2] | I've give you one awkward idioms for free, pretty common. >> unless find serie value [append serie value] |
i'm bored to have to write such code again and again | |
Graham 14-May-2010 [3100] | prerebol it |
Steeve 14-May-2010 [3101] | ahah |
BrianH 14-May-2010 [3102] | APPEND is a modifying operation. This is an excellent example of where the propagation should stop. |
Steeve 14-May-2010 [3103x3] | Agree, indeed |
but not on the first parameter: append find serie value value | |
Stupid me... | |
BrianH 14-May-2010 [3106] | No, it's the first parameter that is being modified. In all other cases with none pass-through the value isn't being modified. Modifying operations are where the pass-through should stop. |
Graham 14-May-2010 [3107x3] | if file: request-file [ append files file ] |
append/found files request-file | |
I lose the temp variable | |
Steeve 14-May-2010 [3110] | In that case, I usually do >> append files [request file []] no temp var |
older newer | first last |