| motion | 10 yo laptop and your still using it? thats gotta be what, a P2 with 128M of ram :p |
| blink | motion: p3 96 |
| wrs_ | blink, is there a way to get ri to help on keywords like "or" and "and"? I played around with it ("5 or 4 or 3 or 2 => 5") but didn't get it yet. |
| blink | wrs_: ri only does objects and methods. wrs_: what are you trying to do? |
| wrs_ | Mh, and google removes "and"s and "or"s from search ... |
| motion | wrs_: 5 isnt false so it uses that |
| oGMo | 96? why back in the day... |
| blink | 'and' and 'or' in gooogle quote them. |
| wrs_ | blink: I try. |
| blink | corundum: quickref? |
| corundum | quickref is http://www.zenspider.com/Languages/Ruby/QuickRef.html |
| jast | wrs_, the term short-circuit operator may be helpful to understand it |
| blink | wrs_: look at the quickref as well. |
| wrs_ | blink: I want to initialize a edge object by two nodes given and a connection modifier. Therefore, I think I need to make sure that the input params in fact are connection modifier + nodes. |
| blink | i have no idea what you just said. |
| wrs_ | motion: sure, but I weren't sure whether or not it might be a binary or; but 4 or 1 makes 4, which confused me. |
| jast | it's a logical or |
| blink | everything is true but for false and nil |
| jast | it picks the first term that, if interpreted as boolean, is true |
| wrs_ | blink, yes I know... apparently I just didn't realize it yet |
| blink | heh |
| jast | if you want binary operators, you should use & and | |
| wrs_ | jast, no I want boolean ones |
| jast | never mind me then ;) |
| jtoy_ | does anyone have a a link to the Enumerable#group_by code, I am having trouble finding it online |
| blink | mrm. dirt needs more carly pope. |
| wrs_ | blink, I meant, I have an object that needs several params for initialization. I want to make sure these are of the expected kind [of object]. |
| blink | ahhh def meth foo; raise 'foo not a string' unless foo.is_a? String; do_stuff; end |
| wrs_ | blink, I'd leave it to any innermore method to throw any exceptions if the params of wrong type, but when I do so for initialization, and it crashes later, it might become hard to find out what caused the crash. yes clearly, but for more but one param? blink, therefore I am after the "and" thing. |
| blink | def meth foo, bar; raise ArgumentError unless foo.is_a?(String) and bar.is_a?(Hash); do_stuff; end |