Index

Show enters and exits. Hide enters and exits.

00:15:50justin-georgeyes, the magic of modules... order matters
00:49:02ruetarcieri: I dunno if they are currently asynchronous. Were
01:52:09tarcieriDefiler: heh, saw something even more confusing earlier today
01:52:13tarcierirue: I see
01:52:47tarcieriDefiler: now *this* is confusing behavior: http://gist.github.com/237366
01:57:41rueIt follows aliasing logic
02:01:33tarcieriyes I'm sure it makes perfect sense... to Ruby implementers
02:01:33tarcieriheh
02:58:36rueYou can always re-include it if you want changed behaviour, but if it changed automatically, you could no longer go back to the original
16:08:37ddubgood morning
17:23:24rueModerately sucky evening
18:39:53DefilerWhoa, 1.9 has a different return value from *[5] than 1.8?
18:40:02DefilerHow the hell am I supposed to write code that works on both versions?
18:40:23Defilerreturn *blah is totally different now
18:41:06brixenDefiler: yeah, fun
19:22:19rueWhy are you returning a splat?
19:26:47rueOr do you just mean in general? A single-element Array splatted to one argument is itself rather than the value now
19:27:50rueI surmise the change was to make single-and multiple-value splattables behave the same with one lhs
19:28:57Defilerrue: I'm returning a splat because I have SomeClass.find(one_or_more_ids)
19:29:07Defilerand if they are looking for one, I don't want to return an array
19:30:27rueHm. You then handle Array vs. something else differently in further code?
19:31:01DefilerThe caller knows how they are using it
19:31:12DefilerSo they expect an array or a single object, depending on what they are using this API for
19:32:16rueMm, perils of lack of overloading. Just have to add an explicit check in .find then
19:32:23DefilerIt's not an 'omg I can't do it any other way' kind of situation
19:32:32Defilerbut it's a surprisingly big behavior change
19:32:54DefilerI can just make find and find_one as well
19:33:42rueI dunno, I can see the virtual overload being intuitive
19:33:52DefilerIt is, yeah
19:33:56rueCould be unintuitive to some too, I suppose.
19:34:04Defiler@source = Source.find params[:source_id]
19:34:11rueSo make both and delegate from .find
19:34:14evanreturn ary.first if ary.size == 1
19:34:15Defilervs. @sources = Source.find(list_of_sources)
19:34:15evanreturn ary
19:34:19evanthat works everywhere.
19:34:26DefilerYeah, that's what I changed it to
19:34:36evanand is much less clever.
19:35:09DefilerI'm not sure the original was 'clever', but yeah
19:35:21DefilerI ended up changing it to ary.size > 1 ? ary : ary.first
19:35:36Defilerbecause I want a nil back from an empty array
19:36:05rueDefiler: Hey, if it takes me a moment to figure out, it is clever ;)
19:36:22DefilerI didn't take me a moment to figure out :)
19:36:34evanit did me!
19:36:49DefilerIf only you knew more Ruby heh
19:38:13DefilerI should look at how ActiveRecord changed their code, since this is the behavior of AR::Base.find as well
20:27:51boyscoutFix bad ref GC bug. Fixes #69, Closes #20. - 87a7776 - Evan Phoenix
20:27:51boyscoutAdd more super specs - b2a0175 - Evan Phoenix
20:27:51boyscoutFix super in define_method - 54943a4 - Evan Phoenix
20:27:51boyscoutExpose backtrace max level in rubinius::print_backtrace - f7c0568 - Evan Phoenix
20:34:33boyscoutCI: f7c0568 success. 3002 files, 11426 examples, 35494 expectations, 0 failures, 0 errors
20:35:33rueHu, weird GC thing
20:35:42rueThink I was hitting that
20:51:20ddubevan, want a newer config.guess? (nov 2009 vs. feb 2003)
21:23:38evanddub: only if it properly detects darwin 64
21:25:38ddubevan: as x86_64-apple-darwin10.2.0
21:26:10evanseems right
21:26:13evanwhats the diff?
21:26:16evanwhat did they change?
21:29:51Defilerevan: in http://github.com/evanphx/rubinius/commit/87a77767d6af0ff6f689a545ca32d7779964f877
21:30:05evanyes?
21:30:10Defileram I reading it wrong, that it fetches the native method frame from env, and then sets it back on env without changing it?
21:30:28evanwhere?
21:30:37Defiler173/172
21:31:02Defiler(nativemethod.cpp, sorry)
21:31:11evanyes, that line sets that NativeMethodFrame to be the current frame
21:31:12evanand?
21:31:31Defilerbut nmf came from env->current_native_frame() a few lines up, right?
21:32:00evanum. no?
21:32:08evanit's created on line 169
21:32:11evanon the stack
21:32:31evanthat line creates a new NativeMethodFrame as a C++ object allocated on the stack
21:32:42evanthe argument to the constructor is the current nativemethodframe
21:32:46evanthat it sets as it's previous one
21:32:49evanso there is a linked list of them.
21:32:50DefilerAaah, ok
21:33:02DefilerI thought it was retrieving and casting it, sorry
21:34:36evanno prob.
21:46:25ddubevan, I'm looking at what it takes to make a universal binary with the new build system, I upgraded in hopes that it would correct a problem I had (it didn't)
21:46:44ddubthey added support and fixes for about six and a half years worth of platforms
21:52:43evanseems fine to update it.
22:08:10boyscoutAdd File::Stat#sticky? - 12e8e70 - Mikko Perttunen
22:08:10boyscoutUpdated specs for File.sticky? and FileTest.sticky? - d7175ac - Mikko Perttunen
22:08:10boyscoutFix File#sticky? for darwin - 2876e14 - Evan Phoenix
22:08:59cyndiswhee! first patch.
22:09:05evan:D
22:09:10evanwant your commit bit?
22:09:25cyndissure, have to learn how to use git push though :p
22:09:31evanheh
22:09:54evanwhats your github username?
22:09:59cyndiscyndis
22:09:59boyscoutCI: 2876e14 success. 3002 files, 11431 examples, 35502 expectations, 0 failures, 0 errors
22:10:13evanok, added!
22:10:15evanthanks for the help!
22:10:40cyndisthank you for a nice project :)
22:11:34cyndisi have a working File.expand_path patch also, but haven't made specs for it yet
22:12:04cyndisi wonder if i can use etc.so/rb in the specs?
22:18:49brixencyndis: we shouldn't in the core specs
22:18:57brixencyndis: if you need a helper, we'll add that to rubyspec
22:19:04cyndisok
22:19:12brixenbut I try to keep the deps in core specs not using any stdlib stuff
22:19:30brixenthere are some places that this rule is currently broken, but those need to be fixed
22:19:49cyndisi'm needing File.expand_path's spec to use Etc.getpwnam to get the home directory of probably root and check if expand_path gives the same result
22:20:14brixenhrm
22:20:20brixenyou mean, when running as root?
22:20:39cyndisno, any user, but root is probably the safest thing to check
22:20:53cyndisI mean, File.expand_path("~root") must equal root's home dir
22:21:17cyndisor whatever other user, but root should exists pretty much everywhere
22:21:56brixenhmm
22:22:06brixenthis is a tough one
22:22:24brixenroot won't exist on windows, but we can use platform_is guard for that
22:22:31cyndisyes
22:22:41DefilerYou could just expand "." as well, right?
22:22:43brixennobody would be better than root, maybe
22:23:01brixenDefiler: not for the "~<username>" case
22:23:03cyndisDefiler: but the point is to check if expand_path supports the ~username thing
22:23:14brixenFile.expand_path("~root")
22:23:14DefilerAah, well. Heh
22:23:28brixenyeah, pretty crazy right Defiler :)
22:23:54DefilerThat seems reasonable then, because Win32 doesn't have that feature anyway :)
22:24:19DefilerThough if I were running the show, ~SomeUser on windows would expand to whatever their %USERPROFILE% variable would have given
22:24:21brixencyndis: perhaps we have to make a helper in mspec that implements the ability to get this info
22:24:42cyndisyes, i guess so
22:26:47brixencyndis: I'm open to using etc.rb in the helper I guess
22:27:03brixencyndis: that way a beginning impl could potentially provide a different helper
22:27:20cyndistrue
22:27:25brixenand the specs would be written in terms of the helper, hence agnostic about how the info is being acquired
22:27:56brixenif you check out the spec/custom dir, you can see how this works pretty well
22:28:10brixenie extending mspec facilities in a farely systematic way
22:28:37brixenso, why don't you take a crack at writing the helper and just use etc.rb for a first cut
22:28:53cyndisi'll do that
22:28:57brixensweet
22:30:26cyndisshould i make the patch first for rubinius's in-tree mspec for directly for rubyspec/mspec?
22:30:52cyndiss/for/or/
22:32:26evancyndis: there is an easy test
22:32:38brixenum, either is fine
22:32:45cyndisok :)
22:32:47evanFile.expand_path("~#{ENV['USER']}").should == ENV['HOME']
22:33:13cyndisbut then an implementation could cheat and only support the username it's running as :p
22:33:16evanthat works without anything else.
22:33:29cyndisor is that good enough?
22:33:33evancyndis: don't get crazy with exhaustive tests
22:33:35evanyes, thats good enoug.h
22:33:37brixencyndis: true, but it's unlikely that would be the case
22:33:43cyndisok :)
22:33:56brixencyndis: consider, they could cheat with any literal user you put in there
22:34:00brixenlike root :)
22:34:07cyndisheh, true :p
22:35:03evansimilarly they could hardcode all methods to pass all specs.
22:44:00ddubI think next year I'll buy extra RC tickets and ebay them
22:47:47rueMy Ruby implementation passes all specs* and runs on average 2-3x faster than 1.9*
22:48:00DefilerJust not at the same time
22:49:00ruecyndis: I knew there was another one of us in here...
22:49:43cyndisof course.
22:49:56rueShould totally create a new user just for this purpose
22:59:08ddubhardcoding methods for benchmark performance and to pass specs seems like a great idea
22:59:16ddublike hardcoding an implementation for any method named fib
23:05:37cyndisactually rbx does special-case the ~myusername case before my patch, so cannot make the specs fail without the patch :p
23:06:38cyndisbut now i'm off to sleep and continue tomorrow. -->