Show enters and exits. Hide enters and exits.
| 06:29:29 | thirtysixthspan | Im new to running rubinius. Should I be able to run .rbc files and require them? I'm on 1.0.1 on Mac os x. |
| 08:28:27 | dbussink | thirtysixthspan: the best approach is to just ignore rbc files and run the rb files |
| 08:28:37 | dbussink | thirtysixthspan: the rbc handling will happen for you |
| 12:20:26 | manveru | what are the plans with dbm/sdbm/gdbm from stdlib? |
| 13:14:17 | dbussink | manveru: no plans so far |
| 13:14:30 | dbussink | manveru: you can try if the mri extension works |
| 13:14:40 | dbussink | manveru: if you gemify it |
| 13:15:01 | dbussink | manveru: no idea how much those depend on mri internals or that they are nice c api users |
| 15:57:20 | evan | morning. |
| 15:58:59 | dbussink | evan: morning :) |
| 15:59:47 | jeremyevans | evan: Morning |
| 16:13:05 | dbussink | evan: ah whole welcoming committee ;) |
| 16:13:14 | evan | heh |
| 16:13:27 | evan | i'm reading headius blog post about snoracle/google |
| 16:13:44 | dbussink | as always, the patents are laughable |
| 16:14:03 | BrianRice-work | yeha, only an extremely-greedy lawyer would pick those |
| 16:14:09 | BrianRice-work | yeehaw, even |
| 16:14:57 | BrianRice-work | silver lining: JVM FUD might result in more diverse language platform usage |
| 16:20:52 | dbussink | evan: so, let's change rbx to be not a mixed vm? :P |
| 16:21:24 | evan | since the patent office has now, finally, changed their tune somewhat |
| 16:21:39 | bougyman | howzzat? |
| 16:21:47 | bougyman | that such patents are ever approved just baffled me. |
| 16:21:54 | evan | agreed |
| 16:22:12 | evan | but the patent office recently announced that they're changing their patent policy |
| 16:22:20 | evan | after the baliski (wrong sp) case. |
| 16:22:27 | bougyman | iirc someone patented the 'double click' |
| 16:22:42 | dbussink | well, they just allow everything until it's challenged somehow |
| 16:23:36 | bougyman | i was at a place that wanted to patent the way we used an open source stack! |
| 16:23:43 | bougyman | i quickly bailed after hearing that. |
| 16:23:49 | bougyman | but... they did indeed get that patent. |
| 16:24:35 | dbussink | evan: which case was that? |
| 16:25:26 | bougyman | bilski v kappos |
| 16:26:33 | evan | http://www.groklaw.net/article.php?story=2010072913012223 |
| 16:26:33 | bougyman | they basically just reaffirmed the machine-or-transformation test |
| 16:27:00 | jeremyevans | evan: rb_gv_get("$~") appears not to work, any ideas? |
| 16:27:11 | evan | it will have to be special cased |
| 16:27:16 | jeremyevans | evan: OK |
| 16:27:17 | evan | inside rb_gv_get |
| 16:27:35 | jeremyevans | evan: OK. How should it be accessed? |
| 16:28:07 | evan | i'll let you figure that out. |
| 16:28:09 | jeremyevans | evan: BTW, this appears to be the last issue preventing full support for my extension |
| 16:28:12 | evan | but i'll set you on the right path. |
| 16:28:19 | jeremyevans | evan: OK :) Help is appreciated |
| 16:28:26 | evan | put $~ in a .rb file and do |
| 16:28:32 | evan | rbx compile -B <file> |
| 16:28:45 | evan | the implementation of instructions is in instructions.def |
| 16:28:50 | evan | now go! |
| 16:28:56 | jeremyevans | evan: Fun fun. :) |
| 16:29:49 | jeremyevans | evan: I used -e "$~", but I'm guessing regexp_last_match_result is what I need :) |
| 16:30:03 | evan | i'll let you figure that out. |
| 16:36:45 | dbussink | evan changed into a bot! |
| 16:40:11 | evan | :) |
| 16:40:15 | evan | if i do it for him |
| 16:40:19 | evan | then i might as well write the code. |
| 16:40:35 | sbryant | Morning |
| 16:40:41 | sbryant | Afternoon, rather |
| 16:41:00 | evan | no, morning. |
| 16:41:02 | evan | it's only morning. |
| 16:41:44 | sbryant | Not for us east coasters. |
| 16:44:10 | dbussink | evan: i was wondering, how much 1 to 1 compatibility is needed with mri for networking stuff? |
| 16:44:21 | dbussink | evan: because i was adding some stuff and trying to simplify things |
| 16:44:22 | evan | *shrug* |
| 16:44:24 | evan | exact? |
| 16:44:29 | dbussink | which still result in perfectly sane answers |
| 16:44:34 | dbussink | well something like Socket.pack_sockaddr_in 0, '' |
| 16:44:53 | dbussink | if i make it simpler in rbx, it will return a sockaddr for ::1 |
| 16:45:10 | jeremyevans | evan: How do I get a CallFrame from a NativeMethodEnvironment? |
| 16:45:45 | evan | nme->current_call_frame() |
| 16:45:51 | jeremyevans | evan: Thanks |
| 16:51:04 | dbussink | evan: quick question, are ffi called methods already interruptable? |
| 16:51:21 | evan | ffi called methods? |
| 16:55:33 | dbussink | evan: yeah, look at socket stuffn ow |
| 16:55:38 | dbussink | evan: if you have a dns timeout etc. |
| 16:55:41 | evan | i don't know what you mean. |
| 16:56:01 | dbussink | evan: can other things run while that is happening? |
| 16:56:08 | dbussink | evan: is a ctrl c properly processed? |
| 16:56:11 | evan | yes, ffi unlocks the GIL |
| 16:56:16 | evan | no, ^C isn't processed |
| 16:56:18 | evan | because it can't be. |
| 16:56:48 | evan | well, it *might* be, ie a function might return EINTR |
| 16:56:51 | evan | but no promises. |
| 16:57:00 | evan | basically, FFI can't be used for stuff you'd want to interrupt. |
| 16:58:35 | dbussink | evan: do you know if this is the case for mri too or not? |
| 16:58:45 | evan | you'd have to check. |
| 16:58:49 | evan | sometimes yes, sometimes no. |
| 17:05:13 | jeremyevans | evan: http://pastie.org/1095862.txt <- Patches for rb_gv_get("$~") |
| 17:05:14 | dbussink | evan: i'm already looking too much at mri code trying to improve some in rbx :P |
| 17:05:24 | dbussink | trying to understand why it's behaving in certain ways |
| 17:05:29 | jeremyevans | evan: With these patches, rbx fully supports my extension |
| 17:05:54 | evan | jeremyevans: there is a subtle buffer overflow issue |
| 17:06:07 | evan | you assume name to be at least 3 bytes for this to work |
| 17:06:22 | evan | use strlen |
| 17:06:24 | evan | and then do |
| 17:06:27 | jeremyevans | evan: OK. Wouldn't short circuiting handle that? |
| 17:06:39 | jeremyevans | strlen is going to scan for '\0' |
| 17:06:40 | evan | if(len == 1 && name[0] == '~' .... |
| 17:06:55 | evan | sure, but what if name is just a one byte? |
| 17:06:57 | evan | you still read 2 |
| 17:07:30 | jeremyevans | evan: if name[0] is '\0', shouldn't it never access name[1] |
| 17:07:40 | evan | you don't do it in that order. |
| 17:07:49 | evan | (name[0] == '~' && name[1] == '\0') |
| 17:07:58 | evan | what if it's just ~ |
| 17:08:00 | evan | no \0 |
| 17:08:10 | evan | i guess in that case strlen would blow up too. |
| 17:08:12 | evan | anyway |
| 17:08:16 | jeremyevans | evan: The argume is a char *, you don't know the length |
| 17:08:19 | evan | i'd prefer you be more explicit, less tricky. |
| 17:08:31 | jeremyevans | evan: To get the length you'd have to scan for '\0' using strlen |
| 17:08:33 | evan | do the next guy a favor |
| 17:08:39 | evan | thats fine. |
| 17:08:48 | evan | i know you scan twice |
| 17:08:49 | evan | no biggy. |
| 17:08:56 | evan | unless you'd like to profile it for me :) |
| 17:09:19 | jeremyevans | evan: No, I doubt it makes enough difference considering the calling overhead |
| 17:09:34 | evan | right, so do the next guy a favor. |
| 17:09:39 | jeremyevans | evan: Please change it if you feel it would be more readable with strlen |
| 17:09:45 | evan | well, no |
| 17:09:48 | evan | you please change it. |
| 17:09:54 | jeremyevans | evan: OK :) |
| 17:16:29 | jeremyevans | evan: http://pastie.org/1095881.txt |
| 17:16:46 | evan | looks good |
| 17:16:50 | evan | go ahead and commit it. |
| 17:17:07 | jeremyevans | evan: OK |
| 17:18:31 | jeremyevans | evan: I don't think I have the commit bit for my github account (jeremyevans) |
| 17:18:38 | evan | ok |
| 17:18:40 | evan | i'll fix that. |
| 17:19:16 | evan | ok, added. |
| 17:19:53 | dbussink | ah, found a bug in rubyspec itself :) |
| 17:19:58 | dbussink | evan: that explains my confusion :) |
| 17:20:02 | dbussink | even mri fails this test |
| 17:20:31 | evan | ah |
| 17:20:34 | dbussink | evan: on that socket / rubyspec issue :) |
| 17:20:41 | evan | gotcha. |
| 17:20:49 | dbussink | i was getting back [5000, "::ffff:0.0.0.0"], but 0.0.0.0 was expected |
| 17:20:54 | dbussink | but even mri returns [5000, "::ffff:0.0.0.0"] |
| 17:21:00 | dbussink | yay for a bit of cleanup :) |
| 17:21:06 | evan | eeer |
| 17:21:10 | evan | wait wait. |
| 17:21:25 | evan | you're getting that because you have ipv6 |
| 17:21:27 | evan | if you didn't |
| 17:21:32 | evan | you'd get 0.0.0.0 |
| 17:21:45 | dbussink | evan: yeah, i know |
| 17:21:49 | evan | thats not a rubyspec failure. |
| 17:21:53 | evan | thats a platform difference. |
| 17:21:53 | dbussink | 0.0.0.0 is one of the expected values in the spec |
| 17:22:07 | dbussink | well, apparently mri on my platform also fails that |
| 17:22:15 | evan | right |
| 17:22:19 | evan | i understand that |
| 17:22:29 | evan | but don't change the spec to expect "::ffff:0.0.0.0" |
| 17:22:36 | evan | it will just break for someone else then. |
| 17:22:53 | evan | at least it should see if it's either one |
| 17:23:11 | dbussink | evan: the expentancy already has a [].include? construct |
| 17:23:18 | dbussink | this just needs to be added |
| 17:23:21 | dbussink | as a possible value |
| 17:23:35 | evan | k |
| 17:23:36 | dbussink | ["::", "0.0.0.0"].include?(sockaddr[1]).should be_true |
| 17:23:46 | evan | gotcha. |
| 17:24:12 | boyscout | Add spec for rb_gv_get("$~") - 2ac2c64 - Jeremy Evans |
| 17:24:12 | boyscout | Add support for rb_gv_get("$~") - 0e265b9 - Jeremy Evans |
| 17:24:57 | dbussink | evan: if you want to check, this is what i have now: https://gist.github.com/08dd22b6b2835cdff05b |
| 17:25:05 | dbussink | also added a method that wasn't there yet |
| 17:25:52 | evan | i'm not going to look through it |
| 17:25:56 | evan | i've been through that code |
| 17:25:59 | evan | it makes my brain hurt. |
| 17:26:05 | evan | if it passes and you think it's fine |
| 17:26:06 | dbussink | hehe, i can imagine :) |
| 17:26:07 | evan | thats enough for me. |
| 17:26:16 | evan | I trust you. |
| 17:30:49 | jeremyevans | evan: Looks like C API speed has come a long way since last month |
| 17:30:58 | evan | oh? |
| 17:31:07 | evan | hm, I wonder what we did! |
| 17:31:19 | evan | I assume you mean in the good direction :) |
| 17:31:28 | jeremyevans | evan: I was only getting about 6x speedups on some things, now I'm getting up to 55x |
| 17:31:39 | evan | @_O |
| 17:31:50 | evan | can you double check you're getting the right data? |
| 17:32:03 | jeremyevans | evan: Yep, all the specs passed before I ran the benchmarks |
| 17:32:13 | evan | nice. |
| 17:32:26 | jeremyevans | evan: 55x is still less than MRI, but it's a big improvement |
| 17:32:35 | evan | 55x from what? |
| 17:32:42 | evan | whats the baseline? |
| 17:33:02 | jeremyevans | evan: Date.civil. The baseline being the stdlib, the comparison being my library |
| 17:33:12 | evan | ah |
| 17:33:12 | evan | ok |
| 17:33:13 | jeremyevans | evan: so on rubinius, they are 55x faster |
| 17:33:20 | evan | gotcha |
| 17:33:34 | evan | but they're still slower, over all, than MRI |
| 17:33:49 | boyscout | CI: rubinius: 0e265b9 successful: 3512 files, 15089 examples, 42926 expectations, 0 failures, 0 errors |
| 17:34:48 | jeremyevans | evan: Unlike on MRI, on Rubinius, some things are slower with my extension, but I'm pretty sure it'll still be a major performance boost |
| 17:35:54 | jeremyevans | evan: I haven't yet compared the rbx results to MRI. I just remember the MRI speedup being more than 55x. That might have been a different machine, though. |
| 17:36:16 | evan | ah ok |
| 17:36:19 | evan | so in other words |
| 17:36:23 | evan | MRI is slower than Rubinius |
| 17:36:24 | evan | :) |
| 17:36:39 | evan | which means your extension has a higher boost. |
| 17:36:58 | jeremyevans | evan: I'll try to post the results when they finish |
| 17:37:18 | jeremyevans | evan: The benchmarks take a long time to run |
| 17:37:44 | evan | k |
| 17:40:38 | dbussink | jeremyevans: you won't be able to squeeze as much out of it as on mri |
| 17:40:55 | dbussink | jeremyevans: because rbx is a lot faster in running the ruby code used in date |
| 17:41:54 | jeremyevans | dbussink: True. I believe the speedup on rbx is less than on MRI (1.8), but greater than on YARV (1.9) |
| 17:42:28 | dbussink | evan: btw, which socket specs where unstable for you when you tagged them? i can vaguely remember you doing something like that |
| 17:42:36 | evan | *shrug* |
| 17:42:45 | dbussink | evan: i'll check the log then |
| 17:56:48 | dbussink | brixen: ping? |
| 18:00:51 | dbussink | just grabbed a stroopwafel |
| 18:03:01 | dbussink | evan: you probably don't remember what exactly was the error with 3ddf2c15724c19d3ae6e2d1312a1aef61417e7da right? |
| 18:03:20 | dbussink | because i did fix a ipv6 / udp case |
| 18:14:36 | dbussink | ugh, BasicSocket.do_not_reverse_lookup is one ugly construct |
| 18:15:47 | Defiler | truly. |
| 18:26:53 | evan | dbussink: i don't recall exactly. |
| 18:42:51 | dbussink | evan: can imagine yeah, was this occuring on elle? |
| 18:43:08 | evan | most likely. |
| 18:43:12 | evan | it's our primary linux test machine. |
| 18:44:22 | dbussink | got a 64 bit debian etch machine i semi regularly use to test stuff too |
| 18:44:25 | dbussink | seems to work fine |
| 18:44:42 | evan | that seems to have something to do with the tcp/ip stack |
| 18:44:47 | evan | elle is a slightly older machine |
| 18:44:49 | evan | maybe thats why. |
| 18:45:10 | dbussink | well, i found an issue where udp / ipv6 doesn't work |
| 18:45:44 | dbussink | so if it was doing :ffff:0.0.0.0 style stuff that could be the issue |
| 18:48:10 | evan | ok |
| 18:48:11 | evan | i dunno. |
| 18:48:41 | dbussink | i could remove the quarantine and investigate if it occurs again? |
| 18:48:50 | evan | if you like |
| 18:48:51 | evan | sure. |
| 19:11:18 | jeremyevans | evan: http://pastie.org/1096128.txt <- Comparative benchmarks for rubinius, ruby 1.8.7, ruby 1.9.2 for my extension |
| 19:12:02 | evan | yikes |
| 19:12:06 | evan | could you give me a summary? |
| 19:12:36 | jeremyevans | evan: Rubinius seems to be substantially slower in some cases |
| 19:13:22 | jeremyevans | evan: Date.civil for example. 17.3 secs on rbx, 5.4 on ruby 1.8.7, 1.4 on ruby 1.9.2 |
| 19:13:36 | evan | ok |
| 19:13:41 | jeremyevans | evan: That's for the standard lib |
| 19:13:50 | evan | ah ah |
| 19:13:50 | evan | ok |
| 19:13:54 | evan | what about for your extension? |
| 19:14:29 | jeremyevans | evan: For my library, 0.313 rbx, 0.084 1.8.7, 0.071 1.9.2 |
| 19:14:41 | evan | ok |
| 19:14:49 | evan | i'd suggest you ratched the iterations up |
| 19:14:50 | evan | for that |
| 19:15:01 | evan | i generally tell people any benchmark less than 2 seconds is invalid. |
| 19:15:20 | evan | not just for rubinius, for anything. |
| 19:15:31 | jeremyevans | evan: It's at 100000 iterations for all cases. I suppose I could switch to a time basis |
| 19:15:48 | evan | i'd do a lot more iterations with your extension |
| 19:16:06 | evan | and divide or multiply the results for comparison |
| 19:17:17 | jeremyevans | evan: Maybe in the future I'll do that. The problem there is that sometimes the speedup is significant, and sometimes it's not. |
| 19:17:25 | evan | gotcha |
| 19:17:29 | evan | anyway, just a suggestion. |
| 19:17:42 | jeremyevans | evan: For example, on rbx, the extension is slower for simple lookups |
| 19:17:59 | evan | slower than the ruby code? |
| 19:18:07 | jeremyevans | evan: rbx seems to do really well on memory, though |
| 19:18:22 | jeremyevans | evan: Yes. stdlib is faster than the extension for a lot of the simpler methods |
| 19:18:29 | evan | ah, interesting. |
| 19:18:36 | evan | that makes sense, rbx wise. |
| 19:18:41 | evan | ruby code is the currency of the VM |
| 19:18:49 | evan | extension code is handled with boxing gloves on |
| 19:19:42 | jeremyevans | evan: The largest speedup: Date#<<,51.52381,0.30047,171.48 |
| 19:19:53 | jeremyevans | evan: That's 171x faster for the extension on rbx |
| 19:20:15 | evan | I should checkout this Date code |
| 19:20:16 | jeremyevans | evan: I picked the worse case performance in the stdlib for that |
| 19:20:17 | evan | see what it's doing. |
| 19:20:39 | jeremyevans | evan: It's doing an expensive calculation multiple times |
| 19:21:10 | jeremyevans | evan: My library doesn't support the date of calendar reform, so I only need to do the calculation once |
| 19:21:37 | evan | why not improve the ruby code to do the same? |
| 19:22:33 | jeremyevans | evan: I probably could, but upstream has not cared much about my other performance related patch |
| 19:22:45 | evan | I do though. |
| 19:22:51 | evan | regardless if MRI doesn't. |
| 19:22:56 | evan | :) |
| 19:23:29 | jeremyevans | evan: My eventually hope is that the C extension I'm working on replaces the stdlib one, though I'm not very optimistic about that |
| 19:24:41 | jeremyevans | evan: So the worse the ruby code performs, the greater the need for my extension :) |
| 19:24:58 | evan | well, i don't really want more C extensions :) |
| 19:25:09 | evan | but it's fine we work at odds |
| 19:25:20 | evan | perhaps i'll try and get the JIT to optimize Date and beat you! |
| 19:25:24 | dbussink | the biggest hit in date is actually gcd |
| 19:25:45 | jeremyevans | Yep. Is rbx's rational written in C? |
| 19:25:52 | evan | no |
| 19:25:53 | dbussink | evan: so making gcd (greatest common denominator) fast is probably a good way to go |
| 19:25:54 | evan | course not. |
| 19:26:04 | dbussink | we have as much in ruby as we can |
| 19:26:23 | dbussink | openssl is in c, because it's horrible to turn that into ruby :P |
| 19:27:06 | dbussink | bigdecimal was basically reused because it was the easiest way to get that bootstrapped |
| 19:27:23 | dbussink | jeremyevans: in general the move is towards more ruby code |
| 19:27:32 | dbussink | and not to more c code how mri is going |
| 19:27:45 | jeremyevans | There's a few reasons why date performance is slow. One is the use of rational, another is supporting the date of calendar reform, third is probably the string handling (_strptime/strftime/_parse) |
| 19:27:46 | boyscout | Fix spec, MRI also returns "::ffff:0.0.0.0" on my system - cf88ee9 - Dirkjan Bussink |
| 19:27:46 | boyscout | Slight cleanup of Socket and adding Socket.getnameinfo - dfb1465 - Dirkjan Bussink |
| 19:27:46 | boyscout | Remove tags for now passing specs - 6cd2d53 - Dirkjan Bussink |
| 19:27:46 | boyscout | Dequarantine UDPSocket#bind spec - 683004e - Dirkjan Bussink |
| 19:28:06 | dbussink | let's see what boyscout thinks of this |
| 19:31:05 | jeremyevans | dbussink: I know. That's one of the reasons I'm not optimistic |
| 19:31:31 | dbussink | jeremyevans: how do you mean, mri is moving more and more to c, so that should make you more optimistic ;) |
| 19:31:54 | jeremyevans | dbussink: Ah, my bad. :) |
| 19:32:48 | jeremyevans | dbussink: The main reason I'm not very optimistic is that tadayoshi funaba (the stdlib date maintainer) doesn't appear interested in increasing the performance of Date |
| 19:53:47 | ph0rse | hey guys, is the Core Library section of http://rubini.us/about/roadmap#steps still areas for improvement? |
| 19:56:34 | boyscout | CI: Commit 683004e failed. http://github.com/evanphx/rubinius/commit/683004e5c182b46a6e756feabbdf87f9df6e0fa4 |
| 20:10:00 | dbussink | ph0rse: String could still use some attention for example |
| 20:10:17 | dbussink | evan: how's that story on the String#% compiler? was never finished right? |
| 20:15:30 | ph0rse | cool, thanks. I'll start looking into it |
| 20:15:51 | boyscout | Don't call to_s on given host - ec5b665 - Dirkjan Bussink |
| 20:15:54 | dbussink | ph0rse: and spec failures are always a good place to start |
| 20:16:55 | ph0rse | dbussink: do you work for Nedap? |
| 20:18:16 | dbussink | ph0rse: yeha |
| 20:18:17 | dbussink | yeah |
| 20:19:08 | ph0rse | I did a little work for you guys about a year ago |
| 20:19:41 | ph0rse | brb, thanks for the pointers |
| 20:20:05 | dbussink | ph0rse: ah yeah, name in the whois sounded familiar :) |
| 20:44:28 | boyscout | CI: rubinius: ec5b665 successful: 3512 files, 15101 examples, 42941 expectations, 0 failures, 0 errors |