Index

Show enters and exits. Hide enters and exits.

00:02:11boyscoutCI: rubinius: 8a4758c successful: 3463 files, 13809 examples, 41469 expectations, 0 failures, 0 errors
00:05:50brixenerg, I sigbus'd it
06:15:27brixenmarcandre: got it fixed :)
07:09:24boyscoutChanged libgdtoa g_dfmt() to emit MRI format for minimal, unique String representation of Float. - b687fb8 - Brian Ford
07:09:24boyscoutAdded to_s_minimal primitive for Float#to_s. - c2bee83 - Brian Ford
07:09:24boyscoutRewrote Float#to_s specs. - e92cbca - Brian Ford
07:09:24boyscoutRemoved CI tags for passing String#to_s specs. - de14e67 - Brian Ford
07:09:24boyscoutHack to ensure libgdtoa is rebuilt. - bac27ed - Brian Ford
07:21:06boyscoutCI: rubinius: bac27ed successful: 3463 files, 13823 examples, 41473 expectations, 0 failures, 0 errors
07:25:55matthewdbrixen: Shouldn't `bin/mspec ci spec/capi` run a subset of the specs that `bin/mspec ci` would run?
07:26:16brixenno
07:26:23brixenbut I can see why you'd think that
07:26:31brixencheck out spec/default.mspec
07:26:48brixenbin/mspec ci runs :ci_files
07:27:00matthewdYeah, the help seems to suggest it... "To run a subset of the known good specs" :/
07:27:03brixensee the ^spec/capi lines
07:27:14brixenthe ^ is 'exclude'
07:27:57brixenmatthewd: what are you working on with capi?
07:28:48brixenI've got rb_class_new, rb_class_inherited, rb_const_defined_at, rb_const_get_at here
07:28:56brixenworking on specs for them
07:28:56matthewdrb_f_global_variables and rb_str_new3
07:29:00brixenok
07:29:03matthewdAnd a missing prototype for rb_apply
07:29:04brixencool
07:30:16boyscoutrb_protect's callback takes a VALUE, not ANYARGS. - 4bdb9cc - Matthew Draper
07:30:16boyscoutAdd apparently-missed prototype for rb_apply() - 2396aea - Matthew Draper
07:30:16boyscoutAdd rb_f_global_variables() and rb_str_new3(). - dedae82 - Matthew Draper
07:30:16boyscoutSpec rb_f_global_variables() and rb_str_new3(). - cfa7989 - Matthew Draper
07:30:56brixenwoot
07:31:03brixenok, sleep for me
07:39:26boyscoutCI: rubinius: cfa7989 successful: 3463 files, 13824 examples, 41475 expectations, 0 failures, 0 errors
11:38:32boyscoutClang doesn't need this hack that fixes a GCC complaint - 806388b - Dirkjan Bussink
11:38:32boyscoutLinking with Clang doesn't implicitly add libstdc++ - 69e90e1 - Dirkjan Bussink
11:39:59kronos_vanodbussink, What's the point of clang?
11:45:36ddfreynewhat’s the point of gcc if you have clang?
11:46:33boyscoutCI: rubinius: 69e90e1 successful: 3463 files, 13824 examples, 41475 expectations, 0 failures, 0 errors
14:48:31dbussinkkronos_vano: did you ever see clang error messages compared to gcc?
16:04:09matthewdbrixen: The compiler emits push_const in a bunch of places that I'm pretty sure should be push_cpath_top/find_const
16:04:37Defilerprobably explains a bug I haven't had time to hunt down
16:05:32matthewdbrixen: eg: class A; class Regexp; end; def x; /oops/; end; end; A.new.x
16:08:59Defilernice test case; working on it now
16:14:54bluestormhello
16:15:42bluestormI'm looking for a high-level answer to a simple question : why does rubinius use so much more memory than classical Ruby implementations ?
16:16:51DefilerTwo main answers to that question
16:16:58Defiler1) it is newer than the others
16:17:22Defiler2) more things are exposed as objects in order to enable introspection, the ability to build powerful extensions of the runtime in ruby, etc
16:17:32bluestormhm
16:17:38Defiler#1 will improve over time, #2 means that rbx will always use more memory than mri
16:17:44bluestormso the data representation is more memory-hungry
16:17:47Defilerjust the classic memory usage / feature tradeoff
16:18:01DefilerNot the actual objects themselves, at least not by much
16:18:05Defilerbut there are more objects allocated
16:18:35bluestormand do you have an idea of what a reasonable target might be ?
16:18:42Defilernope!
16:19:09bluestorm(are there still relatively low-hanging fruits just waiting to be optimized ?)
16:20:20Defilerprobably; the memory profiler is getting some love and improvement currently
16:20:26Defilerand that will be handy
16:20:39bluestormok, thanks
16:21:03Defilersometime when evan is around, I'm sure he can give you some actual facts
16:21:25bluestormmaybe you should add that information to the FAQ ?
16:22:18DefilerIt's been in some versions of such things
16:22:21Defilermust not be on the new site
16:32:39brixenmatthewd: yes, the two push_const :Regexp in literals.rb are wrong
16:32:50brixenmatthewd: we do it correctly in GlobalVariableAssignment
16:33:12brixenmatthewd: evan mentioned adding an insn to put Rubinius on the stack
16:33:19Defileryeah, running the test suite now after changing those
16:33:26brixenthat's probably a good idea
16:33:47brixenDefiler: sweet
16:33:58brixenmatthewd: where there other examples you had?
16:35:02brixengrabbing some food, bbiab...
16:35:25brixenDefiler: btw, how do you like the new compiler?
16:35:31Defilerit is jawesome
16:35:35brixenhave you poked around it much?
16:35:59matthewdbrixen: Basically I just did a grep for push_const in spec/compiler, and was suspicious that any such mention of a well-known constant is likely dangerous
16:36:10brixenmatthewd: yep, ok
16:36:37matthewd(The Regexp one was the one I actually hit; it's entirely possible the others are actually all innocuous)
16:37:04brixenthe others that I see are all Rubinius
16:37:14brixenand we'll likely add an insn for that
16:37:35brixenthe only other is ConstantAccess, and that is right afaics
16:37:46brixensince that is the point of that node
16:38:59brixenDefiler: seen this site? http://www.dalnefre.com/wp/2010/05/composing-actors/
16:39:02brixenfun stuff
16:39:13brixenthe syntax of hummus is pretty terrible
16:39:25brixenbut all that is directly applicable to ruby
16:40:19brixenoh, humus has one em
16:40:21matthewdAh, yes... the others are all legit parsings of the actual code. That'll teach me for not looking closer :)
16:40:32brixenno worries, nice catch
16:44:47matthewdNext bit of fun :)
16:44:50brixenmatthewd: oh, heh, grepping lib/compiler/ast is much more instructive
16:44:57brixenI see you grepped spec/compiler
16:45:21Defilercool, green suite again
16:45:23Defilerwill push in a bit
16:45:28brixenDefiler: awesome
16:45:45matthewdGiven class A; class B; end; module M; end; end... rb_define_module_under(rb_cB, "M")... doesn't.
16:45:56matthewdInstead, it returns A::M
16:46:42brixenhmm
16:47:30matthewdBecause define_module_under uses Helpers::open_module, uses const_get_under, which searches upwards
16:47:42brixenyeah
16:47:53brixenprobably not hard to fix
16:48:05brixenbut I really must food myself, back in a bit
17:01:46matthewdYeah, doesn't look to be as tricky as I feared; I'd assumed I'd need to deal with multiple callers with differing requirements
17:02:52matthewdInterestingly, open_class already gets it right
17:06:35dbussinkbrixen: got rbx to compile and link with clang :)
17:06:40dbussinkbrixen: also built the extensions
17:06:56dbussinkwhole slew of warnings in openssl though, but that isn't surprising
17:08:00brixendbussink: awesome!
17:08:29brixenmatthewd: yeah, MRI often has a method that takes flags and alters it's behavior
17:08:36brixeneg rb_const_get_0
17:08:50brixenmatthewd: we probably just did not have enough specs to catch this
17:11:38cremesdbussink: perf difference between gcc/clang when running specs?
17:12:00dbussinkcremes: haven't found any real differences, both were clocking in at 100s. for a compiled spec run
17:12:22cremestoo bad; was looking for a "free" performance win for ruby
17:23:44dbussinkcremes: well, haven't seen any benchmarks where clang is really faster, mostly either the same or slower
17:23:58dbussinkgcc has a lot of optimization history over time of course
17:24:31cremessure, but one of the supposed benefits of the llvm project is a cleaner architecture which allows for *easier* implementation of new optimization techniques
17:24:40cremesi thought maybe they had gotten to some of those by now
17:28:33dbussinkcremes: true, but even so, beating a long history is hard :)
17:28:47dbussinkcremes: but i really like the way better error messages for one
17:29:31cremesyes, better error messages are a good benefit! i wish ruby had them... ;)
17:30:41brixencremes: where would you like to see better error messages?
17:30:49brixencremes: when template expansion fails?
17:30:57brixenoh wait, we don't have that in ruby :)
17:31:01cremesheh
17:31:24cremesi think a lot of the syntax error messages are pretty poor in ruby; i haven't checked rbx to see if they are better/improved
17:31:37cremesoftentimes mri points me in the wrong direction to fix a syntax mistake
17:31:44matthewdbrixen: Grepping for rb_define_module_under in spec/ does support your "not enough specs" theory ;)
17:31:45brixenpart of that is a consequence of the parser tech
17:31:56cremesstruggling to think of a specific example
17:32:13brixenmatthewd: I suppose it does, huh :)
17:32:22dbussinkcremes: it's better than gcc though :)
17:32:29brixencremes: evan added better missing end detection for us
17:32:31cremesdbussink: indeed
17:32:54dbussinkmissing end is probably the only one that frustrating on a semi regular basis
17:32:55cremesbrixen: a good start; how about warning about unused variables (which are oftentimes misspellings?)
17:33:00dbussinkthat i can remember of
17:33:09cremesi know, i know, specs should catch those errors
17:33:11brixencremes: that is a possibility
17:33:12cremesi don't always write specs
17:33:20brixencremes: but that is not a parser deal really
17:33:25brixenwe could add that to the compiler
17:33:43cremesi'll take your word for it; i don't really know the guts of parsers and/or compilers
17:33:44brixenit's quite complicated though by the fact that a vcall and a local look the same to the parser
17:34:03matthewd... unless you encounter an eval, or your binding is published, ... ;)
17:34:10cremesperhaps extra checking could be enabled with the -w switch
17:34:26cremeswith the knowledge that it make give false positives
17:34:41cremesWWSTD? (what wold smalltalk do?)
17:34:46cremes:)
17:34:54brixenwe can require you to put () on every call ;)
17:35:01cremesno!
17:35:05brixenthat vastly simplifies it
17:35:08cremesyucky
17:35:15brixenremember power => responsibility
17:35:21cremesyes, yes...
17:35:22brixenwhere => is 'implies'
17:35:34cremeswants cake and to eat it too
17:35:38brixenyeah
17:36:04cremesi'll let you get back to work; time for my weekend workout
17:36:19brixenheh
17:36:20brixencool
17:40:14boyscoutrb_define_module_under() shouldn't return a parent's module. - 354dc79 - Matthew Draper
17:40:14boyscoutSpec rb_define_module_under(). - 9193f9c - Matthew Draper
17:47:47boyscoutEnsure the proper Regexp constant is found when processing literals - c853b86 - Wilson Bilkovich
17:48:14Defilermatthewd: That should fix it
17:48:17boyscoutCI: rubinius: 9193f9c successful: 3463 files, 13826 examples, 41478 expectations, 0 failures, 0 errors
17:50:05Defilerbrixen: interesting 'composing actors' link; I'll keep it open and read it today
17:51:52matthewdDefiler: Great!
17:56:34evanmorning gents.
18:03:57brixenmorning
18:05:30brixenevan: I type rbx -Xagent.start in one terminal; rbx console in the other; it starts; I type bt in the console and it sigbuses
18:05:44evanrad.
18:05:47brixenheh
18:05:51brixenwhat am I doing?
18:05:56evanplease get a gdb backtrace of the target rbx
18:06:06evanwell, wait, which thing sigbuses?
18:06:11evanrbx console or the target?
18:06:12brixentarget is?
18:06:17brixentarget then
18:06:18evanthe target is the other rbx
18:06:22evanthe one that ran -Xagent.start
18:06:42evanok, run the target under gdb and do it again
18:06:45evanand get a backtrace
18:06:51evanyou'll probably need backtraces of all the threads
18:06:51evanso do
18:06:55brixenhttp://gist.github.com/410249
18:06:58evan`thread apply all bt`
18:07:10evanah ok.
18:07:12evangot it.
18:07:20brixenk
18:07:24evani'm refactoring that code a little right now.
18:07:31evando run it under gdb though
18:07:36evanand find out which source line it's on.
18:07:50evanI'm going to work on the fact taht we're not demangling the symbols also.
18:08:40brixenk
18:08:49evani've backed out this refactor
18:08:55evanso i can debug this for ya.
18:09:00evanJust need the source line
18:09:11matthewdException: `Rubinius::InvalidRBC' kernel/delta/codeloader.rb:122 - /home/matthew/src/rbx/spec/ruby/command_line/fixtures/debug.rbc
18:09:42matthewdIn the middle of a spec run. Not the first time I've seen it... goes away if I run again.
18:09:42evanmatthewd: yep, thats fine.
18:09:50evanyep, it's actually expected.
18:09:55evanbecause that spec tests that -d is used
18:10:03evanand since -d causes exceptions to be printed out, that is printed
18:10:09evanbecause debug.rbc is out of date
18:10:16evanwe should probably surpress stderr
18:10:24matthewdAh, okay
18:11:26brixenevan: http://gist.github.com/410251
18:11:34brixenwant me to build debug?
18:12:02evanoh interesting.
18:12:03evansure
18:12:05brixener sec, new past coming
18:12:07evanwhat is the target running?
18:12:14Defilerbrixen: So, I've got some little cases that break due to the cpath_top thing, which I just fixed for Regexp..
18:12:17evani'll bet I can repro it.
18:12:28brixentarget is running irb
18:12:33evanoh fun!
18:12:34evanok
18:12:37DefilerI'm fixing the ones that break when you define a 'Rubinius' constant closer to your code than toplevel though
18:12:49evanDefiler: ok, cool.
18:12:53Defilershould I put those in somewhere? or just assert the proper bytecode generation and change it
18:12:58brixenevan: refresh the gist
18:13:13Defilere.g. https://gist.github.com/08b20f667bd783e9b686
18:13:14boyscoutA Time is not eql? to a non-time. - e966ea0 - Matthew Draper
18:13:14boyscoutSpec Time#eql?(non_time_value). - cc9d10f - Matthew Draper
18:13:16brixenevan: we were going to add a push_rubinius insn no?
18:13:28evanyeah, we still should.
18:13:32evanDefiler: you want to do that?
18:13:39evanit's so easy to add a new instruction now.
18:13:50evanI only ask that you add them to the bottom of the .def file
18:13:55Defileroh, ok.. so make push_rubinius instead of having to do cpath_top etc
18:13:59evanfor 2.0, we'll reorganize the file.
18:14:03evanDefiler: yeah.
18:14:11DefilerOK, sure
18:14:45evanbrixen: ok, easy! got the crash here.
18:14:47evandebugging now.
18:14:54Defilerwhat do I need to ensure I re-bootstrap these days?
18:15:08brixenevan: ok, cool
18:15:14Defiler(after adding an instruction)
18:15:20evanoh, we're not demangling in the segv handler...
18:15:23brixenDefiler: you should be able to just build
18:15:25evanhm, i wonder if we should...
18:15:35evanDefiler: just run rake
18:15:39brixenDefiler: everything gens off of instructions.def
18:15:39evanDefiler: we've got everything wired up now.
18:16:01Defilerso rad
18:16:42evanhm, i probably shouldn't demangle in the segv handler
18:16:57brixenprobably not
18:17:01brixenthat's last ditch
18:18:00brixenput the message in the bottle and hope the archeologists think there was intelligent life before the apocalypse
18:18:45evani'm betting that abi::__cxa_demangle has a pretty high complexity.
18:19:20matthewdHrmm... // @todo should coerce other types
18:19:25evanoh, I could exec from the handler
18:19:29evanthats safe to do.
18:19:36matthewdThat could explain what I'm seeing :P
18:19:44evanmatthewd: where are you looking?
18:19:50matthewdrb_num2dbl
18:20:08evanand what is the thing you're testing?
18:20:28matthewdI've been trying to get Johnson running
18:20:52matthewdThis is the last failure :)
18:20:55brixenomg matthewd is playing with his Johnson in public!
18:20:59brixentenderlove: ^^^
18:20:59evanhahahah
18:21:02evanmatthewd: PUT THAT AWAY
18:21:07evanthere are children here!
18:21:14brixenthat's why tenderlove named it that after all
18:21:18evanactually, no seydar isn't here right now.
18:21:23matthewdevan: Don't be silly! I'm playing with jbarnette's johnson! :P
18:21:23evanHE'S NOT EVEN HERE ZING
18:21:24tenderlovehahaha
18:21:27brixenhehe
18:21:40evanmatthewd: what is being passed to num2dbl?
18:21:46matthewdA bignum
18:21:46brixenI always confuse which Johnson has who
18:21:50evanmatthewd: oh ok
18:21:55tenderlovebrixen: are you in the same place as matthewd?
18:21:57evanmatthewd: you going to make num2dbl smarter?
18:22:01matthewdSure
18:22:05brixentenderlove: absolutely not! that's sick
18:22:08tenderlovehahaha
18:22:17brixenheh
18:22:21tenderloveevan: why are you not in NYC?
18:22:22tenderlove:-(
18:22:22boyscoutCI: rubinius: cc9d10f successful: 3463 files, 13827 examples, 41481 expectations, 0 failures, 0 errors
18:22:31matthewdShould it just call #to_f ?
18:22:58evanmatthewd: sure, thats fine.
18:23:07Defilerevan: You mean literally at the end of instructions.def, right?
18:23:12Defilerlike, even after invoke_primitive
18:23:13evanDefiler: I did.
18:23:13matthewdLeaving the special case for Float, obviously
18:23:15Defilerk
18:23:18evanmatthewd: sure.
18:23:25evanmatthewd: thats the accepted way to handle that.
18:25:01matthewdOf course, this is another function where I've won the chance to write specs for it too :P
18:25:07brixenhehe
18:25:20brixenwe try to keep those opportunities around
18:25:27brixen(not really, but hey)
18:33:05Defilerdo I need to build clean after adding an instruction?
18:33:13Defilerit looooks like it does it right, but it blows up trying to inline a method
18:33:13evannope
18:33:26evanDefiler: oh, you need to teach the JIT about the instruction
18:33:33evanyou get to change the JIT!
18:33:45Defileroh, hah, right
18:33:46Defilercool
18:34:03evanso, the way to do this is to create a function in vm/llvm/jit_utils.cpp
18:34:14evanthat returns G(rubinius)
18:34:18Defileryeah
18:34:20Defileralready there :)
18:34:24evank :)
18:34:36evanthere are some examples of calling a function for other instructions in there for you to copy
18:35:23Defilerwhy does 'push_cpath_top' not appear in this file?
18:35:35evanthats not a real instruction
18:35:37evancheck out generator
18:35:41Defileroh, right
18:35:46evanit's a psuedo instruction
18:36:23Defilerso, this is an example case where the instruction and the inline function decl are really the same code
18:36:42Defiler(being just G(rubinius) )
18:36:47evanyeah
18:37:03evani don't yet have a way for the JIT to handle that cause automatically
18:37:11evanand just use the code from the interpreter version
18:37:24evanbecause in pretty much every case, we want to do something custom for the JIT
18:37:29evanto exploit it's features
18:38:25brixendid I miss something? how is push_cpath_top not a real insn?
18:38:36DefilerI also need to update jit_visit.hpp, right?
18:38:57Defilerbrixen: rbx_push_system_object is called when you visit a cpath_top instruction
18:39:10brixenoh, ok, you mean in the jit
18:39:12brixengotcha
18:39:47evanDefiler: ah yes!
18:39:50evanDefiler: you can just reuse that
18:39:59Defileractually, I can JUST define it there, right?
18:40:01evanadd a number for Rubinius
18:40:06evanin push_system_object
18:40:10evanand call that with the proper number
18:40:15Defileroh, well
18:40:24Defileris that better than G(rubinius)? since we have a named global for it
18:40:33evaneither is fine.
18:40:38evani'll leave the decision to you.
18:40:52evanin push_system_object, you can still just return G(rubinius)
18:40:53brixenDefiler: choose wisely :)
18:41:05Defilerk
18:41:15evangets his Knight outfit out
18:41:19brixenheh
18:42:37matthewdOh, so, I had to #ifdef out a use of node.h
18:42:58evanis it just included but never used?
18:42:59matthewdSpecifically, it's used to work out whether a method is an attr_reader
18:43:02evanie, no usage of NODE?
18:43:26evanwe can add a stub for node.h
18:43:36evanwith nothing in it
18:43:42matthewdIs there something on Rubinius's Method I could use for equivalent understanding?
18:43:53evanhuh?
18:43:56evanequiv of what?
18:43:58Defilerman, so close
18:43:59DefilerException: `Rubinius::InvalidRBC' kernel/delta/codeloader.rb:122 - /Users/wilson/code/rubinius/spec/ruby/command_line/fixtures/debug.rbc
18:44:04evanDefiler: thats fine.
18:44:06evanthats not an error.
18:44:10Defilerah
18:44:11evanbrixen: we need to fix that.
18:44:22brixenok
18:44:32brixengets out his Fixit outfit
18:44:33evando ya get why it's showing up?
18:44:34matthewdevan: Working out whether a given method is a simple accessor
18:44:47evanmatthewd: can you show me the current code johnson uses?
18:44:52evanyou can point me to a github url
18:44:59matthewdYup, I'll find it
18:45:18matthewdIt basically checks whether the method's body is a NODE_IVAR
18:45:41evaneww.
18:45:58matthewdsubtly points in tenderlove's direction
18:46:01matthewd:)
18:46:13tenderloveO_O
18:47:27matthewdhttp://github.com/jbarnette/johnson/blob/unstable/ext/tracemonkey/js_land_proxy.cc#L167
18:48:05evanmatthewd: there is definitely no equiv of that.
18:48:13matthewdtenderlove: At least, I think that was yours :P
18:48:16evannor do I think we'll add something
18:48:21tenderlovematthewd: I thought that was yours!!!
18:48:25tenderloveevan: no, you shouldn't
18:48:27matthewdNope!
18:48:29tenderlovethat is pure evil code
18:48:57evantenderlove: can we comment out that code safely?
18:49:04evanfor now.
18:49:07tenderlovein Johnson?
18:49:13matthewdYeah, definitely
18:49:13evanyes, in matthewd's working copy
18:49:16evanso he can move on
18:49:23tenderloveya, he should be able to
18:49:26evanok
18:49:32evanmatthewd: comment it out, move on.
18:49:33matthewdWith that in an #ifdef, I have all tests passing
18:49:38evanYAY!
18:49:41dwaiteif only there was some tool that could be used to exorcise evil code
18:49:45evanmatthewd's Johnson passes inspection!
18:49:50brixenwait, how does tenderlove know so much about jbarnette's Johnson?
18:50:03tenderlovebrixen: it's half my project ;-)
18:50:06Defilerinspection and collaboration
18:50:07brixenno wonder I was confused
18:50:08brixen:)
18:50:25tenderlovethough, I'm glad it's on jbarnette's repo
18:50:31tenderloveso I don't have to work on it ;-)
18:50:31brixenheh
18:50:39dwaitewait, does everyone have their own Johnson in here?
18:50:53brixenmums the word
18:50:57dwaiteis there an agreement on which one is considered authoritative?
18:51:19brixenI defer to those who play with their Johnson a lot
18:51:41evanman, we should take this routine on the road
18:51:50dwaiteso you think the one which is authoritative is just the one considered most active?
18:51:50brixenrecalls there is a public log of this channel
18:52:12brixenI blame tenderlove
18:53:01brixenok, last one
18:53:30brixenmatthewd: when do you plan to exhibit your Johnson on Rubinius?
18:54:27dwaiteseems like the sort of thing that should be shown in front of a bunch of geeks, perhaps at a conference
18:54:42matthewdbrixen: I shall push onto jbarnette's johnson shortly!
18:54:49evanthen he could whip his dick out.
18:54:51brixenheh
18:54:51evan...
18:54:53evantoo far?
18:54:59brixenprobably, yes
18:55:20brixenunless you meant yanking ryan from behind the curtain
18:55:26brixen:)
18:55:38matthewddwaite: tenderlove and jbarnette gave a presentation at rubyconf, I think
18:55:48dwaiteyeah I saw it :)
18:56:17dwaitewell worth the price of admission
18:57:11dwaitealthough when they presented it I thought it was a bit.. funny
18:58:06dwaiteI mean, I'm sure it gets the job done
18:58:14dwaitejust didn't really have a desire to go play with it
18:58:59dwaitepossibly I wasn't the intended audience?
18:59:15evanmatthewd: do you have commit rights to jbarnette's johnson repo?
18:59:16dwaiteis done
19:00:17matthewdevan: Yep
19:00:23evanrad.
19:00:24Defilerbrixen: man, I still see three examples of 'push_const :Rubinius', seemingly produced by TestGenerator
19:00:43Defilerbrixen: ..but I have replaced every example of that in testgen, and that pattern of text no longer appears in the working copy at all
19:01:56Defilerall three are in spec/compiler/transforms/assembly_spec
19:02:49evanwhats that file...
19:03:02evanoh, inline assembly!
19:03:13Defilerhttps://gist.github.com/cb30f93e73af7b9f25bb
19:03:29Defileroh, crap, never mind
19:03:31evanright
19:03:34evanyou need to change the spec.
19:03:38DefilerI did
19:03:42Defilerand I think I need to change it back
19:03:49Defilerbecause that is a regular old Rubinius const reference
19:03:54Defilernot one that will use push_rubinius
19:03:58evanah yes.
19:04:15evanthats not something internally asking for the Rubinius constant
19:04:19evanthis is an explicit request
19:04:23evanwhich goes the push_const path.
19:04:24Defileryeah
19:04:36Defilerconfusing because test_generator DOES do a push_rubinius
19:04:42Defilerit just isn't that first one in the stream
19:04:51evanright.
19:04:53matthewdOkay, as it's 4:30 AM, I'm cheating... Johnson (unstable) on github now runs with Rubinius... after I fix rb_num2dbl, tomorrow. :)
19:05:07brixenmatthewd: woot!
19:05:19matthewd(Which I've obviously fixed locally, but haven't done specs for yet)
19:05:24evanDefiler: we could detect that Rubinius is being accessed in the AST and emit push_rubinius
19:05:44brixenseems like a good idea
19:05:46evanprobably best to only do that in kernel mode
19:05:49Defileryeah
19:08:13boyscoutIntroduce `push_rubinius` instruction and use it like a rented mule - 3ec71eb - Wilson Bilkovich
19:08:55evanhah
19:09:50evanbrixen: ok, i've fixed the crash
19:10:03evanthis has enlightened me a little bit to some of our architecture
19:10:17brixenok
19:10:47Defilerno more 'push_const :SomeSymbol" to be found in lib/compiler
19:11:09evanmainly, when a Thread gives up the GIL, it needs to make sure that it's saved_call_frame_ slot is set properly.
19:11:21evanthat was the source of this bug
19:11:25brixenahh
19:11:37evanbefore entering a native method, we updated scf_
19:11:49evanbut the native method called out to native methods via rb_funcall
19:12:00evanand those update scf_ to point to their frame
19:12:03evanwell, when those things return
19:12:11evanscf_ now points to a CallFrame* that doesn't exist
19:12:18brixengotcha
19:12:44evanso, I think I'm going to wrap up UnlockGuard with some extra logic
19:12:58evanto handle making sure that scf_ is set properly.
19:13:07evanthis could be the source of crashes as well.
19:13:23evanbecause the GC reads the scf_ of every thread on every GC
19:13:30evanand if it's not updated properly....
19:13:36brixenhm yeah
19:15:36brixenevan: working on rb_class_new, which needs something like Helpers::add_class, but without the name
19:15:47evanum
19:15:50brixenevan: should I add Helpers function or just synthesize that in rb_class_new
19:15:58evanshouldn't rb_class_new rb_funcall to Rubinius.open_class ?
19:16:05evanwhy duplicate stuff?
19:16:14brixenwell, let me look
19:16:55brixenit has no name
19:17:09evanwhat has no name?
19:17:11evani don't follow.
19:17:35brixenno, this won't work
19:17:46brixenopen_class calls open_class_under
19:18:00evanso?
19:18:02brixenrb_class_new(super)
19:18:14evanit creates a new anonymous class?
19:18:20evanrb_funcall to Class.new then.
19:18:25brixencan't
19:18:29brixenthat calls inherited
19:18:37brixenI already tried the easy ways
19:18:46evanrb_class_new doesn't call inherited?
19:18:49brixenno
19:18:54brixenit basically is...
19:18:56brixenrb_class_boot
19:18:59evanno it doesn't call or no it does call?
19:19:08brixenno, it does not call
19:19:12boyscoutCI: rubinius: 3ec71eb successful: 3463 files, 13827 examples, 41481 expectations, 0 failures, 0 errors
19:19:17evanoh MRI...
19:19:29brixenhttp://gist.github.com/410291
19:19:39evanok, so how do you wanna handle it?
19:19:47brixenrjb uses rb_class_new and calls rb_class_inherited directly
19:19:57evan*eyeroll*
19:20:22brixenso, Helpers::add_class is close
19:20:34evanwell
19:20:38brixenI could add Helpers::new_class or something, or just do it raw in rb_class_new
19:20:42evanwhy not create a class like we do in ontology.cpp?
19:20:53evanthere are some methods on VM to do it
19:20:54brixenthat's what I need to do
19:21:08brixendo it directly, or add Helpers::something ?
19:21:12evani'd ignore Helpers (i want to get rid of it)
19:21:15evando it directly.
19:21:18brixenah ok
19:21:22brixenwhy get rid of Helpers?
19:21:34evanit's a mismash of random stuff
19:21:40brixenright...
19:21:50evanthat need to be refactored out into static methods under the specific classes that concern the functionality
19:21:51brixenwe added it to simplify some stuff
19:21:52evanat least.
19:21:57brixenok
19:22:03brixenso, same idea, better organized?
19:22:04evanlike Class::create_stati()
19:22:07evanyeah.
19:22:11brixenok, got it
19:22:11evansame idea, better organized.
19:43:01brixendammit, missed alex payne speaking at code camp here today
19:43:18brixenknew I was forgetting something
19:44:59evanoops.
19:45:07evanok, i've got UnlockGuard cleaned up now.
19:46:50brixensweet
19:50:24evanzoinks.
19:50:40evanat some point, I appear to have made it so FFI functions run with the GIL unlocked.
19:50:44evanhuh.
19:50:50evanthats funny.
19:52:04dbussinkevan: some point being very recently?
19:52:08brixenI thought I remember you doing that specifically
19:52:12brixenyeah, recently
19:52:13evanvery unlikely recently
19:52:37dbussinkbecause socket stuff using ffi was blocking, or was that different?
19:53:01brixenyeah, that rings a bell
19:53:05evan2009-02-09
19:53:16brixenhah, seriously?
19:53:17brixenno way
19:53:19evanyep.
19:53:25evanbb9618cf is the commit.
19:53:47evanwell, thats pretty awesome.
19:54:04brixenthat's amazisg
19:55:37evanI guess that explains why socket.rb works as well as it does
19:55:49brixenthis was the socket stuff I was thinking of 099175bc
19:57:04evanyeah, i did that because I thought that FFI was blocking hard.
19:57:21evanI was wrong.
19:57:21brixenok
19:57:34evanthe reason was likely because i've coded those IO methods to be interruptable
19:57:42evanwhere as FFI called blocking functions aren't interruptable.
19:58:08evanyou can't use Thread#kill to cause accept(2) to return if accept(2) is called via FFI
19:58:52evanok, lunch!
19:59:12brixenme too!
20:36:16slavaevan: http://mitkokostov.info/2010/05/22/ruby-vm-shootout.html
20:36:24slavalooks like rbx is doing well on numeric code and such
20:37:52Defilernice
20:45:52brixeninterestingly, I believe bm_hilbert_matrix is Array heavy
20:46:03brixenso, if we are basically 2x 1.9.2, that is awesome
20:46:22brixenand we're pretty much 2x scaling with input size
20:46:54brixenwe will eventually run C code faster than MRI :)
20:47:06brixener, let me rephrase
20:47:20brixenwe will eventually run Ruby code faster than MRI does C code
20:50:25Defilerclearly possible, yeah
20:50:35cyndislink with clang and compile/inline ruby exts on the fly and perhaps we will run C code faster than mri ;)
20:54:41brixencyndis: that is totally doable
20:54:57brixencyndis: evan already has ideas for loading C ext on the fly where no C compiler is available
20:55:06cyndisoh :)
20:55:20brixenbut what this also does is make it so we could get more info in LLVM IR
20:55:28brixenand let LLVM go crazy with more
20:55:45cyndisyes
20:55:47brixenand llvm 2.7 adds the metadata to the IR
20:55:56Defilervm can load its own code with llvm and emit java bytecode :)
20:55:58brixenso, we basically have a whole new horizon
20:56:17brixenessentially, it's a wonderful time to be using llvm
20:56:54brixenDefiler: http://github.com/brixen/kireru :)
20:58:58cyndisat one point i made a hobby x86 os which just booted into a statically compiled mri; would be cool (and probably quite difficult) to make an os with embedded rbx and code the drivers in ruby
20:58:59dwaiteyou have a name and a readme
20:59:03dwaitethe hard parts are already done
20:59:38Defilernice
20:59:43dwaiteit would be difficult to program OS drivers without a concept of int or bytes
20:59:54cyndisffi :p
20:59:58dwaiteplus you would be unable to use floating point
21:00:36brixendwaite: we have a world of primitives available
21:00:37slavabrixen: how do you guys do out parameters in ffi?
21:00:38dwaite(learned that one the hard way)
21:01:23brixenslava: sorry?
21:01:38slavabrixen: int x; foo(&x); blah(x);
21:02:03brixenwe have a MemoryPointer type
21:02:34slavaits a chunk of memory?
21:02:56Defilerbrixen: very interesting point re: funnel
21:03:15brixenDefiler: yeah, I like that analogy
21:03:20brixenthought of it all by myself :)
21:03:30brixenslava: yes, basically
21:03:48Defilermaybe you should call it routo
21:04:33brixenslava: we have a couple different things
21:05:00brixenslava: eg, we can describe a Struct layout, and pass an adress of an instance of that to the C function
21:05:10brixenDefiler: routo?
21:05:14Defilerfunnel
21:05:19brixenahh hehe
21:05:38Defiler漏斗
21:05:47Defilercrap, forgot to fix my term settings on new laptop
21:05:51brixenheh
21:06:02brixenI was like wait what? I have utf-8 set
21:06:16slavabrixen: so for the case of returning an int, you allocate a struct with a single int field in it?
21:06:20Defilerhuh.. actually.. my settings look right
21:06:27DefilerI wonder if I didn't launch screen with -U or something dumb
21:06:43Defilerhttp://dict.regex.info/cgi-bin/j-e/sjis/FG=r/dokanji?index=t&ivalue=4f33|454d&
21:07:00Defiler(though in the actual word they appear in reverse order from that page)
21:07:12Defiler'leaky dipper' heh
21:08:43brixenslava: http://github.com/evanphx/rubinius/blob/master/kernel/platform/memorypointer.rb
21:09:39brixenslava: if you grep for :pointer in kernel/platform, you can see various uses of it with libc functions
21:09:49slavabrixen: looks reasonable
21:09:53brixenslava: I'm pretty rusty on ffi atm, but hope to refresh soon
21:10:01slavais it always backed by malloced memory?
21:10:02brixenwe have to fix up our API to match the heathens
21:10:29brixenyeah, we use FFI::Platform::POSIX.malloc atm
21:10:50slavais autorelease mode like a ghetto finalizer?
21:11:13brixenhm, kinda
21:11:26evanslava: it is a bit, yes.
21:11:30evanit uses finalizers actually.
21:11:33brixennot exactly ghetto
21:11:39brixenyeah
21:11:45evana builtin finalizer, which is a little more reliable than a ruby finalizer.
21:11:54slavawerd
21:13:13evanslava: you saw how to use an out param?
21:13:19slavayeah
21:13:26slavaMemoryPointer.new {|p| ... }
21:13:30evanyep
21:13:37slavaand read and write the value in the block
21:13:41evani want to revise the FFI API to add "stack" allocations
21:13:59slavaaha
21:14:05evanso that MemoryPointer.new { } can get some thread local memory without using malloc
21:14:09slavaI just implemented that, and I'm making a new out parameter mechanism
21:14:10evanand can be released back when the block ends
21:14:43evanI could end up wiring it up in terms of alloca() eventually perhaps
21:14:54slavathe thing I made is like your memory pointer with a block form, but stack allocated, so I guess I"m on the right track :)
21:15:33DefilerSomehow I'm not surprised your take on it used the stack :)
21:15:50brixenslava: you're always on the right track, just the wrong side of it :)
21:16:17brixenok, not really wrong... just, other :)
21:16:19slavaoh you guys
21:16:22brixenheh
21:17:02evanslava: hehe
21:18:03slavaI want to make 'out' parameters part of the actual FFI binding syntax though
21:18:06slavahave you thought of that?
21:18:16slavaso you don't need to make the pointer by hand, and dereference it at the end
21:18:39slavait might be more convenient
21:19:11evanthat would be nice.
21:19:38slavaI like it how you have a 'clear' flag in the MemoryPointer constructor
21:19:54slavaits handy not to clear the input if you're going to overwrite it anyway
21:20:07evanyeah, that follows sort of a C best practices vibe
21:20:13evanie, use calloc, not malloc
21:20:14evanetc.
21:52:18boyscoutRevise GIL unlocking to keep Thread::saved_call_frame_ sane - da9d56a - Evan Phoenix
21:52:19boyscoutQuit gracefully when the target has already quit - c50eb7a - Evan Phoenix
21:52:19boyscoutDiscard any output to STDERR to silence any actual debug output - 3753994 - Evan Phoenix
21:52:57evanbrixen: I fixed that spec
21:53:07evanthat seemed like a decent way to do it
21:53:16evanplease advise if there is a better way.
21:53:23brixenok, le'me take a look
21:57:15jaribhmm, rbx seems to automatically print the result of code piped to it
21:57:16Defileranyone run the rbx test suite on mac os with the firewall turned on?
21:57:17jaribis that intentional?
21:57:29jarib$ echo true | rbx
21:57:29DefilerTrying to come up with a way to stop getting prompted to allow connections for vm/vm after every build
21:57:30jaribtrue
21:57:37Defilerbecause the sha1 changes, the firewall de-allows it
21:58:10evanjarib: yes, thats true.
21:58:15evanthats a very old "feature"
21:58:27jaribok, just curious :)
22:04:15boyscoutCI: rubinius: 3753994 successful: 3463 files, 13827 examples, 41481 expectations, 0 failures, 0 errors
22:09:54DefilerThis is interesting http://github.com/danielwellman/bane
22:10:05Defilermaybe some fun tools in there to fuzz the rbx socket implementation
23:16:27brixenevan: could your run: bin/mspec spec/capi/module_spec.rb -tr
23:16:35brixens/your/you/
23:16:47evan4 errors.
23:17:03evanall for
23:17:04evanuninitialized constant SubtendModuleTest::(null)
23:17:18brixenyes, so one issue is those need SYM2ID
23:17:21brixenI got that port
23:17:24brixener part
23:17:43brixenbut you added rb_const_get_from and the specs says it should find Fixnum looking up
23:17:49brixenI don't see it doing that
23:17:55brixenso I'm curious about it
23:18:09brixenI suppose I could build rmagick and see if it runs after I change that
23:18:52brixenI just wondered if I'm missing something
23:19:40evanthat rb_const_get_from was from kronos_vano
23:19:48brixenahh ok
23:20:07evanalso, when running the capi tests
23:20:11brixenI'll talk to him about running the specs in mri
23:20:18evanare you making sure to recompile the extensions if -t changes?
23:20:24brixenyes
23:20:26evank
23:20:36brixenI cache what impl compiled the specs
23:20:49brixenso, if you run it with a different impl, it forces a recompile
23:21:06evangood.
23:21:11evanjust wanted to be sure.
23:21:13brixenyep
23:27:43evanhm, only had to change 3 things to get LLVM 2.7 to compile
23:27:45evanlets see if it runs.
23:29:10evanhah
23:29:15evani crashed CrashReporter
23:29:19evanError Formulating Crash Report:
23:29:19evan*** -[NSCFDictionary setObject:forKey:]: attempt to insert nil value (key: Identifier)
23:33:34brixenhah, ouch
23:35:40brixenman, sometimes these spec....
23:36:00brixena.should == 1; (a != 2).should == true
23:36:05brixenseriously? c'mon
23:36:08evanhahahah
23:36:19evanalmost like someone is trying to fuck with you
23:36:25brixenyeah :/
23:36:38brixenbut not, and that's all the more sad
23:52:34brixentakes a long time to do the specs right...