World: r3wp
[Core] Discuss core issues
older newer | first last |
[unknown: 5] 19-Feb-2008 [9230x2] | I forgot about found. |
Just when I was starting to think there was no longer a use for it. | |
Ingo 19-Feb-2008 [9232] | I admit, I had to look it up, too. |
[unknown: 5] 19-Feb-2008 [9233x2] | lol - I kept thinking in my head what I can return this back with that would explicitly evaluate to true or false and not give none but you FOUND it - pun intended. |
So does anyone else think potential? should be a mezz function? If so, what should the name of it be proposed as? | |
Ingo 19-Feb-2008 [9235] | I'm not sure it's needed often enough to warrant its inclusion, first take at a name: non-lit-word? |
[unknown: 5] 19-Feb-2008 [9236] | But it that really doesn't give an indication of what the function is for which I believe the function is for is to find if an argument has a potential to be evaluate |
Henrik 19-Feb-2008 [9237] | Your functions are returning none so I don't think we want that. <-- my point was that NONE can be more useful than FALSE and gives simpler code, if you are not using NONE as a specific value. |
[unknown: 5] 19-Feb-2008 [9238] | Can you provide an example Henrik? |
Henrik 19-Feb-2008 [9239] | I gave it above. Simplified code. |
[unknown: 5] 19-Feb-2008 [9240] | Yeah but that is a trade off to useability in my opinion. For example I can say pick [this that] potential? arg |
Henrik 19-Feb-2008 [9241x2] | true, if you need to do that. |
but what if you don't? :-) | |
[unknown: 5] 19-Feb-2008 [9243] | I think we will have to do that more than the situation where we would desire it to return none is why I mention it. |
Henrik 19-Feb-2008 [9244] | ok, then ignore my suggestion :-) |
[unknown: 5] 19-Feb-2008 [9245] | I didn't ignore it - I just want to make sure if we propose it then it meets the highest amount of usability. I'm interested in all ideas. |
Ingo 19-Feb-2008 [9246x2] | Sorry, just going nuts ... able-to-have-a-valus? or in short: valuable? |
valus? = value? of course ... | |
[unknown: 5] 19-Feb-2008 [9248x3] | I like valuable? |
Ingo, do I have your ok to submit your form of the valuable? function via Rambo? | |
Anyone know why the case function has a /all refinement? Seems the /all is what case does by default. | |
Ingo 19-Feb-2008 [9251x3] | Sure you have my OK. |
I see a difference ... >> case/all [1 probe 1 2 probe 2 3 probe 3 false probe false 5 probe 5] 1 2 3 5 == true >> case [1 probe 1 2 probe 2 3 probe 3 false probe false 5 probe 5] 1 == 1 | |
Bye, I'll leave for now. | |
[unknown: 5] 19-Feb-2008 [9254] | Yeah I am confused by the wording as it says for the /all: Evaluate all cases and for the function itself: Evaluates each condition That sounds the same. |
btiffin 19-Feb-2008 [9255x2] | case will normally stop after the first true condition. case/all will evaluate all of the true conditions. |
The key bit from the HELP is REFINEMENTS: /all -- Evaluate all cases (do not stop at first true case) | |
[unknown: 5] 19-Feb-2008 [9257x2] | Yeah I understand how it works but the help documentation seems confusing. |
would be nice to also break out of one of evaluated cases. | |
btiffin 19-Feb-2008 [9259] | There is always a REBOL way :) And after I post this, someone else will come by with the real answer. >> print catch [case/all [true [print 1] true [print 2] true [throw "4"] true [5]]] |
[unknown: 5] 19-Feb-2008 [9260x2] | that will work btiffin. |
That seems rather clean also. | |
Ingo 20-Feb-2008 [9262] | How about the following wording for case? Evaluates conditions until the first is true, then evaluates what follows it. |
[unknown: 5] 20-Feb-2008 [9263x5] | Makes it sound a bit like the first condition must be true. |
Evaluates each condition until true, then evaulates what follows it. | |
Then again that one makes it sound like all conditions must be true. | |
Evaulates conditions until a condition is true, then evaluates what follows it. | |
That sounds less confusing. | |
Ingo 20-Feb-2008 [9268x2] | Evaluates conditions until a condition is true, then evaluates the associated value. |
("what follows it" could be all the rest ...) | |
[unknown: 5] 20-Feb-2008 [9270] | So let me play newbie for a moment. If I see your phrase I might think that case is going to evaluate each condition until that condition is true and then evaluate what follows it. Similiar to an until function. |
Ingo 20-Feb-2008 [9271] | Evaluates the conditions, until the first true condition is found. Then evaluates the associated value. |
[unknown: 5] 20-Feb-2008 [9272x2] | Anyone have information on the STATS command. I'm trying to find some comprehensive information on it. I remember at one time there was a discussion regarding using stats to measure performance of functions, etc.. |
Not just memory usage. | |
btiffin 20-Feb-2008 [9274] | stats/evals is handy. Use it with stats/evals/clear And then look at rebol.org's mem-stats.r by Carl. It's not "comprehensive info" but it's info. :) |
Anton 20-Feb-2008 [9275] | I think "next value" is more precise than "associated value". |
[unknown: 5] 20-Feb-2008 [9276] | thanks Btiffin. I'll look for Carl's mem-stats.r function also. |
james_nak 22-Feb-2008 [9277] | I don't know where to put this question exactly but has anyone created any code to generate an Outlook appointment request? |
Gregg 22-Feb-2008 [9278] | I did some MAPI test R&D a long time back, though I think I wrapped it in a DLL to call from REBOL. Can you generate an iCal %.ICS file and do it that way? |
[unknown: 5] 22-Feb-2008 [9279] | The valuable?/potential? function would have to be updated. It needs to check for value. so it would be: valueable?: func [arg][found? all [any-word? :arg not lit-word? :arg value? :arg]] |
older newer | first last |