Show enters and exits. Hide enters and exits.
| 00:34:19 | brixen | ugh ugh |
| 00:34:44 | brixen | 1.9 appears to be omitting a defined?() call whose value is not used |
| 00:34:54 | brixen | but the call itself has side effects |
| 00:35:08 | brixen | if I use the return value, the side-effect method is invoked |
| 00:35:15 | brixen | if not, it is not |
| 00:35:21 | brixen | that seems like a bug |
| 00:36:06 | brixen | can I get 1.9 to print its bytecode? |
| 00:37:26 | evan | somehow |
| 00:37:29 | evan | i don't know how though |
| 00:37:34 | brixen | yeah, no easy way |
| 00:37:55 | evan | but it sounds like a 1.9 bug |
| 00:58:15 | evan | 9 failures left! |
| 00:59:34 | evan | wow. |
| 00:59:36 | evan | this one is.. |
| 00:59:39 | evan | WEIRD. |
| 00:59:45 | evan | <"$(\"body\").visualEffect(\"highlight\");"> expected but was |
| 00:59:45 | evan | <"<p>This is grand!</p>\n">. |
| 00:59:55 | evan | there is no This is grand in this file |
| 00:59:56 | evan | at all. |
| 01:01:43 | brixen | wow |
| 01:01:48 | evan | hm, there is in a different file.... |
| 01:01:52 | evan | oh le sigh. |
| 01:01:56 | evan | they're both named TestController |
| 01:02:03 | evan | but one appears to be inside a class |
| 01:02:08 | evan | i'm going to need coffee for this one. |
| 01:03:01 | brixen | hmm |
| 01:03:19 | brixen | so 1.8 warns about useless use of defined? in void context |
| 01:03:24 | brixen | 1.9 doesn't |
| 01:03:45 | evan | i ignore all 1.8 warnings |
| 01:03:49 | brixen | only for defined(not A.m) does 1.9 omit the call |
| 01:04:12 | evan | sounds like a bug. |
| 01:04:27 | brixen | ie defined?(not m) does not warn on 1.9 but does execute |
| 01:04:32 | brixen | yeah seems to be |
| 01:04:50 | evan | considering the usage of defined? |
| 01:04:56 | evan | i'm not surprised 1.9 has bugs in this |
| 01:04:57 | brixen | especially since implicit self receiver and explicit receiver behave differently |
| 01:04:59 | evan | it does the same thing we do |
| 01:05:08 | evan | emit matcher code |
| 01:05:23 | evan | and i'm sure the boundaries are untested. |
| 01:05:31 | brixen | oh definitely |
| 01:05:51 | brixen | probably more than the boundaries :) |
| 01:06:02 | evan | probably. |
| 01:19:17 | kronos_vano | "This is grand!" Great test! :))) |
| 01:19:25 | evan | hehe |
| 01:44:47 | brixen | evan: for cases like defined?(foo::SomeConst), if foo raises, the exception is swallowd |
| 01:45:02 | evan | really? |
| 01:45:05 | brixen | what's the best way to do that? emit inline rescue bytecode? |
| 01:45:07 | brixen | yes, really |
| 01:45:17 | evan | i'd prefer we go notcompliant |
| 01:45:22 | brixen | hmm |
| 01:45:25 | brixen | just let it rais? |
| 01:45:29 | evan | swallowing that exception is not helping |
| 01:45:29 | brixen | raise? |
| 01:45:32 | evan | yes. |
| 01:45:40 | brixen | indeed, it's not, but it evaluates to nil |
| 01:45:46 | brixen | I'm worried this could be a problem |
| 01:45:54 | evan | rescue what? |
| 01:45:58 | evan | StandardError? |
| 01:46:04 | brixen | any exception |
| 01:46:15 | brixen | basically, just evaluate to nil if an exception occurs |
| 01:46:27 | brixen | like begin; foo; ensure; return nil; end |
| 01:47:05 | evan | it can't be any exception |
| 01:47:12 | brixen | I can just emit bytecode like that |
| 01:47:20 | brixen | well, it can be StandardError then |
| 01:47:24 | evan | thats not any exception |
| 01:47:25 | brixen | le'me check |
| 01:47:27 | evan | that doesn't swallow it either |
| 01:47:39 | evan | well, i guess it does |
| 01:47:46 | evan | anyway. |
| 01:47:56 | evan | if you want to, i'd do StandardError |
| 01:48:07 | evan | you actually can emit a raw handler |
| 01:48:17 | evan | because you're at the bytecode level |
| 01:48:24 | brixen | what do you mean, that doesn't swallow it? |
| 01:48:34 | brixen | the return nil in ensure does |
| 01:48:39 | evan | return in an ensure is an edge case |
| 01:48:48 | evan | that happens to wipe out the current exception |
| 01:48:50 | evan | but anyways |
| 01:48:59 | brixen | right, well that's what I want |
| 01:49:07 | brixen | what's the "best" way to do that? |
| 01:49:17 | evan | go notcompliant |
| 01:49:22 | evan | imho |
| 01:49:23 | evan | otherwise |
| 01:49:29 | brixen | I don't think we should though |
| 01:49:30 | evan | at the bytecode level |
| 01:49:34 | evan | you use a setup_unwind |
| 01:49:38 | evan | and in the label for the handler |
| 01:49:41 | evan | clear_exception |
| 01:49:46 | brixen | ah ok |
| 01:49:47 | evan | thats using a raw handler |
| 01:50:03 | evan | thats not exposed at the ruby level |
| 01:50:06 | evan | but you can still use it. |
| 01:50:07 | brixen | what type should setup_unwind be? Rescue? |
| 01:51:05 | evan | yes |
| 01:51:09 | brixen | k |
| 01:54:14 | brixen | excellent, works fine |
| 01:55:01 | brixen | evan: http://gist.github.com/321311 |
| 01:55:46 | evan | that seems crazy beyond belief |
| 01:55:54 | brixen | heh |
| 01:55:56 | evan | but i won't try to understand why defined does what it does |
| 01:55:57 | brixen | yes, it does |
| 01:56:03 | brixen | indeed |
| 01:59:28 | maharg | I've been trying to think of legitimate use cases for defined? beyond constant-testing since this came up in here and I'm utterly at a loss |
| 02:01:30 | brixen | some uses of defined? have other methods like method_defined?, class_variable_defined?, instance_variable_defined? |
| 02:01:57 | brixen | I can see the sense in evaluating the "scope" in something like foo::Bar |
| 02:02:17 | brixen | but in general, defined? behavior seems really ill-thought out |
| 02:03:06 | brixen | but also in general, it's not my place to critique MRI behavior |
| 02:03:12 | brixen | it just needs to work |
| 02:13:24 | marcandre | brixen: hi! |
| 02:13:30 | brixen | marcandre: hello! |
| 02:13:33 | marcandre | Quick question: is there a list of missing specs? |
| 02:13:38 | brixen | nope |
| 02:14:03 | brixen | there are it "needs to be reviewed for spec completeness" that are emitted by the mkspec tool |
| 02:14:16 | brixen | but alas, how would we know what specs are missing? |
| 02:14:27 | marcandre | Yeah, of course. |
| 02:14:52 | marcandre | Just noticed that some of the new 1.9.2 stuff is missing altogether. Well, at least Enumerable#slice_before is |
| 02:15:05 | brixen | you could start a list of todos on the github wiki for rubyspec |
| 02:15:19 | brixen | you can run mkspec on classes under 1.9 |
| 02:15:29 | brixen | it should not clobber anything existing |
| 02:15:36 | brixen | and it will add signpost specs for new methods |
| 02:15:49 | marcandre | k. will try that. |
| 02:17:05 | marcandre | $ rubydev ~/mspec/bin/mkspec |
| 02:17:05 | marcandre | /Users/work/mspec/lib/mspec/commands/mkspec.rb:110:in `run': undefined method `filter' for #<NameMap:0x00000100871030 @seen={}, @filter=false> (NoMethodError) |
| 02:17:32 | brixen | well, I didn't say mkspec would run on 1.9 :) |
| 02:17:37 | brixen | I just said you could try it |
| 02:17:41 | marcandre | lol |
| 02:17:45 | brixen | le sigh |
| 02:17:51 | brixen | I ran once upon a time |
| 02:17:57 | brixen | probably in 1.9.0 :) |
| 02:18:09 | brixen | s/I/it/ |
| 02:18:20 | marcandre | revert to wiki, then :-) |
| 02:18:30 | brixen | or patch it! :) |
| 02:18:48 | marcandre | Well, if I had the time, I'd just write the damn spec! :-) |
| 02:19:11 | brixen | it at least runs the -h |
| 02:19:36 | brixen | hmm this seems to be just an options issue |
| 02:19:45 | brixen | what class are you looking at? |
| 02:19:48 | brixen | Enumerable? |
| 02:20:06 | marcandre | Enumerable#slice_before doesn't exist |
| 02:20:37 | brixen | ruby1.9 ../mspec/bin/mkspec -c Enumerable -b core/ |
| 02:20:46 | brixen | my cwd is rubyspec |
| 02:20:55 | brixen | that worked fine for me |
| 02:21:28 | marcandre | Cool. It created two entries :-) |
| 02:21:29 | marcandre | Thanks |
| 02:21:36 | brixen | erg, mkspec is still emitting the old require lines |
| 02:21:53 | brixen | marcandre: why don't you give me a list of classes, I'll fix mkspec and add specs for the classes |
| 02:25:22 | marcandre | I just pushed for the new Enumerable methods. Not sure if there are any other |
| 02:33:23 | postmodern | how can i receive statistics about the JIT? |
| 02:33:39 | postmodern | repeating some benchmarks and want to see what the JIT is doing behind the scenes |
| 02:39:42 | kronos_vano | postmodern, For example: bin/rbx script.rb running with JIT and bin/rbx -Xint script.rb running without JIT |
| 02:39:51 | brixen | bin/rbx -Xconfig.print |
| 02:40:02 | brixen | explore the -Xjit options |
| 02:40:09 | brixen | and write a helpful summary :) |
| 02:40:20 | postmodern | haha |
| 02:40:21 | postmodern | word |
| 02:40:38 | brixen | marcandre: um, there is a Time.tuesday? method now? |
| 02:40:45 | brixen | marcandre: and the rest of the days of the week |
| 02:40:47 | brixen | amazing |
| 02:40:48 | postmodern | also what are the guidelines for writing howtos/summaries, what do those get submitted to? |
| 02:40:58 | brixen | postmodern: see doc/*.txt |
| 02:41:03 | postmodern | k |
| 02:41:33 | brixen | marcandre: I need to add an option to mkspec to emit ruby_version_is guards in these proto-specs |
| 02:41:39 | marcandre | brixen: yeah. These are not that recent, BTW. |
| 02:41:41 | brixen | marcandre: and then I'll run it on core classes |
| 02:41:51 | brixen | marcandre: yeah, I have a ton of new files |
| 02:41:56 | brixen | gobs and gobs |
| 02:41:58 | brixen | oodles |
| 02:42:05 | brixen | mmm noodles |
| 02:42:13 | brixen | I'm hungry... bbl... |
| 02:42:27 | marcandre | I notice that mkspec creates specs for Array#xyz, although there is Enumerable#xyz |
| 02:42:52 | marcandre | Enjoy dinner. |
| 02:43:08 | brixen | marcandre: in the past, Array had its own set of methods |
| 02:43:13 | brixen | I dunno about 1.9 |
| 02:44:00 | marcandre | Yeah, it probably redefines many of them. |
| 02:44:22 | brixen | marcandre: this is what I see new for Array on 1.9 http://gist.github.com/321340 |
| 02:44:28 | marcandre | Specs should probably be shared, if they need to be written for Array too |
| 02:44:46 | brixen | anyway, I need to tweak mkspec, so please don't add any more of these till I do |
| 02:44:54 | marcandre | Yeah. I'm not too sure why these are redefined by Array, though. |
| 02:45:08 | brixen | shared specs are not something mkspec knows about, nor should it I think |
| 02:45:41 | marcandre | Agreed. |
| 02:45:55 | brixen | marcandre: you should look in array.c :) |
| 02:46:02 | brixen | I see all those methods being defined on Array |
| 02:46:06 | marcandre | Strike what I said about why these are redefined. Makes sense, for optimization purposes. |
| 02:47:49 | marcandre | Funny thing is that many of those specs could be an_array.method(*args).should == an_array.to_enum.method(*args) |
| 02:48:14 | marcandre | (i.e. the Enumerable method on these should give the same result as the specialized Array method) |
| 02:48:34 | brixen | that's not how we write specs |
| 02:48:54 | brixen | we can make the shared specs work for both method and enumerable method |
| 02:49:18 | brixen | but specs compare to a literal value or less often to a computed value |
| 02:49:39 | marcandre | Agreed |
| 02:58:09 | marcandre | in the case of these Array methods, they should act the same, I believe. |
| 04:16:37 | manveru | hmm |
| 04:16:49 | manveru | i wish i could get to those variables readline sets... |
| 04:17:00 | manveru | then i could make ffi-readline :) |
| 04:17:26 | manveru | but just attaching the readline function already gives you most of what you usually need... |
| 04:20:14 | rue | Which variables? |
| 04:35:35 | manveru | you got mri source around? |
| 04:36:18 | manveru | http://github.com/ruby/ruby/blob/trunk/ext/readline/extconf.rb#L49-78 |
| 04:36:31 | manveru | all the have_readline_var |
| 04:36:58 | manveru | in a C ext it's no big deal, but it's impossible in FFI |
| 04:39:34 | rue | Not globals? |
| 04:41:21 | manveru | dunno |
| 04:41:26 | manveru | what's the difference? |
| 04:41:51 | rue | You can grab globals through dlsym() |
| 04:42:03 | rue | Dunno if FFI provides for that, but I would imagine? |
| 04:52:14 | yakischloba | attach_variable? |
| 05:17:07 | manveru | ooh |
| 05:33:42 | boyscout | Enumerable#each_entry: implementation - e81df4c - Marc-Andre Lafortune (one_nine) |
| 05:33:42 | boyscout | Enumerable#slice_before: Implementation - 7741ac5 - Marc-Andre Lafortune (one_nine) |
| 10:12:38 | poet | what exactly does the VM do? |
| 10:13:14 | poet | does it compile Ruby to LLVM assembly? |
| 11:15:01 | rue | poet: The VM provides a runtime (GC, object space, syscalls etc.) as well as a bytecode interpreter and JIT compilation to object code via LLVM |
| 11:44:47 | poet | rue: so without llvm the vm is capable of running interpreted ruby? |
| 11:49:36 | rue | poet: Bytecode to be precise, but yes |
| 11:50:07 | poet | rue: gottcha, thanks |
| 17:16:58 | brixen | morning |
| 17:17:20 | kronos_vano | brixen, evening :) |
| 17:17:35 | brixen | evening kronos_vano :) |
| 17:17:53 | brixen | notes everyone on irc is so ego-centric :) |
| 17:18:15 | kronos_vano | :-[ |
| 17:18:19 | brixen | heh |
| 17:26:14 | evan | brixen: WELCOME TO PACIFIC DAYLIGHT SAVINGS TIME AT 9:26pm. |
| 17:26:19 | evan | am. |
| 17:26:22 | brixen | haha |
| 17:26:23 | evan | *eyeroll* |
| 17:29:19 | rue | brixen: Good 72,880 o'clock! |
| 17:31:17 | brixen | rue: goood night! |
| 17:31:54 | kronos_vano | brixen, how to list failed specs in rubinius |
| 17:32:00 | kronos_vano | I forgot :( |
| 17:34:15 | brixen | bin/mspec tag --list-all |
| 17:34:25 | kronos_vano | tnx |
| 17:34:59 | brixen | np |
| 17:39:50 | brixen | oh defined? you so silly! |
| 17:40:10 | brixen | defined?($&) => "$&" if $~ is set |
| 17:41:34 | evan | hah |
| 17:41:36 | evan | man. |
| 18:07:41 | brixen | ya know, not seems pretty simple |
| 18:08:06 | brixen | you might assume: defined?(not x) :: if defined?(x) "expression" else nil end |
| 18:08:08 | brixen | NOT |
| 18:11:00 | evan | heh |
| 18:11:13 | evan | i think that a lot of defined? is undesigned |
| 18:12:34 | brixen | hah indeed |
| 18:32:00 | evan | I LOVE this comment. |
| 18:32:09 | evan | /* variables to be removed in 1.8.1 */ |
| 18:32:09 | evan | rb_define_hooked_variable("$defout", &rb_stdout, 0, defout_setter); |
| 18:32:11 | evan | rb_define_hooked_variable("$deferr", &rb_stderr, 0, deferr_setter); |
| 18:32:15 | evan | *eyeroll* |
| 18:35:00 | brixen | nice |
| 18:35:07 | brixen | maybe they meant 1.9.1 |
| 18:39:02 | rue | Are you going for compatibility on defined? and why on earth? |
| 18:53:22 | brixen | down to 6 failures, almost there |
| 18:53:36 | brixen | weird, there is a defined?(super) failure |
| 18:53:46 | brixen | I thought we (evan) fixed all those |
| 18:54:00 | evan | i guess not |
| 18:54:03 | evan | :/ |
| 18:54:04 | brixen | hh |
| 18:54:09 | brixen | er +e |
| 18:54:38 | brixen | rue: broad stroke compatibility, yes, for the same reason we implement any wacky MRI behavior |
| 18:54:42 | brixen | people use it |
| 18:55:42 | evan | plus, it's good to know it all |
| 18:55:48 | evan | then we can actually decide what we don't want to support |
| 18:56:02 | evan | rather than just waving our hands and saying "i don't think we support all of defined" |
| 19:03:49 | rue | True, hope no unnecessary work though |
| 19:08:22 | evtuhovich | Hello |
| 19:08:25 | evtuhovich | http://github.com/evanphx/rubinius/issues/issue/203/#comment_150703 |
| 19:08:45 | evtuhovich | Spec and patch for array.hash |
| 19:09:04 | evan | ok |
| 19:09:12 | evan | you should talk with kronos_vano |
| 19:09:14 | evan | he was working on that too. |
| 19:09:17 | evtuhovich | yes |
| 19:09:25 | evtuhovich | he told me to do that |
| 19:18:58 | kronos_vano | recruits rubinius contributers in russia :D |
| 19:20:29 | evan | hehe |
| 19:21:23 | brixen | kronos_vano: woot |
| 19:22:38 | brixen | kronos_vano: спасибо |
| 19:22:46 | kronos_vano | brixen, cool |
| 19:22:57 | kronos_vano | np |
| 19:50:39 | kronos_vano | evan, I think we should use <<. Because "^" with "|", "&" or even "^" not very safe for hash functions. Why you don't like http://gist.github.com/316118 ? |
| 19:51:21 | evan | i don't get your comment about them being unsafe |
| 19:51:53 | evan | you mean that they don't produce a very good hash? |
| 19:51:53 | evtuhovich | I think safe not a good word - just bad |
| 19:51:59 | evtuhovich | yes |
| 19:52:10 | evan | kronos_vano: i'm fine with that code |
| 19:52:13 | kronos_vano | k |
| 19:52:15 | evan | kronos_vano: just wanted to understand it is all |
| 19:53:12 | evtuhovich | ^ like multiplication if you change order of elements - the produce is the same |
| 19:53:35 | evan | yep |
| 19:53:36 | evtuhovich | if you add index - you add same multipliers to every array |
| 19:54:02 | evan | using the shift is fine |
| 19:54:06 | evan | to get the bits mixed better |
| 19:54:06 | evtuhovich | so el ^ index produce same hash for [10,5] and [5,10] |
| 19:54:10 | evtuhovich | yes |
| 19:55:18 | evan | i'd probably benefit from a primitive called, say hash_many |
| 19:55:45 | evan | that would take an Array, and for each element, if it's a Fixnum, mix it in, otherwise use the #object_id and mix that in |
| 19:55:54 | evan | it could use the same shift to make it order dependent |
| 19:56:09 | evan | i think we hash many things together to get one hash value a number of places |
| 19:56:23 | evan | so one method to do it well would be useful. |
| 19:56:44 | evan | and lowering it to a prim because we use it a lot and it's bit twiddles might be good |
| 19:57:38 | BrianRice-work | not a bad idea |
| 19:59:01 | kronos_vano | evan, so we should move hash function to c++ level. right? |
| 19:59:37 | evan | you don't need to right now |
| 19:59:44 | evan | just thinking |
| 20:01:48 | kronos_vano | I already think about it. And I totally agree with you. It is not very hard to do this right now. |
| 20:02:43 | evan | go for it then |
| 20:02:51 | evan | it would not be Array#hash though |
| 20:02:59 | evan | because the primitive can't call #hash on each argument |
| 20:03:24 | evan | so for Array#hash, you'll need to use #map to convert the elements to their hash |
| 20:03:30 | evan | then pass it to this new function |
| 20:13:04 | evan | i love the "Show Map" service in OS X |
| 20:13:14 | evan | select anything that looks like an address, right click, boom. |
| 20:16:07 | scoopr | *snickering* you said 'boom' |
| 20:21:06 | brixen | heh |
| 20:21:33 | brixen | that's evan's tool for zapping crappy code from the space laser |
| 20:21:55 | evan | thats right. |
| 20:21:59 | brixen | new committer requirement, add your mailing address with your email address |
| 20:22:15 | evan | i just need a phone number. |
| 20:22:21 | brixen | heh |
| 20:23:48 | brixen | 4 failures! |
| 20:23:58 | brixen | I added more specs so that's not delta == -2 |
| 20:24:03 | brixen | for those at home |
| 20:24:23 | evan | :) |
| 22:32:22 | millerti | Hi. Any progress on getting rubinius into Gentoo? |
| 22:33:05 | rue | As a package? |
| 22:36:11 | millerti | Yeah. :) |
| 22:39:31 | brixen | millerti: we need someone who knows gentoo |
| 22:39:43 | brixen | and wants to work on making the package |
| 22:39:50 | brixen | millerti: know anyone like that? :) |
| 22:40:20 | millerti | Well, I talk to people on #gentoo and #gentoo-chat, but that's about it. :) |
| 22:41:03 | brixen | hmm |
| 22:41:38 | brixen | well, it's not too hard to build from source |
| 22:41:50 | brixen | see doc/getting_started.txt |
| 22:46:51 | millerti | Oh, I know. |
| 22:47:23 | millerti | But things get weird if you install it system-wide. I'll have to make sure it gets properly contained in /usr/local so I can remove it easily. |
| 22:47:44 | evan | millerti: well, we need to fix the weirdness |
| 22:47:46 | evan | please report it. |
| 22:47:51 | evan | we're not aware of weirdness. |
| 22:47:55 | millerti | I mean in general. |
| 22:48:01 | evan | i don't follow. |
| 22:48:41 | millerti | I've had problems in the past with installing packages outside of the package management system. At the very least, it can be hard to uninstall, but sometimes, there are file conflicts. I'm not saying rubinius does any of that. I'm saying I'm worried about it. |
| 22:49:34 | brixen | millerti: then use rvm ;) |
| 22:49:45 | maharg | it's not really very hard to make a gentoo package. It's just a text file that describes where to find and build the tarball |
| 22:49:50 | brixen | millerti: but in general, you can configure rbx to install wherever you want |
| 22:49:57 | maharg | and it's really well documented |
| 22:50:04 | millerti | Well, I've looked into that before, maharg, and I found that I don't have the patience. :) |
| 22:51:23 | maharg | well, it's gonna be a race as to which patience is tried first: your patience for doing it yourself in an hour, or your patience waiting for someone else to do it which could take months. ;) |
| 22:51:38 | millerti | Not really. If I need performance, I'll just write C code. :) |
| 22:52:00 | millerti | If I REALLY need performance, I'll write Verilog code and run it on an FPGA. |
| 22:52:14 | maharg | not sure what that has to do with anything |
| 22:52:30 | millerti | Ummm... the main reason to use rubinuis is if you have Ruby code that you want to run faster? |
| 22:53:39 | millerti | I'm a chip designer. I see some of the stuff that you software people have to muck about with as an ungodly waste of time. :) |
| 22:54:13 | brixen | evan: thoughts on this http://gist.github.com/322216 |
| 22:54:35 | evan | we don't support setting $! |
| 22:54:37 | brixen | millerti: ditto from the perspective of software :) |
| 22:54:43 | brixen | evan: ok |
| 22:55:08 | evan | because $! is just showing what the current exception is in one capacity |
| 22:55:17 | evan | it does not control raising, etc. |
| 22:55:32 | brixen | well, assigning to it appears to be raising |
| 22:55:36 | brixen | which I thought was odd |
| 22:55:43 | evan | i think i was playing |
| 22:55:45 | evan | check the compiler |
| 22:55:50 | brixen | we should perhaps emit an exception in the compiler |
| 22:55:54 | evan | i think when you set $! it emits code to raise it |
| 22:55:56 | evan | just remove that |
| 22:55:58 | brixen | k |
| 22:56:04 | evan | thats old code I was playing with I think |
| 22:56:06 | brixen | should we raise instead? |
| 22:56:15 | evan | sure |
| 22:56:17 | millerti | brixen: Yeah. System administration is just not my cup of tea. I've done it. I find it tedious and annoying. If I'm going to mess with software, either I'm writing code, or I'm using an end-user application. And I see little value in software that isn't intuitive. Unless it's SUPPOSED to be unintuitive. |
| 22:56:27 | millerti | I'm probably off-topic, so I'll shut up now. |
| 22:57:24 | brixen | evan: would it be that hard to support setting $! ? since we now have the stack_locals |
| 22:57:39 | evan | well, what should setting it do? |
| 22:57:57 | brixen | in MRI it raises whatever you set it to when you reraise |
| 22:58:02 | brixen | or so it appears |
| 22:59:12 | evan | well |
| 22:59:19 | evan | setting it doesn't actually DO anyting |
| 22:59:22 | evan | it just sets it |
| 22:59:29 | brixen | yes |
| 22:59:50 | evan | what if you set it when you're not handling an exception |
| 22:59:59 | brixen | ignore it? |
| 23:00:09 | evan | so why would you set $!? |
| 23:00:32 | brixen | MRI actually raises if you set $! to other than nil or an Exception |
| 23:00:40 | brixen | TypeError: assigning non-exception to $! |
| 23:01:05 | brixen | *I* wouldn't set $! |
| 23:01:10 | evan | i mean period |
| 23:01:14 | evan | lets look on google code search |
| 23:02:18 | evan | $! is hard to search for |
| 23:02:36 | brixen | indeed |
| 23:02:42 | evan | http://www.google.com/codesearch?q=lang:ruby+%22$!+%3D%22&hl=en&btnG=Search+Code |
| 23:02:44 | evan | there we go. |
| 23:03:26 | evan | e2mm, that hardly counts. |
| 23:03:39 | brixen | yeah |
| 23:03:57 | brixen | but setting $! to nil I can imagine code doing that |
| 23:04:19 | evan | thats the worse case though. |
| 23:04:27 | brixen | $! = "exception raised" unless $! |
| 23:04:29 | brixen | fun |
| 23:04:29 | evan | because does that handle the unwind? |
| 23:04:35 | evan | er. |
| 23:04:36 | evan | cancel |
| 23:04:43 | brixen | I dunno |
| 23:04:54 | brixen | I can try to write spec... |
| 23:05:23 | brixen | if we are not going to support it, we should make sure we're not raising random TypeErrors though |
| 23:05:46 | brixen | random == dependent on what someone attempts to assign |
| 23:05:55 | evan | sure |
| 23:06:34 | brixen | hah, ruby/lib/irb.rb: $! = RuntimeError.new("unknown exception raised") unless $! |
| 23:06:38 | evan | yeah |
| 23:06:50 | evan | but it doesn't reraise |
| 23:06:57 | evan | so i'm assuming thats just some weird reason |
| 23:07:06 | evan | because $! is then set when you're NOT handling an exception |
| 23:07:20 | brixen | yeah |
| 23:15:42 | rue | evan, brixen: http://gittup.org/tup/ |
| 23:16:10 | brixen | interesting |