Show enters and exits. Hide enters and exits.

00:01:28brixennow 0ef372 will have special significance
00:01:34rueWhat kind of behaviour should sexps have?
00:01:39DefilerI'm going to take a dinner break
00:01:48rueIs that even Code As Data compliant? :)
00:03:31brixenwe definitely have a problem calling private/protected methods
00:03:55rueBah, I can stop any time I want
00:04:37brixenI can't, because Hash won't work without it
00:05:05brixenClass#initialize is trying to call a protected instance method on Class
00:05:29brixenwhich wraps a slot accessor
00:17:50evanand that's not working?
00:18:35brixenevan: oh, got a sec?
00:18:41brixenI'm in send_method
00:18:55brixenand I need docs
00:19:19evanwhat do you need?
00:19:23brixenwell, I believe it is send method based on the opcode print out
00:19:30brixenwhat is task->call_flags?
00:19:36brixenwhat is msg.priv?
00:19:47evanmsg.priv indicates if private methods can be considered
00:19:57evanit's not related to protected
00:20:05evantask->call_flags is how msg.priv is set
00:20:08brixenand that's set to task->call_flags & 1
00:20:18brixenand then task->call_flags is set to 0
00:20:19evanthere is a set_call_flags instruction
00:20:26evanyes, call_flags is reset to 0
00:20:40brixenso, calling a protected method, what should msg.priv be?
00:20:44evandoesn't matter.
00:20:54evanit's not considered for protected methods
00:21:26evanlook at line 96 of sendsite.cpp
00:21:33brixenwell, this isn't a dep thing
00:21:35evanthats where protected methods are validated.
00:22:57brixenthis is common/class.rb:64 calling to bootstrap/class.rb:39
00:23:26brixenI don't understand the "not being called from the same module" comment in sendsite.cpp:97
00:24:16evanwhere is needs_cleanup marked protected?
00:24:27evanok, i see.
00:24:54evanthe logic for protected is that the current self is a kind_of where the method is located
00:25:27evanyou should back track
00:25:34evanit's possible that current_self is not being set properly
00:25:42brixenand current_self is?
00:26:15evanthe current self
00:26:19brixenvs recv?
00:26:22brixenin msg
00:26:26evantotally different
00:26:29brixengot it
00:26:34evanbecause if I do
00:26:49evansweet = self
00:26:53evansweet is current_self
00:26:57evanthe return value from woo is recv
00:26:59evanwhen calling go
00:27:11evanthats in the wrong order, but you get it
00:27:14brixenI'll try to parse that
00:28:25evanmsg.current_self should be set to task->active->recv
00:28:29evanby a higher layer
00:34:50evanall right, i'm headed out for a bit.
00:57:32tarcieriheadius: you work at Sun?
01:00:13headiustarcieri: yes
01:01:59tarcieriheadius: I knew a bunch of people who used to work at Sun's Broomfield campus
01:02:09tarcieriemphasis on used to... guess you're sticking around?
01:02:21tarcierido they pay you to do JRuby stuff?
01:02:25headiusjruby pretty much lives autonomously
01:02:35headiusfull time, no strings attached so far
01:02:51tarcieriyeah I suppose everyone I knew who worked there was a server monkey
01:03:30headiusstill lots of them around...sun's going through a major tansition right now what with everything being open-sourced
01:03:37headiusbetting the company that it's the right thing to do
01:04:06tarcieriyeah, kinda seems like too little too late at this point
01:04:30tarcieridepends on what, I suppose
01:04:37headiusat the very least it will guarantee solaris and java live on
01:04:48headiuswhether that means sun will live on, anyone's guess :)
01:05:03tarcieriI used to be a Solaris administrator... now I want nothing to do with it
01:05:25headiusstill seems more stable/solid to me than linux, and they finally realized that usability is kinda important
01:05:39headiusthe solaris 11 stuff is pretty nice
01:05:59tarcieriJDS was... uggghhh
01:06:15tarcieriwhen that came out most of my users chose to stick with CDE
01:06:37tarcieriI was all psyched for ZFS and it didn't exactly deliver what I was hoping
01:06:54tarcieriusing lvm2 + xfs
01:07:55headiussolaris guys are taking a lot of hints from debian and ubuntu
01:08:05headiuslots of power struggles between the new and old way
01:08:17tarcieriI tried running Nexenta several times
01:08:19headiusnew is winning
01:09:29drbrainhrm, why is gsub! finding Kernel#gsub not String#gsub
01:11:08brixendrbrain: method tables seem a little wonky or something
01:11:24brixenso far, no methods on an instance of Hash are resolving
01:12:00drbrainI hooked up some config stuff, and now with vm/vm plus.rb it pukes out when $_ is nil
01:12:10drbrainbecause it does Kernel#gsub instead of String#gsub :(
01:12:13brixenthis is what I see trying to send :initialize form
01:12:57drbrainwhere is frame 6?
01:13:07drbrainoh, send_prim
01:13:41drbrainyours looks like a stack problem
01:13:54drbrainsomething didn't get filled in in msg properly
02:05:24drbrainha! prim_tty
02:14:27drbrainwhy do we have both Rubinius::RBX_VERSION and RBX_VERSION (toplevel)?
02:20:37CIA-21* Move Rubinius::Terminal constant to kernel, wire up IO#tty? to support it. Environment::set_rubinius_constants() is now gone, as it is not needed. - ...; c11533d - Eric Hodel
02:20:50drbrainwell, we don't now :)
02:52:40drbrainsweet! now I get two backtraces!
02:54:06drbrainwhich is as it should be, I guess
02:56:41drbrainsomething seems to be off in the stack again
02:58:54drbrainnot gratz
02:59:01drbraingratz sounds like a good thing
02:59:06drbrainthis is not good
02:59:10seydarbut you got 2 backtraces. i take it you didn't get them before?
02:59:59seydarbtw, i've racked up a study plan for compilers, so in a month i'll have racked up 40 hrs. expect me to be mildly useful then!
03:00:00drbrainI'm getting them because the stack seems off
03:00:14drbrainRubinius is jumping from String#gsub! to Kernel#gsub
03:00:20seydarthe stack is only used, in rubinius, for method arguments, right?
03:00:24drbrainwhat are you studying?
03:00:47seydarjust compilers. i've been snagging dartmouth course info, and just going through papers
03:00:48drbrainwell, the VM's stack seems messed up
03:00:53drbrainnot the C stack
03:01:07seydarwhy do you reimplement a stack?
03:01:13drbrainand the VM stack is used for all kinds of stuff
03:01:30seydardo proceed good sir
03:01:34drbrainhaving a separate stack from the C stack makes a bunch of things easier
03:01:42drbrainlike running multiple VMs in the same process
03:02:40seydardo you use the C stack at all?
03:02:50drbrainmakes the GC a little simpler too, since it doesn't have to guess about the contents of the C stack
03:03:05drbrainthe VM runs on the C stack
03:03:13drbrainand ruby code runs on the VM stack
03:03:29seydarbut for running ruby code, no?
03:03:31drbrainbut ruby C extensions would run on the C stack, of course
03:03:37seydarsounds icky
03:03:55seydardoesn't that raise hell for you?
03:04:03seydarhow do you get the two stacks to play nicely?
03:04:27drbrainthe VM stack is just a chunk of memory, so it's no problem
03:04:38drbrainweren't you working on a scheme implementation?
03:04:42seydaryea, i am
03:04:59seydargot distracted on a brainfuck one, practicing simple optimizations of parsing
03:05:06drbrainyou have something in there that is recognizable as a stack
03:05:30seydarbf or scheme? the scheme one has like, 20 lines of code in it atm
03:05:50drbrainevery time you apply a lambda, you push onto the call stack
03:06:09seydarand for rubinius, you push onto the VM stack
03:06:09drbrainrather, every time you apply a lambda in a non-tail-call position
03:06:29drbrainyes, but you push on for a bunch of other stuff too
03:06:42drbrainsince it's a lower-level stack
03:06:44seydarthe arguments?
03:07:06drbrainor for if
03:08:06seydardammit i wish i knew more
03:08:21drbrainyou're young! it'll happen
03:08:29seydarbut the world will pass!
03:08:41drbrainit'll still be there
03:08:50seydarwhen i FINALLY take a compilers course in spring '09, where will rubinius be? significantly further
03:09:00seydarand i'll be plaing catchup for a whiule
03:09:08drbrainthere's plenty of important stuff to do, like making out with girls (or boys, should that be your thing)
03:09:56seydarfull of wisdom ^^^^^^^
03:10:09drbrainif you're writing a scheme or bf interpreter, you're already far enough along
03:14:11seydarthen i need to learn c++
03:14:22drbrainnot really
03:14:30seydarplus, i'm following a tutorial on the interpreter for scheme
03:14:35drbrainI barely know enough to be functional
03:14:53seydarwhat can i do to help with the VM then?
03:14:55drbrainthat's fine, if you were taking a class, you'd be doing roughly the same thing
03:15:16seydarim am so thirsty to struggle with something interesting
03:15:16drbrainin a couple days we'll be back to running specs
03:15:34drbrainthen you can try to figure out why things work in shotgun, but not in the VM
03:15:47seydar"here, have a cookie"
03:16:39seydarim psyched now
03:16:49seydari've got 15 minutes to kill, need me to do something/
03:17:22drbrainnothing's coming to mind, since everybody is eating or whatever
03:17:30drbrainI'm trying to figure out why the stack seems messed up
03:17:46seydarpastie it
03:18:24drbrainso, in vm/llvm/instructions.rb in VMMethod::resume there's a #if 0
03:18:33drbrainif you switch it to a 1, a bunch of crap gets dumped out
03:19:07drbrainso if I run RBX_RUNTIME=runtime vm/vm -e 'puts 3 + 4'
03:19:17drbrainI get those exceptions you were talking about
03:19:32drbrainwhen built with the dump-crap mode, I get this output:
03:19:46drbrainso there are two possible problems here
03:20:05drbrainoh, let me back up a step
03:20:27drbrainwhen I add a yield_gdb self in Kernel#gsub, I see that self is a Regexp, not a String
03:20:38drbrainif I add yield_gdb in String#gsub!, I see that self is a String
03:20:45drbrainso, the possible problems:
03:21:28drbraina) the stack is off by one, and op_push_self ends up putting self (the String) out of range, and the first argument, pattern becomes self for the lookup
03:21:34drbrainb) op_push_self is broken (unlikely)
03:21:42drbrainc) op_send_stack_with_block is broken (unlikely)
03:22:08drbrainyeah, op_send_stack_with_block is called a bunch of times, so its probably ok
03:22:13drbrainsame for op_push_self
03:22:46seydarso where could an OB1 error happen?
03:23:49seydaroff by 1
03:23:58drbrainthat's hard to say
03:24:15drbrainI'm not familiar with the compiler or instructions.rb yet
03:25:47seydarok. you know the setup of files better than i do, at least. lets start at the top
03:26:20drbrainwell, first I was going to yield_gdb self in gsub!
03:26:38drbrainthen breakpoint on op_send_stack_with_block to see if it was all set up right
03:28:21drbrain(I don't know if there's much you can do beyond listening, though :)
03:28:52seydarits fine, my dad tells me stories of when he would debug other people's code by talking to them
03:29:45drbrainok, so I did that
03:29:56seydarwhats the class of self?
03:30:05drbrainand I looked in the Message at the recv slot (which should be my String)
03:30:10drbrainit should be String
03:30:26seydarbut what is it really?
03:30:33drbrainbut instead I get: KERN_INVALID_ADDRESS at address: 0x54890824
03:31:05drbrainok, this is really bad
03:31:22drbraintask->state is 0x1002400, msg.state is 0xe4458bc2
03:31:32drbrainand everything in this Message looks like it has a bogus address
03:31:43seydarsounds like you're on the edge of your memory
03:31:59seydarif i remember this one tangent a prof went on once about memory space and OSes
03:32:17drbrainoh, I was looking at the wrong one
03:32:27drbrainok, now I've got something correct
03:32:35drbrainmsg hadn't been assigned to yet
03:32:47seydarwhat file are you working in atm?
03:32:49drbrainok, my recv is right
03:33:31drbrainsend_stack_with_block in vm/instructions.rb
03:35:01drbrainoh, ha, I need to walk along further
03:35:07drbrainits reusing the current message
03:35:59drbrainso it still is all filled in for yield_gdb
03:37:16drbrainok, so yeah, the stack is off by one
03:38:03seydarwhat is the equivalent of -> using .? doesn't -> pass pointers around?
03:38:33drbrain-> is used on pointers, . is used on non-pointers
03:38:51drbrainso if you see Object* foo, you would foo->method()
03:38:57drbrainfor Object foo, foo.method()
03:39:55drbrainIIRC, Message& msg means msg is a reference to some other piece of memory, and has no local storage
03:42:01seydarso what is calling op_push_self?
03:42:14drbrainthe bytecode told it too
03:42:56seydarwhich bytecode? is it in send_stack_with_block?
03:43:05seydarwait, nvm
03:43:12seydari understand what you're saying
03:43:13drbrainit's in runtime/core/string.rbc
03:44:19drbrainok, so all these values are off by one, and there seems to be an extra nil on top of the stack
03:44:44seydarand is self not even on there?
03:45:03seydarYou expected 'String -> Regexp -> String', and its 'Regexp -> String -> Nil'?
03:45:04drbrainself is down one further than it should be
03:45:33seydarif self were to be up one slot, would the nil still be there?
03:45:39drbrainat the start, the stack should have been (from the top)
03:46:04drbrainblock, replacement, regexp, self
03:46:13drbraininstead it is nil, block, replacement, regexp, self
03:46:30seydarbah humbug
03:47:15seydarcan you take a look at what's below self in the correct run vs. the incorrect run?
03:47:40drbrainright now there's no correct run, so I'm mostly guessing what that would be
03:47:49drbrainbelow self is nil
03:48:02seydarthat would complicate things
03:48:31drbrainits probably from some operation we're going to resume upon return from gsub!
03:48:37drbrainso it's really none of my business
03:48:56seydarso you think #gsub has the bug, not #gsub!?
03:49:47drbrainno, it's not in #gsub or #gsub!
03:50:03drbrainits in vm/instructions.rb *or* the compiler
03:50:20Defilerooh someone said instructions.rb
03:50:21seydarbut the compilter, isn't that the same from shotgun?
03:50:33DefilerIt has been modified to suit the new VM
03:50:34drbrainsince the same gsub, gsub! code works the same in shotgun
03:50:39Defilerand there could be problems with that transition
03:50:40drbrainno, there have been changes
03:50:51drbrainDefiler: I've got an off by one error
03:50:52Defilerwe changed to left-to-right evaluation order
03:50:57drbraintry vm/vm -e 'puts 3 + 4'
03:51:05drbrainend up with it puking on $_
03:51:11Defilerdude vm supports -e now?
03:51:15DefilerThat is frikkin awesome
03:51:22seydardamn right it is
03:51:24drbrainsince it called Regexp#gsub instead of String#gsub like it was supposed to
03:51:29drbrainit tries, but fails :)
03:51:49DefilerOK, let me gdb this bad boy
03:51:59drbrainself (the String) ends up one further down the stack
03:52:07seydargrab a monster and a bag of m&ms - you guys got this
03:52:11drbrainthe easy way is to add yield_gdb to String#gsub!
03:52:26seydarlater homefries
03:52:27drbrainthen add a breakpoint on op_send_stack_with_block when you get there
03:52:43drbraina j over the raise will get you there
03:54:35drbrainso when you get there, and n down to at least msg.stack
03:54:44drbrainyou can p *(js->stack - 2) then rp $whatever
03:54:53drbrainand find that its a Regexp instead of a String
03:54:59drbrainand that the String is at -3
03:56:12drbrainoh, also, js->stack is nil, and js->stack - 1 is the block that should have been popped
03:56:19drbrain... so then I've got two extra values?
03:57:57drbrainI'm going to start again from the top
03:58:43DefilerWhy is there a 0x0 on the stack?
03:58:51Defilerat stack - 3?
03:59:42drbrainI have a Regexp
04:00:16DefilerOK I should see the problem if I step from here
04:00:29DefilerI think I have it in my sights
04:01:11drbrainthat's before the msg.block = stack_pop()
04:01:27DefilerOk, so this is the _get_field call for 'def env' on BlockContext
04:01:45drbrainmaybe I didn't push that
04:01:47DefilerI think it is a name conflict in C++
04:01:57Defilerbecause this is a blockcontext
04:02:03Defilerbut it was showing MethodContext* in gdb
04:02:11CIA-21* Wire up BlockContext::env to a primitive so we can fetch it -; 1f5c22a - Eric Hodel
04:02:22drbrainok, try now
04:02:51DefilerI'm going to finish stepping to test my hypothesis first
04:03:05drbrainif it wasn't bitching about $_, you weren't in the same place
04:03:33Defilerit was bitching
04:03:50DefilerOK, so the top two items on the stack are reversed
04:03:52Defilerthat is the problem
04:03:57Defilerso I vote compiler
04:04:01Defilerbut let's see
04:04:42Defilerok, not compiler
04:05:15Defilerdamn, phone call
04:05:29drbrainme too, since this seems pretty straightforward for the instructions leading up to it
04:10:38drbrainoh, its one of these that comes after
04:10:46drbrainbetween 36 and 48
04:32:22brixenhm, so attempting to find Class.allocate from a call to super() in Hash.allocate walks MT's in Hash, Enumerable, Object, and Kernel
04:32:28brixenso the same ancestors as MRI
04:32:41brixenbut where is it supposed to look in Class?
04:33:57drbrain... that sounds wrong
04:34:11drbrainshouldn't it be Hash, Class, Module, Object, Kernel?
04:34:40brixenwell, dunno
04:34:48brixenle'me try to trace it in shotgun
04:35:01drbrainsince you're calling Hash::allocate, instead of Hash#allocate
04:47:30DefilerIs it just me or is the stack null here?
04:47:36DefilerI'm looking at context_get_field
04:47:40drbrainit is
04:47:52drbrainoh, I don't know about that
04:47:52DefilerThat seems bad. :)
04:48:05drbrainbut, there's a pass through BlockPass' bytecode
04:48:11drbrainand this is obviously bad
04:48:28drbraindup_top is_nil goto_if_true
04:48:46Defilerp js->stack is 0x0
04:49:07brixenthere was an sassert to prevent NULL from getting into the stack
04:49:12drbrainI'm not seeing that, but we're probably looking in different spots
04:49:57brixenin the define of stack_push
04:49:58drbrainno, this gsub! is called without a block
04:50:11brixenbut not in stack_set_top
04:50:15Defilermsg.task->js->stack is 0x0 in rubinius::Task::send_message
04:50:23Defileron the message that was built for this send
04:50:29massis doing a restore wipe on his iphone
04:50:35brixenDefiler: perhaps add an sassert to stack_set_top
04:50:40DefilerThat might be OK for all I know. just seems odd
04:50:41massthere is a crash report on it which causes the crash reporter to crash
04:51:40massanytime I want a core file all I have to do is plug in a USB cable
04:52:21massI wiped the crash report directory clean, plugged in the iphone, zipped up everything in the directory afterwards and attached it to a bug report.
04:53:01brixenaccording to ruby programming language, method lookup goes into included modules and ancestor modules, and then to superclasses
04:53:35brixenwe're invoking method missing after looking in the modules
04:53:46drbrainstill, there should be a Class andModule in that list
04:54:00brixenthose would be superclasses
04:56:10brixenhmm, but class method resolution is a bit different
04:56:28drbrainugh, this mismatch between compiler and instructions.rb is a PITA
04:56:34drbrainI can't find shit
04:56:36DefilerIt would have to be, or it would be recursive, right?
04:56:39drbrainbecause none of the names match
04:57:01DefilerMaybe not
04:58:32DefilerHow do I dump the gdb commands I have typed in this session so far to a file?
04:58:40Defileror make a file that replays them?
04:58:53drbrainit should be in ~/.gdb_history
05:25:18Defileroh hoh
05:25:37Defilerobj->reference_p() should always be true for Strings I assume?
05:26:32drbrainshould be true
05:28:52Defilerit is false for this one
05:29:38brixenwhat was the shortcut command for __show__(obj) ?
05:29:55drbrainsee .gdb_init
05:30:03drbrainerr, .gdbinit
05:30:04Defileryou can see me using it in that rafb paste as well
05:31:14Defilerhuh. it appears to only be false in gdb, but the program flow is correct
05:31:30Defilerthat's comforting ha ha
05:31:54Defilerwhat no it did it wrong wtf
05:32:40DefilerOK, what the hell is going on here?
05:32:43drbrainI gave it up, it was too twisty
05:33:14brixenthat's what I'm talking about
05:33:18brixenI'll push in a sec
05:33:25brixenshould make inspecting LT's much nicer
05:33:37Defilerbrixen: Cool
05:34:04DefilerIs it possible to see what value T::type has taken on in gdb?
05:36:13DefilerOK, I need to disable optimizations
05:36:18Defilerdo we have an env var for it?
05:36:21Defileror do I just hack the rakefile
05:37:34drbrainI don't think we do
05:38:01DefilerYeah, no -O at all
05:38:08Defilerbut gdb says "static field type optimized out"
05:43:06evanconst static == gone entirely
05:47:10CIA-21* Teach LookupTable how to show itself in gdb. -; 1bad43c - Brian Ford
05:47:46drbrainsounds naughty
05:47:54Defilerunified_load is so hideous
05:48:09brixenon both counts
05:51:00Defiler$LOAD_PATH is [0]
05:52:05drbrainit is?
05:52:15drbrainit was ['.'] on Monday
05:53:20Defiler $LOAD_PATH.unshift(*ENV['RUBYLIB'].split(':'))
05:53:23Defilerit is that line that does it
05:54:46Defileroh sorry
05:54:55Defilerit is this one
05:54:55Defiler$LOAD_PATH.insert($LOAD_PATH.index('.'), *additions)
05:58:10brixenevan: got some spare cycles?
05:58:15DefilerUnable to load default compiler: No method 'ffi_get_field' on File::Stat::Struct (Class)
05:58:29DefilerFFI::Struct(File::Stat::Struct)#[] at kernel/platform/ffi.rb:604
05:58:47DefilerArray#insert is hosed up
05:58:54Defilerbut I don't have time to look at why right now
05:59:08DefilerProbably it is Array#[]= since insert doesn't do much work
06:01:36DefilerOK, so what do gsub! and Array#insert have in common
06:02:10evanbrixen: sure, wassup
06:02:26evanDefiler: ah, yes. the ffi_get_field/ffi_set_field aren't hooked up
06:02:35evanDefiler: they're all written in MemoryPointer
06:02:40evanneed to be wired out primitives
06:02:57brixenevan: I'm trying to figure out why searching for .allocate from super() in Hash.allocate doesn't find Class
06:03:09brixenbut it does in Rubinius::RubyConfig
06:03:13brixenfor example
06:03:19brixensee top of pastie
06:03:31Defilerevan: How does $_ wire up in cpp?
06:03:36brixenI br on sendsite.cpp:72 and wait for :allocate to be called
06:03:40evanbrixen: RubyConfig doesn't use super
06:03:51evanbrixen: so you mean why does going directly work
06:03:55evanbut via super not
06:04:27evanthere are a couple bugs I see
06:04:30evanin instructions.rb
06:04:36evanin all the send_super_* methods
06:04:44evanmsg.priv should be = true
06:04:47evannot using call_flags
06:04:56evansuper calls by default can access private methods
06:05:03evanan no call_flags are emitted for supers
06:05:13evanso msg.priv was always false in a send_super_*
06:05:15DefilerWe definitely have some kind of stack management bug here
06:05:27evanDefiler: there is no globals in C++
06:05:30DefilerCoercion error: Proc.to_str => String failed
06:05:43evanruby globals
06:05:44Defiler$_ is the wacky last match thing
06:05:50Defilerand it needs a field, right
06:05:54evanit does not.
06:06:03DefilerI thought we had it on MethodContext before?
06:06:03evanit didn't in shotgun
06:06:05drbrainno, $_ is the last thing read via Kernel#gets
06:06:20drbrainbut in the $_ case, it jumps from String#gsub to Kernel#gsub!
06:06:26drbrainbecause recv is wrong
06:06:26evanwhich is wrong
06:06:33evanit's actually right
06:06:37evani was debugging that earlier today
06:06:39DefilerAlso, we init it to nil
06:06:45evani'm not sure why it didn't use String#gsub
06:06:46Defilerbut it has a guard against nil
06:07:11evanDefiler: thats expected
06:07:12evantry in MRI
06:07:21evan>> p $_ # nil
06:07:25evan>> gsub
06:07:28evanTypeError: ...
06:07:28Defilerbut that's why that error was confusing
06:07:39Defilerbecause it was nil due to not being set correctly
06:07:48evanthats not true
06:07:52evanit's never been set
06:07:55evanthats why it's nil.
06:07:59evanwhy do you think it should be set to something?
06:08:00DefilerThat's what I just said
06:08:05drbrainit shouldn't be set, we never should have called Kernel#gets
06:08:12drbrainerr, we never called Kernel#gets
06:08:23Defilergsub you mean right?
06:08:35evanif Kernel#gets is not called
06:08:37evan$_ is nil
06:08:43evanthats MRI behavior
06:08:52evanif you call Kernel#gsub and $_ is nil
06:08:55DefilerOh.. look at that.. Kernel(Regexp)#gsub in the backtrace
06:08:56evanyou get a TypeError
06:08:58evanDefiler: yes
06:08:59Defilerthat should never happen, right?
06:09:11evanyou're getting confused by something COMPLETELY different
06:09:13DefilerSorry, it is late here.
06:09:16evanthat code is calling the wrong gsub method.
06:09:21evanit should be calling String#gsub
06:09:28evanbut for some reason, it finds Kernel#gsub
06:09:34drbrainyeah, somehow there's an extra thingy on the stack
06:09:36evanI was going to track that a bit tonight
06:09:50DefilerIt would be nice to add a locate_method test for this
06:09:59drbrainevan: the pattern you called String#gsub! with ends up as self for the next call
06:10:12drbrainit's not a problem looking up methods, it's that recv is wrong
06:10:33evanyou mean the " str = gsub(pattern, replacement, &block)
06:10:35evanline right?
06:10:45evanthe receiver of the gsub message is something weird
06:10:47evanNOT self
06:10:53evanthats what you're assuming yes?
06:11:05evani wasn't going to assume that
06:11:07evani was going to verify it
06:11:30drbrainI walked around in gdb when it's setting up the #gsub call, and the stack is off by one
06:11:47evanoh! got a op trace run?
06:14:30evanok, one sec.
06:14:35evani'm comparing it to a compiler stream output
06:14:47evanperhaps block_pass is going the wrong place on the stack
06:15:04drbrainmaybe, there doesn't seem to be a block to pass in this code
06:15:09evansure there is
06:15:14evangsub(pattern, replacement, &block)
06:15:17evanthe &block
06:15:17drbrainthe call in __split_path__ above it is:
06:15:27drbrainpath.gsub!(/\.(so|bundle|dll|dylib)$/, ".#{Rubinius::LIBSUFFIX}")
06:15:32drbrainshould be nil
06:15:36drbrainthat's all
06:15:49evani guess we're looking 2 different places
06:16:01evani'm just trynig to figure out why gsub! isn't calling the right gsub
06:16:08evanhow it got there doesn't directly concern me
06:16:27evanbecause this is pretty basic functionality
06:16:41drbrainin my particular case of analyzing this, it's called from __split_path__ when I do vm -e 'puts 3 + 4'
06:16:57drbrainso for this run through the opcode stream, the block should be nil
06:17:13evanah! ok.
06:17:16evani see why you bring that up
06:17:19evanthats good
06:17:23evanit's secondary confirmation
06:17:52DefilerI'm running a conditional breakpoint for when the message name is the symbol :gsub!
06:17:56Defilerhopefully that will work
06:18:15evanthe compiler output is pretty clearly fucked up
06:18:45evanthats 'gsub(1,2,&3)'
06:19:00evansee the weird [:find_const, 0] stuck in the stream?
06:19:04evanthats the problem
06:21:36Defilerare we sure class Alias in bytecode.rb is right?
06:21:54Defilerand if so, is VAlias just under it wrong?
06:21:56evanpretty sure
06:23:56evanDefiler: whats wrong with them?
06:24:33Defilerreversed args on the stack
06:24:35Defilerjust wondering
06:25:02evancheck Globals.add_alias
06:25:10evanperhaps it's expecting that order
06:25:19evanwhich probably should be changed
06:25:21evanif it does.
06:26:36DefilerThis looks like blockpass bytecode
06:26:38evanclass BlockPass was wrong
06:26:44evanit as leaving the Proc constant on the stack
06:26:47evanif the block was nil
06:26:50evantesting now.
06:26:52Defileroh, I see it
06:26:59evanthats just a fuck up my be
06:27:05evanwhen rotating the stack
06:27:34evanthat fixed it.
06:27:37evani'll push
06:28:35CIA-21* Fix BlockPass from leaving crap on the stack -; 0eb736a - Evan Phoenix
06:29:03evannow $LOAD_PATH is getting Fixnums in it
06:29:05evanit seems
06:29:12DefilerI have a fix for that here
06:29:20Defilerbut it presumably is caused by another problem we actually need to fix
06:29:34DefilerIt was happening in Array#insert though, and it was too complicated to want to debug this with
06:29:47Defilerin loader.rb there is a call to insert that I switched to be an unshift
06:29:49Defilerand that made it happy
06:30:03evanah, so #insert is busted
06:30:35brixenmy turn
06:30:46evanDefiler: ok, did that
06:30:46DefilerTry it with that
06:30:51evansee it blow up on ffi_get_field
06:30:56CIA-21* Use unshift instead of insert in loader.rb -; 83f5d4d - Wilson Bilkovich
06:30:58DefilerYeah, cool.
06:31:38evanbrixen: ok go!
06:31:52brixenhow do we add assertions for msg.priv = true in these instructions tests?
06:31:59evangot 15 new HD channels today!
06:32:20brixenand I only see two send_super_* instructions, one already had msg.priv = true
06:32:26brixenchanging the other didn't help
06:32:27drbrainI might consider getting cable if I could get only HD channels
06:32:49CIA-21* Adjust field widths to be more sane -; 57c23e6 - Eric Hodel
06:32:53brixenI don't see how send_xx is the problem when it's not looking in the right modules
06:33:15evanbrixen: ok
06:33:19evanwell, it was a shot in the dark
06:33:21evanand it was wrong
06:33:22mernenhey, I
06:33:55mernenhey, I've got a couple patches to make the test suite compile under gcc 4.2. They don't pass, but well, it's a start
06:34:11mernenjust tested, it still passes cleanly on osx
06:34:24mernenany problem if I push them?
06:34:37evanmernen: what OS?
06:34:40evanwe're all on gcc 4.2
06:34:41evanon OS X
06:34:54mernenubuntu 8.10
06:35:04brixenI'm on 4.0.1 on os x
06:35:14Defilerevan: are ffi_get_field and memorypointer_get_field different?
06:35:15evani guess so am I
06:35:15dbussink4.0.1 is still the default on os x
06:35:20mernenyeah, I'm on 4.0.1 here too
06:35:27evanmernen: yeah, go ahead and push
06:35:50evanDefiler: all ffi_get_field should become memorypointer_get_field
06:35:56DefilerOK, thought so
06:35:59evanditto for ffi_set_field
06:36:32evanbrixen: alrighty
06:36:43evana quick run down
06:36:53evancalling super() in Hash.allocate doesn't find Class.allocate
06:37:16evanI'm wondering if Hash's metaclass isn't hooked up right
06:37:22evanthat could cause the problem too
06:37:24brixenme too
06:37:30brixenbut Hash is pure ruby
06:37:44evanbut the way Hash, the class, is created, isn't
06:37:44brixenso, not sure where to start tracking that
06:37:54evanwow, WAY too many commas in that sentence
06:37:58evanthat was like comma crack
06:38:10Defilerevan: Right now, ffi_get_field (now memorypointer) is hooked up via an attach_function call
06:38:18DefilerShouldn't I make a method that wraps the primitive in the kernel
06:38:25CIA-21* Use unsigned literals to make stricter compilers (gcc 4.2) happier. -; 8ca001a - Daniel Luz
06:38:27CIA-21* Declare test string buffers as char[] to ensure their mutability. Required for gcc 4.2. -; e1cce51 - Daniel Luz
06:38:29CIA-21* Cast comparison value to native_int to make stricter compilers happy. -; 32bc147 - Daniel Luz
06:38:38evanDefiler: it should be a primitive instead, yes.
06:39:32brixenevan: I don't understand what ya mean by Hash, the class, the way it is created, is not pure ruby
06:39:52evanbrixen: you have
06:39:53evanclass Hash
06:39:54evanat the top
06:40:03evanhow does that go off and create a Hash?
06:40:16evanit uses the open_class instruction
06:40:21evanwhich is not in ruby
06:40:32evanthats what I mean.
06:40:44brixenthere's no special constructor for it, is what I mean
06:40:47brixenby pure ruby
06:41:02evanbut the metaclass should be hooked up correctly by open_class
06:41:06evanso we should look in that direction
06:41:19evanthe test_open_class should verify our assumptions
06:41:33evani'm going to go watch project runway a bit
06:41:41evanbut here's the test params
06:42:07evanthe new class's metaclass should have a superclass that points to the metaclass of the classes superclass
06:42:15evandoes that make sense?
06:42:30evanso, write a test for that assumption
06:42:33evanand we'll go from there
06:45:20evanlet me know how that goes
06:46:09Defilerhell yeah got it
06:46:30Defilerno such file to load -- compiler/init
06:46:36Defileris the new error
06:47:04evancall it a night
06:47:09evango play
06:47:47Defilerthat looks OK, right?
06:48:30evandef memorypointer_get_field
06:48:33evanis quite a mouthful
06:48:34DefilerI guess the wrapper could be called 'set_field' but that name is so scary heh
06:48:34evanbut fine.
06:48:47DefilerI can easily rename it
06:48:54evanI should probably banish 'field' from my method naming vocab
06:49:11DefilerHow about 'set_at_offset' and 'get_at_offset'?
06:52:05DefilerWhen we get mspec up and running I am going to take a chainsaw to kernel/common/compile.rb
06:52:13DefilerChainsaw Maid
06:52:36evanit's been quite a pain
06:52:42evanbut yeah,
06:52:47evanthe impl is crazy.
06:53:08DefilerNot touching it until the require tests are passing though heh
06:53:20evangood plan
06:55:55brixenevan: did you explain this before? what happened to push_encloser?
06:56:16evanit was pre-StaticScope
06:56:26brixenok, opcode docs are out of date
06:56:30evanso I finally eliminated it
06:56:36DefilerIt turned out to be crazy hard to try to manage the scopes at that level
06:56:37evanadd_scope is used now
06:56:55CIA-21* Avoid creating an extra BlockContext on every require -; fba6b2c - Wilson Bilkovich
06:56:59evanas the first instruction of a module/class body
06:56:59CIA-21* Rename memorypointer_*_field prims to _*_at_offset and wire them. -; 47ef8d3 - Wilson Bilkovich
06:59:22CIA-21* Correct the primitive name in ffi.rb (oops) -; 68af39d - Wilson Bilkovich
07:00:33Defilerleaving it there for the night
07:00:59evanDefiler: looks good
07:03:55DefilerYou probably still have that gsub commented out?
07:04:39drbrainit seems broken
07:05:11drbrain(the gsub)
07:05:11Defilerthis code uses a ton of masgn
07:05:17DefilerAny chance we still have masgn problems?
07:05:23drbraincould be LIBSUFFIX or path
07:05:27drbrainerr, gsub
07:05:41drbrainI'm seeing File.file? return false for a file that exists
07:05:59Defilerthat sounds fruitful
07:07:29drbrainhaha, to_s(2) doesn't work
07:11:31drbrainheh, this file is regular and a character device!
07:13:55drbrainand something else
07:14:45drbrainI'm too tired to look at this any further tonight
07:28:01evan64bit stat strikes again!
07:35:17CIA-21* Fix so ffi_stat calls the 64bit version of stat -; 0144441 - Evan Phoenix
07:35:20CIA-21* Fail hard if compiler/init.rbc is missing -; 5dd02c5 - Evan Phoenix
07:42:46dbussinkevan: hmm, shotgun used compiler flags for those 64 bit fs support
07:42:53DefilerCalled unbound or invalid primitive from: load_from_file
07:43:05evanDefiler: yep
07:43:08evanfixing that now
07:43:16evanwe've got a pure ruby unmarshaler now
07:43:22evanjust got to wire it in
07:43:32evandbussink: yeah, I know
07:43:34evandbussink: thats a hack
07:43:54dbussinkmaybe we want a central header that handles this kind of stuff?
07:44:10dbussinkso it sets up all defines for various platforms
07:44:32evanprobably eyah
07:45:13DefilerI guess we need loader.rb to figure out whether it is running from an install or from a checkout
07:45:33DefilerLooking at that todo in there that wants to use the configure-based lib path
07:45:53DefilerIf we turned that on we would end up loading installed libs when we wanted libs in the checkout I think
07:46:06evanconfigure-based is compile time only
07:46:09evanit's not dynamic
07:47:36DefilerThat's what I mean
07:47:49Defilerif we pull it in in the loader, it will be the same value every time, even if we are running from checkout
07:48:42DefilerThere should really be a __DIR__ method like the __FILE__ method
07:48:58Defilersince so many people do File.dirname(__FILE__) blah
07:51:45headiusevan: I had an idea
07:51:55evangets the media on the phone
07:52:27headiusactually, it's fading now
07:52:46headiusI was thinking duby could target rubinius bytecode also but that wouldn't really gain you anything without static-typed opcodes
07:52:54headiusit would basically just erase the types
07:53:32headiustrying to think of a better way to build the native (C/ASM/whatever) backend
07:54:01headiusdumping out C code is gross and problematic because where C requires explicit exit points Ruby allows implicit exit points
07:54:23evanso, what do ya get by dumping out rubinius bytecode?
07:54:25headiusdumping JVM bytecode or rbx bytecode is trivial because you just return the last value
07:54:48headiussince all bodies eventually leave something on the stack
07:54:56headiuswell, I guess not a whole lot
07:55:11headiusthe benefit of duby is in the inferred types
07:55:45headiusI suppose if you added a send operation that could be statically bound at load time, it could make use of that
07:56:24headiusargument types aren't really important, but if there were a static_send with a type path declaration, duby could emit that
07:56:59headiusthe protocol would be that it binds to the method present when that bytecode is loaded
07:58:00headiussimilar to JVM's invoke bytecodes but without requiring a static signature as well
08:00:36headiusback to work
08:02:13evanheadius: how late do you work?
08:02:29headiusuntil I can't keep my eyes open anymore
08:02:41headiusllvm isn't stack-based, is it
08:02:59evanit's super easy to make it stack based though
08:03:16headiusthat might be the easiest native backend for duby
08:03:17evanyou just assign everything to a variable
08:03:22evanand return the name of the variable you assign to
08:03:29evanso you basically have a pointer to the top of the stack
08:03:36headiusI'll have to look into that later
09:50:33evangot lib/compiler/init.rbc loaded.
10:43:21dbussinkevan: party time!
14:53:48rueGood morning
17:15:17dbussinkrue: howdy
17:21:11brixencan I get another pair of eyes on this:
17:21:19brixenor eye if that's all you can spare ;)
17:21:31brixenthe rbx section is from shotgun
17:21:36brixennot cpp
17:22:22brixenlooks like we're not setting up F.metaclass.superclass correctly
17:22:54brixenI'm going to try to figure out what cpp does now
17:23:15Defilercheck out attach_metaclass probably
17:24:38brixenDefiler: but would you agree that we appear to be doing it wrong in shotgun?
17:25:08brixenwhat I believe evan told me was that: F.metaclass.superclass == F.superclass.metaclass
17:25:15brixenwhich is true in shotgun, but false in MRI
17:25:25brixenso, I'm trying to figure out if evan is confused or I am :)
17:25:57brixenalternatively, parse this line:
17:25:58brixen22:42 evan >> the new class's metaclass should have a superclass that points to the metaclass of the classes superclass
17:26:29brixenGuest76243: cloking?
17:26:51brixenor cloaking if you're a native speller :P
17:29:09rueThe superclass of an object's metaclass should be the metaclass of the object's class' superclass
17:29:11rueI think
17:29:22brixenrue: use ruby please :P
17:30:15brixendid you mean? F.metaclass.superclass == F.class.superclass.metaclass
17:30:22brixenbecause that's false in MRI
17:32:26Defilerwhat is Class.metaclass in rbx?
17:32:57DefilerClass itself, right?
17:33:14brixenMetaClass Class
17:33:30rueclass A; end; class B < A; end; b =; b.class => B; b.class.superclass => A; b.metaclass => MetaB; b.metaclass.class => (Metaclass or Class)
17:33:44rueRemember, MRI does not have MetaClass
17:33:52brixenit does
17:34:01brixenit just doesn't have a nice way to get it
17:34:16brixenit doesn't have a class MetaClass
17:34:21brixenit's anonymous
17:34:37rueThe class of a MRI metaclass is Class
17:34:49brixensame with rbx
17:34:49rueThe class of an rbx metaclass is MetaClass
17:34:53brixenMetaClass < Class
17:35:06rueNot the same, you have an extra step in the chain
17:36:22brixenrue: so, you're saying this is correct in rbx: F.metaclass.superclass == F.superclass.metaclass # => true
17:39:24DefilerIs there code that isn't working, or does it just seem odd?
17:40:04brixenDefiler: super() is not working
17:40:34DefilerGot some sample code?
17:40:39brixenso, in rbx, F.superclass.metaclass == MetaObject, F.superclass.metaclass == MetaObject
17:40:41DefilerOr is it any use of super at all?
17:40:57brixenclass Hash; def self.allocate; super(); end; end
17:40:58Defileryou have one of those reversed
17:41:04brixennot in rbx
17:41:06brixentry it
17:41:12DefilerYou wrote the same line twice
17:41:33brixenF.metaclass.superclass == MetaObject
17:41:33DefilerDoes super work in instance methods?
17:41:36brixenin the second
17:42:09brixenin MRI: F.superclass.metaclass == MetaClass:Class (<Class:Class>)
17:42:18brixenF.metaclass.superclass == MetaObject
17:43:00brixenDefiler: I haven't tried instance methods
17:43:41DefilerI get "Called unbound or invalid primitive from: open_with_mode"
17:43:54Defilerwhen I try to run a script with an instance method call to super
17:44:46brixennice work on loading compiler/init :)
17:44:57evanwent on a bit of a tear
17:45:00evanlast night
17:45:03brixenno doubt
17:45:05DefilerYeah, saw that. Heh
17:45:08brixensurprised you're awake
17:45:33Defilerbrixen: What local changes do you have?
17:46:15brixennothing that would affect this
17:46:36DefilerOK, so what happens when you try to run RBX_RUNTIME=runtime vm/vm some.rbc
17:46:44Defilerwhere some.rb is just (3 + 4).__show__ ?
17:47:08ruebrixen: I have not quite decided yet :P
17:47:12brixenrue: k
17:47:19evanbrixen: you can't look at the proper superclass in MRI
17:47:22evanto test that
17:47:26evanit skips it.
17:47:35brixenevan: ok, so shotgun is right?
17:47:45evanso you can't ask F.metaclass.superclass and get the correct answer
17:47:51evanyeah, shotgun is correct
17:48:04brixenI need help writing the test in open_class to show this
17:48:37brixenI tried this:
17:48:55brixenalso, I'm still on page 0 of "how to write instruction tests" :P
17:50:01brixenDefiler: I can't load all of runtime because I have a Hash class that expects to call super() in .allocate
17:50:13brixenand other kernel stuff needs to instantiate a Hash
17:50:30evanbrixen: that seems fine
17:50:40DefilerYeah, it looks OK to me too
17:50:50brixenevan: excellent, cus it fails :)
17:51:20Defilerso the superclass of the attached metaclass is being set to what?
17:51:31evanoh wait.
17:51:32DefilerCan you add a local variable there and print it?
17:51:33evanhold on.
17:51:45evantest_open_class isn't asking for a subclass of TrueClass
17:51:50evanwhich is what you're testing
17:51:54Defilerohhh yeah
17:51:56brixenyeah, that's my problem
17:51:58Defilerit is just a constant on TrueClass
17:52:10evanthe 'task->push(Qnil)"
17:52:16evanreplace the Qnil with an existing class
17:52:28brixenwhy wouldn't that be open_class_under?
17:52:37evanopen_class_under is for the syntax
17:52:39evanclass A::B
17:52:39Defilerreplace it with G(true_class)
17:52:44Defilerinstead of Qnil
17:52:47Defilerand see what happens
17:52:49evanunder refers to where the constant is located
17:52:51evannot it's superclass
17:52:59brixenand why is SS set to G(true_class)
17:53:05brixenI can't find docs on that either :P
17:53:25DefilerWe are opening class 'C' inside TrueClass
17:53:34Defilerso the sendsite is on trueclass
17:53:45evanthats testing that open_class uses the current lexical scope
17:53:56evanthe StaticScope stuff sets up the lexical scope
17:54:28DefilerIt is a little confusing because the scenario being set up in this test is unlikely in real life
17:54:40Defilerbut the same functions are being called at least
17:54:49brixenI basically understood that, but translating it into code is the problem
17:54:56brixenwe need docs on how to write instruction tests
17:54:58massgood day everyone
17:55:06Defilerbrixen: I will do some
17:55:15brixenDefiler: you will be my hero
17:55:16Defilersince I've got more of them to do today
17:55:17brixenagain :)
17:55:18massI nominate brixen
17:55:42DefilerActually, I do have one question about them that evan can probably answer
17:55:57brixenok, that test passes if task->push(G(true_class))
17:55:58DefilerWhen we declare the 'stream' opcode array in the test glue..
17:56:14DefilerIs it OK to fill that with zeroes first?
17:56:21evanfill what?
17:56:24evanyour lunch box?
17:56:25Defilerthe memory
17:56:38evanreplace that with a real noun
17:56:53brixenright, so you don't have to do stream[1] = (opcode)0; all the time
17:56:58brixenor stream[n]
17:56:59DefilerIn memory, 'stream' starts with the opcodes we are going to run for this test
17:57:04DefilerNo, you would still need that
17:57:16brixenif they were all 0 to begin with?
17:57:20evanso whats 'that'?
17:57:29Defilerbut when you ask gdb to print the stream, it has a bunch of values after the section that this test will run()
17:57:34rueHm, no, I do not think that `B.metaclass.superclass == B.superclass.metaclass` should be true
17:57:50Defilerthat I have been assuming are just previous values/objects residing in that region of memory. am I wrong about that?
17:58:19Defilerbrixen: 0 isn't arbitrary.. when you see instruction tests setting it that way, it is because the opcode they are going to run takes arguments, and we are passing it a zero
17:58:33DefilerIt just so happens that the tests often use 0 for their index, etc.. but it could also be 11
17:58:42evanDefiler: i still don't get what you're asking
17:58:46brixencan we ditch run() as well
17:58:49DefilerLet me paste a gdb session
17:58:51evanbrixen: no
17:58:59DefilerI don't see how, since you need to be able to have multiple per test method
17:59:00evanit has to be there
17:59:05evanotherwise, how is the code run?
17:59:09brixenwhy does it have to be a macro
17:59:15brixenwhy not the real code?
17:59:33evanbecause it abstracts the tests from knowing their setup
17:59:45evanwhich has saved me from having to edit every damn test a number of times
17:59:47brixenk, well with docs it will be better
17:59:52brixenright now it's just confusing IMO
18:00:15brixenrun() // magic happens here
18:00:18evanso we can document it
18:00:18Defilersec. someone at the door
18:00:29evanrun() means "perform the opcode you're testing"
18:00:45evanperhaps a better name is in order
18:01:26brixenI'm just saying, looking at the tests was like my first month of learning spanish, I understood every few words but no sentences
18:01:31evanperhaps a bit verbose
18:02:03evanbrixen: thats true of any framework you don't know.
18:02:04brixenprobably 20 lines of docs at the top would do
18:02:30evanif you need a rails analogy, run == render
18:02:48brixenI don't need an anology
18:02:59brixenI need a connection between run() (empty meaning) and task->
18:03:03brixenwhich does stuff
18:03:13brixenonce I looked at the gen'd test file it made more sense
18:03:30DefilerThat's what I mean.. 29 is the opcode we are testing, and that line is about to set the open_class index to zero..
18:03:42Defiler..but the stuff after it isn't going to be run just now in this test, no?
18:03:47evanDefiler: oh.
18:04:13evanDefiler: sure
18:04:21Defilerbrixen: #define run(val) task->execute_stream(stream)
18:04:22evanjust add a memset() in the setup code
18:04:30DefilerOK, cool. Doing that
18:04:41brixenDefiler: yeah, got that
18:04:53DefilerSo we could just replace the 'runs' with calls to that
18:05:37brixenDefiler: if you could just doc a test, we'll see if that helps others with the confusion
18:06:30DefilerWill do
18:07:39rueThis is a bit complicated, actually
18:09:21Defiler(gdb) p stream
18:09:22Defiler$1 = {0 <repeats 100 times>}
18:09:23Defilerhell yeah
18:10:05rueBecause an MRI metaclass' superclass is always a metaclass
18:10:16Defilergod damn that is so much easier to read
18:14:06drbrainwhat's our status this morning?
18:14:38evanlib/compiler/init.rbc is loading
18:15:49DefilerI miss our old checkin bots
18:15:52DefilerCIA is terrible
18:16:40drbrainI end up in kernel/delta/marshal.rb:13
18:17:39evanme too
18:17:49evanthats where we are
18:20:42drbrainargs.last is broken :(
18:20:47drbrainI ran vm plus.rbc
18:20:51drbrainI'll poke at it
18:21:01drbrainerr, Array#last
18:24:48drbrainah, at(-1) isn't working
18:27:18brixenoh man, I love rp
18:27:49brixenfixing up MetaClass and others to print nice info
18:27:59brixenlike our rbx #inspect did
18:29:58drbrainhow do I indicate a primitive failure?
18:30:06drbrainArray::aref should barf on -1
18:30:10drbrainit doesn't
18:30:56brixenArgumentError::raise e.g.
18:31:00evanArray::aref needs to throw a primitive failure
18:31:02evanin that case.
18:31:13brixenoh yeah PrimitiveFailed
18:31:18evanso the ruby code can handle it
18:31:31evanit's just eating the out of bounds indexes and returning nil
18:31:38drbrainok, now I've got an example
18:31:47drbrainevan: I know, I wrote it :)
18:31:58evanwell then we've got the man for the job
18:33:38drbrainurg, TS_ASSERT_THROWS is backwards
18:33:43drbrainexpected comes first!
18:34:22brixennot in OO, obj.should_throw something
18:34:50drbrainit's a unit test framework, so expected comes first
18:35:42brixenhm, perhaps it's the first unit test framework with correct ordering ;)
18:42:37rueBy the by, I think the Github repo could use a bit of tightening
18:44:41evana new belt perhaps?
18:45:11rueCorset? I was thinking git-prune (or whatever it was called)
18:47:41evannot sure what ya mean
18:48:05DefilerAre you saying we have unreachable objects to get rid of?
18:48:19Defileroh, so we do
18:48:33evangithub runs it automatically
18:48:38evanyou can run it locally
18:48:41evanand should once in a while
18:48:57Defilerhoh dang that made things faster
18:49:08ruePruning, packing?
18:49:26evangit am (and thus git rebase) runs git gc automatically at certain times
18:50:08rueAh yes, git-gc
18:50:20Defilerbrixen: How about I comment up the first test in the file? Or should I do a sample one as a big-ass comment at the top?
18:50:26Defiler(re: instructions.rb)
18:50:39brixenDefiler: I think straight docs at the top
18:50:46brixenbut do what works for ya
18:50:51brixenI'll give you feedback
18:51:00rueI was trying to think about what they named the GC command in git.. *facepalm
18:51:26brixenyeah, one of the more clearly named commands
18:56:38evaniphone really makes my speakers freak out
18:56:44evanthese computer speakers are really old
18:56:50evani guess I need some newer, shielded ones
18:57:09tarcierievan: its awesomely unshielded GSM?
18:57:26tarcierii've had that problem with every AT&T/Cingular phone I've ever owned
18:57:47drbraindamn you CIA! where's my commits?
18:58:00evangithub is looking at it
18:58:05evantheir hook to send to CIA is busted.
18:58:07evanit seems
18:58:10drbrainI love how some cars in GTAIV have speakers that freak out
18:58:20evanyeah, when your phone rings?
18:58:57drbrainI have the run_ruby task setting RBX_RUNTIME now
18:59:17drbrainand vm/vm plus.rbc is now at the same spot as -e
18:59:43evanpulling in new code
19:00:02drbrain(or rake run_ruby[plus.rb]
19:01:45evandrbrain: still on marshal.rb:13, yes?
19:03:00evanyou're working on that then?
19:03:14drbrainI thought somebody else was
19:03:20drbrainif not, I will
19:03:26evango for it
19:09:10evanooh, 'git log --graph' is cool.
19:09:36rueI think two years from now we will still find yet-undiscovered git secrets
19:10:18tarcieriI take it that's a git 1.6 thing
19:10:54evanmight bee
19:11:02evanit's like an ascii gitk
19:12:12drbraingah, this is like walking in a minefield
19:16:39drbrainin IO#seek, how did prim_seek(-@buffer.size, SEEK_CUR) ever work?
19:16:46drbrainI don't see a #size on IO::Buffer in shotgun
19:17:13drbrainthe problem seems to be we've read one too many lines from the rbc
19:17:19drbrainbut IO#lineno is worthless for this
19:17:36drbrainoh, it was a String subclass
19:17:41evanit worked because IO::Buffer used to be a String subclass
19:17:51evan.size should be replaced with .unused
19:18:43drbrain@used ?
19:18:54drbrainor a new method that's @total - @used?
19:19:42evanit's already there
19:20:12drbrainoh, heh
19:20:23drbrainit was invisible, I swear!
19:27:25drbrainno, unused is wrong
19:27:30drbrainsince shotgun has it
19:29:22drbrainlooks like it should be @used
19:29:33evanyeah, I see.
19:29:44evanthat wants to rewind the current size of the buffered data
19:30:05evan@used is how much data the Buffer contains
19:30:07drbrainand I'm getting EINVAL right now
19:30:13drbrain(I wired it up to FFI instead)
19:30:29evancalling seek?
19:30:41evanyou probably can't
19:30:48evanlseek is like stat
19:30:49drbrainsince that what the io_seek prim did
19:30:57evanif you use FFI
19:30:59evanyou get the 32bit version
19:31:10evanbut everything else is using 64bit stuff
19:41:55drbrainis native_int big enough to hold an off_t?
19:42:22DefilerPlatform-specific answer
19:42:41drbrainI'm thinking its never true
19:42:41Defilerif the platform makes off_t 64bit even with 32bit pointers, no
19:42:45drbrainerr, not true for 32 bit
19:42:58Defilerthe ML2N macro in shotgun could handle it though
19:43:05DefilerI can't remember what it is called in VM
19:43:18Defilerprobably yeah
19:43:47Defilerbrixen: OK, check that out
19:46:58brixenDefiler: can you pull and walk through how we'd test msg.priv = true in that commit?
19:47:48brixenalso, could we clarify: * A Task for with that CM activated.
19:48:00DefilerYeah, I am making some edits. sec
19:48:01brixenotherwise, those docs are super helpful
19:49:13drbraindamn, my primitive still failed
19:50:50drbrainis there a C++ way to do std::string + int ?
19:50:55drbrainI'm using std::string + sprintf
19:50:59Defilerbrixen: OK. We can check this by having a second run() that changes the send we are doing to be non-private
19:51:47brixendrbrain: you could use a strstream << int I believe
19:52:03Defilerbut we will have to figure out what to call to create this method hierarchy
19:52:19brixenDefiler: a second call to run() doesn't seem like it'd test what we want
19:52:33DefilerWell, the first run() would be what is there now
19:52:50brixenk, but when I changed that to = true, the test did not fail
19:53:00Defilerand then we would replace the sendsite
19:53:02brixenso, it must have been set up that way
19:53:03DefilerI guess
19:53:07Defilerand run it again
19:53:47Defiler msg.send_site = as<SendSite>(task->literals->field[index]);
19:53:59Defilerwhatever we shove into the literals list for the test there
19:54:08Defilerwill be the sendsite used by send_message
19:54:26ruedrbrain: Yes, strstreams are best when constructing like that
19:55:39Defilerbrixen: Check out vm/builtin/sendsite.cpp and look at the ::resolve functions, if you haven't
19:55:40brixenDefiler: I want to test that msg.priv = true before the task->send_message(msg) runs
19:56:10brixenbecause that is a precondition for me
19:56:22DefilerThe message is not exposed by the instruction
19:56:25brixensend_message(msg) should have certain behavior based on what is in msg
19:56:28DefilerIt just creates it locally and passes it into send_message
19:56:36DefilerYou can test that in the send_message test
19:56:46Defilerbut this is the opcode test
19:56:58Defilerand checking the internal state in the middle of the operation seems weird to me
19:57:10brixenthe send_super_stack_with_splat is setting up a particular msg and invoking send_message
19:57:11DefilerYou are emitting an instruction and asking it to do something for you on the stack
19:57:51brixena good test to me is confirm msg is set right, and that results in a particular behavior
19:57:54DefilerThis doesn't seem like the right place to test that
19:58:04brixenwell, it's being done in that instruction
19:58:04DefilerEverything in this call path is now hard-coded to true
19:58:10brixenso I guess I'm confused
19:58:33Defilermsg.priv = true is done in the method_missing branch
19:58:39Defilerand in the instruction body you have msg.priv = TRUE
19:58:51brixentrue == TRUE
19:58:55DefilerI don't think we need to test that the compiler knows how to set something to TRUE
19:59:12DefilerSo I think what you are describing is a send_message test, not a send_super_stack_with_splat test
19:59:26DefilerHere, we should test that we can make a super send off the stack with a splat
19:59:34brixenwell, one send_super_* had true and one had task->call_flags & 1
19:59:46DefilerRight. and we could have written a failing test for that
19:59:56Defilerbecause a properly-constructed send would fail
20:00:00brixenthose aren't equiv according to evan
20:00:09Defilerwhat aren't equiv?
20:00:09brixenso I want to see a test that makes one fail and the other not fail
20:00:13evanbecause call_flags can be 0
20:00:17evanand for super calls
20:00:23evanyou ALWYS look for private methods
20:00:29drbrainis strstream even standard anymore?
20:00:31DefilerYeah I know why it is hard-coded
20:00:33DefilerThat is correct
20:00:49DefilerWhat I'm saying is that testing that it is true in a function that has it set literally like that seems wrong
20:00:53Defilerand silly
20:01:04DefilerHere, we should test that the send works
20:01:13brixenhere's my question: "Why didn't the test fail when I changed msg.priv = task->call_flags & 1 to msg.priv = true?"
20:01:14ruedrbrain: The header is sstream, the classes are ({o,i})stringstream
20:01:36evanbrixen: which test?
20:01:37evani'll look.
20:01:40DefilerWhy would it fail?
20:01:51brixengit show 5a4b58c
20:02:03brixenDefiler: because if they are equivalent, I didn't need to change anything
20:02:10brixenwhy wouldn't it fail?
20:02:12evanthey're not equiv
20:02:18DefilerThe method you are trying to call isn't private
20:02:24evanbecause the method isn't private
20:02:35brixenthen that line of code is not tested
20:02:36Defilermsg.priv means it allows private sends
20:02:41brixenI got that part
20:02:41evanbrixen: yes, thats correct.
20:02:46brixenI want a test!
20:02:47DefilerThat is correct, and is what I was trying to tell you
20:02:48ruedrbrain: istringstreams allow pretty useful scanf-type reading. Plus you can make your own types work with them by providing the << functions
20:02:49evanthis is not testing that msg.priv = true
20:02:53evanbrixen: so write one!
20:02:54Defilerbecause we need two run() calls to test it
20:02:55drbrainhrm, I'm getting EBADF
20:02:57evanmake the super method private
20:03:20rueAnd by << I mean >>
20:03:23Defilerleave the test as is, and then under it, twiddle the super method to be private, make the stack look the way you want, and run again
20:03:50Defilerthat test will pass, though, since this code looks right
20:04:13Defilerbut you can change msg.priv = FALSE and see it fail
20:04:13evanand you can verify it by setting msg.priv = false
20:04:15evanand seeing it fail
20:04:18evanthen change it back to true
20:04:19evanand it should pass
20:06:41evanjust gave fog a bath
20:06:42evanthat was fun.
20:08:31mernenugh, bad news... strnstr is a BSD-only function
20:09:20mernensome say it's flawed on osx 10.4 too
20:09:53evanmernen: ack.
20:10:00evanwell, you can replace it with strstr()
20:10:07evan ust be sure that the buffers are null terminated.
20:10:15mernenis that safe?
20:10:23evanif they're null terminated, yeah.
20:10:25evanthough, actually
20:10:28evannow that I think abuot it
20:10:34evanstrstr has the wrong logic
20:10:37mernenI mean, can you actually be sure they're null-terminated strings
20:10:40evanbecause we allow our buffers to have nulls
20:10:51evanso strstr is going to fail when it should pass
20:10:52evanin some cases
20:10:55mernenstrnstr seems to also be a bad choice
20:11:07evansounds like it needs to be a hand coded loop
20:11:09mernenthere's memmem, but guess what... GNU-only
20:11:10evanor something else
20:11:18evanah, hrm.
20:11:20evanwell, i have to run to lunch.
20:12:04mernenI'll see if I can write something later
20:12:11mernena simple dumb scanning loop would do anyway
20:18:03brixenevan: *ignoring* included modules, is this correct so far?
20:20:59DefilerWhat is the MetaClass (Object) part?
20:21:03DefilerI didn't realize there were two links there
20:22:58brixenF.metaclass.superclass == Object.metaclass
20:23:06brixenor, IOW
20:23:11Defileroh really
20:23:17Defileroh I remember this yeah
20:23:19brixenF.metaclass.superclass == F.superclass.metaclass
20:23:55Defilerwell, that explains why Object.metaclass.superclass has to be Class
20:24:02Defilerand not some other metaclass
20:24:17Defilerotherwise you would jump over it
20:25:29brixengrabbing some food and ibuprofen for this killer headache
20:25:39Defilerdiagram looks good though
20:27:09brixenbtw, we need more explicity criteria for test completeness
20:27:19brixenthat previous test was apparently correct, but incomplete
20:27:28brixentoo bad we don't have heckle for cxxtest
20:27:30DefilerSure. Once we have tests for everything, we should do another pass and look for holes
20:27:37Defilerhaha imagine how long that would take to run
20:27:44brixenheh, true
20:28:23brixenalso, opcode docs need overhaul
20:28:31brixene.g. no push_encloser
20:30:07Defilersome don't even have docs
20:31:46rueSo by convention the metaclass hierarchy can be made parallel
20:32:05DefilerI like seeing it in the order it will really be checked
20:33:57rueIn MRI, F.metaclass.superclass == F.superclass.metaclass.superclass
20:34:05goodneyevan: you around?
20:34:08DefilerHe's at lunch
20:34:19goodneyso i see
20:58:58rueMRI breaks down badly
21:07:05brixencpp has the classes set up the same as that diagram, which I'm pretty sure is correct
21:07:14brixenso lookup must be broken somewhere
21:08:29brixenand :allocate is in Class.method_table as a CM, not a MV, so it must be public
21:10:37brixen /* If this was a private send, then we can handle use
21:10:37brixen * any method seen. */
21:10:40drbrainwhy is lseek() giving me EBADF?
21:10:55drbrainI don't see where the fd gets closed
21:10:56brixendrbrain: does it work from C++, not FFI?
21:11:08drbrainit does not work from either
21:11:17brixenin that comment above, what is a "private send"? that's not ruby terminology
21:11:29drbraintries some things
21:11:35rueEssentially the method lookup works so that if B < A; mb =; mb < mB < mA. I think
21:11:45brixenrue: I want to word it better
21:12:24brixen"If we're allow to look at private methods, use any method that matches +name+" ?
21:13:02Defilerbrixen: private send means a send without a receiver
21:13:11brixenDefiler: ah, thanks
21:13:17Defilerwithout a lexical receiver, I should say
21:13:29Defileror, I guess, one with literal self as the receiver
21:13:41Defilerbut I think the sexps are a little different. doesn't effect us here
21:14:05brixenwe should have a glossary
21:14:21brixenI shall make one right this minute
21:16:36brixenI guess we should rdoc it
21:16:50brixenwhat is a definition list in rdoc?
21:17:02DefilerI have no idea how to use rdoc =(
21:17:02drbrainuse foo::
21:17:12drbrainri RDoc::Markup
21:17:36DefilerNothing known
21:17:52drbrainyou must not have RDoc 2
21:17:55Defilermain RDoc page has some stuff though
21:18:28Defilergod this is huge
21:19:09Defilercool though
21:19:15DefilerI didn't know about foo::
21:20:56DefilerWow rdoc just uses regexps to parse
21:21:35drbrainit's got a son of irb for ruby parsing
21:21:42drbrainfor everything else, regexp
21:22:48brixendrbrain: would you mind reformatting if I push? then we have an example
21:25:17brixendrbrain: ok, pushed. feel free to revise however
21:25:50brixenwe should be throwing words/phrases into that whenever, regardless of whether we have a good definition
21:25:52Defilerso CIA is totally jacked up I guess
21:26:02brixenit's not CIA
21:26:04brixenit's github
21:26:07drbrainwhich file am I looking at?
21:26:16Defileryeah, saying zargle:: wtf is this? would be an awesome patch
21:27:02drbrainI'll make these changes, but also point them out as I go
21:27:14brixenthat blurb on private send should probably cross-ref "lexical" blah
21:27:22brixenthat helps
21:27:30drbrainto continue a <pre> block, you need to add whitespace on the empty lines matching the indent
21:27:43brixenahh, I stripped
21:28:18drbrainand the "A method call" line was indented, which would turn that into a <pre>, probably not what you wanted
21:28:53drbraintry that
21:28:57drbrainI pushed
21:29:43brixencool, thanks
21:30:02drbrainRDoc is semi-smart about huge <dl>s, but it's eaiser to just use <h1>, <h2> usually
21:30:20drbrainyou have to maintain indentation all over the place and it gets to be a hassle
21:34:34drbrainwait, what? it was closed!
21:37:33drbrainoh, hah, I'm a dummy
22:07:07brixenok, pushed more glossary, please check it
22:11:57johnjust curious, what are the plans for rubinius when ruby 1.9 comes out? Are you going to make a separate version that has compatibility with 1.9?
22:12:26zenspidernot that I know of... not yet planned that way at least.
22:12:42brixenprobably have to cross that when we know what 1.9 will actually be
22:12:52brixenfor now, pure speculation
22:12:54zenspiderI'd rather see us provide a gem or something that shims 1.9 functionality onto rubinius
22:13:07brixenwhich would be pretty easy
22:13:27DefilerWe can do that now that the parser is in ruby
22:13:31johnah, just wondering, didn't they already release their release schedule for 1.9? I thought they had it set for december 08, i read that somewhere on the site wiki
22:13:35DefilerBecause 1.9 has syntax changes
22:14:37zenspiderDefiler: yup. it'd be easier if we switch to a subclassable PEG parser, but that is gonna be a while off.
22:15:05jbarnettezenspider: have you been looking at any specific PEG parsers?
22:15:27jbarnettezenspider: or thinking about rolling your own?
22:18:58zenspider<zenspider> I've started a port of ometa, but haven't had time to go back and
22:19:09zenspider finish it off. [14:16]
22:19:20zenspider<zenspider> I might be doing it wrong, as a straight pull port, instead of
22:19:31zenspider doing a push port. [14:17]
22:19:39zenspiderstupid cafe network
22:19:44johnthats where i read it:
22:19:50johnFurther to the above, Ruby 1.9.0-4 is due on August 25, 1.9.0-5 on September 25, 1.9.1 RC1 on October 25 (this will be quite a significant test - put it in your calendar), 1.9.1 RC2 on November 25, and 1.9.1 proper on December 20, 2008.
22:19:52zenspiderthe real problem is that ometa doesn't have good tests, so it is harder to port
22:22:10jbarnettezenspider: ah, right, I remember you working on that a few months ago
22:22:33jbarnettezenspider: i've been dicking around with Treetop, but I've been very frustrated by its lack of diagnostics
22:22:42brixenDefiler: I'm using __allocate__ for now and going back to finish debugging Hash
22:22:49brixenDefiler: then I'll look at super() some more
22:22:54zenspiderit is a good system, I just think it is a bit much
22:23:06zenspiderteh thing about ometa is it seems as stripped down as possible
22:23:56brixenjbarnette: have you talked to nathan about it's lack of diagnostics?
22:24:05brixen(not sure what that is)
22:24:16jbarnettebrixen: i just checked out the code last night; it's on my list :)
22:24:30brixennathan is fun to talk to
22:27:28ruejohn_: Traditionally Christmas Day is the release day in the winter
22:28:00rues/is/has been/
22:28:07brixenis there a way to do the equiv of bin/rbx describe foo.rb ?
22:28:18johnrue: just saying what i read, thats all
22:35:14zenspiderbtw, I'm renaming :fixnum nodes to :int
22:36:09ruejohn_: I was mainly wondering why they were changing it :)
22:36:12goodneyevan: you back from lunch?
22:36:23ruebrixen: lib/bin/describe.rb ?
22:36:38goodneywe're in a lockdown! I'm locked in OHE122 learning about databases!
22:36:54evanwas there a bomb threat?
22:36:54rueIs it _hierarchical_ databases?
22:36:57johnrue: maybe they wanted to give themselves a few days of a buffer, /shrug but right now they released 1.9.0-4 2 days early but that doesn't say they will stay ahead of schedule
22:37:06ruejohn_: Hehe, might be
22:37:13goodneybank robbery, shootout => manhunt
22:38:55zenspiderrue: 1965 or so.
22:40:48brixenevan: k, pushed that diag in glossary
22:41:18brixenevan: btw, Hash is setup exactly like that diagram, so it must be in method lookup
22:41:31brixenI've put in __allocate__ for now so I can get hash in
22:41:32evanwant me to take a look at it?
22:41:50brixenwell, I'd like to find it, but I'm sure you'll find it much faster
22:42:18brixenthere's other problems with method calls it appears
22:42:36evanI don't want to styme your learning
22:42:40evanso just let me know
22:43:17brixenI'd like to get Hash in instead of rebasing these 7 commits endlessly :)
22:43:32brixenperhaps I should just squash them
22:43:50Defileror just push it and we can all try to fix it
22:43:59DefilerIt isn't like anyone is using cpp for production right now :)
22:44:13brixenheh, true
22:44:26brixenwell, there are two problems, the one I just pastied and super
22:44:32Defilerthis is open source we do what we want *thug life*
22:44:40brixenso, we can work in parallel
22:44:54evanbrixen: just use __allocate__ then
22:44:58evanagardiner: HEY!
22:45:04agardinerhi there!
22:45:05brixenagardiner: wb mate :)
22:45:15agardinerhehe! thanks!
22:45:24agardinerbeen a while...
22:45:28DefilerThe season turns and agardiner is reborn once again
22:45:29brixenevan: __allocate__ gets me to
22:45:41evanhm, ok.
22:45:43agardinerDefiler: :-D
22:45:43evanlet me look
22:46:11agardinerso, been trying to keep abreast of things via IRC logs...
22:46:12evanbrixen: oh! probably a compiler bug.
22:46:14brixenself shouldn't be nil
22:46:20evani'll bet the stack isn't reversed properly for +=
22:46:25Defileroh hoh
22:46:26brixenshould be instance of Hash
22:46:47evanop_asgn2 o/~ suuuucks o/~
22:46:53evanlet me take a peek
22:47:34Defilerthis is OpAssign1 right?
22:47:42evana.b += 1 is op_asgn2
22:47:49Defileroh right
22:48:05zenspiderDefiler: look at pt_testcase.rb
22:48:13zenspidertons of examples for all that stuff
22:48:36evanzenspider: can I make a change to op_assign_spec.rb?
22:48:40evani may need to
22:49:54Defilergoing to left-to-right sure got rid of a lot of swaps. heh
22:50:34evani see the problem
22:50:38evanthe sexp form is different
22:50:41rueagardiner: Hi!
22:50:49agardinerhiya rue
22:51:18agardinerwatcha up to?
22:51:49agardinerstill wrestling with apache?
22:52:47rueagardiner: C++ branch now
22:53:00agardinerah, all hands on deck, huh?
22:53:15agardinersounds like things are getting close...?
22:53:37drbrainhrm, my IO::Buffer is not getting filled in with anything
22:53:52zenspiderevan: just lemme know when you make a change there... I'm focusing on simple right now...
22:54:01zenspideryou do some really nasty stuff to the sexps :(
22:54:02drbrainor something
22:54:15evanzenspider: it's really a tiny change
22:54:21evani'm removing one element from a sexp
22:54:54zenspiderhow much farther is that from the UR sexp?
22:55:05evanlet me check.
22:55:18evans(:op_asgn2, s(:vcall, :a), :b=, :^, s(:lit, 8))
22:55:26evans(:op_asgn2, s(:call, nil, :a, s(:arglist)), :b=, :^, s(:lit, 8))
22:55:47zenspideryou're just doing the vcall rewrite?
22:55:57evanit was
22:56:03evans(:op_asgn2, s(:call, nil, :a, s(:arglist)), :b=, :^, s(:lit, 8))
22:56:11evans(:op_asgn2, s(:call, nil, :a, s(:arglist)), :b, :^, :b=, s(:lit, 8))
22:56:14evanit was ^^ that
22:56:22evani'm making it the PT version
22:56:37zenspiderah. ok. yeah... anything that gets us closer to UR is cool
22:56:44evanit's closer
22:56:50evani'm not going to make any changes that get further
22:56:52evanfrom UR
22:56:55zenspiderthat's essentially what I'm doing for all these errors
22:57:02evanthats just counter to what we're trynig to do
23:00:17zenspiderevan: that's what I've got currently. it already diverges from your changes in that you didn't actually map some stuff
23:00:22zenspiderbut it seems right
23:01:07evanlooks right
23:01:29zenspideryou don't have :symbol, do you?
23:01:34zenspiderI haven't seen it.
23:01:42evanwe don't
23:01:45zenspideryou just seem to use them bare instead (see :alias)
23:01:58evanthere are few places where they're bare, yes
23:02:12evana literal symbol shows up in [:lit]
23:02:55zenspiderI thought you said yesterday that there was no reason to use lit anymore?
23:03:01zenspideror did I misunderstand the above?
23:03:18evanmust be a misunderstanding
23:03:25evanI don't think I said that
23:03:28evanI don't care too much
23:03:43evani like having them be explicit
23:04:06evanbut not super concerned about this
23:04:23evanthe only one I can think of thats more concerning is Regexp
23:04:25zenspiderinteresting. ok.
23:04:28evanas I told ya last week
23:04:52evanthe rest don't require deconstruction
23:04:54evanRegexp does
23:04:56zenspideryeah... that is the only one that might get folded back into UR...
23:05:02zenspiderrange does
23:05:05evanah yes
23:05:18evanthe Range one is also for consistence
23:05:23evansince there is already a :dot2
23:06:09drbrainhow do bytes get into an IO::Buffer?
23:06:17zenspiderbut dot2 is supposed to be for non-literal object ranges...
23:06:24zenspiderdrbrain: they walk
23:06:26evandrbrain: Scheduler.send_on_readable puts them in there
23:06:35zenspiderrunning was deemed too hazardous
23:06:47evanzenspider: yeah, but i figured that having them in lit was an optimization
23:07:08drbrainI'm coming to the conclusion that it is not doing its job
23:07:22evandrbrain: it's possible.
23:07:37evandrbrain: b event.cpp:106
23:07:40evanin gdb
23:07:42evanthen run it
23:07:47evanthats where an IO::Buffer is filled
23:12:35zenspiderevan: wow you're inconsistent :P
23:13:02zenspideroptimize... deoptimize... make up your mind.
23:13:21evani'm not an absolutist
23:13:24evani get to change my mind
23:14:47brixenevan: in class Hash; def self.allocate; super(); end; end <-- what should msg.current_self be ?
23:14:53brixenat the point of super()
23:15:05evanHash, the object.
23:15:31brixennot nil
23:15:38evannot nil.
23:15:42evanif it's nil
23:15:45brixenit is
23:15:45drbrainevan: how does it get from TypedRoot<IOBuffer*> buffer to the IOBuffer*?
23:15:46evanthen something isn't setting it.
23:15:53evandrbrain: .get()
23:15:56drbrainstepping through this, it seems to not go into IOBuffer->read_bytes
23:15:57DefilerI've never seen it not be nil, myself
23:16:05Defilerthat I can recall
23:16:59brixenalso, what is msg.module?
23:17:07evanbrixen: it's filled in by the lookup mechanism
23:17:15evanbrixen: it's the Module* where the method was found
23:17:49evanthat fine?
23:18:53ruemsg.method_found_in # ? :)
23:21:27Defilerbrixen: It is set in executor
23:21:48Defiler(amongst others)
23:22:02evanDefiler: current_self isn't
23:22:07zenspiderevan: booteeful
23:22:11evanzenspider: ok.
23:22:38Defilerevan: I was answering him about module
23:22:42Defilernot current_self
23:22:56evanmsg.module isn't set there either
23:22:57evanit's read there
23:23:27evanzenspider: do you have a better name you refer to the op_asgn2 logic by?
23:23:38evanjust curious
23:23:47brixenevan: what's the idea of TaskProbe and would a probe at instructions.cpp make more sense for now than if 0/1 ?
23:24:11evanbrixen: yeah, good call
23:24:16evana probe call there would be better
23:24:19brixenk, I'll add it
23:24:37evanthe idea behind the probe is to centralize all that noisy logic
23:25:03brixenshould we distinguish them or just all on or all off?
23:25:07rueMethod overloading might help the cases where multiple different locations manipulate some data structure slightly differently
23:25:15rueAssuming those cannot be combined anyway
23:25:24evanbrixen: dunno, thats why they're centralized, so we can easily change them all :D
23:25:35brixenright, but I don't want to turn them all on
23:25:38brixenis what I mean
23:25:42evanadd a flag
23:25:49evanto turn just the one you want on
23:25:54brixensomething like that?
23:26:07evanevery method in probe could have a bool flag also
23:26:10evanthat indicates if it should fire
23:26:20evanthen just wire up some easy logic to set the flags
23:27:07brixenI'm thinking just a set of bit flags
23:27:24brixenset with stuff like PROBE=1 all, PROBE=opcode just opcode
23:27:54brixenPROBE=1 // turn them all on
23:27:57brixento be more clear
23:28:50evansure, up to you.
23:29:35evanbrixen: pushed a potential fix for that Hash problem
23:29:37evangive it a shot
23:29:43evanbe sure to kernel:clean before though
23:30:04brixenk, thanks
23:32:54drbrainshould break rubinius::IOBuffer::create stop somewhere?
23:33:00drbrainit doesn't seem to be called
23:33:19drbrainI'm trying to figure out who's setting used to 0
23:33:42evanI don't think that we're creating IOBuffers with that
23:33:44drbrainso I figured break in IOBuffer::create, continue until it's created the buffer I want, then set a watchpoint
23:33:52evanthe ones used are created entirely in ruby
23:34:13evandrbrain: calling ::create is not automatic
23:34:18evanit has to be wired up to prim
23:34:24evanwhich IO::Buffer doesn't have
23:35:05brixenevan: before it was expected 1 given 0, now it's expected 1 given 3 :)
23:35:23brixenif we could convert those to $'s instead
23:35:24evanbrixen: could you paste me the code?
23:35:27evanthats doing the call
23:35:27drbrainI added a begin/end p in IO::Buffer#shift_front
23:35:29evanthe actual code
23:35:46drbrainand it seems that something is wiping out my buffer
23:35:55evandrbrain: yeah! eeks.
23:35:59evanwhere did that buffer goe
23:36:29evandrbrain: there are only a few things that set @used = 0
23:36:32evanshould be easy to find
23:36:40brixenthe call is on 198
23:36:46brixenself.size += 1
23:37:06evanand could you paste the output again?
23:37:08brixensame code as in here:
23:37:09evanso I don't get confused
23:37:22brixenI'll have to create it, sec
23:37:28evanbrixen: yeah, but that code isn't the actual code you're running
23:37:36evani need to see if there is something else thats bleeding through
23:37:38evanand screwing it up
23:38:41brixenevan: then you want this too:
23:38:58brixenevan: the first is bootstrap/hash, the one just pastied is common/hash
23:39:33evanand the output when running it?
23:39:37brixenhow much of the opcode do you want
23:39:41brixenI'm waiting for it
23:39:41evanthe last 50
23:40:36brixenthere's a few extra heh
23:41:39seydardrbrain: what was your problem from last night?
23:41:40evanit's not self.size += 1
23:41:41evanat all
23:41:58evanit's the @bins[bin] = key, nil, key_hash
23:42:03brixenyeah, this is different
23:42:09evanok, so we fixed one
23:42:18brixenyeah, last was 198
23:43:55evanbrixen: i have to ask
23:44:00evanwhy is Bucket a Tuple subclass?
23:44:18brixenat put
23:44:18zenspiderthe walrus said it was
23:44:24brixenwould be faster than ivar lookup
23:44:32zenspiderlolrus is a bucket expert, after all
23:44:34evanbrixen: it's not though
23:44:43brixenwell, easy to change
23:44:47evanjust curious
23:44:47brixenwhy isn't it faster?
23:44:58brixenthe code path for at is alot less it seems to me
23:45:01evanback in the day, I measured this
23:45:11evanyou're adding an extra method call in there
23:45:16evanthat negates any savings
23:45:22evanif there was any
23:45:29zenspiderwe really shouldn't be making design decisions (at this level) based on speed
23:45:53brixenI doubt this is the problem though
23:45:56evanit's not
23:45:59evani was just curious
23:46:03evanalright, back on the trail.
23:46:19zenspiderwanders off
23:46:44evanbrixen: oh ha!
23:46:58evanthat IS the problem.
23:47:07evansince it's Tuple subclass
23:47:12evanit's calling
23:47:26evanwhich is hooked directly up to tuple_allocate
23:47:46brixenok, easy to fix
23:47:47brixenone sec
23:48:14evanwe should have a comment in Tuple that says if you subclass it
23:48:18evanyou can't have an initialize
23:48:20evanbecause thats true
23:48:39seydarevan: could you call super instead?
23:48:50evannever gets that far goes directly to a primitive
23:49:06evanno initialize is called
23:49:25evanTuple isn't really made to be subclassed
23:49:30evanit's too simple
23:49:33evanit's made to be delgated to
23:50:33brixenI have specs for this part that I can actually run without kill MRI or shotgun
23:50:59evanyou're running them under vm?
23:51:26brixenyeah, with bin/mspec -tr
23:51:38seydarWould making a wrapper class around Tuple kill the speed increase?
23:51:40evanthats under MRI
23:51:43brixenand loading the bootstrap/hash and lib/core_bridge/hash
23:51:46evani'm confused
23:51:58evan"run without kill MRI"
23:52:01brixenevan: sorry, in the cpp dir
23:52:07brixenusing MRI
23:52:15brixenif I load common/hash, it kills MRI
23:52:19evani'm still confused.
23:52:25brixennvm then
23:53:53evanbrixen: it runs under MRI because core_bridge/tuple.rb is totally wrong
23:54:07evanwell, not totally
23:54:14brixenyou don't have mine
23:54:15evanbut how a Tuple is created doesn't match how Rubinius does it
23:54:17evanthus the disconnect
23:54:39brixenright, Tuple in MRI is Array and can be subclassed
23:54:50brixenanyway, it's a very simple change
23:54:54brixenand all the specs pass
23:55:01brixenso, I'll try running it under the vm
23:55:54brixenI think I'll delete core_bridge anyway, it's never really worked out
23:56:09brixenand it's impossible to really replace Hash in MRI
23:56:30brixenbut I can test stuff like Hash::Bucket fine