Show enters and exits. Hide enters and exits.

00:00:04khaaseI get different numbers every time
00:01:24brixenare you trying to say your numbers are flip flopping?
00:01:29brixencus that would just be insane
00:02:23khaasewe bumped the number up to 1 mil, then times stabilze, and jruby is fast
00:04:01brixenthat's interesting
00:04:13brixenput the work into a separate method, and call that
00:12:51phlebashey, what are you doing wrong when you compare benchmark numbers from different machines?
00:13:00phlebas... this might be too obvious :D
00:13:21phlebasbut sometimes khaase and I don't think straight
00:18:16subwindowso what's all this flip flop business? i don't get it
00:21:19khaasesubwindow: flip flops are the shit
00:23:07subwindowthis is something that MRI doesn't support, correct?
00:23:40andrewvosI've been reading this:
00:23:48andrewvosAnd have chosen something I want to fix...
00:24:11khaasesubwindow: no, MRI supports it, but RBX didn't:
00:24:11andrewvosKernel#puts should output newline when nil is passed...
00:24:42andrewvosI've noticed the puts method in io18.rb. How should I got about making the change?
00:24:55subwindowok, best explanation i've read so far is that flip flop == "stateful if"
00:25:20brixenandrewvos: that behavior of #puts is 1.8 or 1.9?
00:25:43andrewvosbrixen: 1.9 should put a "\n". 1.8 puts a "nil\n"
00:26:13brixenandrewvos: if you're fixing it for 1.9, you fix it in io19.rb
00:26:13subwindowhaha, no wonder it wasn't working, i hadn't pulled today =P
00:26:39andrewvosbrixen: Ok, so I'm wondering if I copy and paste the entire method in from io.rb or just alias the method?
00:26:55brixenandrewvos: you *move* it
00:27:08brixenfoo18.rb is for 1.8 specific code
00:27:14brixenfoo19.rb is for 1.9 specific code
00:27:21brixenfoo.rb is for version-independent code
00:27:48andrewvosYeah I get that. So does that mean that it gets removed from io.rb and copied into both 1.8 and 1.9... then the change gets made in 1.9?
00:28:48subwindowyeah exactly
00:28:56andrewvosGreat thanks :
00:29:30andrewvosAlso, should I be writing tests first or is mspec doing everything?
00:29:43brixenandrewvos: you should have a failing spec
00:29:50brixenotherwise, what are you fixing?
00:30:03brixenbin/mspec -tx19 core/kernel/puts
00:31:21subwindowdelete the tag for the failing spec first, under spec/tags/, run the test, make sure it fails, and fix it so it passes
00:31:33brixendo not delete the tag first
00:31:38subwindowoh that's what i always do
00:31:39brixenrun the command I just gave
00:31:41khaaseIGNORE ME
00:31:57andrewvosbrixen: Ok it does appear to be failing... I just followed this command to find it bin/mspec tag --list fails -tx19 :ci_files
00:32:07brixenfolks, read the docs under commands
00:32:22brixenandrewvos: yep, I see it failing here, too
00:32:34brixenandrewvos: so, write the code, run rake build; and rerun that command
00:32:40subwindowok ill remove myself from the conversation. sorry.
00:32:43andrewvosThe uploader has not made this video available in your country.
00:32:50brixenandrewvos: if it all passes, run bin/mspec tag --del fails -tx19 core/kernel/puts
00:32:52andrewvosRegarding that video :(
00:33:14andrewvosbrixen: Do you mean after I get it passing?
00:33:23brixenandrewvos: yes
00:33:28andrewvosbrixen: Thanks
00:33:34brixendo the stuff in the order I just wrote it :)
00:34:06brixenandrewvos: when done, run rake again to run all the 1.8 and 1.9 CI specs
00:34:14brixenif everything passes, you're golden! :)
00:34:19andrewvosrake default?
00:34:36brixenrake defaults to running all the CI specs in 1.8 and 1.9
00:34:49brixenrun 'rake build' after making your changes
00:35:01brixenthen run bin/mspec -tx19 core/kernel/puts
00:35:21brixenif there are no failures, run bin/mspec tag --del fails -tx19 core/kernel/puts
00:35:25brixenthen run 'rake'
00:36:26andrewvosThat last command unmarks it as failing?
00:37:53brixenit deletes the fails tags for passing specs
00:38:16brixenandrewvos: did you read this?
00:38:48andrewvosbrixen: Nope I was directed to that link I mentioned and just started from there.
00:38:54andrewvosWill do though, thanks.
01:06:52boyscoutUpdated CI specs to RubySpec 6ea9ed4b. - 418abd3 - Brian Ford
01:06:52boyscoutFixed Array#pack and String#unpack 'p'. - 94041fc - Brian Ford
01:06:52boyscoutUpdated CI tags for merged specs. - 10ecdc9 - Brian Ford
01:15:30ashleywHey, I'm just playing with rbi, but I can't figure out how to run a compiled file?
01:15:41brixenyou don't
01:15:44brixenyou run a ruby file
01:18:04ashleywSo even in production, the intention is rbx compiles at launch?
01:18:18brixenit caches the compiled code
01:18:29brixennot something you need to worry about
01:18:40brixenthe details of the cache are implementation-specific
01:19:40pkondzior1brixen: this is probably implementation specific too but is it somewhole or will be possible to profile application hot code and preserve it ?
01:19:56brixenpkondzior1: possibly
01:20:05brixenstill not something you should worry about
01:20:18brixenyou should worry about writing good, idiomatic Ruby code :)
01:20:34andrewvosWow that was fun
01:20:42brixenandrewvos: did you get it?
01:20:48andrewvosbrixen: Yup :)
01:20:52pkondzior1andrewvos: this is the way how he handles trolls ? :P
01:21:13andrewvospkondzior1: ?
01:21:14brixenandrewvos: got a pull request for me?
01:21:24andrewvosbrixen: Umm not yet just doing a 'rake'
01:21:27pkondzior1andrewvos: nvm :)
01:21:30andrewvosBut soon :)
01:21:31brixenandrewvos: ah ok
01:21:48ashleywI was just wondering, because from my basic tests, rbx is like 10x slower than MRI 1.9.3, so I was trying to figure out how much was being lost to compilation
01:24:48ashleyw(i.e. if it's like jruby, where boot up is slow, but once it's up and running it's fast, fast, fast :)
01:26:06brixenashleyw: that likely has 0 to do with compilation
01:26:31brixenunless you are testing startup, which is pretty close to 1.9
01:26:59brixenashleyw: push your benchmark code to a repo and link us so we can easily run it
01:27:12brixenor run it with -Xprofile and see where the time is being spent
01:27:42andrewvosIs rbx meant to be faster than mri?
01:28:40brixenit is faster on some things, slower on others
01:28:47brixenyes, we intend it to ultimately be faster
01:29:29brixendo you really expect the answer to be, "no, we don't intend it to be faster" ? :P
01:30:34ashleywrunning with -Xprofile, it seems like 90% is spent on Thread.detect_recursion
01:31:05andrewvosbrixen: No I was wondering if it was a feature.
01:31:16ashleywwait, derp, 14.17%
01:31:25robgleesonandrewvos: Check out one of the presentations by Evan, he covers all that really well.
01:31:30brixenashleyw: you can run with -Xprofile -Xprofiler.graph to see what's calling that
01:31:31robgleesonThey're on confreaks
01:31:35robgleesonOne is on vimeo
01:31:44andrewvosrobgleeson: Thanks
01:40:51andrewvosrobgleeson: Will keep that for tomorrow as it's 3am :)
01:41:39robgleesonYep, I thought the best bit was at 26mins when he started talking about the GC, but you can't seek on that video for some reason
01:41:53robgleesonAh you can now :)
01:41:57robgleesonLong time ago I looked at it
01:47:02andrewvosbrixen: Done.
01:47:23andrewvosrobgleeson: Yeah I will just download it anyway. I get slow speeds from that site.
01:47:30andrewvosOh wait it's vimeo.
01:47:38andrewvosI get slow speeds from confreaks.
01:47:46robgleesonconfreaks never works for me :D
01:48:31brixenandrewvos: I see it, le'me take a loot
01:48:34brixener look
01:48:42brixenI'm going to loot your pull request :)
01:48:49andrewvoshehe go ahead
01:48:49brixenwhat a hoot
01:49:22brixenI think there's a problem with it
01:49:51brixenwhich is a consequence of not having good enough specs
01:49:57brixenputs can take multiple args
01:50:10brixenandrewvos: in irb, run 'puts nil, nil, nil'
01:50:14brixenwith your change
01:50:22brixenand compare that to MRI 1.9
01:50:36andrewvosI thought it was only for one argument?
01:50:47brixenwell, try it
01:50:54brixenand then perhaps write a spec
01:51:04brixenif you're wondering, you don't have good enough specs
01:51:17brixenspecs should make you confident you got it right
01:51:37brixenandrewvos: I can just leave a comment on the pull if you want to do it tomorrow
01:51:38andrewvosIn 1.9 I do get three blank lines :(
01:51:50andrewvosbrixen: Yup that would be cool thanks
01:51:51brixenandrewvos: I don't want to have rbx cause you sleep deprivation :P
01:52:45steveklabnikI DO
01:52:48steveklabnikGET THOS PATCHES IN
01:52:55steveklabnikcracks his whip
01:53:14brixenandrewvos: ok, left ya a comment on the diff
01:53:50andrewvossteveklabnik: x239-156794.jpg
01:54:00andrewvosbrixen: Cool thanks :)
01:54:18brixenandrewvos: no prob, thanks for working on it
01:54:31andrewvosThis was fun. Definitely going to be doing this more.
01:54:36andrewvosAnyway, night.
01:54:45steveklabnikandrewvos: <3 goodnight!
02:41:00xrlahh, nokogiri, a constant source of errors when using rubinius :)
02:41:19xrlit's looking for st.h to build its extension and it's not going so well
02:41:46xrlI found st.h in $HOME/.rvm/rubies/rbx-master/19/include/ so now I just need to get nokogiri's build process to find it
02:41:49xrlany tips?
02:49:18brixennokogiri should install fine
02:49:21xrlrequire 'mkmf'; raise RuntimeError unless Dir.exist? Config::CONFIG['includedir']
02:49:30xrlthat raises an error in a plain IRB session
02:49:46xrlI'm working off nokogiri's extconf.rb:
02:50:02brixenwhat language mode are you in?
02:50:24xrlecho $RBXOPT => -X19
02:50:39brixenis this a recent change?
02:50:47brixenI've installed nokogiri fine in 1.9 mode
02:51:02xrlI installed rbx from rvm last night
02:51:15xrlerr, I installed rbx /with/ rvm
02:51:38brixeninstalls fine here
02:51:55xrluh hmm
02:52:11brixenI suggest not using rvm
02:52:24brixenif you insist on using rvm, I suggest getting 1.8.5
02:52:26xrlwhat does require 'mkmf'; Config::CONFIG['includedir'] say?
02:52:43brixenare you running gem install nokogiri or not?
02:52:53xrlyes, I'm running gem install nokogiri
02:53:04xrlbut now I'm trying to figure out why it's goofing
02:53:06brixenrun exactly that command you see in the gist
02:53:14brixenand gist me your terminal
02:54:03xrlI just replied to your gist
02:56:42brixenI'll install from rvm and look at it
02:56:52brixenbut I'm getting some dinner now
02:56:59xrlhehe, ok
03:04:54xrlif you look at you'll see that it does a #include for either ruby/st.h or or st.h
03:05:34xrlad if you look at the response to the gist you'll see what includes paths are being used
03:07:14xrlmy rvm install has: .rvm/rubies/rbx-master/19/include/ruby/st.h AND .rvm/rubies/rbx-master/19/include/st.h . The only excuse is that my rbconfig is goofed up and does not reference 19
03:09:06xrlok, set up a symlink and it still fails... maybe it's not that :-)
03:26:45xrlit now builds when I do the hoe task's "rake compile"
03:34:32brixenI just installed rbx with rvm and it installs nokogiri fine
03:34:42brixenxrl: what platform are you on?
03:34:53brixenxrl: and what version of rubygems are you using?
03:35:47xrlsure thing:
03:35:51xrljust added those for ya
03:37:54xrljust did a "rvm remove rbx" and going to reinstall from scratch
03:37:59xrlcloning repo as we speak
03:40:01brixenhm, I have exactly the same uname -a
03:40:31brixenxrl: you could try cloning rbx directly, run './configure; rake' to build
03:41:14xrlI do enjoy the handiness of rvm... so let's see if I can stick with it... next up is build from source
03:43:50brixenxrl: what version of rvm?
03:44:43brixenoh gad
03:44:49xrloh no
03:44:49brixenupdate it, pls
03:45:02brixen1.6.anything is totally fucked
03:45:04xrlI had done a rvm update
03:45:09xrland it had the most up to date defs
03:45:14xrlbut ya, ok, rvm update here we go
03:45:32brixenrm anything rbx under ~/.rvm too
03:45:38xrlrvm implode here we go
03:47:15brixenhm, now I got it to fail
03:47:35brixen'ruby -X19 -v -S gem install nokogiri' is fine
03:47:45brixen'RBXOPT=-X19 ruby -v -S gem install nokogiri' fails
03:53:44steveklabnikbrixen: it works for me, but the docs dont gen
03:54:04brixensteveklabnik: ah, I have --no-ri and --no-rdoc
03:54:52steveklabnikthat rbx is like two or three days old
03:55:32brixenI'm guessing the doc stuff has nothing to do with nokogiri
03:57:18brixenwtf, why does this fail with RBXOPT
04:07:45xrlbrixen: ya, rbconfig is goofed
04:07:55xrllooked at it from inside of an irb session
04:10:15brixenI'm pretty sure it's not rbconfig
04:10:21brixengist me your terminal
04:11:12brixenI'm betting it's when RBXOPT is actually processed by the vm
04:11:20brixenI've fixed this before
04:13:22xrlI'm trying this: require 'mkmf'; raise RuntimeError unless Dir.exist? Config::CONFIG['includedir']
04:14:07xrlone second... that code doesn't work
04:14:50brixenok, figured it out
04:15:03brixennow to figure out why
04:15:30xrlso what did you figure out?
04:15:47brixenit's loading the wrong mkmf.rb with -X19
04:15:57brixenwhich makes the gem install correctly :P
04:16:13brixenit's loading the correct mkmf.rb with RBXOPT=-X19
04:16:23brixenand that causes nokogiri to fail
04:16:59brixenso there are 2 problems, loading the correct mkmf.rb and fixing build when using 1.9 mkmf.rb
04:20:17xrlI forked nokogiri to fix the build:
04:20:31xrljust added a "#include <st.h>"
04:20:34brixenxrl: nokogiri is not broken
04:21:17xrloh? I got nokogiri's "rake compile" to work
04:21:52brixendoes nokogiri install on MRI 1.9.2?
04:22:04brixenthat's a rhetorical question, yes it does
04:22:10brixennokogiri is not broken
04:22:18brixenI just explained above what the issue is
04:43:45xrlbrixen: want me to file an issue?
04:44:03brixenxrl: hm, I'm working on it right now
04:44:07brixenyou can if you want though
04:44:28xrlnaw, not necessary then
04:51:25brixenman, wtf
04:52:20brixennow it fails both ways
04:52:59brixenah, no it doesn't, debugging fail
04:57:07Cro_Crxhi all
04:57:14brixensup Cro_Crx
04:57:33brixensteveklabnik: I thought someone snapped a pic of assange at the beach :)
04:57:35Cro_Crxbrixen, bit of a lazy sunday at the moment :P
04:57:51brixenCro_Crx: cool, whereabouts are you?
04:58:00Cro_Crxbrixen: australia
04:58:37brixenCro_Crx: ah cool
04:58:53brixenis the spring starting there?
04:59:43Cro_Crxyeah i suppose so, it's usually quite warm here anyways, even in winter
04:59:51Cro_Crxbut I think it's getting a bit hotter right now, getting into the low 30's
05:00:12xrlsounds cold to me ;)
05:00:22Cro_Crxxrl: :P
05:00:43Cro_Crxso i've got a few spare hours today, was poking around the rubinius codebase
05:01:13Cro_Crxhopefully I can be useful and actually contribute something
05:01:20Cro_Crxthere anything in particular that might be easy to start on
05:01:30Cro_Crxi've got the codebase and tests running at the moment
05:02:16brixenCro_Crx: got any personal Ruby projects? you could run those on rbx and let us know how they work
05:03:23Cro_Crxbrixen: yes I do, that actually sounds like a good idea
05:03:29Cro_CrxI work locomotiveCMS, could check to see if it works nicely on rbx
05:03:48brixenCro_Crx: sounds great!
05:05:31khaasesteveklabnik, brixen: ha ha
05:06:20steveklabnikCro_Crx: do it!
05:06:36steveklabnikCro_Crx: ;)
05:06:54Cro_Crxsteveklabnik: oh yeah, i read through that article :P
05:07:06Cro_Crxsteveklabnik: the test suite seems to pause on certain tests for me though
05:07:27brixenCro_Crx: running what command?
05:07:35Cro_Crxbrixen: the one that you put in your comment
05:07:42Cro_Crx`bin/mspec tag –list-all -tx19 :ci_files`
05:07:51brixenyeah, fuckin formatting
05:07:54brixenit --list-all
05:08:14brixenif you actually paste that into a terminal and echo it to a file and look at the bytes
05:08:21brixenit's a multibyte character
05:08:30brixentag isn't running --list-all
05:09:23Cro_Crxok, that gives me a the list of tagged specs
05:09:26brixenits running bin/mspec tag \342\200\223list-all -tx19 :ci_files
05:09:35brixenand that just looks like another file to run
05:10:38brixenI'm amazed that no one questions that command
05:14:43brixenmulti-mode in a single exe is such a pain in the ass
05:22:46Cro_Crxyay, running the tests now :P
05:28:55Cro_Crxcool, got a few errors
05:28:57Cro_Crxalso a segfault
06:03:13Cro_Crxok, ran into a problem
06:03:39Cro_Crxin 1.8.7'path').size returns the file size
06:03:46Cro_Crxbut not in rbx in 1.8 mode
06:03:57Cro_Crxbbl, formula one is starting :P
06:04:19Cro_Crxalthough the rubydoc only shows the #size method in 1.9.2 and not 1.8.7 :S
06:05:22Cro_Crxoh wait, i'm an idiot; had the wrong ruby version running IRB
12:20:52boyscoutMaking the file.size error message the same as in 1.9. - 07d1c83 - Josh Lubaway
12:20:52boyscoutUsing consistent exception syntax. - dfd143c - Josh Lubaway
12:20:52boyscoutMerge branch 'jish-fix_file_size_spec' - e6d97a8 - Carlos Galdino
12:50:40andrewvosIs there any way I can get rvm to point to my local clone of rbx?
12:50:56andrewvosI'm writing a patch and want to test it out vs mri.
12:51:13steveklabnikandrewvos: you can do the opposite
12:51:20steveklabnikrvm just checks out rbx and builds it
12:51:37steveklabnikso you could have the RVM repo pull in from your dev repo
12:52:23steveklabnikwhy do you need rvm to do it though?
12:52:40andrewvossteveklabnik: Fair point. I could just bin/irb couldn't I?
12:52:54andrewvosDo you never sleep?
12:53:00steveklabniki just woke up half an houra go
12:53:10steveklabnikdrinking my coffee
12:53:26andrewvosOh right you're cali right?
12:53:34steveklabnikeast coast
12:53:37steveklabnikit's 9am
12:53:44andrewvosoh ok
12:53:52steveklabniki was in cali a few weeks ago
12:53:59steveklabnikbut i havent moved out there yet.
12:54:14andrewvosMy sister lives in cali, but just moved out to Santa Barbera
12:54:43andrewvosNooooo my `rake` failed.
12:55:50andrewvosIt's amazing how much work the puts method does.
12:56:27andrewvosWell, I suppose it's not that bad. Could be worse.
12:58:09dbussinkandrewvos: are you running mspec against mri?
12:58:20dbussinkandrewvos: because you don't need rvm for anything like that
12:58:53andrewvosdbussink: Nope.
12:59:05andrewvosdbussink: Weird thing is, my code doesn't seem to work in irb.
12:59:15dbussinkin general i've found mucking with rbx dev and rvm to be very error prone
12:59:17andrewvosdbussink: And I'm running ./bin/irb
12:59:41dbussinkandrewvos: how do you mean 'doesn't seem to work'?
13:00:06dbussinki have lost my crystal ball to immediately know what that means :
13:00:07andrewvosWell, I'm seeing entirely different behaviour.
13:00:37andrewvosDo I have to do a rake build to see changes in ruby code?
13:00:42andrewvos( I am anyway)
13:00:45andrewvosBut just wondering.
13:00:54steveklabnikandrewvos: yes
13:00:58steveklabnikanything in kernel
13:00:59steveklabnikat elast
13:01:11dbussinkandrewvos: if you change anything in vm/ or kernel/ you need rake build first
13:03:09andrewvosThis is blowing my mind.
13:04:07andrewvosmspec could be more helpful when a method is called with a different parameter.
13:04:33andrewvosFor example if I expect puts("bleh") but I get puts("jebus") it doesn't highlight the difference.
13:05:11dbussinkandrewvos: not really sure what you mean
13:05:44steveklabnikandrewvos: well, mspec tries to be super bare-bones, so that you need a very minimal ruby implementation to run it
13:06:50andrewvosdbussink: If you set up an expectation on a method call, and that method gets called but with a different parameter then you don't get a diff like in rspec.
13:08:13dbussinkah ok, well, like steveklabnik, it needs to be pretty bare bones
13:08:27dbussinkso you can start using it early on, dunno if this would be a lot harder to achieve
13:10:08andrewvosyou're saying steveklabnik is pretty bare bones? :)
13:10:23steveklabnikI"VE GOTA LL YOU NEED
13:10:25dbussinkandrewvos: haha, it misses a 'said' :P
13:11:16dbussinkandrewvos: but if you're still not sure why you're seeing what you're seeing, you should show what you're doing
13:11:17andrewvosOk I can't see my changes in irb at all :|
13:12:10andrewvosOk check this.. In 19 Kernel#puts should output "\n" when calling puts(nil)
13:12:18andrewvosIn 18 we get "nil\n"
13:12:32andrewvosWhen running IRB I'm still seeing "nil\n"
13:12:49dbussinkandrewvos: how do you start irb?
13:12:58dbussinkandrewvos: in 1.8 or 1.9 mode?
13:13:04andrewvosdbussink: Oh.
13:13:11dbussinkah ok, you're probably starting it in 1.8 mode (that's the default)
13:13:14andrewvosOh man
13:13:15dbussink./bin/rbx -X19
13:13:30andrewvosOh wow.
13:13:39steveklabnikoh man
13:14:01andrewvosWow feeling pretty stupid right now
13:14:21dbussinksolutions often aren't that hard ;)
13:14:36andrewvosOk just removing all my 'throw "why the hell isn't this working"' type code :)
13:16:03rueBest code
13:16:10andrewvosOk question: Why in the original code was it arg.equal? nil instead of arg == nil ? Can you see any reason why it would be like that?
13:16:46dbussinkandrewvos: people overriding == perhaps
13:17:08dbussinkequal? != ==
13:17:13steveklabnikarg == nil checks if they're equal, but equal? checks if they're the same object.
13:17:15dbussinkequal? checks object identity
13:17:17steveklabnikand nil should be a singleton
13:17:30steveklabnikdbussink: high five!
13:17:31dbussinkmight very well be because someone was doing some weird shit
13:17:42dbussinkoutside rbx i mean
13:18:29dbussinkandrewvos: check git blame :)
13:19:32dbussinkandrewvos: you will find the exact reason if you do that and follow the trail :)
13:19:40andrewvosInteresting. So equal? is more like ===
13:20:00andrewvosdbussink: No I don't really care about the reason :)
13:20:15dbussinkandrewvos: well, you asked why it's there :)
13:20:45andrewvosWas more wondering why one might use the different versions.
13:20:54dbussinkandrewvos: no, === is totally different
13:21:07dbussinkandrewvos: .equal? checks object identity
13:21:16andrewvosAs in ==
13:21:30dbussinkandrewvos: "a".equal?("a") => false
13:21:32andrewvosMore like == ?
13:21:44dbussinkas in obj.object_id == obj2.object_id
13:21:52andrewvosdbussink: Whoa.
13:21:56dbussinkusing .id is deprecated for like a decade now already
13:22:04andrewvos__id__ ?
13:22:16dbussinkandrewvos: object_id is the proper method
13:22:33dbussinkandrewvos: it checks object identity, so whether it is the exact same object
13:23:11dbussinkand it needs to be used here because people do really nasty things like this:
13:23:15andrewvosdbussink: Ok got it
13:23:23Cro_Crxwas .id depricated because rails uses it to return the primary key?
13:23:27Cro_Crxor was it before then?
13:23:37dbussinkCro_Crx: way before actually
13:23:50dbussinkit has been as long as i can remember :p
13:25:07andrewvosDoes this second spec look ok?
13:25:52andrewvosIt's failing because expected to receive 'write' exactly 1 times
13:25:53andrewvosbut received it 2 times
13:26:39andrewvosOh and also, I added that spec in code and I cant seem to run it..
13:27:52dbussinksteveklabnik: just checked, it was deprecated in 2002
13:27:58dbussinksteveklabnik: afaik no rails back then
13:27:58steveklabnikfair enough!
13:28:11steveklabniki have been told the wrong thing.
13:28:29dbussinkandrewvos: you can mock it twice like that, that's why you get that error
13:28:33Cro_Crxandrewvos: @io.should_receive(:write).with("\n").exactly(2).times <----
13:28:46andrewvosdbussink: So how do I check that it's in order?
13:29:37Cro_Crxandrewvos: can you get the output of the write and check the contents, rather than mocking ?
13:30:55dbussinkandrewvos: i'd try Cro_Crx's solution then, see if that's possible
13:31:07dbussinki don't know all the details of how mspec's mocking works
13:31:41andrewvosCro_Crx: Not sure but will take a look.
13:32:23andrewvosNot sure why the test isn't running when I do this though :./bin/mspec -tx19 core/kernel/puts
13:32:34andrewvosDo I need to add it to a list somewhere or something?
13:34:14dbussinki normally just tab complete it to something like this: ./bin/mspec -tx19 spec/ruby/core/kernel/puts_spec.rb
13:36:02andrewvosdbussink: Ok interesting.
13:36:18dbussinkandrewvos: does that do anything different for you?
13:36:49rueandrewvos: spec/ruby is regular stuff, spec/{core,lib} is for rbx-only
13:37:22andrewvosdbussink: It's not running my new spec at all :(
13:37:32andrewvosdbussink: Only when I do a full 'rake' is it running.
13:37:49dbussinkandrewvos: what does git diff show you then?
13:38:05dbussinkcan you gist that here?
13:38:13andrewvosdbussink: My changes?
13:38:27dbussinkyeah, what you have / are doing locally there now
13:39:38dbussinkandrewvos: huh?? did you add the spec to kernel/common/io19.rb
13:39:44andrewvosThe spec I added is the second one:
13:39:47dbussinkthen it's not weird it's not running it
13:39:48andrewvosdbussink: Nope
13:40:06dbussinkcould you then please show git diff without cutting anything out?
13:40:10rueIs the test in kerne/common/io19.rb?
13:40:16andrewvosrue: No
13:40:20dbussinkbecause this is exactly missing the information i'd like to see
13:40:29dbussinkplease, don't try to help us by leaving stuff out :)
13:40:51dbussinkmy experience is that that only results in more confusion and less clarity in 99% of the time
13:41:06andrewvosOk thats better
13:41:21andrewvosdbussink: Sorry I missed a part there )
13:41:59dbussinkandrewvos: well, you're running core/kernel/puts_spec with the specs
13:42:09andrewvosdbussink: Yeah
13:42:15dbussinkand you're changing in kernel/common/io.rb
13:42:28dbussinkKernel has it's own puts methid
13:43:03rue(Also, again the difference between spec/ruby/core/ and spec/core/)
13:43:23dbussinkandrewvos: and you added your spec to spec/ruby/core/io/puts_spec.rb
13:43:39dbussinkso it's not weird you don't see anything if you run spec/ruby/core/kernel/puts_spec.rb
13:43:50dbussinkandrewvos: you should run the file you're adding your specs to :)
13:44:00andrewvosdbussink: Ohhhh ok weird.
13:44:08dbussinkandrewvos: nah, not weird :)
13:44:11andrewvosWow really obvious.
13:44:14dbussinkjust running the wrong file :)
13:44:35dbussinkandrewvos: this is why i wanted to see the complete gist :)
13:44:51dbussinkbecause now it was immediately obvious what the problem is
13:45:04dbussinkwhich wasn't when i just saw the code, not where it was changed
13:46:38dbussinkandrewvos: you see your spec running now?
13:47:30andrewvosdbussink: Yup I do thanks :)
13:47:44andrewvosSo I'm not seeing any documentation for should_receive in mspec?
13:48:34Cro_Crxi'm assuming it mimics rspec mocks ?
13:48:42Cro_Crx <=== this ?
13:48:50Cro_Crxrspec expectations sorry
13:49:56andrewvosCro_Crx: Yeah it does a little.
13:50:06steveklabnikdont use
13:50:10steveklabnikit's waaaay out of date.
13:50:24rueYeah, I mean, why would you even go to the main site?
13:51:42andrewvosYeah relish is the way forward
13:51:54Cro_Crxoh wow relishapp seems neat, the VCR doco sends you there, I didn't realise it was documentation for other projects also
13:51:56steveklabnikrue: becuase it's not kept up to date?
13:52:02steveklabnikCro_Crx: yep, it's in closed beeta
13:52:28rueI always go to semi-/unrelated sites for my documentation needs
13:55:00Cro_Crxrue: but how can you resist when they are all green and cucumber like
13:55:18rueI know!
13:55:35andrewvosCan't telling if joking or just being full of shit
13:55:55Cro_Crxandrewvos: no, it's actually really good
13:56:06rueIt is, it's just in the wrong place
13:56:49andrewvosWhat, in the same way that every single open source project in the world is on github?
13:58:22steveklabnik <- see 'website/blog' link is the official site for 1.x
13:59:11rueBecause that makes sense
13:59:42andrewvosI don't get what you're hating about this?
14:01:21mrb_bkOH HAI
14:02:30rue“Relish allows you to browse, search, and organize your Cucumber features on the web.”
14:02:35rueThat's relishapp.
14:03:08steveklabnikand also arbitrary markdown files
14:03:12andrewvosIs it cucumber you're hating?
14:03:38rueIt's got nothing to do with rspec, as such, but rspec people are just too lazy to maintain their own docs so they've offloaded it
14:03:51rueAnd that's all I'll say.
14:03:57andrewvosrue: Cucumber features are better than docs.
14:04:12steveklabnikno, they've decided that relish is a much better way to present their own docs.
14:04:17andrewvosProbably not the place for this though.
14:04:24steveklabnikthey do write and maintain what relish uses to show them.....
14:06:56mrb_bkCucumber features are NOT better than docs
14:07:30steveklabnikthey're together
14:07:35steveklabnikcucumber features are part of docs.
14:07:38andrewvosIn mspec when I expect a call with should_receive twice with two different parameters am I ever sure that it's in the correct order?
14:07:48steveklabnikandrewvos: mocks dont assert order
14:07:54steveklabnikthey just assert that a message is sent.
14:07:58steveklabnikstubs, rather.
14:07:58andrewvosOh ok
14:09:03andrewvosI had a BDD class the other day and we were changing some code and I got everyone to use the real class implementation instead of a mock and it was great how the code changed.
14:09:22andrewvosBecame less code instantly.
14:09:32andrewvosAnd more readable than tests above it using mocks.
14:09:45rueUsing mocks in the wrong place, then.
14:09:52steveklabnikyou're mocking wrong.
14:09:57rueOr they were
14:10:01andrewvosrue: Yeah which is very popular around London from what I've seen.
14:11:06andrewvosI think it's from people working in a lot of banks, where the code is really bad and people just get used to mocking because the dependencies normally have way to many dependencies... If you get what I mean.
14:11:21steveklabnikmocking is a design activity
14:13:00rueStubbing is typically quite useful in cases like cordoning off the I/O layer
14:16:43andrewvosAlso the problem is when you over mock you end up writing code that only proves the interaction between object. This doesn't work too well in dynamic languages because method calls aren't verified during any sort of compile time.
14:18:38andrewvosOk my pull request is done. Wow that took longer than expected, but I've learned a lot.
14:19:55steveklabnikmocks are supposed to prove the interaction between objects.
14:19:57steveklabnikthat's the idea.
14:20:37mrb_bksuch a good talk
14:26:18andrewvosYeah I wish confreaks worked for me
14:26:47mrb_bkandrewvos: download it
14:26:53Cro_Crxandrewvos: how does it not work? switch to the flash player ?
14:27:08andrewvosIt's really really slow.
14:28:51andrewvos1 hour to download 300mb?
14:29:07Cro_Crxit streams for me OK
14:29:17steveklabnikwow, weird
14:29:20andrewvosCro_Crx: Not fo rme
14:29:34andrewvosWe need like, a mirror.
14:29:40mrb_bkyeah it's slow :/
14:29:47Cro_Crxi'm on a completely different continent as well
14:30:09andrewvosCro_Crx: Continent?
14:30:21andrewvos2hrs left now
14:30:32Cro_Crxandrewvos: as in, not in the US
14:30:47andrewvosCro_Crx: Yes. Which continent?
14:30:56Cro_Crxandrewvos: australia
14:31:02andrewvosI know what continent means :)
14:34:11steveklabnikuh oh
14:34:14steveklabnikmy rbx doesnt build :(
14:34:21steveklabnikSuperclass mismatch: Rubinius::AST::Node != Rubinius::AST::Flip2
14:35:03andrewvosflipflop detected
14:35:43andrewvosSo who does pull requests?
14:36:15steveklabniki do, often
14:36:42steveklabniki was doing another one
14:36:47steveklabnikbut ill do yours first. <3
14:36:59steveklabniki'm rake clean-ing
14:37:03steveklabnikto see if i can fix my build
14:40:38steveklabnikstill broken. wtf.
14:44:05andrewvosYou rock
14:45:22dbussinksteveklabnik: any stale .rbc files perhaps?
14:45:26dbussinksteveklabnik: since the build is clean atm
14:45:27steveklabnikdbussink: i ran a rake clean
14:45:44steveklabnikdoes that not kill them?
14:45:48dbussinksteveklabnik: can you nuke .rbx and ~/.rbx?
14:45:51dbussinksteveklabnik: no, not afaik
14:46:52steveklabniki can try in a second
14:47:06steveklabniki'm updating my installed rbx, let's see if THAT one builds
14:50:57steveklabnikokay, well THAT worked
14:51:03steveklabnikso... lemme try nuking those dirs
14:51:40dbussinksteveklabnik: .rbx in the rubinius dir and ~/.rbx
14:51:55dbussinksteveklabnik: hopefully that helps
14:52:08steveklabnikyeah, let's see, just nuked both
14:53:27boyscoutRolled back changes because code was wrong. - c8e483a - Andrew Vos
14:53:27boyscoutIn 1.9 Kernel#puts now outputs an empty string and a newline when given nil as - 0fbed68 - Andrew Vos
14:53:27boyscoutMerge pull request #1263 from AndrewVos/master - d9497b0 - Dirkjan Bussink
14:53:31dbussinkandrewvos: merged it for you :)
14:53:38dbussinksteveklabnik: you can take your time ;)
14:53:40steveklabnikhaha, aww, i was just trying
14:53:53dbussinksteveklabnik: i thought you said you were also looking at another one?
14:53:58steveklabniki am
14:54:11dbussinksteveklabnik: which one?
14:54:12steveklabnikill switch to it, #1266
14:55:35steveklabniklooks like it's working now, thanks dbussink
14:55:39steveklabnikmust have been the .rbc
14:56:01dbussinksteveklabnik: ah, i see he added a commit for removing the tag
14:57:23andrewvosWOOHOO :)
14:57:26andrewvosdbussink: Thanks :)
14:57:38andrewvosFirst rbx patch
14:58:15Cro_Crxandrewvos: well done
14:58:20mrb_bkdamn, this agent stuff is so cool
14:58:35andrewvosAgent stuff?
14:59:18mrb_bkandrewvos: yeah it's mentioned a bit here: and brian has been talking about it
14:59:22dbussinkmrb_bk: ah, playing with the rubinius agent?
14:59:34mrb_bkdbussink: yeah! trying to document it
14:59:41mrb_bkwriting up a little article about how it works
14:59:41dbussinkmrb_bk: ah, awesome!
14:59:58mrb_bkdbussink: are you pretty familiar with the implementation?
15:00:12dbussinkmrb_bk: i've poked around in it a bit
15:00:41steveklabnikandrewvos: dont forget to bug evan about a commit bit
15:00:42mrb_bkdbussink: cool. it seems like it's pretty transparent to start your app with it running
15:01:02andrewvossteveklabnik: A commit bit?
15:01:15mrb_bkit just spawns a thread
15:01:31steveklabnikandrewvos: yeah, you get added as a collaborator after your first commit
15:01:36steveklabnikit's not really a bit anymore
15:01:45boyscoutMerge branch 'master' of - d38bc21 - Steve Klabnik
15:02:15andrewvosOh ok. Where can I see collaborators?
15:02:38Cro_Crxandrewvos: under the graphs and stats
15:03:03andrewvosOh right you mean like a collaborator on the project.
15:04:10dbussinkguess that list is ordered by nr of commits or something
15:05:28Cro_Crxdbussink: perhaps its KLOC's ??
15:06:36dbussinkpassing the nr 1&2 is probably pretty much impossible i guess :P
15:08:08rueIt is by LOC
15:08:19rueI think I'm still #4 by commit count
15:09:53dbussinkrue: found this:
15:10:54rueOoh, Ohloh is probably out of date, then. I think that's where I ended up last
15:16:47dbussinkrue: time to make a change ;)
15:16:50Cro_Crxnight all
15:17:02rueYou're right, I'll try briefs
16:58:10andrewvosOK going in for my second patch.
16:58:47boyscoutMerge branch 'master' of git:// - 221e6fe - Mateusz Lenik
16:58:47boyscoutAdds fdiv method to Complex - 9b31dbd - Mateusz Lenik
16:58:47boyscoutMerge pull request #1267 from mlen/fixing_complex - f055fc1 - Eero Saynatkari
17:11:29andrewvosWow there's a lot of encoding stuff.
17:36:05rueThat's not an actual metric ;)
17:37:31andrewvosI want to change Kernel.String and can't seem to find the spec for it...
17:40:01andrewvosOh wait foudn it
17:40:10andrewvosack pisses me off some times.
17:53:27rueDon't change it
18:01:31guilleiguaranirb(main):028:0> Rational(0.0, 2) == Rational(0.0, 1)
18:01:31guilleiguaran=> false
18:01:51guilleiguaranI should add a spec for it, right?
18:05:12rueHm, probably
18:05:57rueIt goes through coercion?
18:06:43guilleiguaranactually I found it after of fix another bug:
18:07:08guilleiguaranirb(main):003:0> Rational(0.0, 1)
18:07:08guilleiguaranNoMethodError: undefined method `gcd' on an instance of Float.
18:07:49guilleiguaranI will send a pull request to fix it
18:15:34andrewvosCould I ask someone to take alook at my commit before I try a pull request?
18:15:41andrewvosOr should I just do the pull request?
18:16:46ruePull request is for looks
18:16:56rueIt even has comments and stuff :E
18:17:11steveklabnikandrewvos: just do it
18:17:17steveklabnikthe comments are nice for the future
18:17:33andrewvosAlso, I've fixed four specs in one commit... Should I list them all in the commit?
18:17:57steveklabnikif you want to be super nice. break them up into four.
18:18:02steveklabnikbut you dont have to.
18:18:08andrewvossteveklabnik: I don't think I can.
18:18:11steveklabnikif you dont, list them all
18:18:20steveklabnikyou can ALWAYS do it with git.
18:18:52andrewvosThey're all fixes for Kernel#String so it shouldn't be too much of an issue having them all as one.
18:18:52rueEasiest way would be to separate them into branches
18:21:22andrewvosHow do I find where the tags are that Iwant to delete?
18:24:50andrewvosGot them don't worry.
18:29:41andrewvosHmm I got some tcp errors when running rake.
18:29:49andrewvosDon't think they are relateed to what I changed.
18:29:56steveklabniklocalhost stuff?
18:29:59andrewvosAnyone seen this?
18:30:00steveklabnikhappens every one in a while refuses the connection when there is no server to connect to FAILEDExpected Errno::ECONNREFUSED
18:30:19andrewvosOh ok good
18:30:33andrewvosWell, not good actually.
18:33:02andrewvosCmon rake, you can do it.
18:35:29carlosgaldinoandrewvos: how are you deleting the tags?
18:36:00andrewvoscarlosgaldino: Like ./bin/mspec tag --del fails -tx19 core/kernel/puts
18:36:49carlosgaldinoandrewvos: ah, ok. I thought you were doing it manually because you said you couldn't find the tags you wanted to delete
19:45:38rueandrewvos: I'm not sure it's correct; so far as I can tell, it's #to_str and #to_s, plus #respond_to? should probably be called
19:49:25andrewvosThanks rue
19:50:31andrewvosrue: Eero Saynatkari?
19:53:02brixenandrewvos: the best thing to do is go look at what MRI 1.9 actually does
19:53:10brixen1.9.2p290 is the current stable release
19:53:34brixenthose specs are a bit confusing anyway
19:56:57andrewvosbrixen: Thnks taking a look. Source is a bit tricky to navigate...
19:57:08brixenandrewvos: yes indeed it is
19:57:31andrewvosOk cloning the entire thing down :/
19:58:07brixeneveryone working on implementing ruby should have a copy of MRI source under their pillow
19:58:15brixenthat's just the sad state of affairs right now
19:58:30brixenhopefully in the not too distant future, they'll just need a copy of RubySpec
19:58:50steveklabnikbut it's got so many sharp edges!
19:58:54steveklabnikitll hurt my head when i try to sleep
19:59:08andrewvosIt will *rape* you when you try to sleep.
20:00:35rueandrewvos: C'est moi
20:01:18andrewvos= it's me?
20:04:03dbussinkandrewvos: you need to be a polyglot in here, not only computer language wise ;)
20:04:30dbussinkbrixen: i go to sleep by reading a few lines of mri each night
20:04:34andrewvoslearns french.
20:04:44dbussinkbrixen: so i have the worst nightmare before actually sleeping ;)
20:04:51dbussinkandrewvos: ah, tres bien!
20:04:59andrewvosdbussink: Wake up in cold sweats?
20:05:14dbussinkandrewvos: no, this is so i experience the horror before sleeping ;)
20:07:26andrewvosOk so I'm starting to see what I got myself into :)
20:07:35andrewvosThe code isn't too horrble though.
20:08:13brixendbussink: heh
20:08:49brixenI think the C++ shouldn't test all the stuff in primitives that is tested in RubySpec
20:08:57brixenC++ tests*
20:09:31brixenit is possible that a primitive could get fucked up and then the vm wouldn't boot, but I think that's pretty rare
20:09:37brixenand should be immediately obvious
20:10:11dbussinkbrixen: i remember the c++ tests to be most useful initially when we were bootstrapping the vm
20:10:26dbussinkto see where stuff was not working (yet)
20:10:31brixendbussink: well, there are aspects that are useful
20:10:38brixenspec'ing primitives is not one of those
20:11:01brixenthey are useful for complex behavior whose contours are not seen in the aggregate behavior visible to Ruby
20:11:24dbussinkbrixen: we should check though if everything they test is covered in rubyspec too then (if it is something that should be in rubyspec that is)
20:11:34brixenof course
20:11:54dbussinkbrixen: but fighting with the c++ tests then?
20:11:58brixenin this case, MRI's stupid ass decisions to exclude Float form stuff like Bignum#& makes tests fail
20:12:18dbussinkah ok, when running in 1.9 mode right?
20:12:19brixenand it takes a ton of shit to conditionalize that
20:12:35brixenand that is tested already in rubyspec
20:12:41dbussinktrue yeah
20:12:48dbussinkwe should cut out those tests then i guess
20:12:50brixenI'm removing them for now
20:12:57brixenI'll talk to evan tomorrow
20:13:10brixenalso, I'm making the tests run in 1.8 and 1.9 mode
20:13:42dbussinkyeah, that's also a good idea so stuff like this is picked up early on
20:20:19andrewvosbrixen, rue: It seems like the changes I made are right. I think...
20:20:52brixenandrewvos: ok, I'll take a look after I finish this test stuff
20:21:08andrewvosbrixen: Thanks, I can point you at the files I'm looking through.
20:21:35rueAs far as I can tell, you need to try #to_str, then #to_s
20:21:45rueBut I just tried it in pry
20:21:48andrewvosrue: Not sure what you mean?
20:23:30brixenandrewvos: does String() first try calling #to_str, and if that fails, then tries #to_s, and if that fails raises?
20:24:45andrewvosbrixen: In C?
20:24:55rueStrictly speaking it #respond_to? them rather than tries first
20:25:44andrewvosrue: But the 192 behaviour is to just try call to_s in case of someone adding to_s and not doing a proper respond_to?(:to_s)
20:25:47andrewvosI'm assuming
20:27:06andrewvosOh wait hang on...
20:27:28andrewvosOh nevermind
20:32:24cookrnwould 'Invalid char `\317' in expression' be a sign of weird file encoding when trying to run a gem's test suite on rubinius via `rake`? full out:
20:32:47brixenare you running in 1.9 mode?
20:33:01cookrnrubinius 2.0.0dev (1.8.7 f055fc18 yyyy-mm-dd JI) [x86_64-apple-darwin11.1.0]
20:33:18dbussinkcookrn: using rbenv?
20:33:31brixenI think your rbenv is fucked up
20:33:41dbussinkcookrn: it's doing something in such a way that it tries to load rake as a script
20:33:42brixenit looks like it's trying to exec a link
20:33:48dbussinkand it's a symlink in rbx
20:33:59dbussinkbrixen: someone else who reported this was also using rbenv
20:34:07brixencookrn: ls -l /Users/ryan/.rbenv/versions/rbx-2.0.0-dev/bin/rake
20:34:29andrewvosIs there a list of changes from ruby 187 to 192?
20:34:53cookrnlrwxr-xr-x 1 ryan staff 3 Oct 16 13:56 /Users/ryan/.rbenv/versions/rbx-2.0.0-dev/bin/rake -> rbx
20:35:19brixencookrn: so, rbx is trying to read that link *as* a script to run
20:35:26brixenyou'll need to track down that
20:35:45guilleiguaran% ls -la ~/.rbenv/versions/rbx-2.0.0-dev/bin/rake
20:35:45guilleiguaranlrwxr-xr-x 1 guille staff 3 Oct 15 17:50 /Users/guille/.rbenv/versions/rbx-2.0.0-dev/bin/rake -> rbx
20:36:13brixensure, and if you run that file, it should work fine
20:36:31brixentest it
20:37:03guilleiguaranInvalid char `\317' in expression
20:38:43andrewvosin 187 convert_type is called with true instead of false.
20:38:56andrewvosSorry don't know why I wrote that in here.
20:40:06andrewvosOk so it does NOT raise an exception if object does not respond_to? to_s
20:40:47rueCheck the other specs/fail tags to see if the behaviour's there?
20:41:14andrewvosI'm manually diffing the two and the behaviour is there.
20:41:36andrewvos v = convert_type(val, tname, method, Qtrue);
20:41:52andrewvos#in 187: v = convert_type(val, tname, method, Qtrue);
20:42:23andrewvosIn 1.9.2 it's v = convert_type(val, tname, method, FALSE);
20:42:34brixenguilleiguaran: gist me your terminal running: '/Users/guille/.rbenv/versions/rbx-2.0.0-dev/bin/rake --version'
20:42:37andrewvosconvert_type throws if respond_to returns false.
20:43:21cookrnbrixen: in rbx, is `rake` bin supposed to be symlinked to the `rbx` bin? or is that an artifact of my rbenv setup?
20:44:07brixenit's supposed to be symlinked
20:44:22brixeninvoking rbx as 'rake' tells rbx to run as if you did 'rbx -S rake'
20:44:49brixenand it should do that by looking at its internal gem bin wrappers before looking at PATH
20:46:28andrewvosI've copied out the relevant c methods into a file if anyone wants to take a look?
20:47:34brixenandrewvos: this is one of the most fucked up areas in MRI
20:47:40brixenhow it handles coercion
20:47:49dbussinkbrixen: i found a fun one today too
20:47:59brixenandrewvos: you could list the flow you see and check that the specs cover it
20:48:07dbussinkwhere i think they meant different behavior than it actually is
20:48:12brixenandrewvos: I need to discuss this with evan again about checking respond_to?
20:48:22brixendbussink: wouldn't surprise me
20:49:42andrewvosI suppose I could just test it in ruby 192
20:49:56guilleiguaranbrixen: ok
20:51:18dbussinkbrixen: looks like they fixed it in ruby trunk
20:51:31dbussinkbrixen: i wonder, how should we spec behavior like that then?
20:52:04brixendbussink: so it was one way in 1.8.7, they changed it in 1.9.2, and now they changed it back in 1.9.3?
20:52:19steveklabnikOF COURSE
20:52:30dbussinkbrixen: ah, wait, no, it's still broken
20:53:00brixenwhat is broken?
20:53:23dbussinkwell, from what i think they want is to test if the value gives true for integer?
20:53:38dbussinkbrixen: which is what that f_integer_p thing does
20:53:45brixenI fucking love that rational.c uses entirely different predicates from the rest of MRI
20:53:52brixenfucking. love. it.
20:53:56andrewvosIn mspec is there any way I can check if the error raised has the right message?
20:54:05scooter-dangleI have what is likely another naive question: I wanted to tinker with the array iterators and tested redefining each. Tried a number of different things and looked around online/stackoverflow/ but can't figure out why I'm able to redefine Array#each in 1.8.7 and 1.9.2 but not Rubinius
20:54:11brixenandrewvos: no
20:54:16brixenandrewvos: you don't check that
20:54:16scooter-dangleSimple test:
20:54:30andrewvosbrixen: Ok is it not something we care about?
20:54:30dbussinkbrixen: but this way they check whether it's a Numeric and if not they do a !f_integer_p, but that last returns a VALUE
20:54:49brixenandrewvos: it's not a behavior, you don't spec it
20:54:55andrewvosOk fair enough
20:55:18brixendbussink: dunno, file a ticket
20:55:37brixendbussink: in general, you handle the specs like always, with ruby_version_is or ruby_bug
20:56:02cookrndbussink: so the problem might be in how rbenv is setting up its shims?
20:56:43ruescooter-dangle: Reassigning @index could be an issue?
20:56:53brixenscooter-dangle: why are you redefining Array#each ?
20:57:17cookrnis it breaking the rbx ability to find the `rake` binary in the gem as opposed to the rake binary that is a symlink?
20:57:18brixencookrn: rbenv should do nothing but put rbx/bin in your path
20:57:21scooter-danglerue: even if @index didn't already exist in Array?
20:57:38brixencookrn: if it's doing anything else, it's just being stupid
20:58:00brixenscooter-dangle: go read the rbx code
20:58:20ruescooter-dangle: If it doesn't (I'm not sure offhand), no, but you don't need an ivar there anyway and therefore shouldn't use one
20:58:27brixendbussink: there's not an easy way to run the C++ tests in the language modes
20:58:47brixendbussink: another reason to keep version-specific Ruby behavior out of them
20:59:09brixendbussink: I think I'm going to insist that the C++ test only test rbx implementations details not visible to Ruby
20:59:38scooter-danglebrixen: i wanted to experiment with defining behavior of modifying an array while it's being iterated through... each was the basic test, and i figured in rubinius that it would make the rest of the iterators easier since many of em use each
21:00:45dbussinkscooter-dangle: you mean defining behavior for rbx?
21:01:44scooter-dangledbussink: i guess... i thought it would be easier in rbx
21:02:04brixenscooter-dangle: modifying an array while iterating is explicitly undefined behavior according to Matz
21:02:19brixenthere's the Array#each code
21:02:27brixenI'm sure you can figure out what is happening
21:02:38brixenbut understand that such behavior will not be supported
21:02:42rueWell, this one's not modifying it yet anyway
21:02:45scooter-danglebrixen: i read through that before writing this
21:02:45brixenif your app doing it breaks on rbx, too bad
21:02:48andrewvosOk updated the pull request with some information.
21:05:43scooter-dangleis there at least any other place you could point me to? i wasn't sure where to look beyond bootstrap/array.rb and common/array.rb to find how rbx is implementing arrays... could you point me to where the bootstrap array instance vars are first defined?
21:05:59rueI must be missing something obvious here.
21:06:13rue rnel19.rb#L99
21:06:13scooter-danglei'll keep looking... just wanted to save some time... thanks for the responses
21:06:32rueandrewvos: You're not checking/calling #to_str
21:07:08rue str = rb_check_convert_type(str, T_STRING, "String", "to_str");
21:07:26brixenscooter-dangle: I just want to be super duper crystal clear, rbx will not support modifying collections while iterating
21:07:45andrewvosrue: Interesting, though the original source doesn't either.
21:08:04brixenscooter-dangle: why not spend time on something valuable like a lock-free concurrent queue instead of a behavior that is undefinable in any meaningful way
21:08:23scooter-danglebrixen: that's ok... if i ever did anything, i'd keep it as a gem
21:08:33brixenscooter-dangle: no, it's not ok
21:08:48brixenbecause if someone uses it, and their code breaks on rbx, you've just created a big mess
21:08:51brixenfor no good reason
21:09:33ruescooter-dangle: One thing to keep in mind is that other kernel code is using Array#each
21:09:38steveklabnikthat silly
21:09:48robgleesonIt wouldn't just break on rbx
21:09:52robgleesonIt'd break everywhere
21:10:33scooter-danglea personal gem
21:10:35rueIt *might* break
21:10:37scooter-danglelike an heirloom
21:10:49rueBut, again, this problem isn't even at the point of modifying yet ;)
21:11:02andrewvosrue: String(meh) never calls to_str.
21:11:15andrewvosIn mri 192 at least.
21:12:30robgleesonrue: modifying a collection while you iterate over it is a terrible idea.
21:13:05andrewvosTIL about "undef"
21:13:07scooter-danglethere are cases in the real world that make sense. like a batting order while someone is at bat
21:13:10brixenscooter-dangle: you need to understand that rbx *uses* Array#each, while MRI just calls a C function
21:13:27scooter-danglebrixen: that's what i thought
21:13:37brixenscooter-dangle: you can't expect to redefine core Ruby methods and get predictable and reasonable behavior
21:13:39steveklabnikmodfiying collections while iterating is always terrible.
21:13:46brixenit's stupid
21:13:50steveklabnikthat too
21:14:09rue(Which is why I argued it shouldn't be undefined, but disallowed, but that's sorta beside the point)
21:14:26rueandrewvos: OK
21:14:29steveklabnikrescue FuckYouException => e
21:14:48brixenwell, core behavior can be redefined in a compatible way
21:14:51brixenand that is fine
21:14:58brixenthat's the great power of Ruby
21:15:20brixenbut thinking you can redefine shit any old way is stupid, and only possible because of how MRI is implemented
21:15:30brixenit's why we can't have nice things
21:16:47scooter-danglei'm just playing and learning... the most compsci training i've had part of a course in C and a math independent study in crypto... i've been poking around/reading but can't stop thinking about this... no plans on sending it out with my family christmas cards or anything if i get it to work...
21:16:48boyscoutPropagate language mode to subprocesses. - 58b53a8 - Brian Ford
21:16:49boyscoutMoved C-API headers under 1.9 to match MRI. - b7f4846 - Brian Ford
21:16:49boyscoutRequire intern.h from correct location on 1.9. - 10d4535 - Brian Ford
21:16:49boyscoutForce clean build for header file change. - f20cf56 - Brian Ford
21:16:49boyscoutRemoved C++ tests for primitives tested in RubySpec. - 519beac - Brian Ford
21:17:19scooter-dangleif it's impossible then oh wells
21:18:07brixenscooter-dangle: it's not impossible
21:18:22brixenbut I'm trying to convince you of the problems in your entire approach
21:18:38brixenxrl: I think those commits should fix your nokogiri install, please test
21:26:58dreinullis load_order ordered by any means? I had to add rational to the list and put it to the end.
21:40:50boyscoutDisplay the proper error message. - dc9f7f4 - Andrew Vos
21:40:50boyscoutMerge pull request #1268 from AndrewVos/master - c72a912 - Eero Saynatkari (Säynätkari)
21:42:02andrewvos<3 <3 <3
21:42:29boyscoutfix failing spec for 1.9 Rational#% - c63d832 - burningTyger
21:42:29boyscoutremove Rational#modulo tag file - d6ad361 - burningTyger
21:43:02dreinullworking at that speed we will see 1.9 support by the end of the month
21:43:26andrewvosThat would be great.
21:43:58andrewvosSo is that status page I saw earlier basically all the specs tagged "fails"?
21:44:03andrewvosOr is there more to it?
21:44:55dreinullcant tell
21:45:15boyscoutMerge pull request #1264 from guilleiguaran/gcd-raise-typeerror - c9f8d4c - Eero Saynatkari (Säynätkari)
21:45:42rueBlah, wtf Github changing names
21:47:12brixendreinull: yes, load_order is ordered
21:47:17brixenjust like the name :P
21:47:25brixendreinull: where did you need to add rational?
21:47:38dreinullI added both 18 and 19
21:47:54brixenno, there is no rational in 18
21:48:09brixenand it should have been in 19 already
21:48:44dreinull:S actually it was just 18
21:48:53brixendo not add it to 18
21:49:02brixenthere is no Ration in core lib in 1.8
21:49:54dreinullok, sorry for the mess.
21:50:54rueguilleiguaran: Were there tags for the #== and .reduce fixes?
21:51:13SJDdbussink: ping
21:53:43boyscoutremove Rational from load_order18 to fix c63d832a1a - fb331ab - burningTyger
21:54:03guilleiguaranrue: I'm adding the specs to rubyspec now
21:54:12guilleiguaranrue: or I should add the specs to rubinius?
21:54:43steveklabnikguilleiguaran: add them to rbx
21:54:50steveklabnikbrixen moves them to rubyspec every once in a while
21:56:00rueguilleiguaran: Yeh, and just update the pull request & note here
21:56:12guilleiguaranrue: ok
21:58:47brixendreinull: you need to fix the rest of the mess :P
21:59:03brixendreinull: get rid of rational18 and rational19 and put it back in rational.rb
21:59:28dreinullbrixen: rational19 was there before
21:59:40brixenbecause someone else fucked it up
21:59:49brixendo you want to fix it or do you want me to?
21:59:50dreinullglad that wasnt me :)
21:59:55dreinullI can do it
21:59:58brixenok, thanks
22:01:09rueI find the rule a bit confusing, but I suppose that's because I think 1.8 as the default state of things, from which we diverge into 1.9 support as necessary
22:01:13dreinullbrixen: so it all goes into rational and I remove all of it from load_order?
22:01:28brixenthere should be one file, rational.rb
22:01:44brixenthere should be rational.rbc in load_order19.txt and load_order20.txt
22:02:45dreinullok, will fix that
22:03:13brixendreinull: thanks!
22:11:18boyscoutyet another fix for c63d832a1a - 74f2e6d - burningTyger
22:12:47andrewvosI thought the bot was getting clever
22:18:58boyscoutFixed mkmf.rb so bson_ext installs. - 3192063 - Brian Ford
22:21:34brixenguilleiguaran: could you run 'bin/mspec tag --del fails -tx19 core/rational' and update your pull request
22:25:20guilleiguaranbrixen: ok
22:45:44boyscoutAdded RUBY_VM define for 1.9 C-API. - c3a7bef - Brian Ford
23:05:35boyscoutRational.reduce should use gcd only for Integer - c604b7d - Guillermo Iguaran
23:05:36boyscoutRational#==(other) returns true if self and other have as numerator zero - 06caa66 - Guillermo Iguaran
23:05:36boyscoutRational#zero? now returns true if the numerator is 0.0 - 2b28d14 - Guillermo Iguaran
23:05:36boyscoutMerge branch 'Rational#zero_patch' - f4f76f1 - burningTyger