Show enters and exits. Hide enters and exits.
| 06:40:13 | dkubb | how well does ruby2ruby work with rubinius? |
| 06:43:48 | dkubb | I thought I'd play around with getting dm-ambition to run on rbx tonight, but I get a bus error when I run the specs with rbx: https://gist.github.com/31ba1a1dfa6c4f6a0d37 |
| 09:20:24 | postmodern | say when will rubinius be able to build on ruby 1.9.x? |
| 10:36:03 | kronos_vano | postmodern, I think when 1.1 will released :) |
| 10:36:27 | postmodern | kronos_vano, it just seems like a bunch of # encoding # issues |
| 10:36:46 | rb2k | hm, "no method 'weakref_alive?' on an instance of Object. (NoMethodError)" |
| 10:36:55 | rb2k | I guess rbx doesn't support this by now? :) |
| 10:37:36 | kronos_vano | rb2k, Do you have steps for reproduce? |
| 10:37:41 | kronos_vano | Seems like a bug |
| 10:37:47 | rb2k | just looking what actually caused it for now :) |
| 10:38:04 | kronos_vano | weakref_alive? is method of WeakRef class |
| 10:38:17 | rb2k | yeah, must be some library |
| 10:38:58 | rb2k | https://gist.github.com/2fab5b4e0ece5864ae88 |
| 10:39:01 | rb2k | that's the backtrace |
| 10:39:12 | rb2k | launcher.rb:59 is just Thread.new |
| 10:40:48 | rb2k | uh, doesn't happen the 2nd time |
| 10:40:52 | rb2k | maybe a race condition |
| 10:41:06 | rb2k | oh , took longer this time |
| 10:42:15 | rb2k | this time "no method 'weakref_alive?' on nil:NilClass. (NoMethodError)" |
| 10:45:32 | kronos_vano | rb2k, Open a ticket with as full info as you can. With steps we fix it very quickly |
| 10:47:20 | rb2k | ok, I'll try to include some info |
| 11:53:44 | eregon | Hi |
| 16:10:49 | evan | morning boys and girls. |
| 16:19:00 | brianmario | yo |
| 16:19:03 | brianmario | back in LA? |
| 16:19:06 | evan | yep! |
| 16:19:11 | brianmario | how was RC? |
| 16:19:15 | evan | fun |
| 16:19:18 | evan | tiring |
| 16:19:21 | evan | i gave 3 talks |
| 16:19:24 | brianmario | daaamn really? |
| 16:19:32 | evan | remind me to not do that again |
| 16:19:37 | brianmario | heh |
| 16:19:46 | brianmario | all on rbx? |
| 16:21:07 | evan | nope |
| 16:21:16 | evan | one with headius about weird ruby stuff |
| 16:21:21 | imajes | that one was good |
| 16:21:27 | evan | we talked mainly about concurrency and GC this year |
| 16:21:30 | imajes | a little esoteric though |
| 16:21:33 | evan | yeah |
| 16:21:36 | evan | we know |
| 16:21:39 | evan | but thats ok |
| 16:21:43 | imajes | glad to know i won't use id2ref ever |
| 16:21:43 | evan | thats the design of the talk |
| 16:21:51 | evan | :D |
| 16:21:53 | imajes | yeah, i am not complainin' :) |
| 16:22:01 | evan | and then my 10 minute EY keynote |
| 16:22:09 | evan | which is online, video wise, if you'd like to watch it. |
| 16:22:11 | imajes | well, i say i won't use it, but perhaps i might use it to scare people |
| 16:22:12 | evan | and then a rubinius talk. |
| 16:22:20 | imajes | evan actually did four talks |
| 16:22:27 | imajes | he made a guest appearance in aaron patterson's talk |
| 16:22:52 | evan | ha! yes |
| 16:22:59 | evan | lets call it 3.2 talks |
| 16:23:08 | imajes | was that planned btw |
| 16:24:46 | evan | yeah :) |
| 16:24:54 | imajes | thought so |
| 16:24:56 | evan | we wanted to do that since our talks were at the same time |
| 16:25:02 | imajes | did you have a ringer in the audience |
| 16:25:09 | evan | aaron did |
| 16:25:10 | imajes | or was aaron just hoping someone would ask a rbx q? |
| 16:25:10 | evan | yeah |
| 16:25:12 | imajes | right |
| 16:25:13 | imajes | thought so |
| 16:25:16 | evan | to ask the question |
| 16:25:22 | imajes | right |
| 16:25:27 | evan | never leave comedy to chance. |
| 16:25:28 | evan | :D |
| 16:25:33 | imajes | totally |
| 16:25:36 | evan | it's hard enough planned. |
| 16:25:36 | imajes | btw |
| 16:25:42 | imajes | i'm going to pull the same one myself |
| 16:25:47 | imajes | it's pretty awesome |
| 16:25:51 | evan | hah! good! |
| 16:25:56 | evan | it was fun. |
| 16:26:04 | imajes | i'm going to try sjobs tho |
| 16:26:10 | imajes | he seems to like video chat |
| 16:26:11 | imajes | ;p |
| 16:29:11 | evan | haha |
| 16:29:14 | evan | facetime him! |
| 16:29:48 | evan | when I got back yesterday and abby and I were talking about iphone 4, she said "you know my birthday is only 20 days after the launch..." |
| 16:29:56 | evan | :) |
| 16:40:01 | jeremyevans | evan: I'm having the same issue as http://github.com/evanphx/rubinius/issues/issue/75, but vm/vm is not stripped. This is trying to get 1.0.1 running on OpenBSD 4.7-current with gcc 4.2.1. |
| 16:40:41 | evan | must be something about openbsd's dlsym() that doesn't work the way I expect |
| 16:40:49 | jeremyevans | evan: build log available at Build log available at http://code.jeremyevans.net/build.log, patches so far at http://code.jeremyevans.net/patches.diff |
| 16:40:49 | evan | are you on 1.0.0, 1.0.1, or git master? |
| 16:40:59 | jeremyevans | evan: 1.0.1 |
| 16:41:06 | jeremyevans | I can try master if you think it will help |
| 16:41:24 | jeremyevans | evan: I tried both with and without llvm |
| 16:41:34 | evan | llvm certainly won't matter for this |
| 16:41:40 | evan | you also really want to be using it. |
| 16:42:13 | evan | openbsd doesn't have uintptr_t ?! |
| 16:42:29 | jeremyevans | evan: Apparently it causes problems |
| 16:42:40 | evan | what problem? |
| 16:42:57 | jeremyevans | evan: Something about not a valid type IIRC |
| 16:43:05 | evan | thats bizarre. |
| 16:43:32 | jeremyevans | evan: I can try removing that patch and rebuilding if you want to know the exact error |
| 16:43:36 | evan | try adding #include <stdint.h> at the top if it's not there |
| 16:44:19 | jeremyevans | evan: OK |
| 16:44:52 | evan | jeremyevans: as for the issue with not finding symbols |
| 16:45:35 | evan | we'll have to figure out why openbsd's dlsym() won't find symbols for the current process |
| 16:47:11 | jeremyevans | evan: OK, I'm building with a patch that just uses that include instead of changing uintptr_t to long |
| 16:48:12 | jeremyevans | evan: If you would like me to run any tests, just let me know |
| 16:48:24 | evan | well, you can boot the VM |
| 16:48:29 | evan | so running the tests is going to be hard. |
| 16:48:32 | evan | you could run the VM tests |
| 16:48:40 | evan | but they're not going to show whether or not dlsym() works |
| 16:48:45 | evan | though we should probably add that as a test. |
| 16:48:56 | evan | jeremyevans: let me write you a quick C program to run |
| 16:49:01 | evan | that will tell us, maybe, whats up. |
| 16:49:04 | jeremyevans | evan: OK |
| 16:53:35 | jeremyevans | evan: Looks like the stdint include worked |
| 16:53:48 | evan | ok, thats just a missing include then. |
| 16:53:54 | evan | http://gist.github.com/434747 |
| 16:53:57 | evan | ok, compile and run that. |
| 16:55:00 | jeremyevans | evan: func: 0x0 |
| 16:55:11 | evan | ok, thats what I expected for you. |
| 16:55:18 | evan | thats weird that openbsd's dlsym is broken. |
| 16:55:24 | evan | i'll have to research that. |
| 16:55:49 | jeremyevans | evan: OK. If I can do anything to help, please let me know |
| 16:56:39 | evan | will do. |
| 16:56:43 | evan | i'm going to research a little right now. |
| 16:58:12 | evan | jeremyevans: in that file, change RTLD_LAZY to RTLD_LAZY | RTLD_GLOBAL |
| 16:58:15 | evan | see what happens |
| 16:59:02 | jeremyevans | evan: no change |
| 16:59:08 | evan | dang. |
| 16:59:13 | evan | what version of OpenBSD? |
| 16:59:38 | jeremyevans | evan: OpenBSD 4.7-current as of a couple weeks ago |
| 16:59:48 | jeremyevans | evan: right after they moved to gcc 4.2.1 |
| 17:00:00 | evan | ok, i'll have to get VMWare booted with it. |
| 17:00:23 | evan | if you wanna help, you could poke around and try and see why it can't see symbols from the current process |
| 17:00:51 | evan | jeremyevans: how about replace handle with RTLD_DEFAULT in the call to dlsym |
| 17:02:36 | evan | should be the same |
| 17:02:40 | evan | unless there is an openbsd bug. |
| 17:02:49 | evan | but I'd like to know |
| 17:03:12 | tarcieri | so hmmm @ VMware/EngineYard |
| 17:03:15 | jeremyevans | evan: I'm googling right now, but I'm not a C expert. If I find out anything, I'll let you know |
| 17:03:26 | jeremyevans | evan: no change with RTLD_DEFAULT in dlsym |
| 17:03:30 | tarcieri | think Rubinius would survive that? or no comment... |
| 17:03:31 | evan | k |
| 17:03:41 | evan | tarcieri: i'd expect so |
| 17:03:53 | evan | if not, i'll raise hell. |
| 17:03:55 | tarcieri | it'd really suck if you guys got axed |
| 17:04:12 | tarcieri | or if they stopped funding Rubinius |
| 17:04:13 | evan | i've got it in my contract that I can walk away from EY with the last released version of Rubinius to do whatever I want with |
| 17:04:21 | tarcieri | yeah awesome |
| 17:04:45 | evan | if it happens, man, VMWare will really burn some fucking bridges. |
| 17:04:50 | evan | seems like a shitty move PR wise. |
| 17:04:52 | tarcieri | yeah |
| 17:05:09 | evan | so I guess if the plan is "Buy EY, get everyone to hate us" then they could do that. |
| 17:05:15 | tarcieri | should hold an MRI funeral at RubyConf X ala the IE6 funeral |
| 17:05:31 | tarcieri | between REE, YARV, JRuby, and Rubinius there's like... no reason to continue using MRI |
| 17:06:31 | evan | hah |
| 17:06:42 | tarcieri | evan: wish I got a chance to say hi at RailsConf |
| 17:06:57 | tarcieri | especially since I'm actually using rbx again, heh |
| 17:07:01 | brixen | tarcieri: yeah, where were you hiding?! |
| 17:07:18 | tarcieri | brixen: I should've like... stopped by the EY booth and tried to get a golden ticket or whatever |
| 17:07:24 | brixen | heh, yeah |
| 17:07:29 | tarcieri | I was... around |
| 17:07:35 | brixen | I kept seeing charlie and forgetting you were there |
| 17:07:37 | evan | I know! I was lookin' for ya. |
| 17:07:37 | evan | :/ |
| 17:07:37 | evan | oh well. |
| 17:07:37 | evan | (i didn't look that hard) |
| 17:07:37 | evan | were you in BohConf most of the time? |
| 17:07:38 | evan | i didn't make it over there. |
| 17:07:45 | tarcieri | nah |
| 17:07:48 | tarcieri | I only went to BohConf once |
| 17:07:58 | brixen | I did get to finally meet MenTaLguY |
| 17:08:09 | tarcieri | yeah same here |
| 17:08:38 | brixen | we have to relaunch the scheme to take over the world with Actors |
| 17:08:45 | tarcieri | hehe |
| 17:08:49 | brixen | scheme/effort |
| 17:09:03 | tarcieri | still working on it... just via Reia |
| 17:09:33 | brixen | tarcieri: congrats on the big milestones |
| 17:09:51 | tarcieri | thanks :) |
| 17:09:57 | tarcieri | maybe I can actually do a release here soon or something |
| 17:10:00 | brixen | cool |
| 17:10:07 | brixen | looks like it's coming along nicely |
| 17:10:16 | brixen | just had to get that python out of your system :P |
| 17:10:18 | tarcieri | yeah lots of conference-driven development :) |
| 17:10:22 | evan | tarcieri: you should come to rubyconf |
| 17:10:28 | brixen | again |
| 17:10:29 | brixen | :) |
| 17:10:30 | tarcieri | I will! |
| 17:10:32 | evan | i'll put your on my schedule |
| 17:10:36 | evan | yes, again. :) |
| 17:10:38 | tarcieri | sweet |
| 17:10:55 | tarcieri | this was my first RailsConf and I definitely prefer RubyConf |
| 17:11:09 | brixen | yeah, it's different |
| 17:11:21 | brixen | this railsconf was pretty dang good I think |
| 17:11:30 | tarcieri | yeah it was a lot of fun |
| 17:11:53 | tarcieri | crazy to see Ilya getting Rails running on EventMachine |
| 17:12:23 | tarcieri | although it seems like horrible hax around problems that should be solved at the VM level |
| 17:12:31 | evan | jeremyevans: try http://gist.github.com/434765 |
| 17:12:38 | evan | i added dlerror() to see if openbsd is telling us whats up. |
| 17:13:16 | evan | tarcieri: i'd love to hear your opinions on what about IO jruby/java gets right |
| 17:13:52 | tarcieri | evan: you're doing the same thing as the JVM, suppose I should've mentioned you guys too |
| 17:13:56 | tarcieri | and for that matter so is YARV |
| 17:13:58 | jeremyevans | evan: func: 0x0 (null) |
| 17:14:10 | evan | tarcieri: which thing is that? not using stdio? |
| 17:14:16 | evan | jeremyevans: ok, well, worth a shot :) |
| 17:14:23 | tarcieri | native threads so syscalls don't hang the entire VM |
| 17:14:39 | jeremyevans | evan: I'm going to ask in #openbsd |
| 17:14:41 | tarcieri | which yeah, if Ilya is using 1.9 anyway that argument doesn't hold water |
| 17:14:46 | evan | jeremyevans: ok, perfect |
| 17:14:52 | evan | show them our dlsym_test.c |
| 17:15:04 | jeremyevans | evan: Definitely |
| 17:15:05 | evan | tarcieri: yeah |
| 17:15:06 | tarcieri | evan: the JVM comment was more about threads than I/O |
| 17:15:16 | evan | tarcieri: i've been thinking more and more about how to remove the GIL |
| 17:15:17 | tarcieri | err, JVM angle |
| 17:15:20 | tarcieri | nice |
| 17:16:13 | evan | tarcieri: yeah, i think not implementing your own IO scheduler is important at this stage |
| 17:16:25 | tarcieri | yeah heh |
| 17:16:28 | evan | just don't tell the event programming libraries. |
| 17:16:35 | tarcieri | urgh |
| 17:16:42 | tarcieri | does EventMachine run on Rubinius? |
| 17:17:16 | evan | yep. |
| 17:17:23 | tarcieri | nice |
| 17:18:42 | tarcieri | were either of you at Ilya's talk? |
| 17:19:09 | tarcieri | he got a lot of people interested in the whole Rails on EventMachine with Fibers providing concurrent I/O |
| 17:19:23 | evan | I wish I had been, but no. |
| 17:19:28 | brixen | I missed it too :( |
| 17:19:32 | tarcieri | requiring everyone to use EventMachine protocol implementations, then monkeypatching Fiber stuff into it |
| 17:19:35 | evan | whats the big takeaway? |
| 17:19:43 | tarcieri | umm, my reaction was MADNESS |
| 17:19:45 | tarcieri | heh |
| 17:19:48 | evan | hah |
| 17:19:56 | tarcieri | I mean, that's what I was wanting to do with Revactor |
| 17:19:58 | tarcieri | like 2 years ago |
| 17:20:03 | tarcieri | then I decided it was dumb |
| 17:20:12 | evan | yeah, seems UG to say "lots build our own thread model and our own scheduler and put it on top of a user space thread model" |
| 17:20:40 | tarcieri | you more or less have to throw away every single library that talks to the network ever and start from scratch |
| 17:20:59 | tarcieri | or does any kind of I/O for that matter, and isn't an EventMachine implementation |
| 17:21:05 | evan | yah |
| 17:21:09 | evan | sounds fun! |
| 17:21:10 | evan | :/ |
| 17:21:14 | tarcieri | and then you have to (monkey)patch every EventMachine implementation |
| 17:21:59 | tarcieri | with Revactor I was trying to get to something that was a duck type of TCPSocket, so you could monkeypatch non-evented libraries that do synchronous I/O |
| 17:22:13 | evan | why did they have to monkeypatch EM itself? |
| 17:22:46 | tarcieri | he had to monkeypatch the EventMachine implementations of various protocols and add the hooks for pausing and resuming fibers when they "block" on I/O |
| 17:22:55 | evan | oh righ |
| 17:22:56 | evan | right |
| 17:23:00 | evan | make EM fiber aware. |
| 17:23:02 | tarcieri | http://github.com/igrigorik/em-synchrony |
| 17:23:04 | tarcieri | yeah |
| 17:23:28 | evan | ok know, it would be a fun experiment to make an alternate rubinius kernel that implemented MxN threads |
| 17:23:36 | evan | since we have fiber support |
| 17:23:38 | evan | it's doable. |
| 17:24:16 | tarcieri | and like... letting multiple threads share a single I/O scheduler, or what? |
| 17:24:53 | evan | have a scheduler in ruby, yeah |
| 17:25:06 | evan | and have IO#read and such do fiber switching |
| 17:25:28 | evan | the actual IO itself could happen entirely in a seperate normal ruby thread |
| 17:25:38 | tarcieri | yeah cool |
| 17:25:47 | evan | i think erlang does that, doesn't it? |
| 17:25:50 | evan | manages all IO in one thread |
| 17:25:57 | tarcieri | yeah |
| 17:26:00 | tarcieri | it has a thread pool |
| 17:26:00 | evan | and other threads request IO operations |
| 17:26:13 | tarcieri | well, there's a thread that does all I/O that can be made asynchronous |
| 17:26:18 | tarcieri | and a thread pool for synchronous operations |
| 17:26:27 | evan | ah |
| 17:26:31 | evan | what kind of thinsg are sync? |
| 17:26:42 | tarcieri | file I/O, sendfile, stuff like that |
| 17:26:54 | evan | does it use sysvipc?? :/ |
| 17:26:58 | evan | we did that a previous job |
| 17:27:02 | evan | worst unix API ever. |
| 17:27:02 | tarcieri | haha no idea |
| 17:27:06 | tarcieri | lol |
| 17:27:11 | evan | completely unpollable. |
| 17:27:12 | tarcieri | yeah I tried to play with it at various points |
| 17:27:27 | evan | there is literally a standard kludge |
| 17:27:46 | evan | you put something in a mailbox, then you send the process that should read it a signal |
| 17:27:53 | evan | the signal writes a byte to a pipe |
| 17:27:59 | evan | the pipe is in your select |
| 17:28:01 | evan | select group |
| 17:28:13 | evan | when you see the pipe become active, you read from your sysvipc mailbox |
| 17:28:19 | tarcieri | heh yeah |
| 17:28:27 | tarcieri | recalls sigio prior to the days of epoll |
| 17:28:33 | evan | yep. |
| 17:30:54 | tarcieri | with Rails/EventMachine if anything in the entire event loop blocks or consumes too much CPU you starve every other request |
| 17:31:04 | tarcieri | which is why it'd really be nice to solve all that at the VM level |
| 17:31:08 | tarcieri | rather than through a library |
| 17:31:20 | evan | yeah |
| 17:32:38 | tarcieri | oof |
| 17:32:41 | tarcieri | -> meeting :( |
| 17:39:29 | evan | I should halftone this (http://www.flickr.com/photos/oreillyconf/4687365118/in/set-72157624231740192/) and make it my blog header |
| 17:40:24 | evan | kstephens: hi kurt! sorry I didn't end up seeing you after that first day |
| 17:41:01 | imajes | i did not realize jdd was at rc |
| 17:41:22 | evan | interesting. |
| 17:41:27 | evan | |Blaze||: thanks |
| 17:45:16 | evan | seems similar actually. |
| 17:48:49 | cremes | evan: RE: that picture... are you running for office or something? :) |
| 17:48:59 | evan | ha! |
| 17:49:07 | evan | that was my late night TV show look. |
| 17:49:11 | evan | i'll run for office later in life. |
| 17:49:13 | evan | i'm working up to it. |
| 17:49:13 | imajes | he should run for office. |
| 17:49:35 | cremes | evan phoenix... kind of sounds like a super hero's "secret" identity |
| 17:50:37 | evan | cremes: SSSSSSSHHHH |
| 17:50:57 | evan | i'll confuse the fuck out of the establishment |
| 17:51:09 | evan | With a name like Evan McClendon Webb Phoenix |
| 17:51:14 | evan | and growing up in Montana |
| 17:51:57 | brixen | hmm EMWP... EventMachine'd Web Programming |
| 17:52:07 | brixen | sounds like evan predates ilya's scheme |
| 17:52:21 | imajes | Epic Mechanical Webb Plastering |
| 17:52:46 | evan | hah |
| 17:52:48 | jeremyevans | evan: |Blaze||'s code works for me too |
| 17:53:05 | evan | jeremyevans: which code? works how? |
| 17:53:12 | evan | ah ah |
| 17:53:13 | jeremyevans | evan: gcc -Wall -Wl,--export-dynamic -o dlsym_test dlsym_test.c; ./dlsym_test |
| 17:53:13 | evan | that |
| 17:53:29 | evan | interesting |
| 17:53:30 | evan | ok |
| 17:53:37 | jeremyevans | evan: I'll test modifying the rake task to use those opts |
| 17:53:39 | evan | must not be. |
| 17:53:46 | evan | jeremyevans: ok. |
| 17:53:58 | evan | |Blaze||: there must be some ELF metadata that says what symbols are exported |
| 17:54:01 | evan | and dlsym() respects that. |
| 17:55:20 | evan | well |
| 17:55:40 | evan | we need to also fix the stripping problem |
| 17:56:13 | evan | perhaps I should put those functions in an actual .so |
| 17:56:52 | evan | ah! |
| 17:56:57 | evan | -rdynamic |
| 17:56:57 | evan | Pass the flag -export-dynamic to the ELF linker, on targets that |
| 17:56:57 | evan | support it. This instructs the linker to add all symbols, not only |
| 17:56:59 | evan | used ones, to the dynamic symbol table. This option is needed for |
| 17:57:01 | evan | some uses of "dlopen" or to allow obtaining backtraces from within |
| 17:57:03 | evan | a program. |
| 17:57:05 | evan | ack. |
| 18:05:18 | brixen | evan: did you discuss cac1547ef1e with dbussink ? |
| 18:05:27 | brixen | I'm not sure I like that |
| 18:05:37 | evan | feel free to revert |
| 18:05:51 | evan | he made that change after, in the my rubinius talk, i told them to ignore the [0] entries |
| 18:05:54 | brixen | it's something I use to see if I need to do a full graph |
| 18:06:02 | brixen | yeah, I don't want to ignore them though |
| 18:06:22 | brixen | it just means they are not in the top 45 |
| 18:06:26 | evan | how come? |
| 18:06:37 | evan | well, no [0] means it's not in the top 45 also :) |
| 18:06:46 | brixen | why don't I want to ignore them? |
| 18:07:00 | brixen | yes, [0] means there's no entry in the top 45 |
| 18:07:15 | brixen | but that does not mean I don't want to see them when I'm looking at that output |
| 18:07:17 | evan | and no index listing at all means the same thing |
| 18:07:30 | brixen | I disagree |
| 18:07:36 | evan | ok, well if you'd like them, how about something other than [0] |
| 18:07:44 | jeremyevans | evan: success |
| 18:07:46 | evan | [-] perhaps |
| 18:07:51 | brixen | it means there's no entry for them, but you still get to see their contribution |
| 18:07:51 | evan | to say "no index" |
| 18:08:05 | jeremyevans | evan: rubinius 1.0.1 (1.8.7 release 2010-06-03 JI) [amd64-unknown-openbsd4.7] |
| 18:08:10 | brixen | [-] is fine, but I want to see them |
| 18:08:11 | evan | jeremyevans: rad! |
| 18:08:19 | evan | brixen: ok, lets make it [-] then. |
| 18:08:22 | brixen | without having to do the full graph |
| 18:08:59 | brixen | and why they are [0] should have been explained in the profile doc anyway |
| 18:09:04 | brixen | but I'll make sure it is |
| 18:09:26 | evan | well, why [-] is there now :) |
| 18:09:56 | boyscout | First cut at call_custom support - 14407d5 - Evan Phoenix |
| 18:09:59 | evan | brixen: btw.. ^^ |
| 18:10:13 | evan | http://gist.github.com/434836 |
| 18:10:18 | evan | thats my test script |
| 18:11:51 | brixen | woot! |
| 18:12:42 | evan | obviously Rubinius.bind_call should probably delegate the binding to recv's class |
| 18:12:49 | evan | rather than doing it all itself. |
| 18:13:02 | evan | since you probably want to do different things at different call_custom sites |
| 18:13:23 | evan | but Rubinius.bind_call is the infection point atm. |
| 18:13:57 | brixen | nice |
| 18:16:02 | evan | the one there is the most complicated one i've written thus far |
| 18:16:19 | evan | where the else unit is another test |
| 18:18:43 | brixen | I'll start playing with it tonight |
| 18:19:39 | evan | k |
| 18:19:51 | evan | tarcieri: if you wanna implement reia on rubinius |
| 18:20:02 | evan | tarcieri: i've just added the equiv of invokedynamic to rubinius :) |
| 18:22:47 | evan | you know you're about to have a fun debugging session when you open badnews.rb |
| 18:23:35 | boyscout | CI: rubinius: 14407d5 successful: 3441 files, 13543 examples, 41064 expectations, 0 failures, 0 errors |
| 18:24:20 | brixen | heh |
| 18:24:35 | brixen | evan: which ticket is that? |
| 18:24:47 | evan | http://github.com/evanphx/rubinius/issues/#issue/356 |
| 18:24:54 | evan | going to see if it's easy to fix. |
| 18:25:01 | brixen | ahh that one |
| 18:25:01 | evan | it might be. |
| 18:27:07 | evan | when I change the 10m to 1000 |
| 18:27:18 | evan | and add a total in the subprocess |
| 18:27:24 | evan | to see how many times the HUP is run |
| 18:27:30 | evan | guess how many? |
| 18:27:51 | evan | anyone? anyone? |
| 18:28:25 | evan | if you were to say 2, you'd be right. |
| 18:29:14 | brixen | hmm |
| 18:29:22 | evan | i know exactly why too |
| 18:29:37 | evan | MRI keeps the "signals that should be run" as a simple array |
| 18:29:47 | evan | when it gets HUP, it does signals_to_run[SIGHUP] = 1; |
| 18:29:52 | evan | in otherwords |
| 18:30:04 | evan | no matter how many HUPs it gets before it runs the handler |
| 18:30:09 | evan | it only runs the handler once. |
| 18:30:12 | brixen | ahh ok |
| 18:35:05 | brixen | evan: what do you think of leaving [-] off entirely? |
| 18:35:17 | evan | thats what dbussink's patch does :) |
| 18:35:20 | brixen | if there is a [N], there's an entry; otherwise there is not |
| 18:35:30 | evan | thats what dbussink did :) |
| 18:35:35 | brixen | hm, I misunderstood |
| 18:35:41 | brixen | diffs are hard |
| 18:36:06 | evan | if there is no self entry for a line |
| 18:36:12 | evan | there is no [0] line |
| 18:36:18 | evan | because there is nothing to go reference |
| 18:36:25 | evan | the contributing line is still there though |
| 18:36:33 | evan | it just doesn't reference anything |
| 18:37:08 | brixen | ok, updating the docs |
| 18:38:08 | brixen | I think I'll redo this patch actually |
| 18:38:12 | brixen | it's confusing to me |
| 19:10:06 | boyscout | Reworked profiler graph output change. - d420522 - Brian Ford |
| 19:18:14 | boyscout | CI: rubinius: d420522 successful: 3441 files, 13543 examples, 41064 expectations, 0 failures, 0 errors |
| 19:22:58 | boyscout | Update profiler docs. - 44e70e2 - Brian Ford |
| 19:31:00 | boyscout | CI: rubinius: 44e70e2 successful: 3441 files, 13543 examples, 41064 expectations, 0 failures, 0 errors |
| 19:31:49 | tarcieri | evan: hahaha |
| 19:32:13 | tarcieri | evan: Reia kind of depends on lightweight shared nothing processes that are individually garbage collected |
| 19:32:30 | tarcieri | if you implement some way for threads to have their own independently garbage collected heap that could work |
| 19:33:25 | brixen | tarcieri: why is the individually garbage collected important? |
| 19:33:39 | brixen | ie, what about Ruby Actors that just don't share state with each other? |
| 19:35:13 | brixen | tarcieri: also, we would have SLABs when the gil withers as I understand |
| 19:37:12 | tarcieri | brixen: soft realtime, if that's a design goal |
| 19:37:39 | tarcieri | brixen: with Revactor I thought about duping and freezing all objects you message pass between actors |
| 19:37:51 | tarcieri | that'd sort of accomplish the same thing |
| 19:38:49 | tarcieri | with separate heaps per process there's no locking contentions across multiple CPUs when allocating memory, except when trying to acquire more system memory |
| 19:40:31 | brixen | slabs should give you no contention when allocating objects |
| 19:40:46 | tarcieri | yeah that's how Erlang does it |
| 19:40:48 | brixen | large objects, pinned strings, and overflow allocation would have contention |
| 19:40:59 | tarcieri | although there's still some locking problems preventing SMP scalability |
| 19:41:11 | tarcieri | specific to their memory allocator |
| 19:41:14 | brixen | overflow allocation is when nursery is full but the GC hasn't run yet |
| 19:41:44 | brixen | evan: what's pe stand for in the CallUnit code? |
| 19:42:48 | brixen | thinks it's wildly cool that evan implemented the analog to invoke dynamic |
| 19:43:29 | brixen | finds food |
| 19:43:47 | slava | 15:41 < brixen> overflow allocation is when nursery is full but the GC hasn't run yet |
| 19:43:57 | slava | isn't the point when the nursery gets full precisely when you run GC? |
| 19:44:56 | tarcieri | well anywho, for starters, getting rid of the GIL would make Reia on Rubinius more useful :) |
| 19:45:20 | tarcieri | but even then I'd rather just play around with actor concepts in Ruby, and you'd probably want me to as well |
| 19:45:45 | tarcieri | maybe help MenTaLguY merge some of his work from Omnibus into the current Rubinius Actors |
| 19:46:19 | brixen | slava: gc doesn't run immediately when nursery is full |
| 19:46:30 | slava | why not? |
| 19:46:54 | brixen | because it runs when everything is in a certain state |
| 19:47:01 | slava | weird |
| 19:47:08 | brixen | I'm not totally clear on all the details |
| 19:47:14 | brixen | but evan will enlighten us :) |
| 19:47:27 | brixen | basically, it says "collect soon" |
| 19:47:41 | brixen | and then that event is processed at a certain point |
| 19:48:10 | brixen | tarcieri: I'd really love to get our Actors some love |
| 19:48:26 | brixen | and with Fibers now and possibly M:N, we should be able to do some cool stuff |
| 19:49:13 | brixen | tarcieri: also, getting rid of the GIL is reasonably on the roadmap now |
| 19:49:50 | brixen | quits looking at evan's callunit commit and really finds food :) |
| 20:24:07 | evan | back |
| 20:24:19 | evan | the nursery actually uses a redzone to find out when to collect |
| 20:24:43 | evan | i want to change it soon so that Class#allocate can actually run the GC if it wants |
| 20:32:25 | brixen | evan: so, what is the reason for the current setup? |
| 20:33:06 | evan | allows allocations to occur in code that hold references the GC can't see |
| 20:33:15 | brixen | ahh ok |
| 20:33:29 | evan | we could get rid of that requirement by moving to a Handle<> scheme |
| 20:33:46 | evan | but the current setup keeps things simple |
| 20:33:51 | evan | and it's really no big deal thus far |
| 20:33:55 | brixen | I see |
| 20:34:16 | evan | if i have 2 seperate allocation paths |
| 20:34:30 | evan | an internal one that never GCs, and one used by Class#allocate that can GC |
| 20:34:41 | evan | that would likely deal with any potential issues with the current setup |
| 20:34:51 | brixen | makes sense |
| 20:34:54 | evan | since I introduce a redzone into the nursery allocator, it's been fine. |
| 20:35:21 | brixen | are you thinking about attacking the gil soon? |
| 20:35:26 | brixen | or sooner now |
| 20:35:32 | evan | i'll probably do some spikes and experiments |
| 20:35:38 | brixen | cool |
| 20:35:40 | evan | it's going to take us some time |
| 20:35:45 | brixen | yeah |
| 20:36:45 | evan | i've changed a few things in the GC since the last time I played with making allocation thread safe |
| 20:36:50 | evan | that will simplify it |
| 20:36:55 | brixen | nice |
| 20:36:58 | evan | like removing find_lost_souls |
| 20:37:05 | brixen | what does pe stand for in the callunit code? |
| 20:37:08 | evan | that means that there can be a lock to aquire a chunk of the nursery |
| 20:37:15 | evan | and then a thread can use that chunk/slab unlocked |
| 20:37:20 | evan | and when it's full, ask for a new one |
| 20:37:28 | brixen | cool |
| 20:37:42 | evan | couldn't do that before because find_lost_souls required the nursery to be laid out perfectly packed |
| 20:37:49 | brixen | right |
| 20:38:07 | evan | i don't recall what pe stands for :) |
| 20:38:12 | brixen | heh |
| 20:38:22 | brixen | cool, then I don't feel so bad for not being able to guess it |
| 20:38:26 | evan | ha |
| 20:38:49 | brixen | pointer to executeish |
| 20:38:52 | evan | i've got part 1 of the signal fix done |
| 20:38:57 | brixen | sweet |
| 20:39:03 | evan | i'm using the same scheme as MRI |
| 20:39:11 | evan | ie, tracking a signal as a 1 or 0 only |
| 20:39:27 | evan | but i've hit the bug related to waking a thread again. |
| 20:39:28 | brixen | yeah, seems reasonable |
| 20:39:31 | evan | so i have to really fix it now. |
| 20:39:40 | brixen | mm fun |
| 20:39:56 | evan | I might have to use a helper pthread |
| 20:40:48 | brixen | ahh yes, when a problem is a blocker, use another level of indirection |
| 20:40:53 | brixen | or in this case, another thread |
| 20:40:57 | evan | :) |
| 20:41:06 | evan | well, i need to delay doing anything because of the signal |
| 20:41:10 | evan | but i can't delay it to just anytime |
| 20:41:30 | evan | because i need to get the thing that might be about to sleep to wake up |
| 20:41:56 | evan | so i'll use the old pipe + select trick to get another thread to do the actual work outside of the signal handler |
| 20:42:17 | brixen | man, threads are just so crazy |
| 20:42:26 | evan | yep! |
| 20:42:38 | evan | signals + threads == bad news. |
| 20:42:45 | evan | is the big takeaway |
| 20:42:48 | brixen | yeah |
| 20:42:56 | BrianRice-work | nods |
| 20:42:56 | evan | because all the prims for working with thread syncronization aren't signal safe. |
| 20:42:57 | evan | :/ |
| 20:43:04 | evan | all == all the useful ones. |
| 20:49:40 | gavinstark | If I think I've found a behavior difference between MRI 1.8.7 and Rubinius 1.0.1 what is the best way to proceed? Add a spec to RubySpec to demonstrate the difference and then submit a patch to Rubinius? |
| 20:49:57 | evan | gavinstark: sure |
| 20:50:01 | evan | gavinstark: off hand, whats the behavior? |
| 20:50:21 | gavinstark | Dir.entries(path) seems to call "to_str" for the supplied object while Rubinius does not. |
| 20:50:34 | evan | ok |
| 20:50:40 | evan | yeah, rubyspec and rubinius patch |
| 20:50:42 | gavinstark | For example: Dir.entries when supplied a Rails path object gives a Dir#open primitive fail. |
| 20:50:44 | evan | the rubinius patch is one line |
| 20:50:53 | evan | just add a call to StringValue() |
| 20:52:59 | gavinstark | evan: Thanks, I think the change should be in Dir#open but I'll do some more testing first. |
| 20:53:09 | evan | ok |
| 20:53:15 | evan | let us know if we can help. |
| 20:53:51 | gavinstark | evan: also, is there some docs that describe the best way to run the rubyspecs against multiple implementations? I tried following the instructions for the rubyspec gem but when running the "mspec" there with rbx selected from rvm it does nothing. |
| 20:54:17 | evan | well, i'm not sure about rvm wise |
| 20:54:22 | evan | mspec predates rvm |
| 20:54:25 | evan | we have our own mechanism |
| 20:54:28 | evan | the -t option |
| 20:54:41 | evan | which specifies either a patch or a canonical name |
| 20:54:54 | evan | like -tr will run the specs against "ruby", ie, whatever is in your patch |
| 20:54:56 | evan | if you use rvm |
| 20:54:59 | evan | use -tr |
| 20:55:03 | evan | after you switch |
| 20:55:22 | evan | it probably did nothing for you because rvm has confused mspec |
| 20:55:30 | evan | by default, mspec looks for rbx to run them against |
| 20:55:38 | evan | but rvm advertises rubinius as ruby |
| 20:57:19 | evan | gavinstark: make sense? |
| 20:57:31 | gavinstark | evan: I think so. |
| 20:57:39 | gavinstark | I was trying to follow the README in rubyspec git clone but supplying the path to the rvm installed ruby via -t, but that failed for me. |
| 20:58:06 | evan | show me |
| 20:58:09 | gavinstark | Was trying to see how I'd add a spec in the rubyspec repo and see results in MRI, JRuby, rbx, etc. |
| 20:58:15 | evan | what command exactly did you use. |
| 20:58:23 | gavinstark | So it says first to clone mspec, add it to your path |
| 20:58:29 | evan | you'll have to tell rvm to switch between interpreters to do that |
| 20:58:33 | gavinstark | then I can just run "mspec" |
| 20:58:36 | evan | mspec won't do it automatically |
| 20:58:40 | evan | where? |
| 20:58:43 | evan | what says this? |
| 20:59:00 | gavinstark | standby. |
| 20:59:26 | gavinstark | http://github.com/rubyspec/rubyspec/blob/master/README.markdown |
| 20:59:46 | gavinstark | Under "Running RubySpec" |
| 21:00:12 | evan | you ran mspec under a rubyspec clone, yes? |
| 21:00:17 | gavinstark | Yes. |
| 21:00:19 | evan | ok |
| 21:00:24 | evan | show me what you mean by "nothing happened" |
| 21:00:29 | wayneeseguin | rvm 1.8.7,1.9.2,rbx ruby -S mspec # maybe? |
| 21:00:32 | wayneeseguin | shuts up |
| 21:00:34 | evan | paste in your terminal output |
| 21:00:47 | evan | wayneeseguin: we'll get to that |
| 21:01:10 | evan | we're going over the basics first |
| 21:01:36 | gavinstark | If I have mri 1.8.7 as my ruby: |
| 21:01:42 | gavinstark | $ mspec |
| 21:01:42 | gavinstark | ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin10.3.0] |
| 21:01:42 | gavinstark | ............................................................ |
| 21:01:50 | evan | looks fine to me |
| 21:01:59 | evan | i assume there are a lot more dots |
| 21:02:00 | evan | also |
| 21:02:03 | evan | please use a gist |
| 21:02:34 | gavinstark | Via rvm use rbx: http://gist.github.com/435050 |
| 21:03:44 | evan | gavinstark: you're in a rubyspec checkout, yes? |
| 21:03:52 | gavinstark | evan: Yes |
| 21:04:06 | evan | honestly don't know |
| 21:04:08 | evan | brixen will know. |
| 21:04:11 | gavinstark | With a path set so that mspec is first in path (mspec is also via git checkout) |
| 21:04:26 | evan | rvm must be confusing mspec somehow. |
| 21:04:37 | evan | wayneeseguin: for irb under rvm btw |
| 21:04:51 | evan | wayneeseguin: you should use rbx -S irb, rather than just rbx |
| 21:04:55 | evan | i told you just rbx, but i was wrong |
| 21:05:02 | evan | because I forgot that people want to pass options to it |
| 21:05:17 | evan | rbx -S irb will let them pass irb options directly |
| 21:06:53 | gavinstark | evan: BTW, same result with mspec when rvm has jruby-1.5.0 active. |
| 21:07:19 | gavinstark | Perhaps I'll go spellunking and see if I can figure this out. |
| 21:07:23 | evan | ok, so it happens to work under 1.8.7 |
| 21:07:29 | evan | but everywhere else, mspec is confused. |
| 21:07:33 | evan | please do. |
| 21:07:37 | gavinstark | evan: seems that way. |
| 21:08:57 | evan | take a peak |
| 21:09:02 | evan | it's probably something easy. |
| 21:16:22 | brixen | gavinstark: mspec is a front script, it invokes another script that does the work |
| 21:16:28 | gavinstark | evan: Yup, easy, I think. |
| 21:16:41 | brixen | gavinstark: if you are going to invoke it directly, you should do ruby -S mspec-run |
| 21:16:48 | brixen | where ruby is something rvm has installed |
| 21:16:56 | gavinstark | brixen: Yes, it seems mspec in the rubyspec directory, when using rbx from rvm, is expecting a file: rbx.1.8.mspec to setup the environment. |
| 21:17:25 | brixen | I'm not sure that matters |
| 21:17:34 | brixen | are you getting some error? |
| 21:17:52 | gavinstark | brixen: no, I'll provide gist. |
| 21:18:01 | brixen | well, I see the gist |
| 21:18:05 | brixen | it needs some files to run |
| 21:18:11 | brixen | that's not an error ;) |
| 21:18:19 | evan | brixen: under 1.8.7, just "mspec" runs the current directory |
| 21:18:24 | evan | brixen: and the docs say that no arguments is ok |
| 21:18:29 | evan | or rather, they imply that. |
| 21:18:45 | brixen | yeah, I let someone else modify those docs :/ |
| 21:18:49 | brixen | I need to rewrite them |
| 21:19:01 | evan | the confusion comes from 1.8.7 not printing the help |
| 21:19:05 | evan | but instead running some stuff |
| 21:19:14 | gavinstark | right. |
| 21:19:15 | evan | unlike the other interps |
| 21:19:31 | brixen | there is a default for MRI |
| 21:19:39 | brixen | that is documented as well |
| 21:19:41 | gavinstark | I can get tests to run if: |
| 21:20:06 | gavinstark | cp ruby.1.8.mspec rbx.1.8.mspec |
| 21:20:14 | gavinstark | then mspec will generate output. |
| 21:20:30 | evan | gavinstark: the true use case for mspec is not the no arg one |
| 21:20:34 | evan | you specify what specs you want to run |
| 21:20:39 | evan | ie |
| 21:20:43 | evan | mspec spec/ruby |
| 21:20:55 | evan | thats the way you should be running it anyway |
| 21:21:04 | evan | and will certainly be the way you run it when writing a new spec |
| 21:21:07 | brixen | gavinstark: do not copy that file, use -B <config file> |
| 21:21:14 | brixen | it is a default for *MRI* |
| 21:21:40 | brixen | the way to run the specs is to do mspec -t <target> <files> |
| 21:21:47 | brixen | MRI has a special default |
| 21:21:59 | brixen | that is not necessarily intended to work with other impl |
| 21:23:01 | brixen | gavinstark: http://rubyspec.org/wiki/mspec/Mspec |
| 21:24:57 | gavinstark | brixen: OK, I'll give that a try. I guess what I'm trying to figure out is if I think there is a diff the behavior of somethink, like say Dir#open in this case, what is the most sane path to specing that, then running it in the different impls to see which follows what I'd state is the desired result? I thought it would be to put the spec in Rubyspec and run it with the different impls. rvm seems to be a good way to help with tha |
| 21:25:26 | brixen | gavinstark: the use case for rubyspec is: write a spec that passes on MRI |
| 21:25:32 | brixen | that's step 1 |
| 21:25:38 | brixen | and rubyspec is set up to do that |
| 21:25:42 | brixen | that's pretty much it |
| 21:25:50 | brixen | each impl has their own way of using rubyspecs |
| 21:26:02 | gavinstark | brixen: Aha, thats what I think I am missing. |
| 21:26:10 | brixen | in rbx, you clone rubinius and run bin/mspec path/to/spec |
| 21:26:18 | brixen | in jruby, you do something similar |
| 21:26:20 | evan | gavinstark: yes, most people don't run the rubyspec repo directly |
| 21:26:27 | evan | gavinstark: they run it out of a projects directory |
| 21:26:34 | brixen | however, mspec can invoke the worker scripts with a specific target |
| 21:26:35 | evan | where the project has customized rubyspec to run it that project |
| 21:26:42 | brixen | specified with the -t option |
| 21:27:02 | brixen | you can use that, but you need to specify the options |
| 21:27:12 | brixen | the defaults in rubyspec are for MRI |
| 21:28:08 | brixen | gavinstark: step 2 is to check a particular impl, and (as indicated) how to do that best depends |
| 21:28:29 | brixen | I'd say, ruby -S mspec-run path/to/spec is probably going to be the best with rvm |
| 21:28:43 | wayneeseguin | evan: Noted, thanks. |
| 21:30:50 | brixen | gavinstark: in rbx, see doc/howto/write_a_ruby_spec.txt and the 2 files that doc references |
| 21:31:06 | brixen | gavinstark: that's the easiest way to do it here |
| 21:31:16 | brixen | jruby, etc probably have their own easiest way |
| 21:31:19 | evan | gavinstark: the typical way, thats perfectly fine, to write a spec when working on rubinius is to do it in the rubinius project clone dir |
| 21:31:34 | evan | gavinstark: use bin/mspec -tr <spec file> to test it under MRI |
| 21:31:40 | evan | then remove the -tr to test under rbx |
| 21:31:47 | gavinstark | evan: ok. |
| 21:31:49 | evan | your job is pretty much done after that, spec wise. |
| 21:31:52 | gavinstark | brixen: ok |
| 21:31:59 | evan | you've documented a behavior on MRI |
| 21:32:09 | evan | whether or not other impls do it is their business |
| 21:32:15 | gavinstark | evan: So if I add the spec to rubinius clone, and submit, you guys will push to rubyspec? |
| 21:32:22 | evan | yes |
| 21:32:32 | evan | but you must do the commit to the spec/ dir in a seperate commit from anything else |
| 21:32:35 | evan | that allows us to merge them easier. |
| 21:33:50 | gavinstark | evan / brixen : Will give it a try. Thanks for the input/patience. |
| 21:33:56 | evan | gavinstark: no prob. |
| 21:34:04 | evan | the process I just told you is the process I use. |
| 21:34:21 | brixen | and is the process documented at doc/howto/write_a_ruby_spec.txt :) |
| 21:34:35 | evan | yes. |
| 21:35:57 | evan | I wonder what it's like getting a test into the JVM |
| 21:36:03 | brixen | that said, this is quite the cluster cuss: rubini.us has docs, rbx /doc dir, rubyspec README, rubyspec.org... |
| 21:36:14 | evan | yeah |
| 21:36:19 | evan | we need to put it all in one place. |
| 21:36:39 | brixen | yeah, I need to get rubyspec.org off of redmine and into a git repo |
| 21:38:40 | gavinstark | brixen: Yes, agreed about varying docs. Having followed along at the periphery, I kind of assumed that rubyspec would be the diffinitive source of "put your new specs" here. Thats why I tried getting them to run there first. If the theory is that each impl has its own way to run them, perhaps the README there should be patched to say so and provide a link for each known impl to the appropriate project readme? |
| 21:39:20 | brixen | gavinstark: well, I'm not going to maintain a list to all the impl, but I'll clarify the docs |
| 21:39:43 | brixen | the reason rubyspec doesn't have a .mspec file for every impl is that's not its role |
| 21:39:57 | brixen | rubyspec documents "Ruby", which means MRI |
| 21:40:14 | evan | yes |
| 21:40:18 | evan | when someone uses the rubyspec repo raw |
| 21:40:28 | evan | 99.999% of the time, it's because they want to run it only under MRI |
| 21:40:38 | evan | to flesh out missing specs |
| 21:40:51 | evan | how/if the other users of rubyspec handle those new specs is their business |
| 21:41:01 | evan | and thats where the business of getting a spec to pass under rbx comes into play |
| 21:41:08 | evan | which can be a seperate topic |
| 21:42:14 | brixen | there is also a growing pain where "ruby" always meant MRI and now, with rvm, it could mean any number of different impls |
| 21:42:28 | evan | yes |
| 21:42:45 | brixen | people have to stop thinking and writing scrips that assume invoking "ruby" is invoking MRI |
| 21:43:02 | brixen | except that we've made the convention that RUBY_ENGINE == "ruby" means MRI |
| 21:45:49 | jeremyevans | evan: Rubinius passes almost all of Sequel's specs. There's just one type of spec it doesn't pass, due to a bug in Rubinius: http://pastie.org/1001334.txt |
| 21:46:13 | evan | :/ |
| 21:46:17 | evan | i fucking hate block spalt. |
| 21:46:21 | evan | splat. |
| 21:46:39 | jeremyevans | evan: There are also some warnings when loading the openssl extension: http://pastie.org/1001340.txt |
| 21:47:02 | evan | zoinks btw is that about... |
| 21:47:07 | evan | er. wtf. |
| 21:47:13 | evan | thats not good at all. |
| 21:47:26 | evan | what OS are you on? |
| 21:48:12 | jeremyevans | evan: Still on OpenBSD. openssl version gives OpenSSL 0.9.8k 25 Mar 2009 |
| 21:48:22 | evan | oh right, der. |
| 21:48:33 | evan | i've been dealing with threads and signals all day now |
| 21:48:37 | evan | it's turning my brain to mush. |
| 21:49:43 | jeremyevans | evan: I love the rubinius backtraces, BTW |
| 21:49:46 | evan | :D |
| 21:50:14 | brixen | jeremyevans: that's great to hear, b/c we do too! :) |
| 21:50:19 | evan | jeremyevans: i'll have to get that openbsd vm up and going to figure out whats up with openssl |
| 21:50:35 | evan | perhaps those symbols are only in openssl 1.0+ or something |
| 21:51:02 | evan | though i've used it with 0.9.8 i think and not seen those |
| 21:51:04 | evan | so i'll have to repro it. |
| 21:54:58 | evan | jeremyevans: that block splat problem is fixable, but man MRI is so fucking inconsistent |
| 21:55:37 | evan | if you do "[[1,2]].each { |b, *c| p [b, c] }" |
| 21:55:42 | evan | you get something completely different |
| 21:58:25 | jeremyevans | evan: Yeah. Sucks to be a ruby implementer :) |
| 21:58:32 | brixen | hah |
| 21:58:40 | evan | sucks to be a ruby user actually |
| 21:58:45 | brixen | imagines jeremyevans playing sad trombone there |
| 21:58:48 | evan | with random inconsistencies. |
| 21:58:57 | brixen | yes, splat is so wack in 1.8 |
| 21:59:17 | evan | there is no good reason for |b, *c| to mean muliple things. |
| 21:59:50 | evan | people say "the block is invoked with [1,2]" as a way to describe the each above, as though thats the same as doing Proc#call |
| 21:59:52 | evan | but it's not. |
| 21:59:57 | evan | which is just silly. |
| 22:00:06 | evan | jeremyevans: why/where did sequel hit this? |
| 22:00:19 | jeremyevans | evan: I agree. [[1,2]].each { |(b, *c)| p [b, c] } should be required if you want the 1.8 behavior |
| 22:00:59 | jeremyevans | evan: removing an object from an association given an array of composite primary keys |
| 22:03:04 | evan | jeremyevans: could you show me the code that failed? |
| 22:03:23 | jeremyevans | evan: OK. Let me pastie the code and the backtrace |
| 22:03:28 | evan | thanks. |
| 22:07:10 | jeremyevans | evan: http://pastie.org/1001365.txt If you need more context, let me know. |
| 22:09:05 | evan | ok |
| 22:09:06 | evan | thanks. |
| 22:13:04 | slava | hi evan |
| 22:13:10 | evan | hi slava. |
| 22:13:48 | slava | evan: I'm changing my VM to support GC roots inside call stack frames |
| 22:14:03 | evan | i thought it supported that |
| 22:14:04 | slava | instead of being forced to spill values to the operand stack between calls |
| 22:14:09 | evan | ah |
| 22:14:11 | slava | it does on the C++ side |
| 22:14:11 | evan | cool |
| 22:14:15 | slava | with data_root<> |
| 22:14:25 | slava | just like your OnStack<>. but this is different, its for compiled code |
| 22:14:33 | evan | yep yep |
| 22:14:43 | evan | you making a map of stack locations? |
| 22:14:54 | slava | so one problem with the 'shadow stack' approach to GC roots is you can get a quadratic blowup in the number of virtual registers in your IR |
| 22:15:10 | slava | if you have 10 live values and 10 call sites, that's 100 load/stores or so potentially right? |
| 22:15:36 | evan | yeah |
| 22:15:44 | evan | that's worst case |
| 22:17:20 | slava | yes, so now every code block has a return address -> stack locations map |
| 22:17:40 | wayneeseguin | evan: I'm still in family time but, If there is anything I can do to help let me know. I will be making that irb change for sure. |
| 22:17:55 | evan | wayneeseguin: will do |
| 22:18:00 | evan | wayneeseguin: I think thats the only thing |
| 22:18:49 | slava | < evan> allows allocations to occur in code that hold references the GC can't see |
| 22:19:00 | slava | evan: isn't OnStack<> intended to handle these cases? |
| 22:19:06 | evan | yes |
| 22:19:08 | slava | what remaining situations does rbx have where it doesn't know all roots? |
| 22:19:40 | evan | state->new_object<> isn't a GC point |
| 22:19:53 | evan | so OnStack<> is used when C++ is calling back into ruby only atm. |
| 22:19:58 | slava | oh I see |
| 22:20:03 | slava | so you'd have to add OnStack<> in a bunch more places |
| 22:20:10 | evan | but it's certainly possible to make new_object a GC point and then we'd need to use OnStack<> a lot more places. |
| 22:20:14 | evan | right |
| 22:20:19 | slava | that's what I do |
| 22:20:27 | slava | lots and lots of gc roots everywhere because of this |
| 22:20:51 | evan | yeah |
| 22:21:09 | evan | i'm just using the redzone to deal with mostly |
| 22:21:15 | slava | I used to have that |
| 22:21:35 | slava | originally the design was that allocations would trigger a GC on the next iteration of the interpreter loop |
| 22:22:45 | slava | and since each primitive could only allocate a bounded amount, a red zone was sufficient |
| 22:22:58 | evan | yeah |
| 22:22:59 | slava | but adding a compiler kind of ruined that |
| 22:23:07 | evan | yeah |
| 22:23:14 | evan | also, it makes the allocation heavier |
| 22:23:22 | slava | you need a conditional branch in there |
| 22:23:26 | evan | yea |
| 22:23:38 | slava | my optimizer combines the gc checks for multiple allocations within a single basic block |
| 22:23:53 | slava | so the allocation itself is just a pointer bump compiled inline |
| 22:25:56 | slava | evan: I noticed you added fixnum intrinsics recently |
| 22:25:58 | slava | that's cool |
| 22:26:18 | evan | i added them long ago :) |
| 22:26:20 | evan | you just noticed. |
| 22:26:23 | slava | oh |
| 22:26:40 | slava | going to do floats soon? |
| 22:27:10 | slava | if you break float operations down as box(op(unbox(in1),unbox(in2))), then LLVM's GVN might be able to optimize unbox(box(x)) into x |
| 22:27:11 | jeremyevans | evan: I've submitted a rubinius 1.0.1 port for inclusion in OpenBSD: http://marc.info/?l=openbsd-ports&m=127629497628997&w=2 |
| 22:27:49 | evan | slava: i've done that experiment |
| 22:27:53 | evan | i need to do a little bit more |
| 22:27:58 | evan | GVN can't fully do it. |
| 22:28:16 | slava | I don't have GVN, I do float unboxing in a specialized pass for that purpose |
| 22:28:34 | evan | jeremyevans: wonderful! |
| 22:28:38 | slava | but it seems like the kind of thing you'd want GVN to do |
| 22:29:10 | evan | i'm going to look at the code again this summer |
| 22:29:18 | evan | i'll let ya know what I find |
| 22:29:55 | slava | evan: can LLVM combine multiple reads of an ivar with no interviening writes or subroutine calls into a single read? |
| 22:30:08 | slava | or is an ivar access too heavyweight at the IR level for it to see that |
| 22:30:28 | evan | atm, ivar access is opaque |
| 22:30:34 | slava | dead load elimination can be used to unbox stuff too |
| 22:30:43 | evan | when I have packed ivars, it possible to expose it |
| 22:30:47 | evan | but that has to be guarded |
| 22:30:53 | evan | because the type of self is not fixed. |
| 22:30:53 | slava | like in the mandelbrot benchmark, your loop will probably be making complex number objects and then taking them apart right away |
| 22:31:29 | slava | but even if an ivar access is a C function call, I think you can annotate it a certain way so that alias analysis and GVN treats it like a load |
| 22:32:02 | slava | I'm pretty sure LLVM constant-folds calls to libc functions such as sin() and cos() |
| 22:32:02 | evan | yeah, i likely can. |
| 22:32:12 | slava | so it can operate on calls like that |
| 22:32:15 | evan | it's not as pure as sin() though |
| 22:32:21 | evan | since it depends on GC semantics |
| 22:32:32 | evan | read_ivar(1); call(..); read_ivar(1); |
| 22:32:35 | slava | right, so alias analysis has to convince itself that a given transformation is safe |
| 22:32:42 | evan | yeah |
| 22:32:44 | evan | i've started to do that |
| 22:32:51 | evan | since i've got a custom AA pass with LLVM |
| 22:32:54 | slava | call() would need to kill all collected info |
| 22:33:48 | evan | yeah |
| 22:33:51 | evan | thats all possible. |
| 22:34:01 | evan | just have to annotate and explain to LLVM the right semantics. |
| 22:34:37 | slava | I like how LLVM is pretty flexible |
| 22:35:19 | slava | its also interesting how analyses such as def-use and liveness are implemented with data structures that mirror the IR and are always up to date |
| 22:35:26 | slava | instead of having separate passes that compile this info |
| 22:35:37 | slava | which potentially becomes out of date as soon as you change the operands of an instruction |
| 22:35:44 | evan | yeah |
| 22:35:46 | evan | thats really nice. |
| 22:35:57 | slava | I think any pass can ask GVN if two values are congruent, or ask AA if two values may/must-alias |
| 22:35:59 | evan | since i've written some stuff that does IR replacement |
| 22:36:16 | evan | and it's easy to check the use's of a value to figure out if there is a context you can specialize |
| 22:36:27 | evan | slava: yeah, thats right. |
| 22:36:29 | slava | hotspot has a similar design, all IR manipulation is encapsulated in a set of routines that keep a bunch of related info up to date |
| 22:36:32 | evan | there is a standard API to AA |
| 22:36:53 | evan | you can call llvm::DoesAlias() or something |
| 22:36:58 | evan | on 2 Value's |
| 22:37:21 | evan | all right |
| 22:37:27 | evan | i'm headed to chicago tonight |
| 22:37:33 | evan | gotta grab a few things |
| 22:37:39 | evan | see ya guys. |
| 22:38:40 | slava | later |