Show enters and exits. Hide enters and exits.
| 00:00:47 | boyscout | Cleanup Globals.set_hook API - dc19420 - Evan Phoenix |
| 00:05:06 | boyscout | CI: rubinius: dc19420 successful: 3041 files, 11850 examples, 36139 expectations, 0 failures, 0 errors |
| 00:57:21 | slava | evan: ping |
| 00:57:25 | evan | pong |
| 00:57:41 | slava | check privmsg |
| 01:02:10 | slava | evan: I'm not sure per-thread OnStack<> lists is fine-grained enough |
| 01:02:15 | slava | evan: it should really be per-fiber / per-continuation? |
| 01:02:26 | evan | yes |
| 01:02:49 | evan | i'm morphing STATE (VM* state) into something that is per-callstack |
| 01:03:10 | slava | maybe it would make sense to s/VM/Context/ |
| 01:03:12 | evan | ie, you allocate it at the very beginning on the call stack and pass down a pointer to it |
| 01:03:16 | evan | it would make sense |
| 01:03:19 | evan | the name sucks now. |
| 01:03:28 | slava | I would've thought VM would be like a global thing |
| 01:03:29 | evan | so i'll have to go through and rename it. |
| 01:03:31 | evan | yeah |
| 01:03:33 | evan | it used to be! |
| 01:03:38 | evan | it's slowly been loosing that. |
| 01:03:41 | slava | what's your global thing now? |
| 01:03:41 | evan | THANKFULLY |
| 01:03:45 | evan | I used the STATE macro |
| 01:03:50 | evan | and called it state |
| 01:03:57 | evan | not vm or whatever. |
| 01:04:12 | evan | the global thing is SharedState now |
| 01:04:16 | evan | pretty clear. |
| 01:06:08 | evan | nice, String#captitalize from 13% MRI to 86% |
| 01:07:58 | slava | is it written in C in MRI? |
| 01:08:47 | evan | course |
| 01:08:52 | evan | everything is written in C in MRI |
| 01:08:54 | evan | i cheated though. |
| 01:09:02 | evan | i wrote a transform() primitive in C++ |
| 01:09:16 | evan | that does a table transform on the string |
| 01:09:23 | slava | aha |
| 01:09:45 | evan | i want to remove transform eventually |
| 01:09:49 | evan | but i need to push on |
| 01:09:55 | evan | remove the C++ for it, rather. |
| 01:10:10 | slava | do you have any plans to get the IO stuff to use FFI? |
| 01:10:17 | slava | it might be nicer to do it in pure ruby + ffi than C++. |
| 01:10:20 | evan | not at present, no. |
| 01:10:27 | slava | technical limitation or just not important? |
| 01:10:30 | evan | not unless I remove the GIL. |
| 01:10:39 | slava | I thought your IO was non-blocking? |
| 01:10:43 | evan | nope |
| 01:10:52 | slava | so you can't release the GIL in FFI calls yet? |
| 01:11:02 | evan | i could |
| 01:11:09 | evan | i'd rather not have the GIL. |
| 01:11:17 | evan | so i've put that on the back burner |
| 01:11:23 | slava | one step at a time I guess :) |
| 01:11:38 | slava | is having native threads with a GIL equivalent to green threads with a native thread pool for 'async' FFI? |
| 01:12:04 | evan | probably, yes. |
| 01:16:10 | evan | do you use a native thread pool for async FFI? |
| 01:16:15 | slava | I don't have async FFI yet |
| 01:16:17 | slava | but that's the plan |
| 01:16:33 | slava | right now all I/O is non-blocking, with a few annoying exceptions (like the windows stdin/stdout) |
| 01:19:01 | slava | the only downside I can see to async FFI -vs- having a GIL is that it won't work for APIs that have to be called from one specific thread |
| 01:19:12 | slava | of course real native threads without a GIL beats both approaches |
| 01:21:48 | evan | yeah |
| 01:21:55 | evan | real native threads is where we'll get. |
| 01:28:41 | slava | evan: why does OnStack refer to VariableRootBuffer by value? |
| 01:29:05 | evan | because thats the thing the GC actually reads |
| 01:29:17 | slava | and they're linked in a list? |
| 01:29:21 | evan | thats (VariableRoot)Buffer |
| 01:29:28 | evan | not Variable(Root)Buffer |
| 01:29:30 | slava | heh |
| 01:29:31 | evan | btw |
| 01:29:47 | evan | yeah, VRBs are referenced by the GC in a list |
| 01:29:49 | evan | as I recall |
| 01:30:28 | evan | i don't recall if data_root<> does this |
| 01:30:42 | slava | I put them in an std::vector, but now that I think about it linking them together would be better |
| 01:30:43 | evan | but you'll notice that OnStack<> actually registers the address of the C++ local |
| 01:30:49 | evan | so that you can use it once at the top |
| 01:30:55 | evan | and reassign the local even |
| 01:30:57 | evan | and they're seen |
| 01:31:09 | evan | the idea was to use OnStack<> at the top only |
| 01:31:34 | evan | thats why there is the whole multiple arguments thing |
| 01:32:37 | slava | yeah, I get it now |
| 01:33:07 | slava | linking them together is a nice idea. I've observed some overhead from the std::vector, seems linking would be cheaper since it keeps all the data on the C stack |
| 01:33:22 | slava | hmm, doesn't this solve your per-thread OnStack problem already then? |
| 01:33:34 | slava | since your roots are just a linked list on the stack, and each fiber / thread has its own stack |
| 01:33:52 | evan | well |
| 01:33:59 | evan | what i'm going to do is have a root VBR |
| 01:34:05 | evan | and that is per call stack |
| 01:34:10 | evan | and have them form a linked list on the stack only |
| 01:34:15 | slava | aha |
| 01:34:35 | evan | that removes any threading issues entirely |
| 01:34:44 | evan | the GC just needs to know all the root VBRs |
| 04:24:12 | jvoorhis | is there some way to access thread-local variables across fibers? |
| 04:24:52 | jvoorhis | i haven't rifled through ruby-specs yet, but maybe someone who's recently implemented Fiber could help ;) |
| 04:41:07 | evan | jvoorhis: Thread.local[] you mean? |
| 05:45:27 | jvoorhis | evan: yeah, that's it |
| 05:45:57 | jvoorhis | it seems in MRI, Thread.local[] is also Fiber-local |
| 18:22:37 | BrianRice-work | poll-style Q: what does/should File exists? return if the path specifies what turns out to be a directory? |
| 18:23:32 | evan | BrianRice-work: true |
| 18:23:35 | BrianRice-work | ok |
| 18:23:41 | evan | thats why File.file? is also there |
| 18:23:44 | evan | and File.directory? |
| 18:23:54 | BrianRice-work | yeah we have those |
| 18:25:57 | BrianRice-work | that's the kind of response I was looking for, thanks. |
| 18:28:03 | evan | man |
| 18:28:11 | evan | the superiority of the rubinius backtrace is unmatched. |
| 18:29:11 | evan | a matching one? |
| 18:29:43 | Zoxc | does it print arguments yet? |
| 18:30:49 | evan | no, no arguments yet. |
| 18:30:52 | evan | we'll get there though. |
| 18:31:26 | BrianRice-work | I found that writing an emacs mode for my debugger backtrace helped |
| 18:31:44 | BrianRice-work | I made the frame info clickable-to-navigate (drill into frame or visit source) |
| 18:32:10 | BrianRice-work | example backtrace: http://paste.lisp.org/display/89265 |
| 18:32:53 | evan | nice |
| 18:33:58 | evan | http://gist.github.com/300681 |
| 18:34:06 | evan | thats what the an rbx one looks like |
| 18:34:18 | evan | you'll notice that self recursion is automatically collapsed |
| 19:15:53 | brixen | no cavities! |
| 19:16:03 | brixen | but also, no food for 4-6 hours and I'm starving |
| 19:20:38 | brixen | I guess I could pour stuff straight down my throat |
| 19:20:49 | brixen | like with a funnel or something |
| 19:28:23 | Zoxc | eat before you go to the dentist? :) |
| 19:29:15 | brixen | too late now :P |
| 19:55:18 | boyscout | Move ucontext detection to vm/detection.hpp - 8a2b374 - Dirkjan Bussink |
| 19:55:18 | boyscout | Fix ucontext for freebsd - 8700216 - Dirkjan Bussink |
| 20:13:49 | boyscout | CI: rubinius: 8700216 successful: 3041 files, 11850 examples, 36139 expectations, 0 failures, 0 errors |
| 23:55:01 | kronos_vano | Is it ok? http://gist.github.com/301010 |
| 23:56:33 | evan | i think so |
| 23:56:41 | brixen | define_method is already a module method |
| 23:56:44 | evan | though you missed the define_method(:name) { |*blah| } |
| 23:56:45 | brixen | why is class_eval needed? |
| 23:56:46 | evan | case |
| 23:57:02 | kronos_vano | hm |
| 23:57:12 | kronos_vano | brixen, yes, my fault |
| 23:58:34 | kronos_vano | One more bug is defined_method should be private, but in rubinius it is not ) I'll fixed it a bit later |