Index

Show enters and exits. Hide enters and exits.

00:00:47brixenreplacing *use* of Hash*
00:01:33srbaker enters the room.
00:02:30gdagley_ leaves the room.
00:02:55rueDies how?
00:03:44headiusnuclear detonation, this I have to see
00:04:56brixenrue: well, one issue is that you get an instance with prim_allocate, and then you need to set instance vars in it, so that works with instance_eval once there's enough machinery for it
00:05:00rueheadius: You are supposed to avert your eyes, doofus
00:05:09brixenbut what would you do when it's at a lower level than that
00:05:49brixenrue: e.g. for array: http://pastie.org/159055
00:05:53brixenstring is similar
00:06:00dctanner enters the room.
00:06:40brixenalso, we need replace_method instead of alias_method for all these xx_cv methods
00:06:58rueCan you do it in after_loaded?
00:07:20dc_ leaves the room.
00:07:21brixenrue: replace Hash.allocate in after_loaded? I could try that
00:07:37rueHash was a real pain in the ass when we were working on the current way because of MethodTable
00:07:46brixeneggzackly
00:08:02brixenbut, evan has already said Hash is being replaced by LookupTable for all that
00:08:46brixenat the same time, I could make Hash.allocate a primitive
00:08:58brixento have already setup those fields
00:09:27brixenhash_new does that
00:10:27lvmcrue, how i contact Pat Eyler?
00:12:14zenspidergoogle will find him pretty easy
00:13:35lvmcrue, he can submit mod_rubinius?
00:13:53RyanTM leaves the room.
00:14:37ruelvmc: Yeah, sorry, doign stuff. Pat usually handles it
00:15:57ruehttp://on-ruby.blogspot.com
00:18:08cavalle leaves the room.
00:18:35probablycorey leaves the room.
00:19:46dodecaphonic enters the room.
00:22:34headiusI thought you were going to work on mod_rubinius, rue?
00:23:27KirinDave leaves the room.
00:23:58lvmcrue, i see it
00:24:13lvmcbut if i have another mentor, he can submit mod_rubinius?
00:25:30RyanTM enters the room.
00:31:13KirinDave enters the room.
00:32:20seydardrbrain: you switched the `extend Constants` to `include` and you got zero errors?
00:33:24drbrainseydar: I did
00:33:35drbrainyour spec for constants passed
00:33:40seydarand thats it. it just worked.
00:33:46seydarbut did others fail?
00:33:56drbrainyou only sent me that one
00:34:05seydaroh right. i'm dumb
00:36:35seydardrbrain: beautiful - fixed it up so all pass :-)
00:36:45drbrainseydar: excellent
00:36:54drbrainseydar: I saw you fixed your indentation too
00:36:57seydarhow do i test for stuff on $stderr using rspec? is there something special, or should i just read from stderr?
00:37:25drbrainSyslog doesn't write to $stderr...
00:37:31drbrainit writes to the syslog socket
00:37:35drbrainwhich is magical
00:37:39drbrain"magical")
00:37:43seydarwell, how should I check that it's writing?
00:38:46drbrainwell, there isn't a good cross-platform way of testing that part :/
00:38:56seydaryea.
00:39:10seydarhm... i just plain old tested it and I got no output
00:39:17seydarbut don't test yours quite yet
00:39:27brixenthere is output_to_fd, perhaps output_to_socket?
00:39:38seydarshould i rake git:push what I have?
00:39:39drbrainyeah, you'd see something in one of the files in /var/log
00:39:44seydaroooooh!
00:39:44drbrainbrixen: for syslog? no
00:39:48drbrainyes
00:40:50drbrainon BSD systems, you can start up another syslogd
00:40:55drbrainbut not on OS X
00:42:10drbrainhrm, but it looks like syslog(3) doesn't allow you to say which syslogd you're writing to
00:43:01boyscout1 commit by Ari Brown
00:43:02boyscout * Added specs and the constant module for stdlib/syslog.rb; 8f103a6
00:43:17seydari am now cool
00:43:26seydaranyways drbrain, try that out.
00:43:48seydari've got everything except for LOG_UPTO and LOG_MASK, because it seems like those can't be defined (??)
00:46:06drbrainthey may not exist on your platform
00:46:23seydartiger/ppc? maaaaaaybe
00:46:35seydarhow should I define them to be available on others, though?
00:47:07drbrainfor an inclusion spec?
00:47:11drbrainI would assume if one of them works, they all work
00:47:29seydarfor syslog.rb
00:48:29drbrain02/28/2008 16:48:07 PM rubinius[46159] the sky is falling in 10 seconds!
00:48:32drbrainyay!
00:48:47seydar1337!!!1111
00:48:53drbrainseydar: which lines?
00:49:39seydar72, 73, 213, 213
00:49:40dctanner leaves the room.
00:49:54seydar72 and 73 are commented out, and 213 and 223 are NotYetImplemented
00:49:59drbrainhrm, those might be macros...
00:50:15seydari didn't think they were....
00:50:28drbrainyeah, they are macros on OS X
00:50:36drbrainI'm not sure how to wrap a macro with FFI
00:50:42drbrainit may not be possible
00:50:58seydar!@#$!#@%#$ damn
00:51:30lvmc leaves the room.
00:52:08gdagley enters the room.
00:56:29rubuildiusAri Brown: 8f103a6f9; 1718 files, 5802 examples, 19776 expectations, 0 failures, 0 errors; http://rafb.net/p/XEj8fV32.html
00:57:50seydarthis makes me 1337
00:57:58drbrainseydar: why don't you just include the macro straight-up
00:58:04drbrainI doubt it's any different cross-platform
00:58:20seydarwithout FFI?
00:58:43drbrainjust port it straght from C to ruby
00:58:49drbrainbe sure to put a HACK on it
00:59:27seydaris LOG_UPTO defined in syslog.c or not?
01:01:48cremes enters the room.
01:03:29seydar leaves the room.
01:03:36drbrainsyslog.h
01:03:46drbrainalso a macro
01:04:45seydar enters the room.
01:05:19drbrainsyslog.h, also a macro
01:05:38jptix_ enters the room.
01:05:40seydarhm....
01:07:05KirinDave leaves the room.
01:07:17seydari don't understand this macro: #define LOG_MASK(pri) (1 << (pri))
01:08:04imajes leaves the room.
01:08:52drbraindef LOG_MASK(priority) 1 << priority end
01:09:05drbrainthe first part of the macro LOG_MASK(pri) is the name
01:09:13drbrainthe secord part is the code it gets replaced with
01:09:18drbrainthings in () are arguments
01:09:37seydarwhoa: Fixnum#<< ?
01:09:38jptix_ leaves the room.
01:09:45drbrainyes
01:09:50jptix_ enters the room.
01:09:59seydarri-ing it now
01:10:16drbrainit makes a bit-mask
01:10:25seydaroh. no wonder i don't know about it
01:10:30seydari never work on the bit level
01:10:48drbrainI try to avoid it as much as possible
01:11:00jptix leaves the room.
01:12:39seydarhm.. LOG_MASK just returns a priority, right?
01:13:39drbrainit returns a priority mask
01:14:19seydarah! same as a bit mask, i guess
01:14:58drbrain"The mask for an individual priority pri is calculated by the macro LOG_MASK(pri); the mask for all priorites up to and including toppri is given by the macro LOG_UPTO(toppri).
01:15:01drbrain"
01:15:04drbrainfrom syslog(3)
01:15:12drbrain(that's shorthand for `man 3 syslog`)
01:15:14crossblaim leaves the room.
01:15:34seydarand still call them hacks?
01:15:58drbrainyes, say something like HACK, copied from the macro
01:16:02seydarkk
01:16:31jptix_ leaves the room.
01:17:13seydarso did i get the specs i needed? anything else i should add?
01:17:19boyscout1 commit by Ari Brown
01:17:20boyscout * Added Syslog::LOG_MASK and Syslog::LOG_UPTO; f23b3fc
01:17:45seydari m 1337
01:17:59seydarok, not really. but i like to think this makes me important
01:18:20drbrainit does
01:18:54seydarhuzzah!
01:18:58seydarwhat else should i do?
01:19:44drbrainmove it to lib/ now
01:19:52drbrainsince we have it all working and everything
01:20:34seydarwaaay cool!
01:21:25seydarand where do i put the specs? spec/library/syslog?
01:21:54enebo leaves the room.
01:22:05headius leaves the room.
01:24:18drbrainspec stays where it is
01:24:22drbrainspec/ruby/1.8/
01:24:59seydarmmm ok
01:25:16drbrainsince it's part of ruby's standard library
01:26:13seydark
01:26:14dodecaphonichm i just ran ci on my ancient ibook g4 and got 10 errors. is that's what's expected right now?
01:26:23seydaryou betcha
01:26:26seydarwelcome to the club
01:26:32drbraindodecaphonic: for ci, zero errors are expected
01:26:40seydarare you on tiger/ppc?
01:26:46drbraindodecaphonic: but, we've been having problems on PPC
01:26:52dodecaphonicseydar: i'm running leopard, but ppc, yeah.
01:26:59seydarhmmmmm
01:27:24seydardrbrain: i got rid of my .rbc files, and they're showing up on my commit file. worry or no?
01:27:39drbrainyou shouldn't be checking in .rbc files
01:27:43dodecaphonicdrbrain: i remember, but i got so hopeful when seydar started contributed. i thought it was finally all shiny
01:27:50dodecaphoniccontributing
01:28:18drbraindodecaphonic: I think evan is going to check in some new FFI stuff that'll help RSN
01:28:23drbrainhe's on vacation, though
01:28:23dodecaphonicit's not shiny it takes one million seconds to finish ci, but i can live with that.
01:28:26seydardrbrain: well, my diff file will remove them if they're there.
01:28:40dodecaphonicdrbrain: oh that's awesome.
01:29:39boyscout1 commit by Ari Brown
01:29:40boyscout * Moved stdlib/syslog.rb to lib/syslog.rb . it works!; fa35211
01:29:45seydarniiiiiiiice
01:30:03dodecaphonicliking macs and living in a tax-heavy country makes you stick with your old computer a little longer than you should.
01:30:21djwhitttax-heavy country?
01:30:29dodecaphonicdjwhitt: Brazil.
01:30:44wycats_ enters the room.
01:31:15djwhittinteresting, I had know idea taxes where high down there
01:31:19djwhitt*no idea
01:31:30seydardodecaphonic: i'm still running mac mini tiger here, and a linux machine for all my cool stuff
01:33:04dodecaphonicdjwhitt: pretty high. we spend a fair bit of our money feeding corruption :)
01:33:26djwhittheh, great...
01:33:35seydarmy dad wants me to learn portuguese. is it a cool language?
01:33:51drbrainseydar: you should look on your linux box to see if the LOG_MASK and LOG_UPTO macros ar et hesame
01:34:01seydarkk
01:34:04seydarwell, reading time
01:34:08seydar leaves the room.
01:34:22moofbong enters the room.
01:34:30dodecaphoniche left me mid-sentence ;_
01:35:02dodecaphonicdjwhitt: pretty great.
01:36:59dodecaphonicdjwhitt: an imac costs 4000 reais here from an official apple reseller. that'd be about 200% it's original price.
01:37:28dodecaphonic75% to the government, and then a lot of profit.
01:37:31djwhittdodecaphonic: so, sales tax is really high?
01:37:56dodecaphonicdjwhitt: both import and sales.
01:38:18dodecaphonicwhich is funny, because the import part tries to protect an industry that simply doesn't exist here.
01:38:22djwhittdodecaphonic: what about income tax?
01:39:30technomancy200%! wow. does software also get such a markup?
01:39:45technomancythat would explain why i hear a lot about free software in brazil
01:40:02drbrainheads home
01:40:40dodecaphonicdjwhitt: i can't quite measure it, because it's so many little things you kinda get lost. i pay about 12%, as i have my company
01:40:44srbaker leaves the room.
01:41:05wmoxam leaves the room.
01:41:14djwhittdodecaphonic: ah, well, at least that's a bit lower, that sales/import tax sounds killer though
01:41:30dodecaphonicit's a common arrangement for IT people. you open up your company and then send an invoice every month. employers do it to avoid paying the high taxes government forces them to.
01:41:45rubuildiusAri Brown: fa35211f3; 1718 files, 5802 examples, 19776 expectations, 0 failures, 0 errors; http://rafb.net/p/7liSSk18.html
01:41:46rubuildiusAri Brown: f23b3fcc8; 1718 files, 5802 examples, 19776 expectations, 0 failures, 0 errors; http://rafb.net/p/bah1sg63.html
01:42:15dodecaphonictechnomancy: it used to be somewhat high, but it's less dramatic. they passed a law a little while ago to make it a little more sensible.
01:42:42dodecaphonicleopard, for instance, costs about R$ 300.00, which today would be 179.64 dollars.
01:42:52obiejuan leaves the room.
01:44:01dodecaphonictechnomancy: yes, it's a bit platform for the current government, but our president has been on the job for six years now, and adoption in public offices is still crawling.
01:44:32wycats leaves the room.
01:44:52dodecaphonicsometimes they just change everything and then offer no training. sometimes microsoft tries to offer a good deal and a sector of the government remains the same.
01:45:04dodecaphonicit's beign done slowly.
01:45:07dodecaphonicbeing
01:45:32jtoy enters the room.
01:46:42dodecaphonicbut considering all the taxes, it's no wonder a black market for hardware thrives.
01:47:10dodecaphonicalso, you know, there's little awareness software costs something
01:47:40dodecaphonicpeople just think it's something you pay 6 dollars for on the street
01:49:15crafterm leaves the room.
01:51:35jtoy leaves the room.
01:51:35lopex leaves the room.
01:51:35therealadam leaves the room.
01:51:35dgtized leaves the room.
01:51:35Chrononaut leaves the room.
01:51:35evan leaves the room.
01:51:35lenbust leaves the room.
01:51:35rphillips leaves the room.
01:51:44lopex enters the room.
01:51:44therealadam enters the room.
01:51:44dgtized enters the room.
01:51:44rphillips enters the room.
01:51:44evan enters the room.
01:51:44Chrononaut enters the room.
01:51:44lenbust enters the room.
01:51:47ezmobius enters the room.
02:01:50dodecaphonic leaves the room.
02:02:32aotearoa enters the room.
02:11:32technomancy leaves the room.
02:19:15rubyconsumer enters the room.
02:20:39aotearoa_ enters the room.
02:23:55krisps enters the room.
02:26:46rueSomeone tell lvmc to take a look at the GSoC FAQ if he asks when I am not around..
02:30:24brixenrue: are you around?
02:33:26Defilerbrixen: I vote you go for the LookupTable idea.. if it messes with what evan is doing, that will just force him to work on libffi ha ha
02:33:42brixenDefiler: exactly what I was thinking
02:33:48brixenhe needs to do the hard stuff :P
02:34:00brixenDefiler: perhaps I could solicit your opinion on something
02:34:11Defilersure
02:34:26brixenok, so I have a whole set of specs now for e.g. String.allocate, Array.allocate
02:34:32brixenall of which we fail currently
02:34:55rueNope, just us dustbunnies here.
02:35:01brixenbasically, any class that has some sort of setup needs to return a fully-functional instance from the allocate method
02:35:26brixenhowever, our allocate primitive is smart! it allocates the right size class given the instance fields
02:35:47aotearoa leaves the room.
02:35:59brixenso, the trade off is essentially this: on String: def self.__allocate__; Ruby.primitive :allocate...
02:36:19brixenand then def self.allocate; __allocate__; then set up the rest of the instance here
02:36:22brixenOR
02:36:34brixendefinite primitives for all the allocates, which seems like a yucky idea
02:36:47brixenof course __allocate__ could be renamed, but that's the idea
02:36:56Defiler'allocate' is not a method in MRI, right?
02:37:00brixenit is
02:37:05DefilerReally?
02:37:06brixenString.allocate, e.g.
02:37:08brixenyeah
02:37:22DefilerWhat does it do? Like running 'new' without running the body of initialize?
02:37:24brixenit's how you get object memory
02:37:29brixenyep
02:37:50DefilerOK.. So in my opinion, we need a method that works the way the object allocation functions work in MRI under the hood
02:38:05DefilerA step that is deliberately not useful to override in userland
02:38:23DefilerBecause presumably the problem is that people can override allocate and break the system?
02:38:27brixenour current allocate primitive will allocate the right size object, but currently it's only on Class
02:38:46brixenwell, one thing is they override initialize and get an instance that isn't sane
02:39:06aotearoa enters the room.
02:39:11rueDefiler: Yes, it is fine to say that redefining .allocate is undefined
02:39:12DefilerRight. So what I am getting at is that that is what needs fixing
02:39:13brixenDefiler: one sec... I'll give you a pastie
02:39:34brixenno, we don't need to fix redefining allocate
02:39:51DefilerWe could set the policy: "if you override a method that ruby 1.8 exposes then nothing will break, if you override a rubinius core-only method, you better do it correctly"
02:39:59Defilerbrixen: What do we need to fix, then?
02:40:33brixenDefiler: http://pastie.org/159122
02:40:56brixenso, you can do Array.allocate and get a sane instance
02:41:13brixenDefiler: for a different approach, look at current core/hash.rb
02:41:16DefilerI am confused
02:41:22DefilerWhy not just move the code that was in 'new' there into allocate?
02:41:29brixenhowever, that is broken because Hash.allocate will not give you a usable hash instance
02:41:56brixenbecause Class.allocate will not give you a big enough object
02:42:02brixenArray has different fields
02:42:44DefilerI don't understand.. what part of the existing code figures that out?
02:43:07brixenso, looking at the pastie: self.__allocate__ calls the allocate primitive
02:43:09DefilerOr, rather.. I don't see how that has changed in the two versions
02:43:16brixenwhich checks the receiver and allocates the right size
02:43:31brixenbut after you have enough memory, you have to finish setting up
02:43:37brixenbefore you return from .allocate
02:43:53brixenthe previous version used .new and send :setup
02:44:06brixenwhich would not return a usable Array instance from allocate
02:44:12DefilerWhy not just have allocate call 'final_allocation' as its last line..
02:44:21Defiler..and then implement that part as needed in various classes?
02:45:00DefilerI assume I am missing some really basic concept here
02:45:00brixenbecause allocate primitive checks the receiver, and iiuc, when that is Class, you'll get an object with Class's instance_fields
02:45:23Defilerwhen is the receiver of allocate not a correct source of information about the number of fields?
02:45:27brixenDefiler: primitives.rb line 471
02:45:37brixenwell, I'm wondering that
02:45:56DefilerIt sounds like a kickass place to get that info, right?
02:46:17brixenI should just check in that primitive
02:46:35rueWhat problem are you trying to solve, brixen?
02:46:59brixenrue: shotgun/rubinius: Hash.allocate
02:47:01brixenfor instance
02:47:16rueWe have the primitive which does the figuring-out part-- Class.allocate just runs the primitive
02:47:30rueArray.allocate runs the primitive and then does whatever it does
02:47:53VVSiz_ enters the room.
02:48:02brixenbut you can't just do: class Array; def self.allocate; super
02:48:12brixenor ary = super; whatever
02:48:41rueWhy not? `class Array, def self.allocate; primitive_allocate; blah;' end probably rather but nonetheless
02:48:59brixenrue: what is 'primitive_allocate'?
02:49:22rueThe primitive that allocates that you referenced above
02:49:48brixenare you looking at the pastie? I'm not sure we're on the same page
02:51:18Defilerprimitive_allocate is your __allocate__
02:51:21rueThe pastie says what I just did, except you wrap the primitive in __allocate__
02:51:32_mutle leaves the room.
02:52:08rueNow, I understand that that may currently /break/ somewhere, but I do not understand whether you are saying there is a problem with that design
02:52:12brixenrue: so, do you agree with the pastie or not? and what about Defiler's idea of having Class.allocate send to 'final_allocation' or whatever?
02:52:21mutle enters the room.
02:52:43brixenthe other problem is that Class.allocate *is* a primitive, so no code can run after it in that method
02:52:54rueRight, se it needs to be wrapped
02:52:58DefilerYeah, the primitive needs to be wrapped
02:53:06rueThe pastie is perfectly fine
02:53:15rueWhere does it break?
02:53:24brixenrue: it doesn't, it workd!
02:53:27brixenor works
02:53:38brixenit's the approach that I'm questioning
02:53:44Defilerohhhhhh hehe
02:53:46rueI thought you said it was broken with Hash
02:53:53DefilerOK, sorry. I agree with this approach
02:53:57brixenindeed, that pastie is for Array! :P
02:54:12brixenok, just wanted some more eyes
02:54:20rueYeah, this is fine
02:54:20DefilerOK.. here is what I don't get..
02:54:27brixenHash's *current* impl is broken, yes
02:54:44DefilerYou were talking earlier about how one of these approaches required a bunch of different primitives or implementations
02:54:49DefilerWhich option was that, and why?
02:55:22brixenoh, well either 1. you do __allocate__, allocate, or 2. you do a special primitive for each class that needs this
02:55:48rueNah, 1.
02:56:14brixenso, the tradeoff is 1. more work (i.e. two methods) vs 2. a bunch more primitives
02:56:19brixenmore work as in more execution work
02:56:22Defiler#1 for sure
02:56:26brixenok
02:56:48DefilerI agree with you that it is two methods, but it is also ripe for an inlining plugin
02:56:56Defilerand/or instruction fusion fun
02:56:58brixentrue
02:57:10brixenI'll see if I can generalize it on Class
02:57:21DefilerEventually our method dispatch will be so fast you will need a mouthguard
02:57:25brixenthe pastie works just fine and can be used for e.g. String and Hash
02:57:35brixenheh, can't wait!
02:58:33brixenwhat I have to figure out is, when this runs: class_get_instance_fields(msg->recv);
02:58:45brixenwill msg->recv be e.g. Array
02:59:04DefilerI should be the real deal receiver
02:59:07Defilerso, Array
02:59:09brixenassuming that the allocate primitive is called from Class.__allocate__
02:59:14brixenok, cool
02:59:31Defileras long as the __allocate__ call is in Array, it should be fine
02:59:37DefilerOr, rather, is 'sent' by Array
02:59:41brixenok
02:59:56DefilerLet me know if I am wrong and I will do penance
03:00:02brixenheh, I'm checking now
03:00:29rueDefiler: http://forum.insanelymac.com/index.php?showtopic=87574
03:00:50Defilerrue: oh snap
03:01:04rueDefiler: I will give it a whirl, need to get an external DVD drive though. I do not think OS X installs over the wire
03:01:04brixenwow, we create a *ton* of instances doing the littlest things
03:01:49DefilerHehe. Yeah. first-class stack frames oh god
03:01:54Defilerrue: Coolness
03:04:50rubyconsumer leaves the room.
03:04:54ruebrixen: recv is the object the method was called on regardless of method definition
03:05:15brixenrue: thanks
03:05:21VVSiz leaves the room.
03:05:47brixenok, one more question: obj.instance_eval { @tuple = ...} versus defining tuple= ?
03:06:34brixenrue / Defiler ?
03:07:54DefilerI vote tuple=
03:07:56aotearoa_ leaves the room.
03:08:05brixenk, I like that better too
03:08:14rueActually, those may be fields.. dunno how that would work
03:08:15DefilerThough we could call it something longer and more irritating as well
03:08:19rueSo #2 is safer
03:08:51brixenDefiler: we have the accessor defined, so it's not really a matter of clashing
03:09:08brixene.g. Array.new.tuple is defined
03:09:18brixenI suppose those could be private methods
03:13:05brixenheh, 32,921 calls to Class.allocate just starting IRB
03:14:48Defilerwicked
03:16:10brixenhah! +400 to call a class method on an already existing clas in IRB
03:16:23brixenso basically, calling the method and printing the inspect
03:16:28brixen400 instances allocated
03:16:30brixenjeez
03:16:57brixenI can see we've got vast fields for optimization
03:17:20brixenvast majority of those are Range and LongReturnException
03:18:24rueMaybe we could use prototypes for exceptions or something
03:18:33rueAt least for raise FooError, "blah"
03:19:02rueLRE could well be a singleton anyway since it is internal
03:19:03brixenrue: yeah, some sort of caching
03:19:10brixenor yeah, a singleton
03:19:26brixenwell, not really a singleton
03:19:31brixenit stores info about the return
03:20:01rueMm, prototype then, I suppose
03:20:04DefilerWe could bake it into the Context object or something, maybe
03:20:16rueI think we may need to revisit the LRE approach
03:21:01brixenwell, there's fusion at the machine code level, but some sort of approach like that at the bytecode level might be useful
03:21:04rueIt is definitely the easiest solution, might be the best one for that matter
03:21:11brixenbecause basically, we're doing a ton of sends
03:21:29brixenso, identifying hot paths in the bytecode and addressing that might give a huge gain
03:21:33brixeneven without jit
03:22:37brixenbut, better finish this mundane shit first :P
03:24:43aotearoa_ enters the room.
03:24:48DefilerLuckily we are now prepared to gather more and better data about what is sent and where than pretty much any other possible implementation
03:24:51DefilerHeh
03:25:22DefilerWe could use a script that did a bunch of 'dup' calls to build a star schema out of ObjectSpace
03:27:16obiejuan enters the room.
03:27:16brixenDefiler: yeah, I'm very interested in how we can use SendSite to build an awesome tracing/profiling automation for feeding back to optimization techniques
03:32:02krisps leaves the room.
03:37:33drbrainI hate, hate, hate Gem::Package::*
03:43:34d2dchat leaves the room.
03:44:22rue'S 'cause it sux0r?
03:45:33rue'Cause I think 't's
03:46:11drbrainit has some pretty lame tests, to start
03:46:33srbaker enters the room.
03:47:51srbaker leaves the room.
03:48:24drbrainfor example, the test to make sure you're at #eof? is really a test for IO#eof?
03:50:20lopex leaves the room.
03:50:46aotearoa leaves the room.
03:50:52drbrainbecause #eof? just isn't good enough, have to check that #read and #getc and so-on also return nil
03:51:16hoopycan you guys program after you've had a few beers? </left-field>
03:52:50drbrainhow many is a few?
03:53:02rueI do not drink
03:53:05drbraindepends on the beer and the time of day
03:53:13rueBut the crack helps
03:54:09drbrainI think meth would be good too
03:54:16drbrainuntil it rots your brain out
03:55:19squeegyand destroys your teeth
03:55:38drbrainsqueegy: that's what slushees are for
03:55:49drbrainsqueegy: and, everybody stops eating when they're on meth anyhow
03:56:27squeegytrue, what good are teeth if you aren't eating
04:00:04moofbong leaves the room.
04:00:04cremes leaves the room.
04:00:04ttmrichter leaves the room.
04:00:04agardiner leaves the room.
04:00:04imajes_ leaves the room.
04:00:04Norgg leaves the room.
04:00:04nicksieger leaves the room.
04:00:04Fullmoon leaves the room.
04:00:04hassox leaves the room.
04:00:04foysavas leaves the room.
04:00:04anonuser leaves the room.
04:00:04rbx_buildbot leaves the room.
04:00:04xmlhacker leaves the room.
04:00:04gnufied leaves the room.
04:00:38agardiner enters the room.
04:00:43obiejuan leaves the room.
04:02:33Norgg enters the room.
04:05:50dewd enters the room.
04:06:11xmlhacker enters the room.
04:06:39nicksieger enters the room.
04:07:24moofbong enters the room.
04:07:30Fullmoon enters the room.
04:07:53hassox enters the room.
04:08:05cremes enters the room.
04:10:34srbaker enters the room.
04:11:14ezmobius leaves the room.
04:14:10foysavas enters the room.
04:16:40anonuser enters the room.
04:19:24ttmrichter enters the room.
04:20:35srbaker leaves the room.
04:21:41gnufied enters the room.
04:30:29krisps enters the room.
04:40:52ezmobius enters the room.
04:47:20jinjing enters the room.
04:56:50rueHola
04:57:03rueI am surprised headius has not chimed in on the kwargs discussion
04:57:07headius enters the room.
04:57:13rueUh-oh
04:57:15agardinerhowdy
04:57:24drbrainkwargs
04:57:32rueheadius: You have a magical offline nick highlighting, dontcha?
04:58:11rueheadius: I just sent my feeble thoughts on the keyword arg issue from the MacRuby ANN
04:58:12headiusI see all
04:58:22headiusahh, very good
05:01:13agardinerman, this profiler sigsegv is a bitch... for me at least!
05:01:28rueAh, still fighting with that?
05:01:32agardineryep
05:01:36agardineri've made more progress
05:02:02agardineri've determined that a context that is referenced can be overwritten
05:02:11agardinerbut it seems to only happen when the profiler is run
05:02:42agardinermaybe it something to do with signals, but i don't know much about that
05:03:18agardinerit *looks* like some sort of pre-emption issue or something
05:03:31rueAll paths to create a new context go through that one guard?
05:04:10agardinerwell, there isn't a guard on context allocation
05:04:16agardineronly on retiring a context
05:04:55crafterm enters the room.
05:05:37agardinerbasically, the context heap current pointer is only unwound if the context bottom is less than the context address (meaning the context has not been referenced)_
05:05:58agardinerthat logic works fine except when the profiler is run
05:06:40agardinerthen i get weird output, e.g. what looks like two retirements of the same reference
05:07:14agardineri've added asserts to the allocation and retirement blocks, and they don't fire unless the profiler is run
05:09:42headius leaves the room.
05:11:12rueHave you debugged through SIGPROF?
05:11:34agardinerno...
05:11:40agardinerbut that's a good idea
05:12:27agardiner(i'm learning a lot from grappling with this, at least! :-)
05:12:38rueHm, the comment says that recycling should be disabled while sampling (when it is enabled)
05:13:27agardinerwell, i read that as saying we don't do recycling yet, but when we do, we should disable it...
05:14:06agardinerwonder if that's still true though?
05:16:07agardinerhowever, i've ruled out the GC in this, since it doesn't run between the time a context is allocated/referenced and the re-used
05:16:44rueThat is what the context stack is for, no? Recycling
05:16:51rueOr is it just preallocated
05:16:58rueEw, add '?'
05:17:02ezmobius leaves the room.
05:17:02agardineryeah, it seems to be
05:18:06agardinercontexts are definitely recycled in that sense, but the methctx_reference macro moves the context_bottom to protect any referenced contexts from recycling
05:18:49rueShould move, yeah
05:19:18agardinerlemme pastie some of the output i get when it fails...
05:19:27agardinerpastie:
05:20:10pastiehttp://pastie.org/159162 by agardiner.
05:22:19agardinerthe weird bit in there is the duplication in lines 12/13
05:24:20agardinerthat comes from a single macro that prints the Before retire bit, does the guard logic, and then prints the After retire bit
05:24:37agardinerso it should not be possible to get an after without a corresponding before
05:29:48agardinerso, lemme check an assumption here
05:30:42agardinerwhen SIGPROF fires, that would be handled by libev, and then shotgun would get the event when it checks interrupts after processing an opcode... is that right?
05:34:27agile enters the room.
05:36:55rueYep, should be
05:48:22squeegy leaves the room.
05:50:57Ingmar leaves the room.
05:51:18Ingmar enters the room.
05:52:18srbaker enters the room.
06:02:34therealadam leaves the room.
06:03:50twbray enters the room.
06:05:23agardinerhmmm... i'm not sure it does work that way
06:05:25squeegy enters the room.
06:06:54agardineri think the profiler is setting up SIGPROF outside libev
06:07:23rueThat would be a problem
06:08:06agardinerits using signal(SIGPROF, _cpu_sampler_record_context)
06:08:12agardinerthat's not using libev, right?
06:09:31boyscout4 commits by Brian Ford
06:09:32boyscout * Specs for Hash.allocate. Fix awaits replacing Hash with LookupTable in core.; 9bd2f07
06:09:33boyscout * Specs and fixes for Module.allocate.; c1d9796
06:09:34boyscout * Specs and fixes for Array.allocate.; 904fd61
06:09:35boyscout * Specs for String.allocate and fixes to make them pass.; 776a24f
06:18:34rueagardiner: Nope, no no. I think cpu_event_wait_for_signal() is the place to go
06:18:40srbaker leaves the room.
06:20:08_ADS enters the room.
06:20:35agardineryeah, that makes sense to me too
06:20:56agardinerok, i'll try making that change later and see if it solves the problem
06:21:04agardinerthanks for your help! :-)
06:21:33rueSure
06:21:34rubuildiusBrian Ford: 9bd2f0740; 1723 files, 5812 examples, 19794 expectations, 0 failures, 0 errors; http://rafb.net/p/Qt3nqp81.html
06:22:57ezmobius enters the room.
06:23:53brixensome trivia: a full bin/mspec ci run created 1718076 instances with the allocate primitive
06:24:00tmornini enters the room.
06:24:01brixenthe distribution: 1718076
06:24:06brixenblast
06:24:12brixenhttp://pastie.org/159175
06:24:35ezmobiuswow thats a lot of LongReturnException
06:24:38twbray leaves the room.
06:24:41ezmobiuswhat does that do?
06:24:43brixenyep, that's what I'm thinking
06:24:49tmornini leaves the room.
06:25:03rueezmobius: It is there to facilitate block returns
06:25:34rueI have not looked at it further.. it is not an actual exception though, just an abuse of the exception mechanism since it is already present in all methods
06:25:53rueIt should be every single method call there
06:25:59brixenyeah
06:27:26brixenthe number of Range objects actually surprised me
06:30:16brixenthere must be a way to get those File::Stat's down too
06:30:30brixen31k when there's only 1700 spec files
06:30:39drbrainRange not having a custom Marshal loader/dumper suprised me
06:36:01agardiner leaves the room.
06:36:11gdagley leaves the room.
06:41:23krisps leaves the room.
06:41:40squeegy leaves the room.
06:48:15squeegy enters the room.
06:52:20wycatsdon't we already do this: http://www.infoq.com/news/2008/02/ruby-mvm-research
06:53:45tarcierinice
06:53:46tarcieriand yes
06:54:01wycatsso why aren't we involved?
06:54:11wycats"In short, the expected outcome is a common API that will allow to launch and use multiple Ruby VMs."
06:54:56squeegy leaves the room.
06:55:04tarcieriyeah, I'd be interested in what they have in mind
06:55:25radarek leaves the room.
06:56:37wycatsI'd be interested in having Rubinius personnel involved in developing a "common API"
06:56:38wycats:P
06:57:20tarcieriMVM will be integral to a common Actor implementation
06:57:53tarcierialthough that's only one way to leverage it
06:58:03sfaxon enters the room.
07:00:26brixenhmm, yeah, good reporters try to contact the important interested parties typically, I guess we don't know if werner tried to contact evan
07:00:38brixenwhere's headius?
07:02:48squeegy enters the room.
07:14:12Fullmoon_ enters the room.
07:15:11RyanTM leaves the room.
07:21:37rueNeh, this is the thing headius wrote about a few days ago
07:23:19_ADSSo I'm working on filling out Array#pack...
07:23:33_ADSand I see a lot of: item = Type.coerce_to(self[arr_idx], Integer, :to_i)
07:23:56_ADSwhy isn't this simply: self[arr_idx].to_i
07:25:06rueSpecific error type, usually
07:25:34_ADSType.coerce_to raises, while to_i doesn't?
07:25:45_ADSthat would make sense.
07:26:29_ADSI just wanted to make sure I wasn't blindly copying voodoo code
07:28:08rueWell, #to_i can raise
07:28:41rueUsually it would be a NoMethodError, right? The implementation probably requires the TypeError
07:28:45flori_ enters the room.
07:29:10Fullmoon_ leaves the room.
07:29:27_ADSthat's it exactly. Thanks
07:32:24flori leaves the room.
07:46:32wifelette leaves the room.
07:46:42wycats_ leaves the room.
07:55:22lstoll leaves the room.
08:03:35dctanner enters the room.
08:04:05aotearoa enters the room.
08:05:13wycats enters the room.
08:12:15wifelette enters the room.
08:17:33Fullmoon_ enters the room.
08:21:25krisps enters the room.
08:21:48Fullmoon_ leaves the room.
08:22:29dctanner leaves the room.
08:23:20cavalle enters the room.
08:27:20thehcdreamer enters the room.
08:27:25mae enters the room.
08:31:03aotearoa_ leaves the room.
08:39:55w1rele55 enters the room.
08:40:51jinjing_ enters the room.
08:45:18crafterm leaves the room.
08:49:47crossblaim enters the room.
08:50:36wifelette leaves the room.
08:56:54jinjing leaves the room.
09:08:24ezmobius leaves the room.
09:14:44VVSizmorning, guys!
09:18:12octopod enters the room.
09:18:19drbraingah, Hash seems broken in a strange and mysterious way
09:19:20rueMorning
09:19:37drbrainwhoa whoa whoa!
09:20:02drbrainyes, it is
09:20:10drbrainat least, Hash arguments
09:22:52drbrainhrm, maybe it's Array#shift
09:23:24drbrainoh, it's order-of-evaluation
09:23:34drbraingoddamnit
09:32:52cavalle leaves the room.
09:40:20rueWell there you go, all solved
09:47:09manveruwonders when the loop{} thing will be fixed
09:50:24dctanner enters the room.
09:52:07GMFlash leaves the room.
09:52:12GMFlash enters the room.
09:52:25drbrainmanveru: ??
09:54:44manverudrbrain: http://rubinius.lighthouseapp.com/projects/5089/tickets/368-kernel-loop-raises-if-block-has-no-con tent
09:55:04drbrainah
09:55:23drbrainwell, not by me, tonight
09:55:53drbrainI'm off to bed
10:00:11rueI should probably go too
10:02:50Fullmoon_ enters the room.
10:03:12cavalle enters the room.
10:04:31jtoy enters the room.
10:32:01crossblaim leaves the room.
10:35:39sfaxon leaves the room.
10:38:23jtoy leaves the room.
10:44:53mernen leaves the room.
11:10:48probablycorey enters the room.
11:20:49crossblaim enters the room.
11:24:25probablycorey leaves the room.
11:49:02ragnard enters the room.
11:50:12ragnard leaves the room.
11:53:56ragnard enters the room.
11:58:46moofbong leaves the room.
11:59:52moofbong enters the room.
12:09:40pietia enters the room.
12:13:43imajes enters the room.
12:28:45headius enters the room.
12:34:03skaar enters the room.
12:41:36headiusg'day
13:01:35mutle leaves the room.
13:02:52mutle enters the room.
13:03:05pietia leaves the room.
13:10:03headiuswycats, brixen, tarcieri: evan is already involved in the MVM stuff...I had ko1 include him on the MVM mailing lists
13:29:16imajes leaves the room.
13:29:34cavalle leaves the room.
14:07:20rubymaverick enters the room.
14:08:07AndrewO enters the room.
14:10:42headius leaves the room.
14:12:15cavalle enters the room.
14:18:02RyanTM enters the room.
14:30:35moofbong leaves the room.
14:43:49wmoxam enters the room.
14:46:37headius enters the room.
14:58:24moofbong enters the room.
14:58:49imajes enters the room.
15:01:10peglegrot enters the room.
15:01:28rueBleh
15:01:48headiusBleh!
15:02:20srbaker enters the room.
15:04:01langenberg enters the room.
15:04:41boyscout1 commit by Vladimir Sizikov
15:04:42boyscout * New rubyspecs for IO#ungetc.; b6e9532
15:06:56rueThat whole sleeping thing did not go so well
15:13:39srbaker leaves the room.
15:13:47agile leaves the room.
15:15:21macournoyer enters the room.
15:15:58femtowin enters the room.
15:16:42rubuildiusVladimir Sizikov: b6e95321d; 1723 files, 5812 examples, 19794 expectations, 0 failures, 0 errors; http://rafb.net/p/lYmhbt74.html
15:17:09headiusdown with sleeping!
15:17:28rueAnd stuff!
15:17:30headiusrubiniites must transcend such pleasures of the flesh
15:23:36chris2 enters the room.
15:25:51DefilerYeah. We just pray, code, and brew beer
15:25:58DefilerOh, and mortify this sinful flesh
15:33:38thehcdreamer leaves the room.
15:35:03mutle leaves the room.
15:36:06thehcdreamer enters the room.
15:36:10ragnard leaves the room.
15:37:23mutle enters the room.
15:37:34jacen_ enters the room.
15:38:02femtowin leaves the room.
15:59:35ragnard enters the room.
16:02:00langenberg leaves the room.
16:02:31langenberg enters the room.
16:06:33therealadam enters the room.
16:07:13d2dchat enters the room.
16:17:49VVSizzenspider: are you there?
16:18:26VVSizI just wanted to talk about that new Kernel#catch spec
16:20:33jacen_ leaves the room.
16:29:28jacen_ enters the room.
16:29:46enebo enters the room.
16:30:12cavalle leaves the room.
16:31:16cavalle enters the room.
16:32:12ragnard leaves the room.
16:33:06DefilerVVSiz: It is still a little early in Pacific time
16:33:20ruePacific time is for pansies
16:33:27DefilerIndeed
16:37:11rueIs evan supposed to be back today?
16:39:01octopod leaves the room.
16:39:02octopod_ enters the room.
16:40:54sholden enters the room.
16:42:23octopod_ leaves the room.
16:49:34cavalle leaves the room.
16:53:11nitay_ enters the room.
16:53:49agile enters the room.
17:00:59cavalle enters the room.
17:01:39ragnard enters the room.
17:01:51evanmorning bitches
17:02:01evan leaves the room.
17:02:21evan enters the room.
17:02:32evanstupid dircproxy.
17:02:40DefilerMorning bitch
17:03:07evanhows things?
17:03:18evanbeen going over the commits from when I was gone
17:03:20imajeshey evan
17:03:47evanDefiler: got libffi working great
17:03:49evanabout to commit it.
17:04:13Defilerevan: You are pretty good at this. Heh.
17:04:31DefilerExcellent news
17:05:10headiusso libffi worked out after all eh?
17:05:20headiusgood to hear it
17:05:22headiusbbiab
17:05:23headius leaves the room.
17:06:23dodecaphonic enters the room.
17:07:45Fullmoon_ leaves the room.
17:08:27probablycorey enters the room.
17:08:48evanI also rewrote FFI's struct access
17:09:08Defilerdrbrain: ping, re: getsockname
17:09:08evanshould be less brittle now.
17:09:17DefilerHow do you like libffi?
17:09:30evanit's nice, the api is simple.
17:09:41evanour ffi_call isn't nearly as pretty now though.
17:10:08evanbecause there is a for() with a switch() inside it, to convert all the args
17:10:11DefilerDoesn't suprise me that the most platform-divergent piece will end up pretty ugly, though
17:10:46nitay leaves the room.
17:10:50boyscout1 commit by Evan Phoenix
17:10:51boyscout * Pull in libffi and retrofit the VM to use it solely.; bbb1af1
17:11:08srbaker enters the room.
17:11:10evani'm going to yank out our custom stub code and lightning now.
17:13:04srbaker leaves the room.
17:14:01evanall the code to interface to libffi is in subtend/ffi_libffi.c
17:14:20evanit's pretty verbose, but thats good, since it's fairly sensitive
17:15:12wmoxam leaves the room.
17:15:32wmoxam enters the room.
17:16:58probablycorey leaves the room.
17:17:34probablycorey enters the room.
17:17:52DefilerCool
17:18:05Defilerbrixen: ping, re: test_array.rb
17:18:42cremesfyi i disabled rubuildius_ppc while waiting for libffi to be committed; i will re-enable it tonight
17:18:50evanok
17:22:28Defilerevan: When you feel like a change of pace, could you take a look at getsockname in socket.rb?
17:22:48evanwhat am I looking at/for?
17:23:16DefilerFrom looking at stdlib/ext/socket.c, it seems like I am supposed to be able to call getsockname on a descriptor that is a unix socket
17:23:27DefilerOur version returns EINVAL when that happens
17:23:36murphee enters the room.
17:23:38jluxenberg enters the room.
17:23:41Defiler..and I was wondering if it looked right to you
17:24:20evanwhat line in socket.rb and socket.c?
17:24:46jtoy enters the room.
17:25:14Defiler230 in socket.rb
17:25:59Defiler..and starting at 2210 in socket.c (our copy)
17:26:10evannot bsock_getsockname?
17:26:36DefilerNope. I am working on UNIXSocket#addr and UNIXSocket#peeraddr
17:26:52evanah, ok.
17:27:05rubuildiusEvan Phoenix: bbb1af1ca; 1723 files, 5812 examples, 19794 expectations, 0 failures, 0 errors; http://rafb.net/p/WxEkzE70.html
17:27:14evanrubuildius: say yay!
17:27:14rubuildiusyay!
17:27:17evan:D
17:27:44evanDefiler: so, whats your question?
17:27:52evanyou call getsockname, passing in an fd
17:27:56evanthat fd can be any socket.
17:28:42jluxenbergcan anyone give me an overview of what the GlobalVariables core class is, or where I can find documentation about it?
17:28:57Defilerevan: Yeah, I get EINVAL when I pass it a unix socket, though
17:29:10evanjluxenberg: GlobalVariables has one instance, located at Globals
17:29:20Defilerevan: So I am trying to figure out where the problem is.. and I am considering the possibility that it is in our FFI call to getsockname
17:29:23evanjluxenberg: all global variables ($blah) are stored in it
17:29:26jluxenberginteresting
17:29:36djwhittevan: build is not so happy on my box (amd64 gentoo)
17:29:44evandjwhitt: pastie?
17:29:59jluxenbergevan: I have some code that seems to be invoking GlobalVariables#[] even though the code doesn't involve globals
17:30:05djwhitthttp://pastie.caboo.se/159374
17:30:07evanjluxenberg: which?
17:30:15jluxenbergevan: I'll pastie, one sec
17:30:22evandjwhitt: crap.
17:30:27evandjwhitt: go remove .libs in libffi
17:30:39evanmy commit might have had that in there
17:30:45evanif so, libffi's make distclean is busted.
17:30:56jluxenbergevan: http://pastie.caboo.se/159377
17:31:08murpheeevan: or headius: saw you were in on the MVM project announced yesterday; are any of these mailing lists or wikis they use public?
17:31:40jluxenbergevan: in my redef-ed [] function, when I call __get_item, execution ends up GlobalVariables#[]
17:31:43djwhittevan: remove .lib, rebuilding now
17:31:45djwhitt*removed
17:31:46evanjluxenberg: where you see it accessing GlobalVariables#[]?
17:32:08evanmurphee: there is one, seems like it's for people implementing MVM
17:32:15evanit's pretty quiet currently
17:32:19jluxenbergevan: and then __get_item returns 0 for keys that are not in the hash, rather than nil in Matz's ruby
17:33:03evanjluxenberg: that doesn't sound right. how are you running this file?
17:33:08evanjust rubinius file.rb
17:33:09evan?
17:33:10jluxenbergevan: rbx file.rb
17:33:12jluxenbergyeah
17:33:18evanthats.. very odd.
17:33:36jluxenbergevan: maybe subclassing a core class makes it unhappy?
17:33:40evanhow do you know that __get_item is calling GlobalVariables#[]?
17:34:01jluxenbergI put a call to "debugger" in my []
17:34:11jluxenberg(left that out when I pasted it)
17:34:13evanDefiler: the manpage for getsockname says that you get EINVAL if the socket has been shutdown
17:34:17evanDefiler: what is your test case for this?
17:34:18DefilerYeah, I saw that
17:34:37Defileru = UNIXSocket.new '/tmp/mysql.sock'
17:34:40Defileru.peeraddr
17:34:52evanmaybe it's closed.
17:35:06DefilerIt works in mri
17:35:14evanwell yeah
17:35:16DefilerSo either my UNIXSocket impl is busted, or etc
17:35:16evani mean
17:35:24evanyour connect is broken
17:35:32DefilerYeah
17:35:46DefilerCare to code-review 'unix_setup'?
17:35:50evansure
17:35:51evanwhere?
17:35:54Defilersocket.rb line uhh
17:36:03Defiler453
17:36:20thehcdreamer leaves the room.
17:36:21murphee leaves the room.
17:36:31jptix enters the room.
17:38:24evanDefiler: seems ok
17:38:39evanjluxenberg: hm, you should be able to subclass Hash
17:38:48evanjluxenberg: i know that there was some work just the other day to deal with that
17:38:51evanjluxenberg: when did you try this code?
17:39:36jluxenbergevan: I downloaded rubinius-daily.tgz yesterday
17:39:42djwhittevan: didn't fix it
17:39:43djwhitthttp://pastie.caboo.se/159380
17:39:55jluxenbergevan: I could try the GIT version, is it significantly newer?
17:40:40DefilerShould only be at most 23:59 hours newer
17:41:50wifelette enters the room.
17:42:23jluxenbergany idea why it would end up in GlobalVariables#[] though? that seems odd.
17:42:57Defilerjluxenberg: Can you paste where you are seeing that?
17:43:21jluxenbergdefiler: yeah, one sec
17:44:22jluxenbergah, stupid mistake
17:44:23evandjwhitt: run 'file external_libs/libffi/.libs/libffi.a'
17:44:35jluxenbergwas looking at the wrong line. something's still wrong though
17:44:37evandjwhitt: also, could you paste the output of the build?
17:45:11langenberg leaves the room.
17:45:26djwhittevan: all of it?
17:46:03jluxenbergah!!!
17:46:05jluxenbergI see the problem
17:46:19srbaker enters the room.
17:46:27jluxenbergI use an instance variable called @default
17:46:42jluxenbergthe core class also uses an instance variable called @default
17:46:57jluxenberghow am I supposed to avoid that?
17:47:48DefilerRename yours or the one in core, I guess
17:47:59jluxenbergeww. this creates subtle bugs.
17:48:10jluxenbergis that really the accepted solution?
17:48:22DefilerCan you think of a better way?
17:48:24jluxenbergI guess this wasn't a problem in Matz Ruby because Hash is in C?
17:48:29DefilerRight
17:48:38DefilerWell, it was a problem in that you couldn't really subclass Hash
17:48:40Defilerheh
17:49:15DefilerWith great power comes great responsibility
17:49:21jluxenbergso in general, how does one deal with this problem? because the names of my instance variables are arbitrary and I won't know if they collide with base classes until I have subtle bugs.
17:49:33evandjwhitt: yeah
17:49:35jluxenbergthis seems like a big problem.
17:49:35jtoy leaves the room.
17:50:26djwhittevan: build output: http://spcom.org/~djwhitt/rbx_build_output
17:50:30DefilerIt's regular old OOP, in my opinion
17:50:48DefilerSubclassing requires you to understand the API of the superclass
17:51:00jluxenbergyeah but the instance variables are not part of the API
17:51:00DefilerI mean.. it would be cool to not have that problem, but I can't think of a fix, myself
17:51:08DefilerSure they are.
17:51:12jluxenbergin a language like Java, you don't have this problem because each subclass gets its own instance variable "namespace", right?
17:51:22evanthey are part of the subclass API.
17:51:27DefilerJava has this same problem
17:51:39Defilerif you repurpose a 'field' in a subclass, you have to reimplement everything that relies on it
17:51:44djwhittevan: file outputs: external_libs/libffi/.libs/libffi.a: current ar archive
17:51:56evanodd.
17:52:04jluxenbergoh
17:52:12jluxenbergthis is what private instance variables are for
17:52:13DefilerIt seems like a bigger problem here because there is no requirement to declare all your fields at the top of the class decls
17:52:32jluxenbergah, yes, and this can be checked statically in java, presumably
17:52:34DefilerThat being said, I am open to the idea of a naming convention for core class ivars
17:52:44evanwell, we could add private ivars
17:52:54DefilerI have run into this in a ton of libraries, Rails and Merb included
17:52:58evanuse the same technique python does, ie, compile time name mangling
17:53:04Defiler@base = something was a Rails-breaker for a long time
17:53:09jluxenbergah
17:53:11evanbut yes, it's not a rubinius specific problem
17:53:25jluxenbergmaybe we need an "extra_private" macro
17:53:34jluxenbergthat will mangle instance vars or something
17:53:34evandjwhitt: oh oh.
17:53:44evandjwhitt: libffi wasn't compile with -fPIC
17:54:21evandjwhitt: in shotgun/Makefile
17:54:47evanadd to line 119, after the ;, CFLAGS=-fPIC
17:54:56evanlike was done above there
17:55:38djwhittok, done, rebuilding
17:55:40olabini enters the room.
17:56:10dc_ leaves the room.
17:56:59Defilerevan: So.. this cropped up while you were off having fun: http://rubinius.lighthouseapp.com/projects/5089/tickets/369-next-causes-integer-times-to-lose-coun t#ticket-369-2
17:57:22Defilerevan: Should I try to make the inliner smarter, or just detect control flow in the body and skip inlining?
17:57:34jluxenbergis there any way to hook accesses to instance variables in the same way "$" works?
17:57:41evanDefiler: probably easier to make the inlining smarter.
17:57:52evanDefiler: i'll bet I just put a label in the wrong place.
17:57:58jluxenbergbecause if there was it'd be easy to do run-time mangling
17:58:09evanjluxenberg: no
17:58:18evanthere are no hooks for ivars
17:58:30jluxenbergevan: I suppose that would require some compiler changes.
17:58:51evanjluxenberg: hooking ivars? would require VM changes too
17:59:02jluxenbergevan: ah, so totally non-trivial.
17:59:14evanand likely having all ivar access go through methods
17:59:15jluxenbergmight be too slow, too
17:59:21DefilerAlso, we probably don't want to do anything to slow down ivar access
17:59:32DefilerI am already about to have to dramatically slow down block yielding =(
17:59:36evanthats not really a solution to this problem
18:00:04evanDefiler: so, i was thinking a little about that
18:00:32evanperhaps we should put some code at the send site
18:00:36evannot just in the method thats called
18:00:55evanfor the BlockPass code
18:01:07evanthen we wouldn't slow down code in the form of
18:01:13evan100.times { ... }
18:01:19