Index

Show enters and exits. Hide enters and exits.

00:34:19brixenugh ugh
00:34:44brixen1.9 appears to be omitting a defined?() call whose value is not used
00:34:54brixenbut the call itself has side effects
00:35:08brixenif I use the return value, the side-effect method is invoked
00:35:15brixenif not, it is not
00:35:21brixenthat seems like a bug
00:36:06brixencan I get 1.9 to print its bytecode?
00:37:26evansomehow
00:37:29evani don't know how though
00:37:34brixenyeah, no easy way
00:37:55evanbut it sounds like a 1.9 bug
00:58:15evan9 failures left!
00:59:34evanwow.
00:59:36evanthis one is..
00:59:39evanWEIRD.
00:59:45evan<"$(\"body\").visualEffect(\"highlight\");"> expected but was
00:59:45evan<"<p>This is grand!</p>\n">.
00:59:55evanthere is no This is grand in this file
00:59:56evanat all.
01:01:43brixenwow
01:01:48evanhm, there is in a different file....
01:01:52evanoh le sigh.
01:01:56evanthey're both named TestController
01:02:03evanbut one appears to be inside a class
01:02:08evani'm going to need coffee for this one.
01:03:01brixenhmm
01:03:19brixenso 1.8 warns about useless use of defined? in void context
01:03:24brixen1.9 doesn't
01:03:45evani ignore all 1.8 warnings
01:03:49brixenonly for defined(not A.m) does 1.9 omit the call
01:04:12evansounds like a bug.
01:04:27brixenie defined?(not m) does not warn on 1.9 but does execute
01:04:32brixenyeah seems to be
01:04:50evanconsidering the usage of defined?
01:04:56evani'm not surprised 1.9 has bugs in this
01:04:57brixenespecially since implicit self receiver and explicit receiver behave differently
01:04:59evanit does the same thing we do
01:05:08evanemit matcher code
01:05:23evanand i'm sure the boundaries are untested.
01:05:31brixenoh definitely
01:05:51brixenprobably more than the boundaries :)
01:06:02evanprobably.
01:19:17kronos_vano"This is grand!" Great test! :)))
01:19:25evanhehe
01:44:47brixenevan: for cases like defined?(foo::SomeConst), if foo raises, the exception is swallowd
01:45:02evanreally?
01:45:05brixenwhat's the best way to do that? emit inline rescue bytecode?
01:45:07brixenyes, really
01:45:17evani'd prefer we go notcompliant
01:45:22brixenhmm
01:45:25brixenjust let it rais?
01:45:29evanswallowing that exception is not helping
01:45:29brixenraise?
01:45:32evanyes.
01:45:40brixenindeed, it's not, but it evaluates to nil
01:45:46brixenI'm worried this could be a problem
01:45:54evanrescue what?
01:45:58evanStandardError?
01:46:04brixenany exception
01:46:15brixenbasically, just evaluate to nil if an exception occurs
01:46:27brixenlike begin; foo; ensure; return nil; end
01:47:05evanit can't be any exception
01:47:12brixenI can just emit bytecode like that
01:47:20brixenwell, it can be StandardError then
01:47:24evanthats not any exception
01:47:25brixenle'me check
01:47:27evanthat doesn't swallow it either
01:47:39evanwell, i guess it does
01:47:46evananyway.
01:47:56evanif you want to, i'd do StandardError
01:48:07evanyou actually can emit a raw handler
01:48:17evanbecause you're at the bytecode level
01:48:24brixenwhat do you mean, that doesn't swallow it?
01:48:34brixenthe return nil in ensure does
01:48:39evanreturn in an ensure is an edge case
01:48:48evanthat happens to wipe out the current exception
01:48:50evanbut anyways
01:48:59brixenright, well that's what I want
01:49:07brixenwhat's the "best" way to do that?
01:49:17evango notcompliant
01:49:22evanimho
01:49:23evanotherwise
01:49:29brixenI don't think we should though
01:49:30evanat the bytecode level
01:49:34evanyou use a setup_unwind
01:49:38evanand in the label for the handler
01:49:41evanclear_exception
01:49:46brixenah ok
01:49:47evanthats using a raw handler
01:50:03evanthats not exposed at the ruby level
01:50:06evanbut you can still use it.
01:50:07brixenwhat type should setup_unwind be? Rescue?
01:51:05evanyes
01:51:09brixenk
01:54:14brixenexcellent, works fine
01:55:01brixenevan: http://gist.github.com/321311
01:55:46evanthat seems crazy beyond belief
01:55:54brixenheh
01:55:56evanbut i won't try to understand why defined does what it does
01:55:57brixenyes, it does
01:56:03brixenindeed
01:59:28mahargI'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:30brixensome uses of defined? have other methods like method_defined?, class_variable_defined?, instance_variable_defined?
02:01:57brixenI can see the sense in evaluating the "scope" in something like foo::Bar
02:02:17brixenbut in general, defined? behavior seems really ill-thought out
02:03:06brixenbut also in general, it's not my place to critique MRI behavior
02:03:12brixenit just needs to work
02:13:24marcandrebrixen: hi!
02:13:30brixenmarcandre: hello!
02:13:33marcandreQuick question: is there a list of missing specs?
02:13:38brixennope
02:14:03brixenthere are it "needs to be reviewed for spec completeness" that are emitted by the mkspec tool
02:14:16brixenbut alas, how would we know what specs are missing?
02:14:27marcandreYeah, of course.
02:14:52marcandreJust noticed that some of the new 1.9.2 stuff is missing altogether. Well, at least Enumerable#slice_before is
02:15:05brixenyou could start a list of todos on the github wiki for rubyspec
02:15:19brixenyou can run mkspec on classes under 1.9
02:15:29brixenit should not clobber anything existing
02:15:36brixenand it will add signpost specs for new methods
02:15:49marcandrek. will try that.
02:17:05marcandre$ rubydev ~/mspec/bin/mkspec
02:17:05marcandre/Users/work/mspec/lib/mspec/commands/mkspec.rb:110:in `run': undefined method `filter' for #<NameMap:0x00000100871030 @seen={}, @filter=false> (NoMethodError)
02:17:32brixenwell, I didn't say mkspec would run on 1.9 :)
02:17:37brixenI just said you could try it
02:17:41marcandrelol
02:17:45brixenle sigh
02:17:51brixenI ran once upon a time
02:17:57brixenprobably in 1.9.0 :)
02:18:09brixens/I/it/
02:18:20marcandrerevert to wiki, then :-)
02:18:30brixenor patch it! :)
02:18:48marcandreWell, if I had the time, I'd just write the damn spec! :-)
02:19:11brixenit at least runs the -h
02:19:36brixenhmm this seems to be just an options issue
02:19:45brixenwhat class are you looking at?
02:19:48brixenEnumerable?
02:20:06marcandreEnumerable#slice_before doesn't exist
02:20:37brixenruby1.9 ../mspec/bin/mkspec -c Enumerable -b core/
02:20:46brixenmy cwd is rubyspec
02:20:55brixenthat worked fine for me
02:21:28marcandreCool. It created two entries :-)
02:21:29marcandreThanks
02:21:36brixenerg, mkspec is still emitting the old require lines
02:21:53brixenmarcandre: why don't you give me a list of classes, I'll fix mkspec and add specs for the classes
02:25:22marcandreI just pushed for the new Enumerable methods. Not sure if there are any other
02:33:23postmodernhow can i receive statistics about the JIT?
02:33:39postmodernrepeating some benchmarks and want to see what the JIT is doing behind the scenes
02:39:42kronos_vanopostmodern, For example: bin/rbx script.rb running with JIT and bin/rbx -Xint script.rb running without JIT
02:39:51brixenbin/rbx -Xconfig.print
02:40:02brixenexplore the -Xjit options
02:40:09brixenand write a helpful summary :)
02:40:20postmodernhaha
02:40:21postmodernword
02:40:38brixenmarcandre: um, there is a Time.tuesday? method now?
02:40:45brixenmarcandre: and the rest of the days of the week
02:40:47brixenamazing
02:40:48postmodernalso what are the guidelines for writing howtos/summaries, what do those get submitted to?
02:40:58brixenpostmodern: see doc/*.txt
02:41:03postmodernk
02:41:33brixenmarcandre: I need to add an option to mkspec to emit ruby_version_is guards in these proto-specs
02:41:39marcandrebrixen: yeah. These are not that recent, BTW.
02:41:41brixenmarcandre: and then I'll run it on core classes
02:41:51brixenmarcandre: yeah, I have a ton of new files
02:41:56brixengobs and gobs
02:41:58brixenoodles
02:42:05brixenmmm noodles
02:42:13brixenI'm hungry... bbl...
02:42:27marcandreI notice that mkspec creates specs for Array#xyz, although there is Enumerable#xyz
02:42:52marcandreEnjoy dinner.
02:43:08brixenmarcandre: in the past, Array had its own set of methods
02:43:13brixenI dunno about 1.9
02:44:00marcandreYeah, it probably redefines many of them.
02:44:22brixenmarcandre: this is what I see new for Array on 1.9 http://gist.github.com/321340
02:44:28marcandreSpecs should probably be shared, if they need to be written for Array too
02:44:46brixenanyway, I need to tweak mkspec, so please don't add any more of these till I do
02:44:54marcandreYeah. I'm not too sure why these are redefined by Array, though.
02:45:08brixenshared specs are not something mkspec knows about, nor should it I think
02:45:41marcandreAgreed.
02:45:55brixenmarcandre: you should look in array.c :)
02:46:02brixenI see all those methods being defined on Array
02:46:06marcandreStrike what I said about why these are redefined. Makes sense, for optimization purposes.
02:47:49marcandreFunny thing is that many of those specs could be an_array.method(*args).should == an_array.to_enum.method(*args)
02:48:14marcandre(i.e. the Enumerable method on these should give the same result as the specialized Array method)
02:48:34brixenthat's not how we write specs
02:48:54brixenwe can make the shared specs work for both method and enumerable method
02:49:18brixenbut specs compare to a literal value or less often to a computed value
02:49:39marcandreAgreed
02:58:09marcandrein the case of these Array methods, they should act the same, I believe.
04:16:37manveruhmm
04:16:49manverui wish i could get to those variables readline sets...
04:17:00manveruthen i could make ffi-readline :)
04:17:26manverubut just attaching the readline function already gives you most of what you usually need...
04:20:14rueWhich variables?
04:35:35manveruyou got mri source around?
04:36:18manveruhttp://github.com/ruby/ruby/blob/trunk/ext/readline/extconf.rb#L49-78
04:36:31manveruall the have_readline_var
04:36:58manveruin a C ext it's no big deal, but it's impossible in FFI
04:39:34rueNot globals?
04:41:21manverudunno
04:41:26manveruwhat's the difference?
04:41:51rueYou can grab globals through dlsym()
04:42:03rueDunno if FFI provides for that, but I would imagine?
04:52:14yakischlobaattach_variable?
05:17:07manveruooh
05:33:42boyscoutEnumerable#each_entry: implementation - e81df4c - Marc-Andre Lafortune (one_nine)
05:33:42boyscoutEnumerable#slice_before: Implementation - 7741ac5 - Marc-Andre Lafortune (one_nine)
10:12:38poetwhat exactly does the VM do?
10:13:14poetdoes it compile Ruby to LLVM assembly?
11:15:01ruepoet: 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:47poetrue: so without llvm the vm is capable of running interpreted ruby?
11:49:36ruepoet: Bytecode to be precise, but yes
11:50:07poetrue: gottcha, thanks
17:16:58brixenmorning
17:17:20kronos_vanobrixen, evening :)
17:17:35brixenevening kronos_vano :)
17:17:53brixennotes everyone on irc is so ego-centric :)
17:18:15kronos_vano:-[
17:18:19brixenheh
17:26:14evanbrixen: WELCOME TO PACIFIC DAYLIGHT SAVINGS TIME AT 9:26pm.
17:26:19evanam.
17:26:22brixenhaha
17:26:23evan*eyeroll*
17:29:19ruebrixen: Good 72,880 o'clock!
17:31:17brixenrue: goood night!
17:31:54kronos_vanobrixen, how to list failed specs in rubinius
17:32:00kronos_vanoI forgot :(
17:34:15brixenbin/mspec tag --list-all
17:34:25kronos_vanotnx
17:34:59brixennp
17:39:50brixenoh defined? you so silly!
17:40:10brixendefined?($&) => "$&" if $~ is set
17:41:34evanhah
17:41:36evanman.
18:07:41brixenya know, not seems pretty simple
18:08:06brixenyou might assume: defined?(not x) :: if defined?(x) "expression" else nil end
18:08:08brixenNOT
18:11:00evanheh
18:11:13evani think that a lot of defined? is undesigned
18:12:34brixenhah indeed
18:32:00evanI LOVE this comment.
18:32:09evan /* variables to be removed in 1.8.1 */
18:32:09evan rb_define_hooked_variable("$defout", &rb_stdout, 0, defout_setter);
18:32:11evan rb_define_hooked_variable("$deferr", &rb_stderr, 0, deferr_setter);
18:32:15evan*eyeroll*
18:35:00brixennice
18:35:07brixenmaybe they meant 1.9.1
18:39:02rueAre you going for compatibility on defined? and why on earth?
18:53:22brixendown to 6 failures, almost there
18:53:36brixenweird, there is a defined?(super) failure
18:53:46brixenI thought we (evan) fixed all those
18:54:00evani guess not
18:54:03evan:/
18:54:04brixenhh
18:54:09brixener +e
18:54:38brixenrue: broad stroke compatibility, yes, for the same reason we implement any wacky MRI behavior
18:54:42brixenpeople use it
18:55:42evanplus, it's good to know it all
18:55:48evanthen we can actually decide what we don't want to support
18:56:02evanrather than just waving our hands and saying "i don't think we support all of defined"
19:03:49rueTrue, hope no unnecessary work though
19:08:22evtuhovichHello
19:08:25evtuhovichhttp://github.com/evanphx/rubinius/issues/issue/203/#comment_150703
19:08:45evtuhovichSpec and patch for array.hash
19:09:04evanok
19:09:12evanyou should talk with kronos_vano
19:09:14evanhe was working on that too.
19:09:17evtuhovichyes
19:09:25evtuhovichhe told me to do that
19:18:58kronos_vanorecruits rubinius contributers in russia :D
19:20:29evanhehe
19:21:23brixenkronos_vano: woot
19:22:38brixenkronos_vano: спасибо
19:22:46kronos_vanobrixen, cool
19:22:57kronos_vanonp
19:50:39kronos_vanoevan, 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:21evani don't get your comment about them being unsafe
19:51:53evanyou mean that they don't produce a very good hash?
19:51:53evtuhovichI think safe not a good word - just bad
19:51:59evtuhovichyes
19:52:10evankronos_vano: i'm fine with that code
19:52:13kronos_vanok
19:52:15evankronos_vano: just wanted to understand it is all
19:53:12evtuhovich^ like multiplication if you change order of elements - the produce is the same
19:53:35evanyep
19:53:36evtuhovichif you add index - you add same multipliers to every array
19:54:02evanusing the shift is fine
19:54:06evanto get the bits mixed better
19:54:06evtuhovichso el ^ index produce same hash for [10,5] and [5,10]
19:54:10evtuhovichyes
19:55:18evani'd probably benefit from a primitive called, say hash_many
19:55:45evanthat 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:54evanit could use the same shift to make it order dependent
19:56:09evani think we hash many things together to get one hash value a number of places
19:56:23evanso one method to do it well would be useful.
19:56:44evanand lowering it to a prim because we use it a lot and it's bit twiddles might be good
19:57:38BrianRice-worknot a bad idea
19:59:01kronos_vanoevan, so we should move hash function to c++ level. right?
19:59:37evanyou don't need to right now
19:59:44evanjust thinking
20:01:48kronos_vanoI already think about it. And I totally agree with you. It is not very hard to do this right now.
20:02:43evango for it then
20:02:51evanit would not be Array#hash though
20:02:59evanbecause the primitive can't call #hash on each argument
20:03:24evanso for Array#hash, you'll need to use #map to convert the elements to their hash
20:03:30evanthen pass it to this new function
20:13:04evani love the "Show Map" service in OS X
20:13:14evanselect anything that looks like an address, right click, boom.
20:16:07scoopr*snickering* you said 'boom'
20:21:06brixenheh
20:21:33brixenthat's evan's tool for zapping crappy code from the space laser
20:21:55evanthats right.
20:21:59brixennew committer requirement, add your mailing address with your email address
20:22:15evani just need a phone number.
20:22:21brixenheh
20:23:48brixen4 failures!
20:23:58brixenI added more specs so that's not delta == -2
20:24:03brixenfor those at home
20:24:23evan:)
22:32:22millertiHi. Any progress on getting rubinius into Gentoo?
22:33:05rueAs a package?
22:36:11millertiYeah. :)
22:39:31brixenmillerti: we need someone who knows gentoo
22:39:43brixenand wants to work on making the package
22:39:50brixenmillerti: know anyone like that? :)
22:40:20millertiWell, I talk to people on #gentoo and #gentoo-chat, but that's about it. :)
22:41:03brixenhmm
22:41:38brixenwell, it's not too hard to build from source
22:41:50brixensee doc/getting_started.txt
22:46:51millertiOh, I know.
22:47:23millertiBut 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:44evanmillerti: well, we need to fix the weirdness
22:47:46evanplease report it.
22:47:51evanwe're not aware of weirdness.
22:47:55millertiI mean in general.
22:48:01evani don't follow.
22:48:41millertiI'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:34brixenmillerti: then use rvm ;)
22:49:45mahargit'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:50brixenmillerti: but in general, you can configure rbx to install wherever you want
22:49:57mahargand it's really well documented
22:50:04millertiWell, I've looked into that before, maharg, and I found that I don't have the patience. :)
22:51:23mahargwell, 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:38millertiNot really. If I need performance, I'll just write C code. :)
22:52:00millertiIf I REALLY need performance, I'll write Verilog code and run it on an FPGA.
22:52:14mahargnot sure what that has to do with anything
22:52:30millertiUmmm... the main reason to use rubinuis is if you have Ruby code that you want to run faster?
22:53:39millertiI'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:13brixenevan: thoughts on this http://gist.github.com/322216
22:54:35evanwe don't support setting $!
22:54:37brixenmillerti: ditto from the perspective of software :)
22:54:43brixenevan: ok
22:55:08evanbecause $! is just showing what the current exception is in one capacity
22:55:17evanit does not control raising, etc.
22:55:32brixenwell, assigning to it appears to be raising
22:55:36brixenwhich I thought was odd
22:55:43evani think i was playing
22:55:45evancheck the compiler
22:55:50brixenwe should perhaps emit an exception in the compiler
22:55:54evani think when you set $! it emits code to raise it
22:55:56evanjust remove that
22:55:58brixenk
22:56:04evanthats old code I was playing with I think
22:56:06brixenshould we raise instead?
22:56:15evansure
22:56:17millertibrixen: 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:27millertiI'm probably off-topic, so I'll shut up now.
22:57:24brixenevan: would it be that hard to support setting $! ? since we now have the stack_locals
22:57:39evanwell, what should setting it do?
22:57:57brixenin MRI it raises whatever you set it to when you reraise
22:58:02brixenor so it appears
22:59:12evanwell
22:59:19evansetting it doesn't actually DO anyting
22:59:22evanit just sets it
22:59:29brixenyes
22:59:50evanwhat if you set it when you're not handling an exception
22:59:59brixenignore it?
23:00:09evanso why would you set $!?
23:00:32brixenMRI actually raises if you set $! to other than nil or an Exception
23:00:40brixenTypeError: assigning non-exception to $!
23:01:05brixen*I* wouldn't set $!
23:01:10evani mean period
23:01:14evanlets look on google code search
23:02:18evan$! is hard to search for
23:02:36brixenindeed
23:02:42evanhttp://www.google.com/codesearch?q=lang:ruby+%22$!+%3D%22&hl=en&btnG=Search+Code
23:02:44evanthere we go.
23:03:26evane2mm, that hardly counts.
23:03:39brixenyeah
23:03:57brixenbut setting $! to nil I can imagine code doing that
23:04:19evanthats the worse case though.
23:04:27brixen$! = "exception raised" unless $!
23:04:29brixenfun
23:04:29evanbecause does that handle the unwind?
23:04:35evaner.
23:04:36evancancel
23:04:43brixenI dunno
23:04:54brixenI can try to write spec...
23:05:23brixenif we are not going to support it, we should make sure we're not raising random TypeErrors though
23:05:46brixenrandom == dependent on what someone attempts to assign
23:05:55evansure
23:06:34brixenhah, ruby/lib/irb.rb: $! = RuntimeError.new("unknown exception raised") unless $!
23:06:38evanyeah
23:06:50evanbut it doesn't reraise
23:06:57evanso i'm assuming thats just some weird reason
23:07:06evanbecause $! is then set when you're NOT handling an exception
23:07:20brixenyeah
23:15:42rueevan, brixen: http://gittup.org/tup/
23:16:10brixeninteresting