Show enters and exits. Hide enters and exits.
| 10:17:56 | danlucraft | morning |
| 10:19:08 | kronos_vano | ัััะพ! (morning in russian =) |
| 10:24:42 | dbussink | danlucraft: testing the logging? ;) |
| 10:25:15 | danlucraft | well spotted :) |
| 12:24:16 | boyscout | Added support to http proxy when download llvm source. - 62285dd - David Pinheiro |
| 12:28:01 | boyscout | CI: rubinius: 62285dd successful: 3024 files, 11747 examples, 35948 expectations, 0 failures, 0 errors |
| 15:52:19 | Defiler | Ugh, this is a terrible piece of sentence-building: Classical module systems support well the modular devel- opment of applications but do not offer the ability to add or replace a method in a class that is not defined in that module. |
| 15:56:34 | Defiler | See, this classbox paper doesn't make sense to me |
| 15:56:47 | Defiler | Why not just do what amounts to a copy-on-write setup for your constant tables? |
| 17:19:38 | brixen | Defiler: yeah, the classbox paper has some challenging sentences |
| 17:20:01 | evan | i only looked at that one paper |
| 17:20:14 | evan | if no one else has implemented it without a 60% performance drop |
| 17:20:21 | evan | lets not even bother. |
| 17:20:26 | brixen | exactly |
| 17:20:48 | brixen | until there is a compelling use case that is neither mathn or wycats :D |
| 17:20:57 | brixen | s/or/nor/ |
| 17:22:36 | BrianRice-work | yeah they're not even that well known within squeak community |
| 17:22:51 | evan | i get the idea |
| 17:23:13 | evan | it's extending method lookup to include some some other key in addition to the method name |
| 17:23:15 | evan | pretty simple |
| 17:23:23 | evan | but comes with a huge cost. |
| 17:23:31 | BrianRice-work | mm |
| 17:24:04 | BrianRice-work | in Slate we have multi-methods and can add an additional argument for dispatch which is "contextual". that's a bit faster but not enough |
| 17:24:32 | evan | how does the user construct that? |
| 17:25:00 | evan | multi-method wise, that makes total sense, since multi-methods are really just a way of constructing a decision tree inside a method |
| 17:25:25 | BrianRice-work | usually with dynamic or lexical binding, i.e. inContext: x do: [messages which look normal but now have modified lookup] |
| 17:26:00 | evan | and previously, you've added methods explitely to that context? |
| 17:26:21 | BrianRice-work | typically we just "uncurry" the method to make a new signature with an extra argument |
| 17:26:48 | BrianRice-work | so instead of "x decodeFrom: y" we do "z decode: x from : y" |
| 17:26:50 | evan | so, would every call within that scope be modified at compile time to include an extra argument? |
| 17:27:09 | BrianRice-work | no, runtime :( at least the way we implemented it |
| 17:27:25 | evan | does the multi-method itself say "is there a context I should include in my lookup?" |
| 17:27:39 | evan | and the context is make active in a thread-local way |
| 17:27:40 | BrianRice-work | the interpreter does |
| 17:27:51 | BrianRice-work | the interpreter is also thread-local |
| 17:28:27 | evan | ok, so the context works anywhere "below" where it's setup |
| 17:28:27 | BrianRice-work | the closest thing to this is ContextL which came a bit after we did this for common lisp |
| 17:28:31 | evan | ie, across method calls |
| 17:28:32 | BrianRice-work | right |
| 17:28:36 | evan | thats the sane thing |
| 17:28:41 | evan | and you obviouly have to do that at runtime |
| 17:28:49 | BrianRice-work | yep |
| 17:28:56 | slava | in factor we have 'hooks' which are generic functions that dispatch on the value of a dynamically scoped variable |
| 17:29:21 | BrianRice-work | that is conceptually similar |
| 17:29:54 | evan | i suppose if ruby had a way of installing a trampoline into a method slot in a class |
| 17:30:11 | evan | and that trampoline could consult some data to decide which method to actually call to |
| 17:30:19 | evan | basically, multi-method injection |
| 17:30:37 | evan | then at least it's a pay-per-usage system |
| 17:31:56 | BrianRice-work | aka "opt-in" ;) |
| 17:32:05 | evan | :D |
| 17:32:09 | evan | what a great term! |
| 17:32:11 | evan | :) |
| 17:32:46 | BrianRice-work | we were actually considering using our setup to create sandboxes and "subjective dispatch". we may get back to that but via other means. |
| 17:33:41 | BrianRice-work | focuses on the day-job... |
| 17:33:56 | evan | back to the perl house with you! |
| 17:35:26 | slava | evan: any more thoughts on our heap discussion earlier? |
| 17:35:42 | evan | not since the last time |
| 17:35:45 | evan | i haven't had time to play with it. |
| 17:36:05 | slava | what is the CodeManager change about? |
| 17:36:10 | slava | GC for JITted code? |
| 17:36:29 | evan | yeah |
| 17:36:33 | evan | well, eventually. |
| 17:36:51 | evan | there is currently a backend structure for the interpreter to use, per method |
| 17:37:04 | evan | that wasn't being cleaned up |
| 17:37:08 | evan | it is now |
| 17:39:11 | slava | ah |
| 17:39:18 | slava | but JITted code is still not cleaned up? |
| 17:40:13 | evan | nope |
| 17:40:18 | evan | getting to that soon. |
| 17:41:26 | slava | any major changes that have to be made for that to work? |
| 17:43:12 | evan | i don't think so. |
| 17:45:54 | evan | btw, the fact that IO.new(fd).close can completely fuck up some random future IO is so bad. |
| 17:50:34 | brixen | evan: you mean the fact that IO.new(fd) is essentially an fd alias? |
| 17:50:45 | brixen | ie dup is not called on the fd |
| 17:50:51 | evan | exactly |
| 17:50:55 | brixen | yeah, hate that |
| 17:51:02 | brixen | and that matz refuses to fix it |
| 17:51:09 | evan | and if you do |
| 17:51:14 | evan | f = File.open "/etc/hosts" |
| 17:51:19 | evan | g = IO.new(f.fileno) |
| 17:51:22 | evan | f.close |
| 17:51:28 | evan | you've just introduced a timebomb. |
| 17:51:50 | brixen | yeah, this issues was discussed in writing some specs |
| 17:51:51 | evan | because at some future time, g will be finalized and close will be called on f.fileno |
| 17:52:02 | evan | BUT if you open another file between those times |
| 17:52:11 | evan | you'll close the fd of some other random IO |
| 17:52:21 | brixen | yes |
| 17:52:30 | evan | so fucked. |
| 17:52:36 | brixen | yep |
| 17:54:32 | yakischloba | nothing checks to see if it was closed already? i was having dicussion about this with someone literally like 3 minutes ago |
| 17:54:56 | yakischloba | oh, it would not know |
| 17:55:01 | evan | right |
| 17:55:07 | slava | yakischloba: also it could be re-opened with a new file |
| 17:55:10 | evan | plus the suck ass part is this |
| 17:55:16 | evan | after you've done the above code |
| 17:55:29 | evan | h = File.open "whatever" |
| 17:55:32 | evan | h.fileno == g.fileno |
| 17:55:47 | yakischloba | yea |
| 17:55:48 | evan | <g goes out of scope and is collected> |
| 17:55:55 | evan | h.gets # => raises Errno::EBADF |
| 18:04:48 | Defiler | evan: Wait, seriously? |
| 18:04:56 | evan | http://gist.github.com/277353 |
| 18:04:58 | Defiler | The finalizer for an IO closes the fd? |
| 18:04:59 | evan | run that. |
| 18:05:20 | Defiler | That is iiiinnnsaenaena8rarer |
| 18:05:39 | evan | because IO.new does not dup(2) it's argument |
| 18:06:56 | Defiler | Yeah, it follows from that I guess, but wow that is ugly |
| 18:08:57 | BrianRice-work | I don't suppose there's some explanation of the design thinking behind ruby's taint concept, and maybe post-thinking about it now that its been in use for a while |
| 18:09:26 | Defiler | Nope! |
| 18:09:33 | BrianRice-work | aww. oh well |
| 18:09:34 | Defiler | I was just reading the ruby source from 1995 actually |
| 18:09:41 | evan | the post-think is that it's not very useful. |
| 18:09:42 | Defiler | and the changes are interesting |
| 18:09:45 | evan | imho. |
| 18:11:06 | BrianRice-work | ok. I'll stick with my shared-nothing sandboxes goal, then. |
| 18:11:27 | BrianRice-work | with asynchronous message-passing |
| 18:12:10 | Defiler | I guess my summary of the 'tainted?' post-think is 'blacklists don't work as well as whitelists' |
| 18:12:44 | BrianRice-work | ah, good point |
| 18:13:06 | brixen | nice, we pass all the existing #require specs and fail 1/2 of my rewritten one |
| 18:13:10 | brixen | *ones |
| 18:13:13 | brixen | WIN |
| 18:13:18 | evan | so, should I fix this in rubinius? |
| 18:13:25 | BrianRice-work | which goes right along with the things the E-rights / Caja guys have been saying |
| 18:13:50 | brixen | evan: did you see the ruby-core ticket on it, or want me to dig it up? |
| 18:13:57 | Defiler | evan: What can you do with two references to an un-duped fd that you can't do after duping? |
| 18:13:58 | brixen | evan: I think the fd should be dupped |
| 18:14:10 | Defiler | IOW, are there valid things that duping would prevent? |
| 18:14:11 | brixen | looks for the ticket |
| 18:14:12 | evan | brixen: nope, i don't see the ticket |
| 18:14:38 | evan | if I dup the fd passed to IO.new |
| 18:14:42 | evan | then problem solved. |
| 18:15:53 | brixen | hum hum, where was this... |
| 18:18:40 | Defiler | Am I supposed to be smart enough to figure out rdoc? |
| 18:18:46 | Defiler | Because, wow, I just have no idea how to use this nightmare |
| 18:19:16 | Defiler | I always always always run into errors like this: rdoc.rb:177:in `stat': No such file or directory - ./bin/ctags (Errno::ENOENT) |
| 18:19:21 | Defiler | the instant I try to use it for anything |
| 18:20:01 | evan | why the fuck is rdoc using ctags?! |
| 18:20:19 | Defiler | and why does it think it would be installed somewhere relative to the current directory? |
| 18:20:47 | evan | we need the drbrain |
| 18:20:49 | evan | to tell us. |
| 18:21:13 | evan | back on IO.new |
| 18:21:15 | evan | solution: https://gist.github.com/90ffaedb053391bf8268 |
| 18:21:57 | brixen | evan: grr, I'm not finding it |
| 18:22:27 | brixen | I swear matz specifically answered the question of why the fd is not dupped |
| 18:22:43 | evan | hm, ok. |
| 18:22:46 | evan | i'd love to know. |
| 18:22:50 | brixen | me too |
| 18:22:53 | brixen | heh |
| 18:24:37 | brixen | jredville is not responding to my ping, he wrote a spec about it |
| 18:24:52 | Defiler | This? http://redmine.ruby-lang.org/issues/show/2250 |
| 18:26:27 | brixen | I found that one, but it was not the one I was thinking of |
| 18:27:04 | wyhaines | OK. So.... I was able to successfully run Swiftiply under Rubinius, after a little hacking. It's not _quite_ so fast as MRI, and there seems to be a humungous memory leak, but nonetheless, it worked. |
| 18:27:36 | evan | i'm betting I know the answer |
| 18:27:37 | brixen | wyhaines: woot, bummer, ugh, woot |
| 18:27:40 | evan | reading that ticket Defiler posted. |
| 18:29:05 | evan | that example about using IO::for_fd from Socket#sysaccept |
| 18:29:14 | evan | if you dup it |
| 18:29:24 | evan | then the socket is never closed. |
| 18:29:36 | evan | because the original fd is basically left dangling |
| 18:29:41 | evan | never closed |
| 18:29:56 | evan | never closed within the kernel |
| 18:30:03 | evan | because there will be 2 fds pointing to the same kernel object |
| 18:31:51 | Defiler | What if it was 'open' that duped it, not IO.new? |
| 18:33:40 | evan | i don't see how that changes anything |
| 18:33:50 | evan | we'd have the same issue |
| 18:34:18 | Defiler | Hrm, yeah. |
| 18:34:52 | Defiler | I guess if we had an object that kept pointers to all the IOs that wrap a given fd |
| 18:35:04 | Defiler | We could avoid collecting things that had side effects |
| 18:35:56 | evan | right |
| 18:35:58 | evan | thats what jruby does |
| 18:36:03 | evan | the fd is an indirection |
| 18:36:17 | evan | to a table of backend objects |
| 18:37:19 | brixen | hmm, this is what I was thinking of http://bit.ly/4xaH9V |
| 18:40:23 | evan | basically |
| 18:40:32 | evan | matz is saying that you use IO.new at your own peril. |
| 18:40:53 | Defiler | mmm peril |
| 18:41:32 | wyhaines | brixen: evan: I do have a question, when you have a moment, about why rb_define_alloc_func was defined the way that it is in the CAPI. It doesn't match how it's defined in MRI, and I had to change the definition to match MRI's to get my code to compile. Ignorance is bliss, though, and I'm feeling pretty happy, so what am I missing? |
| 18:41:54 | evan | why was it wrong? |
| 18:42:26 | evan | seems fine to me |
| 18:42:30 | brixen | wyhaines: gist |
| 18:42:43 | brixen | wyhaines: it's hard to imagine what you may have changed :) |
| 18:43:48 | brixen | rb_define_alloc_func is used and working in our lib/ext |
| 18:43:56 | brixen | digest and syck |
| 18:46:00 | evan | wyhaines: ? |
| 18:48:33 | wyhaines | Yeah, it's interesting, because my extension uses it exactly like your digest.c does, but I was getting an error out of it when building. Just a moment. I'll pull the error that I was getting and put everything into a gist. |
| 18:48:53 | evan | when building? |
| 18:49:11 | evan | sounds like a function pointer cast problem |
| 18:49:43 | brixen | yeah |
| 18:54:26 | wyhaines | Yeah, it is. |
| 18:54:27 | wyhaines | https://gist.github.com/676b35c627b1a8a956ea |
| 18:54:49 | evan | ok... |
| 18:54:51 | evan | what did you change? |
| 18:55:09 | evan | is splaytree in C++ |
| 18:56:08 | wyhaines | Yeah, splaytree is in C++. |
| 18:56:30 | evan | I suspected as much |
| 18:56:34 | evan | what did youc hange? |
| 18:57:33 | brixen | you should be able to use the RUBY_METHOD_FUNC macro I think |
| 18:57:37 | wyhaines | I just change ruby.h and module.h so that the rb_define_alloc_func didn't use CApiAllocFunction, and instead looked just like MRI: rb_define_alloc_func(VALUE class_handle, VALUE (*allocator) _((VALUE))); |
| 18:57:51 | wyhaines | It built. :) But I figured it was wrong. |
| 18:57:59 | evan | why not change CApiAllocFunction to match that |
| 18:58:05 | wyhaines | Because I was just hacking. |
| 18:58:13 | evan | you should just change it. |
| 18:59:08 | wyhaines | OK. I figured there was something that I was missing, though, since, as Brixen pointed out, your use of it in your C code in digest.c works fine, as is. |
| 18:59:13 | evan | i think thats just an oversight by rue |
| 18:59:16 | evan | when he coded that up. |
| 18:59:28 | evan | it's because splaytree is C++ |
| 18:59:40 | evan | ANYARGS is "..." if the file is C++ |
| 18:59:44 | evan | otherwise it's "" |
| 18:59:52 | wyhaines | Ah! |
| 18:59:56 | brixen | yeah, I added the _() __() macros much later too |
| 18:59:57 | evan | it works for digest because digest is in C |
| 19:00:14 | evan | and C allows any function pointer through if the type has () as the arguments |
| 19:00:32 | evan | () in C is not "no arguments" it's "any arguments" |
| 19:00:39 | evan | (void) is "no arguments" |
| 19:00:55 | boyscout | Add GC finalization support, fix IO close-on-cleanup bug - a9c471d - Evan Phoenix |
| 19:00:55 | wyhaines | OK. Do you want me to make a ticket for my changes? I added rb_equal and rb_yield_values to the CAPI, as well. |
| 19:00:58 | boyscout | CI: Commit a9c471d failed. http://github.com/evanphx/rubinius/commit/a9c471decfaed2f469c52294ab4fac836871cc43 |
| 19:01:17 | evan | ack. forgot a file. |
| 19:01:37 | boyscout | Add missing file - 5171ef4 - Evan Phoenix |
| 19:01:47 | evan | wyhaines: sure, or commit them |
| 19:01:50 | evan | if you have a commit bit |
| 19:02:22 | wyhaines | I don't appear to. |
| 19:03:34 | evan | ticket is fine then |
| 19:06:37 | wyhaines | Cool. Will do. |
| 19:08:14 | dbussink | wyhaines: also included tests? |
| 19:08:18 | boyscout | CI: rubinius: 5171ef4 successful: 3024 files, 11747 examples, 35948 expectations, 0 failures, 0 errors |
| 19:13:30 | brixen | anyone know if Array#sort is stable in MRI by accident or design? |
| 19:14:16 | brixen | hm, maybe the iso draft says... |
| 19:14:27 | Defiler | Looked like it was by design to me when I was analyzing it |
| 19:14:46 | Defiler | and I've run into bugs in ruby libs that expected it to be stable |
| 19:14:53 | Defiler | ..but were failing because the data was changing during the sort |
| 19:15:00 | brixen | yeah |
| 19:15:09 | brixen | ironruby dev was asking on the rubyspec list |
| 19:15:40 | wyhaines | dbussink: I will provide tests, yes. In fact, if you all want to throw me a commit bit sometime, I'll work on filling in some more of the CAPI here and there. |
| 19:15:55 | dbussink | wyhaines: cool :) |
| 19:16:02 | dbussink | wyhaines: commit policy is very open |
| 19:16:18 | evan | wyhaines: sure. did you have a bit before? |
| 19:16:20 | evan | i thought maybe you did. |
| 19:16:22 | dbussink | brixen: i think i remember that being discussed before |
| 19:16:37 | dbussink | brixen: i somewhat remember that it was a feature |
| 19:16:40 | wyhaines | evan: I thought I did, too. But I don't see it now. I know that I do for rubyspec. |
| 19:16:58 | dbussink | brixen: i think it was a discussion with the jruby guys |
| 19:16:59 | evan | i'll add you on github |
| 19:17:03 | evan | pretty sure you had one before |
| 19:17:41 | evan | wyhaines: ok, added you |
| 19:17:43 | evan | commit away |
| 19:18:02 | wyhaines | evan: Cool. Thanks. |
| 19:18:14 | dbussink | brixen: looks like i remembered wrong: http://redmine.ruby-lang.org/issues/show/1089 |
| 19:18:33 | brixen | so ISO draft only details Enumerable#sort and for the the result of #<=> only details < 0 and > 0 |
| 19:19:13 | brixen | dbussink: thanks |
| 19:19:44 | dbussink | brixen: from that discussion it seems that even mri doesn't have a completely stable sort |
| 19:20:04 | brixen | dbussink: yeah, that's what I was inferring too |
| 19:24:27 | Defiler | interesting thread |
| 19:25:42 | rue | wyhaines, evan: I am pretty sure I used the typedef for some particular reason, but it may just have been to either A) have a typedef to use or B) defensive coding to conform to C++'s function pointer types |
| 19:26:06 | rue | Either way if it works |
| 19:26:08 | evan | the typedef is good |
| 19:26:17 | evan | makes it clearer |
| 19:26:19 | wyhaines | rue: Yeah. No argument with the typedef. |
| 19:26:31 | evan | it's just a matter of using ANYARGS vs the exact signature |
| 19:26:32 | evan | basically. |
| 19:26:37 | wyhaines | I just did it the way that I did because I was hacking, and it was faster to toggle it back if I left the typedef alone. |
| 19:27:05 | rue | Yeh, dun remember what the rationale was. The change should work fine though |
| 19:27:54 | rue | Who was it that was rewriting Array#sort? Did that get finished? |
| 19:28:20 | Defiler | I think their username was \w+ |
| 19:28:23 | brixen | rue: can't remember who that was but no |
| 19:28:31 | Defiler | Since Array#sort has been rewritten like 1123121 times in rbx heh |
| 19:28:32 | brixen | haven't heard back from them |
| 19:28:51 | rue | Mighta gotten discouraged with the edge cases :) |
| 19:28:55 | brixen | heh |
| 19:28:59 | brixen | that tends to happen |
| 19:29:14 | brixen | probably why MRI doesn't have a pluggable GC arch too |
| 19:29:25 | brixen | ZING to all those wishers :) |
| 19:30:24 | rue | Heh |
| 19:30:37 | rue | That discussion got good again |
| 19:31:50 | evan | if MRI had a pluggable GC arch, then I could write an Array#sort that is O(1) |
| 19:35:18 | brixen | *and* stable |
| 19:35:21 | brixen | uber stable |
| 19:35:42 | brixen | even stable under #reverse and #reverse_each_other |
| 19:35:45 | evan | oh, mine is stable |
| 19:35:47 | brixen | and stuff |
| 19:35:54 | evan | it's also O(1) for all inputs. |
| 19:36:15 | slava | if MRI had a pluggable GC arch, then you could write a stable ruby |
| 19:36:49 | brixen | slava: the standard ruby cut has a point and will never be stable unless it has high angular momentum |
| 19:36:53 | brixen | or something |
| 19:36:58 | evan | if you wanna see something wierd |
| 19:37:03 | evan | a = []; a << a; a << a |
| 19:37:04 | evan | a.sort |
| 19:37:14 | evan | i don't understand that output at all. |
| 19:37:28 | brixen | sweet |
| 19:37:28 | slava | whoa |
| 19:37:32 | brixen | what the hell |
| 19:37:38 | Defiler | aaaaaaaaah |
| 19:37:41 | Defiler | aaaaaaaaaaaaaaaaaaah |
| 19:37:44 | slava | [[[...], [...]], [[...], [...]]] |
| 19:37:54 | brixen | that screams bug to me |
| 19:37:54 | Defiler | Oh, sure, I get it |
| 19:38:05 | slava | its so weird that ruby attempts to do the right thing with circular structures |
| 19:38:08 | slava | like making equality testing wor |
| 19:38:10 | slava | work* |
| 19:38:35 | slava | when is that even useful? |
| 19:38:46 | evan | oh |
| 19:38:46 | Defiler | check out a[0] and a[1] |
| 19:38:47 | evan | it's not. |
| 19:39:02 | Defiler | and therefore also a == a.first |
| 19:39:45 | Defiler | So we're now sorting what looks like an array, but all three objects, the array and its two elements, are the same object |
| 19:39:52 | evan | I kind of hoped it would raise SortError::YourAnAsshat |
| 19:40:11 | Defiler | x = a.sort |
| 19:40:16 | Defiler | x == a |
| 19:40:28 | slava | evan: raising that error in turn raises a GrammarNazi::YourIsNotYou're error |
| 19:40:29 | Defiler | but of course they have different inspect outputs hehe |
| 19:40:46 | evan | slava: but via chained exceptions |
| 19:45:00 | brixen | Defiler: hmm, I dunno |
| 19:45:29 | Defiler | My guess is that this is an artifact of what happens when you 'to_ary' a recursive array |
| 19:45:36 | brixen | a = []; b = []; a == b; a << a; b << b; a != b |
| 19:45:40 | brixen | why is that? |
| 19:46:23 | Defiler | because as soon as you are recursive, you can't exhaustively check equality, you just have to go with the outermost wrapper |
| 19:46:44 | Defiler | so to == it probably looks like [object_12345] == [object_12346] |
| 19:47:00 | brixen | yes |
| 19:47:14 | brixen | but that seems weird with the sort example |
| 19:47:20 | Defiler | check this one out |
| 19:47:26 | Defiler | a = []; a << a; a.sort |
| 19:47:50 | evan | yeah |
| 19:47:51 | evan | thats a wierd one. |
| 19:48:25 | Defiler | *b = *a |
| 19:48:26 | Defiler | hehe |
| 19:48:40 | brixen | heh |
| 19:48:52 | Defiler | The result there surprises me |
| 19:49:04 | Defiler | and I think might be the underlying thing that is adding another wrapper around these |
| 20:12:51 | rue | evan: `class Array; alias sort non_const_sort; def sort(); t = Time.now.to_i; non_const_sort; sleep(O_1 - (Time.now.to_i - t)); end; end` |
| 20:13:17 | rue | O(1) !! |
| 20:14:07 | Defiler | alias_method :awesome_sort, :to_a |
| 20:19:19 | rue | slava: Yeah, have to litter everything with a recursion guard because of it :) |
| 20:19:51 | Defiler | I don't understand the purpose of recursive arrays in ruby |
| 20:20:00 | Defiler | I have never seen them used in real code |
| 20:23:38 | rue | There is no purpose |
| 20:26:34 | brixen | they have a higher purpose |
| 20:44:20 | dbussink | Defiler: they exists because they can |
| 20:44:35 | dbussink | probably someone trying to satisfy an intellectual challenge |
| 20:45:57 | rue | I venture it is strictly to protect users from the recursion |
| 20:48:22 | brixen | it is not hard to end up with a recursive structure |
| 20:48:38 | brixen | it's not the a = []; a << a case that matters |
| 20:48:45 | Defiler | Yeah |
| 20:48:59 | brixen | it's some object that keeps an array of objects and that object ends up in the array |
| 20:49:00 | Defiler | for example, ActiveRecord has a recursive structure in the 'errors' collection |
| 20:49:05 | Defiler | but it isn't a ruby recursive array |
| 20:49:18 | brixen | pretty sure our AST or compiler ends up with recursive arrays |
| 21:48:29 | evan | object graphs with cycles are quite common in ruby |
| 21:48:45 | evan | it's just that explicitly self recursive arrays are not very useful |
| 21:55:54 | BrianRice-work | are ruby collection libraries much like smalltalk in that deep copy methods assume no cycles in containership? |
| 21:57:03 | brixen | neither #clone nor #dup are deep copies |
| 21:58:18 | BrianRice-work | ok, so there's no core copy method that recurses(?) |
| 21:58:23 | ezmobius | there isnt really a deep copy in ruby excpet for Marshal.load(Marshal.dump(foo)) which is kinda lame |
| 21:58:33 | BrianRice-work | ok |
| 21:59:53 | rue | A generic deep copy is obviously difficult to do...but Array, Hash and so on should probably have standard-provided extra argument to #dup/#clone to allow specifying depth |
| 22:00:08 | brixen | Defiler: heh, I think that #sort behavior is from #dup |
| 22:00:27 | brixen | a = []; a << a << a; a.dup # => [[[...], [...]], [[...], [...]]] |
| 22:02:02 | evan | fun. |
| 22:04:43 | evan | I should really add biomorphic IC optimizations |
| 22:05:04 | evan | that would make #nil? much nicer |
| 22:06:40 | brixen | if #nil? is organic? |
| 22:06:42 | brixen | :D |
| 22:06:50 | brixen | oh, you mean bimorphic |
| 22:09:01 | evan | hah |
| 22:09:01 | evan | yes |
| 22:09:03 | evan | hehe |
| 22:09:05 | evan | bimorphic |
| 22:09:07 | evan | not biomorphic |
| 22:09:19 | evan | biomorphic is when one lifeform turns into another? |
| 22:09:22 | brixen | we really should add something biomorphic to rbx |
| 22:09:48 | evan | word. |
| 22:09:59 | brixen | based on or resembling a living organism is what dashboard dict says |
| 22:10:01 | evan | maybe turn carrots into buffalo |
| 22:10:18 | brixen | if I'm going to be a borg, I want rbx running my codes |
| 22:10:27 | brixen | that's tweet worth haha |
| 22:10:29 | evan | heh |
| 22:15:25 | dwaite | I thought the borg ran .Net? |
| 22:16:03 | dwaite | you better try talking to the ironruby folk if you want the nanobots in your blood to be able to run ruby |
| 22:16:50 | brixen | the day nanobots from anywhere near M$ are in my blood is the day I'm in the morgue |
| 22:17:01 | brixen | cus the bots would probably be suffering random BSOD |
| 22:17:04 | dwaite | 'have you tried rebooting him?' |
| 22:17:10 | brixen | exactly |
| 22:17:28 | Defiler | brixen: oooh dup huh? fun |
| 22:17:35 | Defiler | re: array fun |
| 22:18:17 | brixen | besides, there's no one small enough to click the buttons on the tiny security exception confirm dialogs on the nanobots |
| 22:18:28 | brixen | so they'd just be frozen and not working |
| 22:18:52 | Defiler | so rad: http://github.com/mame/_ |
| 22:19:10 | brixen | heh |
| 22:19:22 | Defiler | http://github.com/mame/_/blob/master/lib/_.rb |
| 22:19:25 | Defiler | sweet at_exit |
| 22:19:50 | dwaite | what syntax is that? |
| 22:20:54 | dwaite | oh no |
| 22:23:00 | evan | hehe |
| 22:23:14 | evan | it's like all the perl source filters |
| 22:23:54 | brixen | I feel like I could run this over these #require specs and they would be just as clear |
| 22:24:03 | brixen | no wait, they would be an improvement |
| 22:25:08 | brixen | you think I jest, but I do not |
| 22:25:09 | brixen | http://gist.github.com/277578 |
| 22:25:18 | BrianRice-work | it's like the hangman games that the ruby group's local nutty hacker likes to create |
| 22:25:43 | brixen | see that extended_on guard *inside* the Dir.chdir block using #`rm ?? |
| 22:25:49 | brixen | that is precious |
| 22:27:28 | evan | hah |
| 22:27:38 | evan | no, not hah. |
| 22:27:40 | evan | bad hah. |
| 22:27:44 | evan | sorry brixen :/ |
| 22:27:49 | brixen | weeps hah |
| 22:27:50 | brixen | yes |
| 22:32:10 | rue | brixen: Pneumatic stegosauruses are biomorphic |
| 22:32:23 | brixen | rue: ahh indeed! |
| 22:32:39 | brixen | I wonder if one would fit in my living room... |
| 22:32:52 | brixen | maybe a miniature |
| 22:33:08 | evan | haha |
| 22:35:33 | rue | I have to say I will absolutely accept criticism for my part of the #require/#load specs. They were just flat-out ugly |
| 22:37:08 | rue | However, they also worked :) Plus doing it right would have taken #{brixen.been_working_on_them_how_long_now()} :/ |
| 22:37:57 | brixen | rue: yeah, I know |
| 22:38:11 | brixen | I share as much blame to have ever let them exist |
| 22:38:26 | brixen | just decoding them is painful |
| 22:39:08 | rue | Naw, they did the job, there was more important stuff to do |
| 22:39:18 | brixen | well, they don't really do the job |
| 22:39:27 | brixen | rbx passes all the exiting ones |
| 22:39:35 | brixen | and fails half of my rewrites |
| 22:39:41 | brixen | so, yeah... |
| 22:40:08 | rue | Have you committed (parts of) the new stuff |
| 22:40:12 | rue | +? |
| 22:40:17 | brixen | not yet |
| 22:40:38 | brixen | well, locally heh |
| 22:40:45 | brixen | including about 1000 git ci --amends |
| 22:41:07 | evan | i was going to ask that |
| 22:41:08 | evan | :) |
| 22:41:09 | rue | Heh |
| 22:41:37 | brixen | I introduced a bug in it_behaves_like while fixing it for nested describes |
| 22:41:58 | brixen | something needs to be dupped |
| 22:42:04 | brixen | duped |
| 22:42:22 | evan | oh goody |
| 22:42:27 | evan | File.extname is at the top of this profile |
| 22:42:35 | evan | i wonder what horror of performance i'm about to find |
| 22:42:39 | brixen | hehe |
| 22:43:47 | evan | actually not too bad |
| 22:43:53 | evan | though the style is weird. |
| 22:43:55 | dwaite | what is the best way to profile a script? |
| 22:44:01 | evan | -P |
| 22:44:03 | evan | well |
| 22:44:05 | evan | -Xint -P |
| 22:44:10 | dwaite | I'm curious why that mandelbrot script I made a while back is so much slower than 1.9 |
| 22:44:34 | rue | evan: How is the JITted profiling? |
| 22:44:45 | evan | i need to fix it |
| 22:44:47 | evan | it's possible |
| 22:44:56 | evan | but i need to move profiling up to a -X option |
| 22:45:11 | evan | it's not well tested either. |
| 22:45:15 | Defiler | Oh, hey.. Python has exactly the same behavior of sorting recursive arrays |
| 22:45:18 | evan | so i just use -Xint while profiling |
| 22:45:21 | Defiler | (as in, it doubles the number of elements) |
| 22:48:22 | rue | evan: Hm. Do you have a hunch on whether there is anything that would skew the overall profile of some program between the two modes? |
| 22:48:56 | evan | it could |
| 22:49:22 | brixen | definitely could |
| 22:49:25 | rue | As in, for example, with JIT enabled some particular method would have a significantly better/worse than average runtime? |
| 22:49:26 | brixen | one would hope it would |
| 22:49:38 | brixen | otherwise the jit wouldn't be doing its job |
| 22:49:38 | evan | but thats ok atm |
| 22:49:49 | evan | because i'm using the profile to measure algorithmic performance |
| 22:49:55 | evan | not overall performance |
| 22:50:03 | rue | True, I would not imagine it to be a huge problem |
| 22:50:10 | evan | righ |
| 22:50:12 | evan | right |
| 22:50:15 | brixen | yeah, running with -Xint makes sense |
| 22:50:25 | evan | generally profiling is because you want to know what the program is doing algorithmicly |
| 22:50:27 | brixen | unless you can tell the jit what to do from ruby code |
| 22:50:32 | brixen | yeah |
| 22:50:49 | evan | not how the algorithm is executed. |
| 22:50:55 | brixen | yep |
| 22:51:04 | evan | but in time, we need to introduce a way to find out that info |
| 22:51:08 | evan | possibly a sampler |
| 22:51:22 | evan | that would at least tell you how much time was spent in JIT'd versus interpreted methods |
| 22:51:24 | brixen | I'd think shark/oprofile would be more useful then |
| 22:51:28 | rue | I suppose the main benefit I am thinking is just that using the real runtime i.e. JIT will allow concentrating the algo improvements on the parts that are the most troublesome at runtime |
| 22:52:16 | rue | Disclaimer: just musing, obviously it is not at the top of the list of priorities |
| 22:52:37 | evan | funny enough |
| 22:52:45 | evan | if you try and profile the jit'd code |
| 22:52:50 | evan | you influence it a bunch |
| 22:52:53 | evan | so it works less efficiently |
| 22:53:04 | evan | so it can become a loosing battle |
| 22:53:11 | evan | you use profiling to find the hot areas |
| 22:53:13 | evan | you improve them |
| 22:53:17 | evan | then you rerun benchmarks |
| 22:53:47 | rue | True |
| 23:16:39 | brixen | heh, cool, just ran these specs under rbx using *rspec* 1.3.0 |
| 23:17:05 | brixen | it is just wicked cool we run rspec |
| 23:17:41 | brixen | I spent so many weekends in early 2007 trying to even get a spec -v to print |
| 23:17:46 | rue | Heh |
| 23:18:16 | evan | oh nice! |
| 23:18:21 | brixen | it would just spin and use up all my memory and I couldn't figure out where that was happening |
| 23:18:28 | brixen | never figured it out |
| 23:18:45 | brixen | had something to do with define_method inside an SClass |
| 23:19:07 | evan | hehe |
| 23:19:10 | evan | now it runs great! |
| 23:19:15 | brixen | it does! |
| 23:19:28 | brixen | I just gem installed it, installed mspec gem, and voila |
| 23:20:00 | brixen | heh fun side note... |
| 23:20:05 | brixen | installing rspec: rbx: Precompiling 312 files... |
| 23:20:19 | evan | rspec is big. |
| 23:20:22 | brixen | installing mspec: rbx: Precompiling 231 files... |
| 23:20:33 | brixen | same 3 digits! |
| 23:20:34 | brixen | heh |
| 23:20:38 | evan | hah |
| 23:21:10 | brixen | in fact, you can get it by rotating |
| 23:21:11 | brixen | sweet |
| 23:21:50 | evan | version << 1 |
| 23:36:10 | evan | well, thats a pleasent surprise |
| 23:36:21 | evan | for a trivial String#split benchmark |
| 23:36:27 | evan | MRI: 4.45s |
| 23:36:30 | evan | RBX: 2.62s |
| 23:37:05 | evan | 1.9: 1.2s |
| 23:37:38 | evan | MacRuby: 7.3s |
| 23:37:46 | Defiler | !! |
| 23:38:18 | brixen | wowsers |
| 23:38:48 | evan | jruby: 2.4s |