Show enters and exits. Hide enters and exits.
| 00:02:30 | lypanov | night * |
| 00:02:32 | lypanov leaves the room. | |
| 00:02:33 | wycats | nite! |
| 00:02:36 | wycats | agardiner: yep |
| 00:02:45 | jp_tix | hi, I'm trying to build rubinius on freebsd - ´rake build´ gives me some errors from the oniguruma makefile (something about "missing separator") |
| 00:02:49 | jp_tix | any ideas? |
| 00:07:58 | agardiner | wycats: it seems like you might also want to know the default value for optional args |
| 00:08:07 | wycats | yep |
| 00:08:08 | wycats | I do |
| 00:08:16 | wycats | but I don't know exactly how to simply pull that off |
| 00:09:44 | agardiner | huh... that's strange compiler/local.rb:141 takes an arg indicating if a method arg is default, but doesn't record that anywhere |
| 00:10:02 | wycats | it doesn't provide the actual defaults |
| 00:10:05 | wycats | defaults are CRAZY |
| 00:10:16 | wycats | I guess I would be ok with storing the default parsetree |
| 00:10:40 | KirinDave enters the room. | |
| 00:10:47 | wycats | Argument nodes have the default nodes inside |
| 00:11:00 | agardiner | well... defaults, however crazy, must be being stored in the literals tuple, no? |
| 00:11:32 | wycats | they don't need to be literal |
| 00:12:23 | wycats | and no |
| 00:12:25 | wycats | they're not in there |
| 00:12:26 | agardiner | and its not in the literals... |
| 00:12:26 | wycats | 0 elements |
| 00:12:47 | wycats | the defaults get converted to bytecode |
| 00:12:48 | agardiner | yeah - thought that's where it would go, but i was wrong |
| 00:12:52 | wycats | I want to get the Array parsetree |
| 00:13:36 | agardiner | hmmmm |
| 00:14:11 | agardiner | does that help you? you need to resolve it to something in ruby ultimately... |
| 00:15:09 | wycats | I could probably use the compiler to resolve it |
| 00:15:22 | wycats | it would be nice to have a sexp.to_ruby |
| 00:15:56 | agardiner | yeah, it would! but this seems like redoing something the compiler has already done |
| 00:16:33 | cored enters the room. | |
| 00:18:15 | agardiner | i guess the whole side-effects thing makes asking for the default value problematic |
| 00:18:44 | agardiner | what is you use case for this in merb? |
| 00:19:18 | wycats | def foo(bar, baz = "1", baz = "2") and /foo?bar=hello&baz=goodbye |
| 00:19:32 | wycats | should call foo("hello", "1", "goodbye") |
| 00:20:35 | agardiner | did you mean to have baz in the def twice? |
| 00:20:44 | rightondev leaves the room. | |
| 00:21:31 | wycats | no |
| 00:21:33 | wycats | I meant bar |
| 00:21:39 | wycats | bar, baz, bat |
| 00:22:11 | agardiner | hehe, yeah... i was having a wtf moment there! :-P |
| 00:22:17 | wycats | ;) |
| 00:22:21 | wycats | w.t.f. mate |
| 00:22:44 | rightondev enters the room. | |
| 00:23:47 | agardiner | so really, you want to allow a default to be used in between specified param values... what keyword args would give you? |
| 00:25:21 | wycats | ? |
| 00:26:34 | agardiner | is this what merb uses parsetree for? generates a method call with all args, replacing defaults with any specified values, and using the defaults where no value is specified? |
| 00:27:42 | agardiner | so in your example, you are generating the call foo("hello", "1", "goodbye") from the method def and the supplied args? |
| 00:31:31 | gnufied enters the room. | |
| 00:32:51 | wmoxam leaves the room. | |
| 00:35:42 | wycats | precisely |
| 00:35:56 | agardiner | well, that is pretty cool! |
| 00:36:00 | bugfux enters the room. | |
| 00:36:14 | agardiner | and now i understand your problem! :-) |
| 00:37:00 | wycats | ;) |
| 00:37:14 | agardiner | you know, the bytecode is all there to do what you want... |
| 00:37:18 | wycats | I'm kinda ok with just having args and no defaults, but the defaults would be a bonus :) |
| 00:37:28 | wycats | agardiner: If I want to interpret arbitrary bytecode, yeah |
| 00:37:31 | wycats | and hope it doesn't change |
| 00:38:12 | wycats | I guess I could look for push_literals in order |
| 00:38:25 | benburkert leaves the room. | |
| 00:39:59 | agardiner | nah, that won't work |
| 00:40:22 | agardiner | literals like 0, 1, 2, true. false, nil are not stored in the literals tuple |
| 00:40:50 | benburkert enters the room. | |
| 00:40:53 | wycats | but you can look at the opcodes |
| 00:41:01 | wycats | oic |
| 00:41:52 | wycats | they get set_local_from_fp |
| 00:42:00 | dewd leaves the room. | |
| 00:42:25 | wycats | so you can look for the set_local instruction |
| 00:42:39 | agardiner | my point before was that almost everything you need is in the method already - you just need a way to call the method that doesn't use normal call semantics, and a slight tweak to passed_arg |
| 00:42:55 | agardiner | maybe using Undefined... |
| 00:43:23 | agardiner | course, it would probably break stuff |
| 00:43:30 | wycats | probably |
| 00:43:38 | wycats | I'd rather store the info we already have into the cm |
| 00:43:57 | wycats | maybe it could be a compiler options |
| 00:44:02 | wycats | :metadata => true |
| 00:45:12 | agardiner | well, if you wanted to go down that path, you could even write your own generator and plugin to the compiler that way |
| 00:45:23 | agardiner | then you'd have access to anything/everything |
| 00:46:05 | wycats | which is what Evan suggested ;) |
| 00:46:09 | wycats | are you now seeing it? |
| 00:46:23 | agardiner | ahh... yeah, kinda |
| 00:46:39 | agardiner | i guess i've not yet convinced myself there isn't another path |
| 00:46:42 | wycats | do you now agree with him? |
| 00:46:44 | wycats | ah |
| 00:47:54 | pietia leaves the room. | |
| 00:48:16 | kofno enters the room. | |
| 00:49:18 | agardiner | so, let me understand where you were going with looking for the set_local instructions... |
| 00:49:28 | agardiner | how would this help? |
| 00:49:37 | wycats | set_local_from_fp |
| 00:49:45 | KirinDave leaves the room. | |
| 00:49:46 | defunkt enters the room. | |
| 00:49:47 | wycats | the op looks like :baz, slot# |
| 00:50:24 | pietia enters the room. | |
| 00:50:52 | wycats | so you know the arg |
| 00:51:09 | wycats | from .args, or by looking at set_local_from_fp |
| 00:51:30 | agardiner | without the code preceding it, you don't know what the default value would be though... |
| 00:51:41 | wycats | you have to find the pushes as well |
| 00:52:14 | agardiner | but the joy of default args means this could be arbitrarily complex... |
| 00:52:18 | wycats | correct |
| 00:52:23 | wycats | which was my initial statement |
| 00:52:29 | wycats | if you restrict to literals, you'll be somewhat ok |
| 00:52:33 | wycats | you look for the list of pushes |
| 00:52:36 | wycats | and then match up the slots |
| 00:53:17 | agardiner | sure, if you restrict what you'll allow for the default, the problem is reduced |
| 00:54:06 | agardiner | but this simpler case could also probably be handled in simpler ways |
| 00:54:10 | wycats | yep |
| 00:54:43 | agardiner | at the end of the day, you want to dynamically generate ruby code though, right? |
| 00:54:54 | wycats | yep |
| 00:54:57 | wycats | not ruby code |
| 00:55:00 | wycats | as much as ruby objects |
| 00:55:18 | antares_ leaves the room. | |
| 00:57:23 | agardiner | ruby objects? are you generating the method calls, or defining new methods on the receiver? |
| 00:58:27 | wycats | I'm making method calls |
| 00:58:38 | wycats | .send(:meth, ...) |
| 00:58:54 | agardiner | yeah, that's what i thought... |
| 01:05:43 | wycats | ;) |
| 01:06:56 | agardiner | its frustrating isn't it? the info you need is in the literals tuple (except for the handful of special cases), but it isn't necessarily a single literal... |
| 01:07:33 | binary42_ enters the room. | |
| 01:07:44 | pietia leaves the room. | |
| 01:10:03 | agardiner | e.g. def foo(bar, baz = Foo.bat, bat = Proc.new { puts "hehe" }) |
| 01:10:51 | agardiner | everything you need to call the method with args that match the defaults is there, but you have to decode it to work out what to send... |
| 01:15:35 | agardiner | which seems like a path to insanity |
| 01:15:56 | cored leaves the room. | |
| 01:16:58 | agardiner | you know, you may be able to convince evan to keep the sexp around on a CM... |
| 01:18:00 | probablycorey enters the room. | |
| 01:19:46 | agardiner | otherwise, i'm coming to the conclusion that you will either need to parse the source or write your own generator |
| 01:22:00 | agardiner | trying to piece this back together after it has been compiled is like trying to put humpty dumpty back together... :-( |
| 01:22:20 | binary42 leaves the room. | |
| 01:25:07 | KirinDave enters the room. | |
| 01:26:18 | Fishy5 enters the room. | |
| 01:33:56 | menator enters the room. | |
| 01:34:36 | wmoxam enters the room. | |
| 01:35:58 | KirinDave leaves the room. | |
| 01:37:03 | vatic42_ enters the room. | |
| 01:37:26 | macournoyer enters the room. | |
| 01:49:02 | binary42_ leaves the room. | |
| 01:50:18 | wycats | agardiner: yep |
| 01:50:23 | vatic42 leaves the room. | |
| 01:50:26 | wycats | I think I need the sexp to stick around |
| 01:50:33 | wycats | it's not like it's a massive amount of stuff |
| 01:50:49 | wycats | like I said, maybe it needs to be an option |
| 01:50:56 | KirinDave enters the room. | |
| 01:57:53 | geekounet enters the room. | |
| 02:10:25 | KirinDave leaves the room. | |
| 02:14:53 | Fishy5 leaves the room. | |
| 02:17:40 | rue | OMG, the Pope is back :D |
| 02:19:23 | brixen | heh |
| 02:19:27 | brixen | not just any pope |
| 02:20:01 | rue | We should get a copy |
| 02:20:15 | rue | "Rubinius is the future of Ruby" -- Pope Benedictus |
| 02:20:48 | rue | brixen: Oh, I totally forgot to follow up on the Radiant stuff |
| 02:21:06 | brixen | rue: that's ok, much to do |
| 02:21:23 | rue | I could not get the Archive feature to work for the life of me so I hacked the solution you probably saw |
| 02:21:56 | brixen | what part wasn't working? |
| 02:22:22 | rue | Plus the layout to just show child pages.. it all started when I was trying to add the compiler intro to Docs |
| 02:22:58 | rue | brixen: Setting it on News does not create the "bloggy" style page at least here on FF 2 |
| 02:23:14 | brixen | ahh, hmm |
| 02:23:35 | brixen | well, thanks for adding the other content |
| 02:23:54 | rue | So I wrote those snippets and fought with the frigging CSS for entirely too long |
| 02:24:46 | VVSiz_ enters the room. | |
| 02:25:28 | brixen | yeah, the CSS can be a bitch |
| 02:25:39 | brixen | I'm sure we can hand that off to ey |
| 02:25:52 | brixen | I just wanted to get something up, and I'd like to consolidate all docs on rubini.us |
| 02:25:57 | brixen | very polished and professional |
| 02:26:00 | rue | Definitely |
| 02:26:10 | rue | That is mainly why I added the childlist layout |
| 02:26:38 | brixen | cool |
| 02:26:50 | rue | It would be nice if we can borrow someone from there to spend a bit of time on it |
| 02:27:18 | brixen | yep, definitely |
| 02:27:31 | rue | I would be happy to do maintenance etc. but could definitely use someone who can use Photoshop etc. to get a nice graphics layer set up |
| 02:27:44 | brixen | agreed |
| 02:27:54 | brixen | I want to be able to tweak content, but we need the design polished |
| 02:28:07 | brixen | I am partial to the header :) |
| 02:28:44 | brixen | and I definitely want the page area to stand out, unlike the old, all-black site |
| 02:28:52 | rue | Yeah |
| 02:28:53 | rubyconsumer leaves the room. | |
| 02:28:55 | brixen | but the rest was literally 2 hrs of work |
| 02:29:05 | brixen | (and it shows :P) |
| 02:29:23 | menator leaves the room. | |
| 02:29:25 | rubyconsumer enters the room. | |
| 02:29:28 | rue | I do like the logo but I think a smaller one would be nice (or maybe make it vertical or something) |
| 02:29:39 | rue | It takes 1/3 of the page at a normal resolution |
| 02:29:46 | brixen | yep, we can definitely shrink that |
| 02:29:48 | rue | Well, that + navigation |
| 02:30:04 | brixen | I didn't do it because it's so crisp and I don't have the original psd file |
| 02:30:08 | rue | And I keep kinda thinking about the BMX bike :D |
| 02:30:13 | rue | Sure |
| 02:30:16 | brixen | I only have a png |
| 02:30:28 | brixen | heh, bmx racing stripes ftw! |
| 02:30:42 | VVSiz leaves the room. | |
| 02:30:44 | brixen | we could put those speed marks on the logo |
| 02:30:47 | rue | Although in all seriousness, I am a big proponent of "looks good in black and white on stationery" style logos |
| 02:30:53 | brixen | like the r is reving up and taking off |
| 02:30:59 | rue | Hehe |
| 02:31:10 | brixen | right, well, that logo can be inverted nicely for stationary |
| 02:32:04 | rue | I think my current favourite logo on the web is.. dammit, what is the company name? 9 something |
| 02:32:25 | brixen | so, I've got a working FFI File::Stat to replace the primitive that passes on OS X |
| 02:32:26 | rue | With the inlaid leaf logo in green-red-yellow |
| 02:32:30 | brixen | I wonder if I should commit it |
| 02:32:40 | rue | Hehe, feeling a bit gun-shy? |
| 02:32:42 | brixen | hmm, dunno if I've seen it |
| 02:32:55 | brixen | well, linux is broken and I don't want to be in hot water for that |
| 02:33:01 | rue | I will see if I can find it.. the 9 whatever I see on Rails sites |
| 02:33:07 | brixen | yesterday it was, revert it if it breaks other platforms |
| 02:33:15 | brixen | today it is, fix it if it breaks |
| 02:33:16 | brixen | :/ |
| 02:33:27 | rue | Yeah, I think it might be safest to wait until evan is back in LA |
| 02:33:29 | rue | And fed :P |
| 02:33:32 | brixen | ahh |
| 02:33:35 | brixen | heh |
| 02:33:41 | brixen | the food factor |
| 02:37:23 | rue | http://journal.kittensoft.org/ I like the new theme, lucid finally works OK on Mephisto |
| 02:37:56 | brixen | yeah, looks good |
| 02:41:41 | rue | Ugh, now I will spend hours trying to remember what that 9 something is really called |
| 02:42:55 | rubymaverick enters the room. | |
| 02:44:10 | geekounet leaves the room. | |
| 02:44:40 | brixen | hmm, well this mostly works on linux |
| 02:44:47 | brixen | problem it, can't find 'stat' to attach |
| 02:45:12 | brixen | which makes no sense because the primitive calls that function, so it must be linked in |
| 02:45:37 | brixen | and we attach to a bunch of other functions |
| 02:45:38 | brixen | arg |
| 02:48:51 | rue | stat could be a macro |
| 02:48:54 | wmoxam leaves the room. | |
| 02:49:05 | rue | But it should be pretty POSIX |
| 02:49:09 | brixen | hmm, good point |
| 02:49:23 | brixen | that could be a problem |
| 02:49:36 | brixen | but perhaps there's a flag to use the function version, right? |
| 02:49:54 | rue | Well, all libc implementations should have their exported stuff listed somewhere |
| 02:49:58 | _mutle enters the room. | |
| 02:51:34 | rue | Huh, why can I not delete a bookmark folder |
| 02:55:23 | bugfux leaves the room. | |
| 02:55:43 | mutle leaves the room. | |
| 02:55:55 | brixen | rue: you are indeed, right |
| 02:56:02 | brixen | it's basically a macro |
| 02:56:18 | brixen | it would be a function if we had LFS enabled |
| 02:57:32 | agardiner | wycats: you still around? |
| 02:59:28 | rubymaverick leaves the room. | |
| 03:00:40 | brixen | rue: I can see this being a general problem, perhaps we need a function stub generator for FFI similar to const/struct generators |
| 03:00:43 | brixen | rue: what do you think? |
| 03:03:26 | rue | That would kind of defeat the purpose |
| 03:04:00 | brixen | heh, suppose so |
| 03:04:08 | rue | I have to research to see what dlopen etc. say about macroed definitions.. but this would be a prime case for the hierarchical Platform setup |
| 03:04:23 | brixen | yep, definitely |
| 03:04:59 | rue | We implement POSIX and if someone reports a problem, easy to fine-tune |
| 03:05:19 | rue | I wonder if architectures could be implemented via modules |
| 03:06:12 | brixen | and mixed in? |
| 03:06:14 | brixen | that would be slick |
| 03:06:24 | brixen | so, did you check out this ffi link from lypanov? |
| 03:06:30 | brixen | it's pretty interesting so far |
| 03:06:47 | rue | I think it might get too fancy. Initially I was thinking just Platform->Generic->Specific->Hardware |
| 03:06:53 | bugfux enters the room. | |
| 03:07:11 | rue | Nah, have not read it yet but did bookmark |
| 03:07:14 | rue | It looked nice |
| 03:07:19 | bugfux leaves the room. | |
| 03:08:07 | brixen | I'm going to some guy's talk on haskell's ffi on monday |
| 03:08:11 | brixen | I better read up |
| 03:08:17 | rue | Cool |
| 03:08:26 | bugfux enters the room. | |
| 03:08:56 | brixen | yeah, I've neglected this local resource, there's at least one prof at oregon graduate institute on the haskell design board |
| 03:09:07 | brixen | and there's a local functional lang group |
| 03:09:46 | brixen | or there was a prof, I haven't looked in a couple years |
| 03:28:02 | maxpenguin leaves the room. | |
| 03:29:32 | cremes_ leaves the room. | |
| 03:35:17 | jtoy enters the room. | |
| 03:47:02 | krisps enters the room. | |
| 03:49:33 | dewd enters the room. | |
| 03:49:39 | menator enters the room. | |
| 03:53:30 | KirinDave enters the room. | |
| 03:53:36 | boyscout | 1 commit by Wilson Bilkovich |
| 03:53:37 | boyscout | * Failing spec for 'super' behavior; 5be84fc |
| 03:57:58 | lopex leaves the room. | |
| 03:59:07 | rubuildius | Wilson Bilkovich: 5be84fce2; build failed! http://rafb.net/p/MjpoId35.html |
| 03:59:52 | Defiler | Was the build already failing? Because it runs fine here |
| 04:01:04 | boyscout | 2 commits by Wilson Bilkovich |
| 04:01:05 | boyscout | * Rubinius now passes all 'super' specs; 6b2f05a |
| 04:01:06 | boyscout | * Correct behavior of Module#set_visibility; 1d8f826 |
| 04:01:59 | Defiler | green bar baby |
| 04:02:38 | benburkert enters the room. | |
| 04:03:07 | KirinDave leaves the room. | |
| 04:03:37 | bugfux leaves the room. | |
| 04:05:00 | _ADS leaves the room. | |
| 04:09:22 | rubuildius | Wilson Bilkovich: 6b2f05af4; build failed! http://rafb.net/p/ysD04g40.html |
| 04:09:32 | rue | Defiler: Not so green bar :P |
| 04:09:54 | Defiler | Yeah, well, it was already failing on Linux :) |
| 04:12:12 | agardiner | wycats: i think i have a solution for ya, re default args |
| 04:12:27 | Defiler | Cool. Down to one (real) failure in the rake test suite |
| 04:12:39 | brixen | very cool |
| 04:13:31 | rue | Defiler: Excuses ;) |
| 04:14:43 | Defiler | rue: You will notice that I totally separated the spec, exclude, and implementation commits this time, you picky bastard :) |
| 04:16:11 | rue | Hehe, I appreciate that |
| 04:18:06 | Defiler | Oh man singleton.rb is terrible |
| 04:20:28 | Defiler | Also, it totally doesn't work on Rubinius |
| 04:20:53 | rue | Yes, Singleton, Delegator and Forwardable all pretty much suck goat testes |
| 04:21:02 | brixen | Defiler: did you see that class Mu < nil; end; Mu.instance_methods => [] no longer works |
| 04:21:05 | Defiler | I will take a look at it tomorrow, though. Time for THe Wire |
| 04:21:12 | Defiler | brixen: You mentioned that, yeah |
| 04:21:14 | brixen | oh, heh |
| 04:21:17 | brixen | you like the wire? |
| 04:21:23 | brixen | someone just highly recommended it |
| 04:21:23 | Defiler | It is easily the best show on TV |
| 04:21:26 | brixen | awesome |
| 04:21:32 | brixen | we just finished 6 feet under |
| 04:21:38 | brixen | that's the best I've ever seen :) |
| 04:21:48 | brixen | I'll have to watch it |
| 04:21:52 | Defiler | Square that and you have the quality 'factor' of The Wire |
| 04:21:58 | brixen | nice heh |
| 04:22:06 | krisps leaves the room. | |
| 04:22:44 | Defiler | brixen: When you have a chance, take a look at the 'MS4' spec I added to super_spec. Awesome bug. |
| 04:22:57 | Defiler | super was calling the method that called super :) |
| 04:24:31 | brixen | heh, ok |
| 04:24:50 | Defiler | Oh.. another thing that I have been meaning to mention to you |
| 04:25:03 | Defiler | platform_is :darwin, :version => '1.8.5' |
| 04:25:15 | Defiler | People seem to think that that says 'platform is darwin running version 1.8.5' |
| 04:25:27 | rue | Defiler: Those will all be fixed up :) |
| 04:25:29 | Defiler | So we should consider making it work that way |
| 04:25:39 | rue | Once the slacker gets his changes in ;) |
| 04:25:50 | Defiler | OK. Just wanted to make sure it was on the list |
| 04:26:17 | rue | brixen: You know, I think there is a huge market for my little app right here on this channel |
| 04:26:46 | Defiler | It is AMAZING coming home to my real computer after a few days using my laptop |
| 04:29:41 | rue | Heh, what kind of setup do you have there? |
| 04:30:23 | Defiler | 8GB Mac Pro with a solid state disk |
| 04:31:53 | brixen | rue: indeed |
| 04:32:07 | Defiler | Man, rake has some terrible code in it |
| 04:32:15 | brixen | Defiler: you and your 10 sec build on your ssd :P |
| 04:32:21 | brixen | is jealous |
| 04:34:41 | Defiler | Jim doesn't accept rake patches, right? |
| 04:34:51 | Defiler | I know I have never gotten a reply to any of the ones I have sent |
| 04:36:36 | rue | I would assume he does, Jim is pretty good about that.. are you putting them on the tracker? |
| 04:37:47 | Defiler | There is no tracker |
| 04:38:03 | Defiler | http://rubyforge.org/projects/rake |
| 04:39:38 | d2dchat enters the room. | |
| 04:41:11 | Defiler | I am getting pretty tempted to implement a rake alternative that runs regular Rakefiles without modification |
| 04:41:45 | d2dchat leaves the room. | |
| 04:41:59 | Defiler | I suspect I can do it in 10% of the code |
| 04:42:06 | d2dchat enters the room. | |
| 04:42:14 | rue | Probably |
| 04:42:20 | Defiler | EarlyTime is insane |
| 04:42:21 | d2dchat leaves the room. | |
| 04:42:43 | Defiler | Here's another way to implement a Time object that is earlier than all other Time objects |
| 04:42:46 | Defiler | Time.at(0) |
| 04:43:09 | agardiner | hehe |
| 04:43:34 | brixen | we really need some sort of autoconf I think |
| 04:43:45 | Defiler | (yeah, I know negative offsets exists, but not every platform supports them, so they never happen in the wild) |
| 04:44:15 | brixen | e.g. on ubuntu gutsy, major() is defined in sys/sysmacros.h and that is wrapped in ifdef __USE_BSD in sys/types.h |
| 04:44:26 | Defiler | Even if I absolutely needed a custom Time class that was always 'early', I feel like I could probably do it without Thread.critical |
| 04:44:27 | agardiner | Defiler: doesn't EarlyTime return -1 when compared with another EarlyTime instance, or something? |
| 04:44:28 | macournoyer leaves the room. | |
| 04:44:41 | Defiler | agardiner: Yeah, but it doesn't seem to rely on that behavior |
| 04:46:06 | agardiner | geez...that probably means i didn't need to jump through half the hoops i did when i implemented a DatabaseTask subclass for a project a while back... :-P |
| 04:46:11 | boyscout | 2 commits by Brian Ford |
| 04:46:12 | boyscout | * Reworked File::Stat to use FFI instead of a primitive.; 19a26d0 |
| 04:46:13 | boyscout | * Additional specs for File::Stat#rdev, #rdev_major, #rdev_minor.; 54c4a4c |
| 04:47:02 | brixen | rue: have you looked at the failures on linux by chance? |
| 04:47:24 | brixen | that commit works on linux, fwiw |
| 04:51:17 | rue | Nope |
| 04:53:54 | Defiler | Ooh, new version of git is super cool |
| 04:54:07 | Defiler | Receiving objects: 100% (2407/2407), 393.01 KiB | 148 KiB/s, done. |
| 04:54:13 | rubuildius | Brian Ford: 19a26d040; build failed! http://rafb.net/p/JgTlag20.html |
| 04:54:17 | Defiler | tells you how fast it is downloading the clone, etc |
| 04:57:15 | wycats | agardiner: speak, and I shall soak in your knowledge |
| 04:57:17 | wycats | Hey Defiler |
| 04:57:29 | Defiler | Yo |
| 04:57:45 | agardiner | ok, i was thinking more about the possibility of changing the behaviour of passed_arg ever so slightly |
| 04:57:48 | Defiler | wycats: I thought of an even simpler way to implement the gems feature we were talking about (re: json) |
| 04:57:50 | wycats | so Jamis tried to use Ruby/DL, and it fatal flaw is lack of 64-bit support |
| 04:57:55 | Defiler | wycats: I will sleep on it and give it a shot tomorrow |
| 04:57:57 | wycats | Defiler: tell me |
| 04:58:19 | Defiler | wycats: Basically.. you as the gem author know which other gems are compatible |
| 04:58:33 | wycats | me as the dependedee, yes |
| 04:58:34 | agardiner | so that it checks if an optional arg was passed the value Qundef, and if so, it treats the arg as not passed |
| 04:58:43 | rue | Man, Markdown is so much nicer than Textile |
| 04:58:44 | Defiler | wycats: So, if we just let the 'depends on' list contain arrays as well as gem names.. |
| 04:58:51 | wycats | oooh |
| 04:58:52 | wycats | yes |
| 04:58:56 | wycats | that would work perfecto-lee |
| 04:58:57 | Defiler | wycats: e.g. = "foo", ["json", "json-pure"] |
| 04:59:02 | wycats | yeah |
| 04:59:04 | wycats | that works great |
| 04:59:10 | Defiler | I can make rubygems realize that that means there is a choice/branch |
| 04:59:13 | wycats | you don't need system-wide virtual gems |
| 04:59:15 | wycats | just locally |
| 04:59:31 | wifelette_afk enters the room. | |
| 04:59:34 | wycats | also, I added support for CompiledMethod#args, but I gotta ask Evan if he's cool wit' it |
| 04:59:47 | Defiler | The only drawback is that people with older clients will have trouble installing your updated gem when you use that feature |
| 04:59:57 | wycats | yeah... fuck them :P |
| 05:00:00 | Defiler | :) |
| 05:00:09 | wycats | I'll add a s.requirement that says to update your Rubygems |
| 05:00:22 | wycats | were you heading to bed or do you have a sec? |
| 05:00:34 | Defiler | I have a sec.. but I am otherwise planning to watch some TV |
| 05:00:38 | wycats | ah |
| 05:00:38 | wycats | http://pastie.caboo.se/150222 |
| 05:00:44 | wycats | that's my #args impl |
| 05:00:47 | wycats | it's really stupid simple |
| 05:01:08 | wycats | I just wanted ppl to look at it before I showed it to evan, to forestall me being horrifically bad and getting the beat down |
| 05:01:16 | wycats | it's like 10-15 diff lines |
| 05:01:29 | rue | Heh, it takes a while to generate this page: http://rubini.us/dokumentation/introduction-to-the-compiler/ |
| 05:01:48 | rue | brixen: Incidentally, why is it doKumentation? Does the correct spelling break something? |
| 05:01:52 | Defiler | wycats: What does this accomplish? |
| 05:02:02 | wycats | it gives you .args on CompiledMethod |
| 05:02:13 | wycats | which returns an array of required, optional, and splat |
| 05:03:08 | Defiler | I believe you still need to add this field to the 'hints' file as well, but otherwise it looks right |
| 05:03:21 | Defiler | [required, optional, @arguments.splat && @arguments.splat.name] |
| 05:03:27 | wifelette_afk leaves the room. | |
| 05:03:31 | wycats | I didn't add it to hints because I didn't add it to the list of indexed ivars |
| 05:03:39 | Defiler | is a cool trick with &&. Heh |
| 05:03:42 | boyscout | 1 commit by Eero Saynatkari |
| 05:03:43 | boyscout | * Converted compiler intro to Markdown syntax.; ef463a8 |
| 05:03:50 | wycats | Defiler: no sarcasm, right :P |
| 05:04:00 | Defiler | No sarcasm |
| 05:04:06 | wycats | http://pastie.caboo.se/150224 |
| 05:04:20 | Defiler | You need to make this into a real field, unless I am confused about how the whole thing works |
| 05:04:30 | Defiler | Otherwise it won't stick around after it is compiled out to disk |
| 05:04:38 | wycats | got it |
| 05:04:44 | brixen | rue: yeah, evan's got a rewrite rule on doc* I think |
| 05:04:49 | Defiler | Also, that funny-semicolon-oneliner thing at the top is meant for indexed ivars only, hence the 'intimidating' formatting |
| 05:04:53 | brixen | rue: it never gets to the app |
| 05:04:54 | wycats | I was under the impression that indexed ivars were an optimization |
| 05:05:14 | Defiler | They are.. but that doesn't mean that the thing they are optimizing for isn't important |
| 05:05:25 | Defiler | They are a cooler replacement for 'put' and 'at' |
| 05:05:31 | defunkt enters the room. | |
| 05:05:35 | wycats | It's still an ivar, unless using indexed ivars preclude using regular ones |
| 05:05:41 | wycats | precludes* |
| 05:05:54 | wycats | hey defunkt |
| 05:05:58 | agardiner | evan has also said he doesn't want fields accessed using put/at any more, i think |
| 05:06:02 | Defiler | Right |
| 05:06:06 | defunkt | yo wycats |
| 05:06:24 | Defiler | wycats: indexed ivars become fields, rather than regular ivars |
| 05:06:32 | wycats | right |
| 05:06:35 | wycats | so it'll work |
| 05:06:37 | Defiler | wycats: ..but this should be a field in case we need to access it from C, etc, at least in my opinion |
| 05:06:39 | wycats | because I'm using a regular ivar |
| 05:06:41 | wycats | sure |
| 05:06:42 | wycats | got it |
| 05:07:06 | wycats | last time I discussed it with evan, he was dubious about the entire prospect, but I think that's because Iw as being dense about the implementation |
| 05:07:10 | wycats | (i.e. asking too many questions) |
| 05:07:11 | Defiler | If you leave it as a regular ivar, move the accessor for it away from the field accessors, at least |
| 05:07:15 | Defiler | Otherwise, confusetastic |
| 05:07:22 | agardiner | oh yeah |
| 05:07:31 | agardiner | i thought it was a field! :-) |
| 05:07:34 | wmoxam enters the room. | |
| 05:07:38 | brixen | me too |
| 05:07:42 | wycats | I'm adding it as a field |
| 05:07:43 | wycats | :P |
| 05:07:57 | brixen | wycats: confusing fields with ivars == boom |
| 05:08:04 | wycats | nah... it's exploding |
| 05:08:12 | wycats | because somewhere the # of fields is set as 18 |
| 05:08:20 | wycats | "Attempted to access field 18 in an object with 18 fields" |
| 05:08:20 | Defiler | You have to update the system hints file |
| 05:08:23 | wycats | did |
| 05:08:26 | Defiler | and then rebuild the vm |
| 05:08:29 | KirinDave enters the room. | |
| 05:08:30 | wycats | got it |
| 05:08:34 | wycats | so a simple rake != adequte |
| 05:08:45 | wycats | rake rebuild? |
| 05:08:55 | Defiler | It should be, but it also wouldn't surprise me if nobody had made it smart enough |
| 05:09:00 | brixen | well, there should be a dep on hints if there isn't one |
| 05:09:08 | wycats | it def. didn't work :P |
| 05:09:12 | wycats | so I'm doing rake rebuild |
| 05:09:12 | Defiler | rake clean:shotgun build:shotgun should do it |
| 05:09:18 | Defiler | ..but rebuild is fine too |
| 05:09:21 | wycats | too late ;) |
| 05:09:22 | wycats | k |
| 05:09:23 | rubuildius | Eero Saynatkari: ef463a83d; build failed! http://rafb.net/p/LAWehZ65.html |
| 05:09:34 | Defiler | So, the other comment I have is this.. |
| 05:09:34 | brixen | wycats: see if you can add a dep to build shotgun if hints changes |
| 05:09:50 | wycats | in rake? |
| 05:09:56 | wycats | Rakefile? |
| 05:10:02 | Defiler | We are going to need to think of a way to load up the AST at runtime, in order to be able to get the parse tree back for, say, a Proc |
| 05:10:12 | Defiler | ..and when we do that, this feature will be obsolete |
| 05:10:13 | wycats | Defiler: that would be killer |
| 05:10:22 | wycats | Defiler: see, our conversation at acts_as |
| 05:10:33 | wycats | I know that... we use the parse_tree in MatzRuby |
| 05:10:39 | Defiler | I talked to Evan about this today, and his suggestion was to store the AST in the .rbc file, but not load it until it was requested |
| 05:10:49 | agardiner | wycats: so, i think i have a way to avoid having to store the sexp or reverse engineer the bytecode to get the default argument handling the way you want it |
| 05:10:51 | Defiler | I know you know it. I am just talking to the IRC log here :) |
| 05:10:59 | wycats | :) |
| 05:11:04 | wycats | Defiler just suggested the solution |
| 05:11:17 | agardiner | its much simpler than that too! |
| 05:11:17 | wycats | do we have a mechanism for storing stuff in the RBC that lazily loads in |
| 05:11:25 | wycats | fine... tell me ;) |
| 05:11:45 | agardiner | so, say you've got a method def foo(bar=1, baz=2) |
| 05:11:56 | Defiler | We do not currently have such a mechanism (re: lazy loading) |
| 05:12:02 | Defiler | ..but it wouldn't be particularly hard |
| 05:12:02 | agardiner | and you want to call foo with a value for baz, but not bar |
| 05:12:09 | rue | wycats: The lazy loading part is fairly simple unless you need really fine granularity |
| 05:12:10 | Defiler | Then again, nothing is particularly hard compared to eval |
| 05:12:13 | KirinDave leaves the room. | |
| 05:12:31 | wycats | Defiler: yeah, but eval was a feature-complete requirement ;) |
| 05:12:38 | wycats | so it was legit to spend ungodly hours on it |
| 05:12:41 | Defiler | So is this, in my opinion |
| 05:12:47 | wycats | niiiiice |
| 05:12:49 | Defiler | (runtime parse tree from compiled objects) |
| 05:12:55 | wycats | it makes us compatible with 1.8.6 |
| 05:13:00 | wycats | for people who use parse_tree |
| 05:13:18 | wycats | otherwise there would be classes of 1.8.6 apps you could not run in rbx |
| 05:13:21 | wycats | despite subtend |
| 05:13:29 | Defiler | I think it is retarded to have a programming language that can redefine a method when it is called the first time.. |
| 05:13:35 | Defiler | ..but not be able to manipulate the AST :) |
| 05:13:53 | wycats | this feature would allow manip of the AST? |
| 05:14:05 | Defiler | Sure |
| 05:14:09 | wycats | so cm.ast = [...] would recompile it? |
| 05:14:19 | wycats | (psuedo) |
| 05:14:19 | Defiler | Sure |
| 05:14:25 | wycats | that would be really sick |
| 05:14:48 | Defiler | That would be really easy (once we had the AST) |
| 05:14:59 | Defiler | One more method on CM, one more method on Compiler |
| 05:15:02 | Defiler | bang done |
| 05:15:12 | wycats | :-D |
| 05:15:13 | wycats | yay |
| 05:15:33 | wycats | that would be worth blogging about ;) |
| 05:16:19 | Defiler | People don't want to hear about easy shit like lisp macros in Ruby |
| 05:16:20 | dewd leaves the room. | |
| 05:16:41 | agardiner | some people do :-P |
| 05:16:42 | wycats | sure they do |
| 05:17:02 | wycats | "You can do Lisp Macros in Ruby (in Rubinius)" |
| 05:17:08 | wycats | I guarantee you'd get a ton of hits |
| 05:17:29 | rue | Nah |
| 05:17:43 | Defiler | I guess you don't have the sarcasm font installed :) |
| 05:17:49 | rue | Should write an article about irony on IRC I think |
| 05:17:59 | Defiler | ..but yeah, would be a cool feature |
| 05:18:27 | KirinDave enters the room. | |
| 05:18:52 | thewoolleyman enters the room. | |
| 05:19:01 | mae leaves the room. | |
| 05:19:17 | wycats | damn |
| 05:19:26 | agardiner | wycats: so, can i tell you about my solution to your default arg problem now? |
| 05:19:29 | wycats | that's because you're writing it in vim |
| 05:19:30 | agardiner | :-) |
| 05:19:33 | wycats | agardiner: certainly |
| 05:19:46 | wycats | if you were in emacs, you could turn on the sarcasm minor mode :P |
| 05:20:13 | agardiner | i made a small change to passed_arg, so that if you pass Qundef in place of an arg, it returns false |
| 05:20:27 | agardiner | that way, you get the default arg value, even though you passed a value in that arg position |
| 05:20:45 | agardiner | this allows you to do foo(Undefined, 3) and get the default arg value for bar |
| 05:21:00 | RyanTM leaves the room. | |
| 05:21:06 | agardiner | (at least, it would if Undefined actually == Qundef) |
| 05:22:15 | wycats | weird |
| 05:22:16 | wycats | :P |
| 05:22:34 | Defiler | x86 gcc is surprisingly few lines of code |
| 05:22:37 | Defiler | I had no idea |
| 05:22:48 | wycats | how few? |
| 05:23:00 | rue | agardiner: I disagree with that unless I misunderstand |
| 05:23:12 | wycats | rue: me too |
| 05:23:16 | agardiner | why's that? |
| 05:23:17 | Defiler | about 17,000 lines of actual C code, like 24,000 'machine description' files that detail all the instructions |
| 05:23:20 | wycats | it doesn't sound like it solves the problem, even |
| 05:23:26 | wycats | Defiler: so it's smaller than Rails ;) |
| 05:23:27 | rue | Undefined should never be used by client code |
| 05:23:35 | wycats | rue: I disagree with that |
| 05:23:37 | rue | That is what happened to nil |
| 05:23:42 | wycats | people should be allowed to use Undefined |
| 05:23:45 | rue | No, never. |
| 05:23:48 | wycats | nil is different |
| 05:23:56 | wycats | nil is a regular value |
| 05:24:03 | wycats | Undefined would be used only in method descriptions |
| 05:24:22 | rue | A MethodDescription is not exactly client code |
| 05:24:26 | wycats | no |
| 05:24:29 | wycats | not a MD |
| 05:24:31 | wycats | def foo(bar) |
| 05:24:38 | wycats | it's not "what happened to nil" -- things natively return nil |
| 05:24:52 | rue | nil was meant to be what Undefined is now. |
| 05:25:02 | wycats | when? |
| 05:25:03 | wycats | 0.1? |
| 05:25:05 | rue | But people use it, which is why we now need Undefined. |
| 05:25:12 | wycats | not "people" |
| 05:25:13 | wycats | MatzRuby |
| 05:25:18 | wycats | he does return Qnil |
| 05:25:24 | rue | Yes |
| 05:25:25 | wycats | in C functions that bind to Ruby |
| 05:25:26 | wycats | ok |
| 05:25:34 | wycats | then your assertion is not really true ;) |
| 05:25:45 | rue | I do not understand how that is |
| 05:25:48 | menator leaves the room. | |
| 05:25:55 | rue | But Undefined should never appear in a method call |
| 05:25:58 | rue | Ever |
| 05:26:00 | wycats | the issue is not that people started using a pristine thing |
| 05:26:07 | wycats | the issue is that Matz started doing it |
| 05:26:18 | wycats | oh |
| 05:26:24 | wycats | you shouldn't do foo(Undefined) |
| 05:26:31 | wycats | but you should be able to do foo(x = Undefined) |
| 05:26:38 | wycats | def foo(x = Undefined) |
| 05:26:44 | rue | Yes |
| 05:26:49 | agardiner | and that is being done |
| 05:26:52 | wycats | fine |
| 05:26:53 | KirinDave leaves the room. | |
| 05:26:56 | wycats | we don't disagree then |
| 05:27:11 | wycats | Defiler: It's amazing how many things are smaller than Rails |
| 05:27:12 | wycats | :P |
| 05:27:18 | wycats | we should make a list |
| 05:27:19 | agardiner | the ability to call a method and indicate that no value is being passed for an arg is what is needed |
| 05:27:50 | rue | agardiner: The correct solution to that, in my opinion, is keyword arguments |
| 05:27:56 | wycats | I gotta grab dinner |
| 05:28:02 | wycats | rue: keyword arguments rock hard |
| 05:28:03 | agardiner | Agreed, but that is a much larger change |
| 05:28:12 | wycats | I'll be back soon |
| 05:28:18 | Defiler | wycats: haha.. like that 'things that happened while Duke Nukem Forever was in development' page |
| 05:28:22 | wycats | agardiner: pastie me an irb session doing what you want |
| 05:28:25 | wycats | lol |
| 05:28:35 | rue | I think "exposing" Undefined will lead to bad habits |
| 05:28:54 | agardiner | Its already exposed... unless you mean Qundef? |
| 05:29:15 | agardiner | cause the problem i have now is that Undefined = Object.new, not Qundef |
| 05:31:20 | pastie | wycats: http://pastie.org/150229 by agardiner. |
| 05:31:40 | agardiner | there's a hacky example of what i mean |
| 05:32:06 | agardiner | UndefClass.new1 is a primitive that returns Qundef |
| 05:35:32 | rue | I am really leery about this, need to mull it over. |
| 05:35:57 | brixen | we need real macros in ruby |
| 05:36:07 | agardiner | yes please! |
| 05:36:09 | rue | At the very least Undef must be a singleton. Make it Kernel.Undef |
| 05:36:13 | brixen | ruby2ruby is a huge hack and should never be used, despite that I've used it myself |
| 05:36:19 | Defiler | We need the awesome def foo(**keys) thing from RubyConf 2005 |
| 05:36:26 | brixen | we keep dancing around this broken part of ruby |
| 05:36:35 | brixen | and we need keywords, yes |
| 05:37:02 | brixen | if we have macros, we can quit being dependent on the particulars of the sexp, pt, whatever |
| 05:37:16 | brixen | and any code that uses ruby2ruby can be ported |
| 05:38:28 | Defiler | brixen: If you feel like staying up, you could make this code run on rbx: http://rafb.net/p/7Bcwhh77.html |
| 05:38:31 | brixen | rue: the new sendsite stuff gets a ton of activity :P |
| 05:38:48 | brixen | Defiler: :P |
| 05:39:02 | brixen | I'm trying to debug linx atm |
| 05:39:06 | brixen | er linux |
| 05:39:16 | Defiler | Fine, shirk your responsibilities |
| 05:39:21 | brixen | hah |
| 05:40:09 | Defiler | klass.private_class_method :new, :allocate |
| 05:40:11 | Defiler | oh god |
| 05:40:50 | Defiler | class Middle < Up |
| 05:41:01 | Defiler | loathing fills me like a black tidal wave |
| 05:44:46 | kofno leaves the room. | |
| 05:47:13 | Defiler | I guess I need to write specs for singleton. Ugh |
| 05:47:19 | Ingmar_ leaves the room. | |
| 05:48:00 | Defiler | Somebody apparently thought that this was a helpful set of test outputs |
| 05:48:01 | Defiler | http://rafb.net/p/U4wBJn58.html |
| 05:48:03 | Ingmar enters the room. | |
| 05:48:47 | drbrain | Defiler: run the weakref "tests" |
| 05:50:29 | Defiler | drbrain: Do you know who wrote singleton? It looks like it was added in 1999 as revision 520 of MRI |
| 05:50:35 | kwatch leaves the room. | |
| 05:50:42 | Defiler | ..but the comment is just '1.4.0' |
| 05:50:53 | Defiler | ..and given the style, I have trouble believing it was really matz |
| 05:51:34 | drbrain | I don't know |
| 05:51:36 | Defiler | Oh, actually.. maybe it is |
| 05:51:42 | Defiler | The revision 520 version is wildly different |
| 05:52:39 | brixen | you don't really realize what a "dynamic language" is until you trace dispatch in the vm |
| 05:52:57 | brixen | the new sendsite stuff get a *ton* of activity |
| 05:53:39 | Defiler | SendSite is totally awesome |
| 05:54:30 | drbrain | Defiler: at some point in time they added thread-safety to Singleton |
| 05:54:36 | drbrain | maybe between 1.6 and 1.8 |
| 05:54:41 | Defiler | 'thread' 'safety' |
| 05:54:52 | Defiler | 'added' |
| 05:55:17 | brixen | Defiler: loading loader.rbc, which is a small file, line 1130 of cpu_instructions.c gets hit over 11,000 times |
| 05:55:37 | drbrain | Defiler: all the Thread.critical stuff |
| 05:56:02 | Defiler | brixen: Nice |
| 05:56:25 | Defiler | drbrain: Yeah, I was just being mean and making fun of Thread.critical |
| 05:57:18 | brixen | Defiler: that's before it gets to like line 19 of the file :) |
| 06:05:21 | brixen | Defiler: what's the command to turn on excessive tracing? |
| 06:06:28 | Defiler | RBX="rbx.debug.trace=1" will do it |
| 06:06:36 | brixen | thanks |
| 06:06:38 | Defiler | ..but doing it from inside gdb can be more convenient |
| 06:06:41 | brixen | yep |
| 06:07:53 | brixen | m->s->excessive_tracing :) |
| 06:08:02 | brixen | I just need something to search for |
| 06:08:50 | TheVoice leaves the room. | |
| 06:09:49 | wycats leaves the room. | |
| 06:14:01 | wycats enters the room. | |
| 06:14:52 | wycats | damn... MBP didn't recover from sleep |
| 06:14:56 | wycats | what, if anything, did I miss |
| 06:15:39 | olegandreev enters the room. | |
| 06:16:59 | drbrain | in the 5 minutes you were gone? nothing |
| 06:17:49 | brixen | wycats: and in the next 5 min, what you didn't miss in the last 5 will be here: http://www.donttreadonme.co.uk/rubinius-irc/ |
| 06:17:53 | brixen | wycats: ;) |
| 06:18:13 | wycats | I was gone around an hour ;) |
| 06:18:22 | wycats | brixen: thx for the link |
| 06:18:28 | brixen | np |
| 06:20:50 | jeremydurham enters the room. | |
| 06:21:12 | wycats | agardiner: that requires actually CALLING the method |
| 06:22:14 | wycats | brixen: did you see the crazy code from RC2005 Defiler was referring to? |
| 06:22:37 | agardiner | yeah - it avoids the need for having to determine what the default value is when you call the method - you just call it with the args you have, passing Undefined for the ones that weren't specified |
| 06:22:54 | wycats | agardiner: true |
| 06:22:57 | wycats | it solves my use-case |
| 06:23:05 | wycats | Defiler: do you need help with those specs? |
| 06:23:33 | agardiner | and handles arbitrarily complex default args as well |
| 06:23:34 | Defiler | For singleton? |
| 06:23:36 | wycats | yep |
| 06:23:38 | Defiler | please oh please.. go for it |
| 06:23:43 | Defiler | I am going to go watch some TV |
| 06:23:44 | wycats | ;) |
| 06:23:49 | agardiner | including defaults with side-effects |
| 06:24:12 | wycats | where should I start? |
| 06:24:17 | wycats | it's not exactly a small topic |
| 06:24:56 | Defiler | Start with the basic "instance gives you something useful, but you can no longer say TheClass.new" stuff, I guess |
| 06:25:07 | wycats | got it |
| 06:25:27 | Defiler | Maybe see if you can whip up a spec that would fail if it didn't have a mutex |
| 06:25:35 | Defiler | ..but those are hard |
| 06:25:39 | wycats | brain explodes :P |
| 06:25:45 | wycats | get thee to a tv-ery |
| 06:25:51 | Defiler | Can do |
| 06:26:27 | wycats | we don't have any singleton impl yet, right? |
| 06:27:51 | agardiner | Debugger (lib/debugger) is a sort-of singleton |
| 06:28:00 | wycats | got it |
| 06:28:01 | agardiner | only a single active instance allowed |
| 06:28:31 | agardiner | but when quit, singleton instance can be released |
| 06:28:36 | wycats | I think I'm going to have trouble coming up with the edge-cases |
| 06:29:39 | agardiner | you mean cases like two threads calling instance at the same moment? |
| 06:29:42 | wycats | yes |
| 06:29:49 | wycats | or even coming up with that ;) |
| 06:31:17 | Defiler | wycats: We have lib/singleton.rb |
| 06:31:24 | wycats | right |
| 06:31:31 | wycats | but it doesn't work? |
| 06:31:34 | Defiler | wycats: Which exposes some terrible bug in Rubinius that I will track down tomorrow |
| 06:31:40 | wycats | haha |
| 06:31:42 | Defiler | ..but once we fix that, it should work fine |
| 06:31:45 | wycats | investigates... |
| 06:31:50 | wycats | I didn't think it was that complex |
| 06:31:54 | wycats | private :allocate, :new |
| 06:32:00 | wycats | should be like 80% of the impl |
| 06:32:01 | Defiler | It isn't. I suspect it is that line right there that breaks rbx |
| 06:32:11 | wycats | oh right |
| 06:32:18 | wycats | rbx has issues with privatizing new |
| 06:32:18 | Defiler | since we, uhh.. actually call those damn methods, unlike MRI |
| 06:32:24 | wycats | lol |
| 06:32:28 | wycats | yeha |
| 06:32:33 | wycats | I remember having that issue with String |
| 06:32:42 | wycats | there's a spec that says that some .new is private |
| 06:33:31 | wycats | I guess I could start by just speccing all the lines in the readme |
| 06:33:49 | Defiler | Really totally walking away now.. but this is a nice article http://steve-yegge.blogspot.com/2008/02/portrait-of-n00b.html |
| 06:34:01 | agardiner | i'm outta here too... later |
| 06:34:05 | wycats | peace out folks |
| 06:34:10 | agardiner leaves the room. | |
| 06:34:11 | wycats | hopefully you will have some singy specs |
| 06:35:51 | wycats | you tryinna say something Señor Defiler! |
| 06:36:02 | lstoll leaves the room. | |
| 06:43:40 | aotearoa leaves the room. | |
| 06:46:58 | ezmobius enters the room. | |
| 06:50:26 | ezmobius_ enters the room. | |
| 06:52:50 | wycats | we don't support ObjectSpace.each_object(Foo){} right? |
| 06:53:00 | wycats | to count the number of objects of some class? |
| 06:53:06 | defunkt leaves the room. | |
| 06:53:49 | akshay enters the room. | |
| 06:54:11 | wycats | Defiler: if you ever come back... there are a few specs for singleton |
| 06:54:20 | ezmobius leaves the room. | |
| 06:57:55 | cjheath | Anyone here that can answer a quick qn about how MRI and RUbinius instantiate singleton class objects? |
| 06:58:04 | cjheath | Specifically, |
| 06:58:47 | cjheath | when an object is created, its singleton class contains a superclass pointer to the thing that obj.class will point to, |
| 06:58:57 | cjheath | and an empty included modules array. |
| 06:59:07 | cjheath | Which means it's redundant. |
| 06:59:39 | cjheath | Does either interpreter instantiate the singleton class in a lazy (copy on write) type of fashion? |
| 07:00:17 | cjheath | i.e. only when def obj.method, or obj.extend happens. |
| 07:00:21 | cjheath | ? |
| 07:00:24 | cjheath | Anyone know? |
| 07:00:47 | rue | Ours always have a metaclass |
| 07:01:05 | wycats | is there a way I can see rubildius' last results? |
| 07:01:10 | cjheath | ok, tx. Do you know why? |
| 07:01:17 | wycats | because I just merged from remote and I get 4 errors |
| 07:01:38 | cjheath | i.e. if no instance methods, no included modules, then it's not needed... |
| 07:01:41 | wycats | File::Stat is exploding |
| 07:02:20 | wycats | rubuildius: what were the last results? |
| 07:02:53 | cjheath | rue: does that mean that two separate allocations occur, or are these agglomerated into one? |
| 07:05:03 | ezmobius_ enters the room. | |
| 07:05:20 | akshay leaves the room. | |
| 07:05:44 | cjheath | ezmobius, you might know the answer to the qn I've just been asking... got a mo? |
| 07:06:48 | cjheath | When a new object is created, its metaclass contains no (instance) methods, no included modules, only a superclass pointer. Why does it need one, couldn't that get created on first change? |
| 07:07:30 | cjheath | Seems a shame to create 2 objects when you'll mostly only ever use one. |
| 07:07:37 | brixen | wycats: pastie |
| 07:07:41 | brixen | wycats: and what platform? |
| 07:07:48 | wycats | brixen: I may not have recompiled |
| 07:07:51 | wycats | I'm investigating |
| 07:07:56 | brixen | what platform? |
| 07:08:01 | wycats | Leopard |
| 07:08:07 | brixen | yeah, you should be fine |
| 07:08:39 | wycats | is there a git unstash? |
| 07:09:08 | rue | git stash --apply |
| 07:09:19 | wycats | and that just pulls the stash back into uncommitted? |
| 07:10:43 | ezmobius | cjheath: i'm not sure of the answer to that. i'd probably ask evan when hes about |
| 07:10:59 | wycats | it's probably just an optimization |
| 07:11:06 | brixen | I thought Defiler said recently our bignum is slower than MRI |
| 07:11:15 | brixen | doesn't appear to be for + anyway: http://pastie.org/150250 |
| 07:11:21 | wycats | that way the metaclass gets stashed in the rbc |
| 07:11:36 | cjheath | ok, tx. I'll ask again. Seems like an important optimization, if you don't need to create 2 objects. |
| 07:12:30 | wycats | :) |
| 07:12:37 | cjheath | since most objects never get an instance_def or an extend. |
| 07:13:09 | rue | cjheath: I think it might complicate logic, though |
| 07:13:46 | cjheath | Pretty simple actually - when someone asks for the metaclass, if the class pointed to in the object is tagged as not a metaclass, make one now. |
| 07:13:57 | wycats | BTW: brixen: wicked job on CI... it runs fast enough to actually be useful |
| 07:14:09 | rue | cjheath: Thinking more like method lookup |
| 07:14:15 | ezmobius | what is the proper test to see if I am running under rubinius ? os there a RRUBY_PLATFORM or something? |
| 07:14:18 | brixen | wycats: heh, I can't take credit for that |
| 07:14:24 | wycats | brixen: I know |
| 07:14:28 | wycats | but it makes your job easier ;) |
| 07:14:32 | cjheath | Sure, but if there's nothing to look up, you don't need it. |
| 07:14:33 | boyscout | 1 commit by Yehuda Katz |
| 07:14:34 | boyscout | * Adds support for CompiledMethod#args; 6471cf0 |
| 07:14:56 | brixen | ezmobius_: we have RUBY_ENGINE |
| 07:15:01 | brixen | which should be rbx |
| 07:15:12 | ezmobius | and will that be nil in mri? |
| 07:15:16 | brixen | yep |
| 07:15:16 | wycats | no |
| 07:15:18 | wycats | whaaa? |
| 07:15:20 | brixen | well, it won't be set |
| 07:15:21 | jtoy leaves the room. | |
| 07:15:27 | ezmobius | k thx |
| 07:15:27 | wycats | it'll throw an error |
| 07:15:35 | wycats | you have to do RUBY_ENGINE rescue nil or something |
| 07:15:41 | brixen | ezmobius_: you'll need Object.const_defined? :RUBY_ENGINE |
| 07:15:49 | wycats | git stash --apply doesn't work |
| 07:15:55 | wycats | I need to pull my shit out of the stash ;) |
| 07:15:59 | brixen | wycats: define "doens't work" |
| 07:16:11 | wycats | it doesn't pull the stash back out into my WC |
| 07:16:11 | brixen | git stash apply stash@{0} |
| 07:16:13 | brixen | for example |
| 07:16:25 | wycats | yeah... that isn't what someone told me to do ;) |
| 07:16:25 | brixen | git stash list for what you have |
| 07:16:33 | brixen | man git-stash ;) |
| 07:16:37 | wycats | did ;) |
| 07:16:52 | brixen | well, so "doesn't work" needs elaboration then |
| 07:16:53 | rue | ezmobius_: How was the conf? |
| 07:17:02 | ezmobius | it was fun |
| 07:17:08 | rue | I have not seen any reporting out of there for some reason |
| 07:17:18 | ezmobius | evan and i procrastinated til the last minute but had no trouble filling the 3 hours ;) |
| 07:17:21 | wycats | brixen: and that did |
| 07:17:29 | brixen | wycats: ok, cool |
| 07:17:33 | wycats | ezmobius: because everyone wanted to just hear about it ;) |
| 07:17:39 | wycats | they lapped it up |
| 07:18:51 | rue | Hu, three hours? That is a long presentation |
| 07:19:01 | ezmobius | it was a charity session |
| 07:19:14 | jtoy enters the room. | |
| 07:19:14 | rubuildius | Yehuda Katz: 6471cf0ee; build failed! http://rafb.net/p/mfVZ8q61.html |
| 07:19:22 | rue | Oh, you had to give out soup too? |
| 07:21:21 | ezmobius | hmm require 'yaml' blows up on head. didn't used to |
| 07:21:37 | wycats | wtf... I ran ci |
| 07:21:39 | rue | There have been some regressions these past few days :) |
| 07:21:59 | wycats | segfault... |
| 07:22:00 | wycats | wtf. |
| 07:23:05 | brixen | wycats: don't mind that |
| 07:23:20 | brixen | wycats: linux is broken due to some of the sendsite stuff, likely |
| 07:23:23 | wycats | :/ |
| 07:23:29 | brixen | I've spents some time trying to debug it |
| 07:23:37 | brixen | the one thing I know for sure, it segfaults :P |
| 07:23:42 | wycats | :P |
| 07:23:55 | wycats | I think evan added something today and said "fuck it if it fails in Linux" |
| 07:24:06 | brixen | well, he said "fix it" |
| 07:24:19 | brixen | but doing so isn't trivial, unless you are evan ;) |
| 07:24:24 | wycats | ;) |
| 07:24:24 | ezmobius | heh |
| 07:24:37 | wycats | I have conflicts on my branch and just want to delete the branch and start over |
| 07:24:39 | brixen | I'd really love to see his gdb session for something like this |
| 07:24:48 | wycats | but it won't let me leave the branch until I resolve |
| 07:24:56 | brixen | wycats: git reset --hard |
| 07:25:01 | brixen | if you don't care if you lose stuff |
| 07:25:07 | wycats | I don't |
| 07:25:08 | wycats | thx |
| 07:25:37 | wycats | can I get a diff on a stash item? |
| 07:25:44 | brixen | well, you can show it |
| 07:25:48 | brixen | git show stash@{0} |
| 07:25:51 | brixen | e.g. |
| 07:26:03 | brixen | you can probably git diff stash@{0} HEAD |
| 07:26:21 | brixen | or just git diff stash@{0}, but I've not tried that |
| 07:26:25 | wycats | "Cannot restore on top of a dirty state" |
| 07:26:30 | brixen | a stash is just a "commit" |
| 07:26:33 | wycats | right |
| 07:26:33 | brixen | yeah |
| 07:26:56 | brixen | what are your changes? |
| 07:27:05 | wycats | singleton specs |
| 07:27:09 | brixen | hmm |
| 07:27:12 | brixen | I'd do this: |
| 07:27:18 | brixen | git commit your changes |
| 07:27:24 | brixen | git stash apply <whatever> |
| 07:27:31 | brixen | git revert -n <hash for your commit> |
| 07:27:45 | jtoy leaves the room. | |
| 07:27:48 | brixen | the -n will not create a new commit |
| 07:28:00 | brixen | it will leave the changes |
| 07:28:08 | langenberg enters the room. | |
| 07:28:31 | brixen | wycats: I guess the question is: why are you stash applying in a dirty dir? |
| 07:28:55 | wycats | yeah... I figgered it out |
| 07:28:58 | wycats | I was being retarded |
| 07:29:01 | brixen | ok, cool |
| 07:30:20 | wycats | ok... if I have something like Foo._load.should == Foo.instance, where does that go |
| 07:30:25 | wycats | foo_load or foo_instance? |
| 07:32:21 | brixen | foo_load |
| 07:32:26 | brixen | because that's what the expectation is on |
| 07:32:42 | brixen | what is Foo.instance? |
| 07:32:49 | brixen | e.g. try to use literals, not computed values |
| 07:32:52 | brixen | if possible |
| 07:33:07 | brixen | s/e.g./i.e./ |
| 07:34:51 | wycats | this is for singleton |
| 07:34:55 | wycats | so the singleton has an instance |
| 07:34:59 | wycats | Foo.instance |
| 07:35:06 | wycats | it also has a _load (a private load) |
| 07:35:40 | rue | You can use shared behaviours for that |
| 07:36:17 | rue | Mm, well, actually in this case it is probably appropriate. But specify against the object_id |
| 07:39:24 | lstoll enters the room. | |
| 07:48:06 | gnufied leaves the room. | |
| 07:49:01 | wycats | rue: instead of just ==? |
| 07:49:11 | langenberg | How do I spec a method that calls 'print'? |
| 07:49:23 | brixen | wycats: well, in this case you want obj identity, right? |
| 07:49:31 | brixen | so, obj.equal? other |
| 07:49:39 | Fullmoon leaves the room. | |
| 07:49:40 | brixen | or obj.equal?(other).should == true |
| 07:50:03 | brixen | langenberg: take a look at lambda { blah }.should output(stdout, stderr) |
| 07:50:12 | brixen | langenberg: mspec/matchers/output.rb |
| 07:50:17 | brixen | or grep |
| 07:50:46 | brixen | langenberg: also, look at the CaptureOutput class in mspec/capture.rb |
| 07:50:46 | rue | langenberg: ^^ or s/output/output_to_fd/g if it turns out it is too high level |
| 07:50:48 | wycats | brixen: cool |
| 07:51:17 | brixen | langenberg: right, what rue said if you really need to check that it goes to a filedes |
| 07:51:40 | brixen | if you don't care, and just want to see what got printed, use should output() |
| 07:52:03 | langenberg | yeah, okay |
| 07:52:19 | wycats | brixen: we don't have be_eql, right? |
| 07:53:13 | brixen | wycats: nope |
| 07:53:21 | wycats | suck |
| 07:53:35 | _ADS enters the room. | |
| 07:53:50 | wycats | so you do .eql?(...).should == true? |
| 07:54:01 | brixen | .equal?() |
| 07:54:03 | brixen | but yeah |
| 07:54:54 | wycats | are those identical? |
| 07:55:40 | rue | No, #equal? is an object_id check |
| 07:57:54 | wycats | that's not what ri says |
| 07:58:09 | wycats | ri Object#eql? says that it's an alias |
| 07:58:40 | wycats | oic |
| 07:58:41 | wycats | I lied |
| 07:59:45 | aotearoa enters the room. | |
| 08:00:10 | wycats | haha... my singleton specs pass in MatzRuby but explode all over the place in Rubinius |
| 08:08:14 | nex3 enters the room. | |
| 08:09:08 | benburkert leaves the room. | |
| 08:09:46 | boyscout | 1 commit by Yehuda Katz |
| 08:09:47 | boyscout | * Added singleton specs (and reorganized stale one):; dfdf909 |
| 08:13:57 | nex3 | Is there a Rubinius disassembler? |
| 08:14:06 | rubuildius | Yehuda Katz: dfdf90968; build failed! http://rafb.net/p/p2ql4H62.html |
| 08:14:23 | nex3 | There's a reference to "compiler/bytecode/disassembler.rb" in the docs, but it doesn't seem to exist anywhere |
| 08:15:09 | brixen | nex3: that was for compiler 1 |
| 08:15:15 | brixen | the current compiler is compiler 2 |
| 08:15:21 | nex3 | Oh, okay |
| 08:15:25 | nex3 | So no disassembler? |
| 08:15:26 | brixen | there is a Iseq#decode |
| 08:15:38 | brixen | but it needs to be hooked up into a disassembler |
| 08:16:02 | brixen | so, no disassember right now |
| 08:16:22 | nex3 | That's better than Iseq#each(&:puts) :p |
| 08:17:47 | pietia enters the room. | |
| 08:22:41 | _ADS leaves the room. | |
| 08:23:24 | lstoll leaves the room. | |
| 08:24:02 | lstoll enters the room. | |
| 08:25:44 | dbussink enters the room. | |
| 08:35:35 | ezmobius_ leaves the room. | |
| 08:35:36 | ezmobius leaves the room. | |
| 08:42:43 | dbussink | morning |
| 08:45:14 | krisps enters the room. | |
| 08:50:10 | kwatch enters the room. | |
| 08:58:34 | brixen | morning dbussink |
| 08:58:46 | dbussink | brixen: still not asleep? |
| 08:58:50 | brixen | so, this is the sort of thing with mri that is maddening |
| 08:58:56 | brixen | dbussink: not quite, but very soon |
| 08:59:03 | dbussink | brixen: any luck with the linux failure? |
| 08:59:09 | brixen | 1.0.coerce "2" => [2.0, 1.0] |
| 08:59:20 | brixen | 1.0 + "2" => exception |
| 08:59:32 | brixen | Bignum.coerce "2" => exception |
| 08:59:39 | b |