Show enters and exits. Hide enters and exits.
| 00:00:47 | brixen | replacing *use* of Hash* |
| 00:01:33 | srbaker enters the room. | |
| 00:02:30 | gdagley_ leaves the room. | |
| 00:02:55 | rue | Dies how? |
| 00:03:44 | headius | nuclear detonation, this I have to see |
| 00:04:56 | brixen | rue: 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:00 | rue | headius: You are supposed to avert your eyes, doofus |
| 00:05:09 | brixen | but what would you do when it's at a lower level than that |
| 00:05:49 | brixen | rue: e.g. for array: http://pastie.org/159055 |
| 00:05:53 | brixen | string is similar |
| 00:06:00 | dctanner enters the room. | |
| 00:06:40 | brixen | also, we need replace_method instead of alias_method for all these xx_cv methods |
| 00:06:58 | rue | Can you do it in after_loaded? |
| 00:07:20 | dc_ leaves the room. | |
| 00:07:21 | brixen | rue: replace Hash.allocate in after_loaded? I could try that |
| 00:07:37 | rue | Hash was a real pain in the ass when we were working on the current way because of MethodTable |
| 00:07:46 | brixen | eggzackly |
| 00:08:02 | brixen | but, evan has already said Hash is being replaced by LookupTable for all that |
| 00:08:46 | brixen | at the same time, I could make Hash.allocate a primitive |
| 00:08:58 | brixen | to have already setup those fields |
| 00:09:27 | brixen | hash_new does that |
| 00:10:27 | lvmc | rue, how i contact Pat Eyler? |
| 00:12:14 | zenspider | google will find him pretty easy |
| 00:13:35 | lvmc | rue, he can submit mod_rubinius? |
| 00:13:53 | RyanTM leaves the room. | |
| 00:14:37 | rue | lvmc: Yeah, sorry, doign stuff. Pat usually handles it |
| 00:15:57 | rue | http://on-ruby.blogspot.com |
| 00:18:08 | cavalle leaves the room. | |
| 00:18:35 | probablycorey leaves the room. | |
| 00:19:46 | dodecaphonic enters the room. | |
| 00:22:34 | headius | I thought you were going to work on mod_rubinius, rue? |
| 00:23:27 | KirinDave leaves the room. | |
| 00:23:58 | lvmc | rue, i see it |
| 00:24:13 | lvmc | but if i have another mentor, he can submit mod_rubinius? |
| 00:25:30 | RyanTM enters the room. | |
| 00:31:13 | KirinDave enters the room. | |
| 00:32:20 | seydar | drbrain: you switched the `extend Constants` to `include` and you got zero errors? |
| 00:33:24 | drbrain | seydar: I did |
| 00:33:35 | drbrain | your spec for constants passed |
| 00:33:40 | seydar | and thats it. it just worked. |
| 00:33:46 | seydar | but did others fail? |
| 00:33:56 | drbrain | you only sent me that one |
| 00:34:05 | seydar | oh right. i'm dumb |
| 00:36:35 | seydar | drbrain: beautiful - fixed it up so all pass :-) |
| 00:36:45 | drbrain | seydar: excellent |
| 00:36:54 | drbrain | seydar: I saw you fixed your indentation too |
| 00:36:57 | seydar | how do i test for stuff on $stderr using rspec? is there something special, or should i just read from stderr? |
| 00:37:25 | drbrain | Syslog doesn't write to $stderr... |
| 00:37:31 | drbrain | it writes to the syslog socket |
| 00:37:35 | drbrain | which is magical |
| 00:37:39 | drbrain | "magical") |
| 00:37:43 | seydar | well, how should I check that it's writing? |
| 00:38:46 | drbrain | well, there isn't a good cross-platform way of testing that part :/ |
| 00:38:56 | seydar | yea. |
| 00:39:10 | seydar | hm... i just plain old tested it and I got no output |
| 00:39:17 | seydar | but don't test yours quite yet |
| 00:39:27 | brixen | there is output_to_fd, perhaps output_to_socket? |
| 00:39:38 | seydar | should i rake git:push what I have? |
| 00:39:39 | drbrain | yeah, you'd see something in one of the files in /var/log |
| 00:39:44 | seydar | oooooh! |
| 00:39:44 | drbrain | brixen: for syslog? no |
| 00:39:48 | drbrain | yes |
| 00:40:50 | drbrain | on BSD systems, you can start up another syslogd |
| 00:40:55 | drbrain | but not on OS X |
| 00:42:10 | drbrain | hrm, but it looks like syslog(3) doesn't allow you to say which syslogd you're writing to |
| 00:43:01 | boyscout | 1 commit by Ari Brown |
| 00:43:02 | boyscout | * Added specs and the constant module for stdlib/syslog.rb; 8f103a6 |
| 00:43:17 | seydar | i am now cool |
| 00:43:26 | seydar | anyways drbrain, try that out. |
| 00:43:48 | seydar | i've got everything except for LOG_UPTO and LOG_MASK, because it seems like those can't be defined (??) |
| 00:46:06 | drbrain | they may not exist on your platform |
| 00:46:23 | seydar | tiger/ppc? maaaaaaybe |
| 00:46:35 | seydar | how should I define them to be available on others, though? |
| 00:47:07 | drbrain | for an inclusion spec? |
| 00:47:11 | drbrain | I would assume if one of them works, they all work |
| 00:47:29 | seydar | for syslog.rb |
| 00:48:29 | drbrain | 02/28/2008 16:48:07 PM rubinius[46159] the sky is falling in 10 seconds! |
| 00:48:32 | drbrain | yay! |
| 00:48:47 | seydar | 1337!!!1111 |
| 00:48:53 | drbrain | seydar: which lines? |
| 00:49:39 | seydar | 72, 73, 213, 213 |
| 00:49:40 | dctanner leaves the room. | |
| 00:49:54 | seydar | 72 and 73 are commented out, and 213 and 223 are NotYetImplemented |
| 00:49:59 | drbrain | hrm, those might be macros... |
| 00:50:15 | seydar | i didn't think they were.... |
| 00:50:28 | drbrain | yeah, they are macros on OS X |
| 00:50:36 | drbrain | I'm not sure how to wrap a macro with FFI |
| 00:50:42 | drbrain | it may not be possible |
| 00:50:58 | seydar | !@#$!#@%#$ damn |
| 00:51:30 | lvmc leaves the room. | |
| 00:52:08 | gdagley enters the room. | |
| 00:56:29 | rubuildius | Ari Brown: 8f103a6f9; 1718 files, 5802 examples, 19776 expectations, 0 failures, 0 errors; http://rafb.net/p/XEj8fV32.html |
| 00:57:50 | seydar | this makes me 1337 |
| 00:57:58 | drbrain | seydar: why don't you just include the macro straight-up |
| 00:58:04 | drbrain | I doubt it's any different cross-platform |
| 00:58:20 | seydar | without FFI? |
| 00:58:43 | drbrain | just port it straght from C to ruby |
| 00:58:49 | drbrain | be sure to put a HACK on it |
| 00:59:27 | seydar | is LOG_UPTO defined in syslog.c or not? |
| 01:01:48 | cremes enters the room. | |
| 01:03:29 | seydar leaves the room. | |
| 01:03:36 | drbrain | syslog.h |
| 01:03:46 | drbrain | also a macro |
| 01:04:45 | seydar enters the room. | |
| 01:05:19 | drbrain | syslog.h, also a macro |
| 01:05:38 | jptix_ enters the room. | |
| 01:05:40 | seydar | hm.... |
| 01:07:05 | KirinDave leaves the room. | |
| 01:07:17 | seydar | i don't understand this macro: #define LOG_MASK(pri) (1 << (pri)) |
| 01:08:04 | imajes leaves the room. | |
| 01:08:52 | drbrain | def LOG_MASK(priority) 1 << priority end |
| 01:09:05 | drbrain | the first part of the macro LOG_MASK(pri) is the name |
| 01:09:13 | drbrain | the secord part is the code it gets replaced with |
| 01:09:18 | drbrain | things in () are arguments |
| 01:09:37 | seydar | whoa: Fixnum#<< ? |
| 01:09:38 | jptix_ leaves the room. | |
| 01:09:45 | drbrain | yes |
| 01:09:50 | jptix_ enters the room. | |
| 01:09:59 | seydar | ri-ing it now |
| 01:10:16 | drbrain | it makes a bit-mask |
| 01:10:25 | seydar | oh. no wonder i don't know about it |
| 01:10:30 | seydar | i never work on the bit level |
| 01:10:48 | drbrain | I try to avoid it as much as possible |
| 01:11:00 | jptix leaves the room. | |
| 01:12:39 | seydar | hm.. LOG_MASK just returns a priority, right? |
| 01:13:39 | drbrain | it returns a priority mask |
| 01:14:19 | seydar | ah! same as a bit mask, i guess |
| 01:14:58 | drbrain | "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:01 | drbrain | " |
| 01:15:04 | drbrain | from syslog(3) |
| 01:15:12 | drbrain | (that's shorthand for `man 3 syslog`) |
| 01:15:14 | crossblaim leaves the room. | |
| 01:15:34 | seydar | and still call them hacks? |
| 01:15:58 | drbrain | yes, say something like HACK, copied from the macro |
| 01:16:02 | seydar | kk |
| 01:16:31 | jptix_ leaves the room. | |
| 01:17:13 | seydar | so did i get the specs i needed? anything else i should add? |
| 01:17:19 | boyscout | 1 commit by Ari Brown |
| 01:17:20 | boyscout | * Added Syslog::LOG_MASK and Syslog::LOG_UPTO; f23b3fc |
| 01:17:45 | seydar | i m 1337 |
| 01:17:59 | seydar | ok, not really. but i like to think this makes me important |
| 01:18:20 | drbrain | it does |
| 01:18:54 | seydar | huzzah! |
| 01:18:58 | seydar | what else should i do? |
| 01:19:44 | drbrain | move it to lib/ now |
| 01:19:52 | drbrain | since we have it all working and everything |
| 01:20:34 | seydar | waaay cool! |
| 01:21:25 | seydar | and where do i put the specs? spec/library/syslog? |
| 01:21:54 | enebo leaves the room. | |
| 01:22:05 | headius leaves the room. | |
| 01:24:18 | drbrain | spec stays where it is |
| 01:24:22 | drbrain | spec/ruby/1.8/ |
| 01:24:59 | seydar | mmm ok |
| 01:25:16 | drbrain | since it's part of ruby's standard library |
| 01:26:13 | seydar | k |
| 01:26:14 | dodecaphonic | hm i just ran ci on my ancient ibook g4 and got 10 errors. is that's what's expected right now? |
| 01:26:23 | seydar | you betcha |
| 01:26:26 | seydar | welcome to the club |
| 01:26:32 | drbrain | dodecaphonic: for ci, zero errors are expected |
| 01:26:40 | seydar | are you on tiger/ppc? |
| 01:26:46 | drbrain | dodecaphonic: but, we've been having problems on PPC |
| 01:26:52 | dodecaphonic | seydar: i'm running leopard, but ppc, yeah. |
| 01:26:59 | seydar | hmmmmm |
| 01:27:24 | seydar | drbrain: i got rid of my .rbc files, and they're showing up on my commit file. worry or no? |
| 01:27:39 | drbrain | you shouldn't be checking in .rbc files |
| 01:27:43 | dodecaphonic | drbrain: i remember, but i got so hopeful when seydar started contributed. i thought it was finally all shiny |
| 01:27:50 | dodecaphonic | contributing |
| 01:28:18 | drbrain | dodecaphonic: I think evan is going to check in some new FFI stuff that'll help RSN |
| 01:28:23 | drbrain | he's on vacation, though |
| 01:28:23 | dodecaphonic | it's not shiny it takes one million seconds to finish ci, but i can live with that. |
| 01:28:26 | seydar | drbrain: well, my diff file will remove them if they're there. |
| 01:28:40 | dodecaphonic | drbrain: oh that's awesome. |
| 01:29:39 | boyscout | 1 commit by Ari Brown |
| 01:29:40 | boyscout | * Moved stdlib/syslog.rb to lib/syslog.rb . it works!; fa35211 |
| 01:29:45 | seydar | niiiiiiiice |
| 01:30:03 | dodecaphonic | liking macs and living in a tax-heavy country makes you stick with your old computer a little longer than you should. |
| 01:30:21 | djwhitt | tax-heavy country? |
| 01:30:29 | dodecaphonic | djwhitt: Brazil. |
| 01:30:44 | wycats_ enters the room. | |
| 01:31:15 | djwhitt | interesting, I had know idea taxes where high down there |
| 01:31:19 | djwhitt | *no idea |
| 01:31:30 | seydar | dodecaphonic: i'm still running mac mini tiger here, and a linux machine for all my cool stuff |
| 01:33:04 | dodecaphonic | djwhitt: pretty high. we spend a fair bit of our money feeding corruption :) |
| 01:33:26 | djwhitt | heh, great... |
| 01:33:35 | seydar | my dad wants me to learn portuguese. is it a cool language? |
| 01:33:51 | drbrain | seydar: you should look on your linux box to see if the LOG_MASK and LOG_UPTO macros ar et hesame |
| 01:34:01 | seydar | kk |
| 01:34:04 | seydar | well, reading time |
| 01:34:08 | seydar leaves the room. | |
| 01:34:22 | moofbong enters the room. | |
| 01:34:30 | dodecaphonic | he left me mid-sentence ;_ |
| 01:35:02 | dodecaphonic | djwhitt: pretty great. |
| 01:36:59 | dodecaphonic | djwhitt: an imac costs 4000 reais here from an official apple reseller. that'd be about 200% it's original price. |
| 01:37:28 | dodecaphonic | 75% to the government, and then a lot of profit. |
| 01:37:31 | djwhitt | dodecaphonic: so, sales tax is really high? |
| 01:37:56 | dodecaphonic | djwhitt: both import and sales. |
| 01:38:18 | dodecaphonic | which is funny, because the import part tries to protect an industry that simply doesn't exist here. |
| 01:38:22 | djwhitt | dodecaphonic: what about income tax? |
| 01:39:30 | technomancy | 200%! wow. does software also get such a markup? |
| 01:39:45 | technomancy | that would explain why i hear a lot about free software in brazil |
| 01:40:02 | drbrain | heads home |
| 01:40:40 | dodecaphonic | djwhitt: 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:44 | srbaker leaves the room. | |
| 01:41:05 | wmoxam leaves the room. | |
| 01:41:14 | djwhitt | dodecaphonic: ah, well, at least that's a bit lower, that sales/import tax sounds killer though |
| 01:41:30 | dodecaphonic | it'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:45 | rubuildius | Ari Brown: fa35211f3; 1718 files, 5802 examples, 19776 expectations, 0 failures, 0 errors; http://rafb.net/p/7liSSk18.html |
| 01:41:46 | rubuildius | Ari Brown: f23b3fcc8; 1718 files, 5802 examples, 19776 expectations, 0 failures, 0 errors; http://rafb.net/p/bah1sg63.html |
| 01:42:15 | dodecaphonic | technomancy: 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:42 | dodecaphonic | leopard, for instance, costs about R$ 300.00, which today would be 179.64 dollars. |
| 01:42:52 | obiejuan leaves the room. | |
| 01:44:01 | dodecaphonic | technomancy: 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:32 | wycats leaves the room. | |
| 01:44:52 | dodecaphonic | sometimes 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:04 | dodecaphonic | it's beign done slowly. |
| 01:45:07 | dodecaphonic | being |
| 01:45:32 | jtoy enters the room. | |
| 01:46:42 | dodecaphonic | but considering all the taxes, it's no wonder a black market for hardware thrives. |
| 01:47:10 | dodecaphonic | also, you know, there's little awareness software costs something |
| 01:47:40 | dodecaphonic | people just think it's something you pay 6 dollars for on the street |
| 01:49:15 | crafterm leaves the room. | |
| 01:51:35 | jtoy leaves the room. | |
| 01:51:35 | lopex leaves the room. | |
| 01:51:35 | therealadam leaves the room. | |
| 01:51:35 | dgtized leaves the room. | |
| 01:51:35 | Chrononaut leaves the room. | |
| 01:51:35 | evan leaves the room. | |
| 01:51:35 | lenbust leaves the room. | |
| 01:51:35 | rphillips leaves the room. | |
| 01:51:44 | lopex enters the room. | |
| 01:51:44 | therealadam enters the room. | |
| 01:51:44 | dgtized enters the room. | |
| 01:51:44 | rphillips enters the room. | |
| 01:51:44 | evan enters the room. | |
| 01:51:44 | Chrononaut enters the room. | |
| 01:51:44 | lenbust enters the room. | |
| 01:51:47 | ezmobius enters the room. | |
| 02:01:50 | dodecaphonic leaves the room. | |
| 02:02:32 | aotearoa enters the room. | |
| 02:11:32 | technomancy leaves the room. | |
| 02:19:15 | rubyconsumer enters the room. | |
| 02:20:39 | aotearoa_ enters the room. | |
| 02:23:55 | krisps enters the room. | |
| 02:26:46 | rue | Someone tell lvmc to take a look at the GSoC FAQ if he asks when I am not around.. |
| 02:30:24 | brixen | rue: are you around? |
| 02:33:26 | Defiler | brixen: 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:42 | brixen | Defiler: exactly what I was thinking |
| 02:33:48 | brixen | he needs to do the hard stuff :P |
| 02:34:00 | brixen | Defiler: perhaps I could solicit your opinion on something |
| 02:34:11 | Defiler | sure |
| 02:34:26 | brixen | ok, so I have a whole set of specs now for e.g. String.allocate, Array.allocate |
| 02:34:32 | brixen | all of which we fail currently |
| 02:34:55 | rue | Nope, just us dustbunnies here. |
| 02:35:01 | brixen | basically, any class that has some sort of setup needs to return a fully-functional instance from the allocate method |
| 02:35:26 | brixen | however, our allocate primitive is smart! it allocates the right size class given the instance fields |
| 02:35:47 | aotearoa leaves the room. | |
| 02:35:59 | brixen | so, the trade off is essentially this: on String: def self.__allocate__; Ruby.primitive :allocate... |
| 02:36:19 | brixen | and then def self.allocate; __allocate__; then set up the rest of the instance here |
| 02:36:22 | brixen | OR |
| 02:36:34 | brixen | definite primitives for all the allocates, which seems like a yucky idea |
| 02:36:47 | brixen | of course __allocate__ could be renamed, but that's the idea |
| 02:36:56 | Defiler | 'allocate' is not a method in MRI, right? |
| 02:37:00 | brixen | it is |
| 02:37:05 | Defiler | Really? |
| 02:37:06 | brixen | String.allocate, e.g. |
| 02:37:08 | brixen | yeah |
| 02:37:22 | Defiler | What does it do? Like running 'new' without running the body of initialize? |
| 02:37:24 | brixen | it's how you get object memory |
| 02:37:29 | brixen | yep |
| 02:37:50 | Defiler | OK.. So in my opinion, we need a method that works the way the object allocation functions work in MRI under the hood |
| 02:38:05 | Defiler | A step that is deliberately not useful to override in userland |
| 02:38:23 | Defiler | Because presumably the problem is that people can override allocate and break the system? |
| 02:38:27 | brixen | our current allocate primitive will allocate the right size object, but currently it's only on Class |
| 02:38:46 | brixen | well, one thing is they override initialize and get an instance that isn't sane |
| 02:39:06 | aotearoa enters the room. | |
| 02:39:11 | rue | Defiler: Yes, it is fine to say that redefining .allocate is undefined |
| 02:39:12 | Defiler | Right. So what I am getting at is that that is what needs fixing |
| 02:39:13 | brixen | Defiler: one sec... I'll give you a pastie |
| 02:39:34 | brixen | no, we don't need to fix redefining allocate |
| 02:39:51 | Defiler | We 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:59 | Defiler | brixen: What do we need to fix, then? |
| 02:40:33 | brixen | Defiler: http://pastie.org/159122 |
| 02:40:56 | brixen | so, you can do Array.allocate and get a sane instance |
| 02:41:13 | brixen | Defiler: for a different approach, look at current core/hash.rb |
| 02:41:16 | Defiler | I am confused |
| 02:41:22 | Defiler | Why not just move the code that was in 'new' there into allocate? |
| 02:41:29 | brixen | however, that is broken because Hash.allocate will not give you a usable hash instance |
| 02:41:56 | brixen | because Class.allocate will not give you a big enough object |
| 02:42:02 | brixen | Array has different fields |
| 02:42:44 | Defiler | I don't understand.. what part of the existing code figures that out? |
| 02:43:07 | brixen | so, looking at the pastie: self.__allocate__ calls the allocate primitive |
| 02:43:09 | Defiler | Or, rather.. I don't see how that has changed in the two versions |
| 02:43:16 | brixen | which checks the receiver and allocates the right size |
| 02:43:31 | brixen | but after you have enough memory, you have to finish setting up |
| 02:43:37 | brixen | before you return from .allocate |
| 02:43:53 | brixen | the previous version used .new and send :setup |
| 02:44:06 | brixen | which would not return a usable Array instance from allocate |
| 02:44:12 | Defiler | Why not just have allocate call 'final_allocation' as its last line.. |
| 02:44:21 | Defiler | ..and then implement that part as needed in various classes? |
| 02:45:00 | Defiler | I assume I am missing some really basic concept here |
| 02:45:00 | brixen | because allocate primitive checks the receiver, and iiuc, when that is Class, you'll get an object with Class's instance_fields |
| 02:45:23 | Defiler | when is the receiver of allocate not a correct source of information about the number of fields? |
| 02:45:27 | brixen | Defiler: primitives.rb line 471 |
| 02:45:37 | brixen | well, I'm wondering that |
| 02:45:56 | Defiler | It sounds like a kickass place to get that info, right? |
| 02:46:17 | brixen | I should just check in that primitive |
| 02:46:35 | rue | What problem are you trying to solve, brixen? |
| 02:46:59 | brixen | rue: shotgun/rubinius: Hash.allocate |
| 02:47:01 | brixen | for instance |
| 02:47:16 | rue | We have the primitive which does the figuring-out part-- Class.allocate just runs the primitive |
| 02:47:30 | rue | Array.allocate runs the primitive and then does whatever it does |
| 02:47:53 | VVSiz_ enters the room. | |
| 02:48:02 | brixen | but you can't just do: class Array; def self.allocate; super |
| 02:48:12 | brixen | or ary = super; whatever |
| 02:48:41 | rue | Why not? `class Array, def self.allocate; primitive_allocate; blah;' end probably rather but nonetheless |
| 02:48:59 | brixen | rue: what is 'primitive_allocate'? |
| 02:49:22 | rue | The primitive that allocates that you referenced above |
| 02:49:48 | brixen | are you looking at the pastie? I'm not sure we're on the same page |
| 02:51:18 | Defiler | primitive_allocate is your __allocate__ |
| 02:51:21 | rue | The pastie says what I just did, except you wrap the primitive in __allocate__ |
| 02:51:32 | _mutle leaves the room. | |
| 02:52:08 | rue | Now, 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:12 | brixen | rue: 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:21 | mutle enters the room. | |
| 02:52:43 | brixen | the other problem is that Class.allocate *is* a primitive, so no code can run after it in that method |
| 02:52:54 | rue | Right, se it needs to be wrapped |
| 02:52:58 | Defiler | Yeah, the primitive needs to be wrapped |
| 02:53:06 | rue | The pastie is perfectly fine |
| 02:53:15 | rue | Where does it break? |
| 02:53:24 | brixen | rue: it doesn't, it workd! |
| 02:53:27 | brixen | or works |
| 02:53:38 | brixen | it's the approach that I'm questioning |
| 02:53:44 | Defiler | ohhhhhh hehe |
| 02:53:46 | rue | I thought you said it was broken with Hash |
| 02:53:53 | Defiler | OK, sorry. I agree with this approach |
| 02:53:57 | brixen | indeed, that pastie is for Array! :P |
| 02:54:12 | brixen | ok, just wanted some more eyes |
| 02:54:20 | rue | Yeah, this is fine |
| 02:54:20 | Defiler | OK.. here is what I don't get.. |
| 02:54:27 | brixen | Hash's *current* impl is broken, yes |
| 02:54:44 | Defiler | You were talking earlier about how one of these approaches required a bunch of different primitives or implementations |
| 02:54:49 | Defiler | Which option was that, and why? |
| 02:55:22 | brixen | oh, well either 1. you do __allocate__, allocate, or 2. you do a special primitive for each class that needs this |
| 02:55:48 | rue | Nah, 1. |
| 02:56:14 | brixen | so, the tradeoff is 1. more work (i.e. two methods) vs 2. a bunch more primitives |
| 02:56:19 | brixen | more work as in more execution work |
| 02:56:22 | Defiler | #1 for sure |
| 02:56:26 | brixen | ok |
| 02:56:48 | Defiler | I agree with you that it is two methods, but it is also ripe for an inlining plugin |
| 02:56:56 | Defiler | and/or instruction fusion fun |
| 02:56:58 | brixen | true |
| 02:57:10 | brixen | I'll see if I can generalize it on Class |
| 02:57:21 | Defiler | Eventually our method dispatch will be so fast you will need a mouthguard |
| 02:57:25 | brixen | the pastie works just fine and can be used for e.g. String and Hash |
| 02:57:35 | brixen | heh, can't wait! |
| 02:58:33 | brixen | what I have to figure out is, when this runs: class_get_instance_fields(msg->recv); |
| 02:58:45 | brixen | will msg->recv be e.g. Array |
| 02:59:04 | Defiler | I should be the real deal receiver |
| 02:59:07 | Defiler | so, Array |
| 02:59:09 | brixen | assuming that the allocate primitive is called from Class.__allocate__ |
| 02:59:14 | brixen | ok, cool |
| 02:59:31 | Defiler | as long as the __allocate__ call is in Array, it should be fine |
| 02:59:37 | Defiler | Or, rather, is 'sent' by Array |
| 02:59:41 | brixen | ok |
| 02:59:56 | Defiler | Let me know if I am wrong and I will do penance |
| 03:00:02 | brixen | heh, I'm checking now |
| 03:00:29 | rue | Defiler: http://forum.insanelymac.com/index.php?showtopic=87574 |
| 03:00:50 | Defiler | rue: oh snap |
| 03:01:04 | rue | Defiler: 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:04 | brixen | wow, we create a *ton* of instances doing the littlest things |
| 03:01:49 | Defiler | Hehe. Yeah. first-class stack frames oh god |
| 03:01:54 | Defiler | rue: Coolness |
| 03:04:50 | rubyconsumer leaves the room. | |
| 03:04:54 | rue | brixen: recv is the object the method was called on regardless of method definition |
| 03:05:15 | brixen | rue: thanks |
| 03:05:21 | VVSiz leaves the room. | |
| 03:05:47 | brixen | ok, one more question: obj.instance_eval { @tuple = ...} versus defining tuple= ? |
| 03:06:34 | brixen | rue / Defiler ? |
| 03:07:54 | Defiler | I vote tuple= |
| 03:07:56 | aotearoa_ leaves the room. | |
| 03:08:05 | brixen | k, I like that better too |
| 03:08:14 | rue | Actually, those may be fields.. dunno how that would work |
| 03:08:15 | Defiler | Though we could call it something longer and more irritating as well |
| 03:08:19 | rue | So #2 is safer |
| 03:08:51 | brixen | Defiler: we have the accessor defined, so it's not really a matter of clashing |
| 03:09:08 | brixen | e.g. Array.new.tuple is defined |
| 03:09:18 | brixen | I suppose those could be private methods |
| 03:13:05 | brixen | heh, 32,921 calls to Class.allocate just starting IRB |
| 03:14:48 | Defiler | wicked |
| 03:16:10 | brixen | hah! +400 to call a class method on an already existing clas in IRB |
| 03:16:23 | brixen | so basically, calling the method and printing the inspect |
| 03:16:28 | brixen | 400 instances allocated |
| 03:16:30 | brixen | jeez |
| 03:16:57 | brixen | I can see we've got vast fields for optimization |
| 03:17:20 | brixen | vast majority of those are Range and LongReturnException |
| 03:18:24 | rue | Maybe we could use prototypes for exceptions or something |
| 03:18:33 | rue | At least for raise FooError, "blah" |
| 03:19:02 | rue | LRE could well be a singleton anyway since it is internal |
| 03:19:03 | brixen | rue: yeah, some sort of caching |
| 03:19:10 | brixen | or yeah, a singleton |
| 03:19:26 | brixen | well, not really a singleton |
| 03:19:31 | brixen | it stores info about the return |
| 03:20:01 | rue | Mm, prototype then, I suppose |
| 03:20:04 | Defiler | We could bake it into the Context object or something, maybe |
| 03:20:16 | rue | I think we may need to revisit the LRE approach |
| 03:21:01 | brixen | well, there's fusion at the machine code level, but some sort of approach like that at the bytecode level might be useful |
| 03:21:04 | rue | It is definitely the easiest solution, might be the best one for that matter |
| 03:21:11 | brixen | because basically, we're doing a ton of sends |
| 03:21:29 | brixen | so, identifying hot paths in the bytecode and addressing that might give a huge gain |
| 03:21:33 | brixen | even without jit |
| 03:22:37 | brixen | but, better finish this mundane shit first :P |
| 03:24:43 | aotearoa_ enters the room. | |
| 03:24:48 | Defiler | Luckily 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:51 | Defiler | Heh |
| 03:25:22 | Defiler | We could use a script that did a bunch of 'dup' calls to build a star schema out of ObjectSpace |
| 03:27:16 | obiejuan enters the room. | |
| 03:27:16 | brixen | Defiler: 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:02 | krisps leaves the room. | |
| 03:37:33 | drbrain | I hate, hate, hate Gem::Package::* |
| 03:43:34 | d2dchat leaves the room. | |
| 03:44:22 | rue | 'S 'cause it sux0r? |
| 03:45:33 | rue | 'Cause I think 't's |
| 03:46:11 | drbrain | it has some pretty lame tests, to start |
| 03:46:33 | srbaker enters the room. | |
| 03:47:51 | srbaker leaves the room. | |
| 03:48:24 | drbrain | for example, the test to make sure you're at #eof? is really a test for IO#eof? |
| 03:50:20 | lopex leaves the room. | |
| 03:50:46 | aotearoa leaves the room. | |
| 03:50:52 | drbrain | because #eof? just isn't good enough, have to check that #read and #getc and so-on also return nil |
| 03:51:16 | hoopy | can you guys program after you've had a few beers? </left-field> |
| 03:52:50 | drbrain | how many is a few? |
| 03:53:02 | rue | I do not drink |
| 03:53:05 | drbrain | depends on the beer and the time of day |
| 03:53:13 | rue | But the crack helps |
| 03:54:09 | drbrain | I think meth would be good too |
| 03:54:16 | drbrain | until it rots your brain out |
| 03:55:19 | squeegy | and destroys your teeth |
| 03:55:38 | drbrain | squeegy: that's what slushees are for |
| 03:55:49 | drbrain | squeegy: and, everybody stops eating when they're on meth anyhow |
| 03:56:27 | squeegy | true, what good are teeth if you aren't eating |
| 04:00:04 | moofbong leaves the room. | |
| 04:00:04 | cremes leaves the room. | |
| 04:00:04 | ttmrichter leaves the room. | |
| 04:00:04 | agardiner leaves the room. | |
| 04:00:04 | imajes_ leaves the room. | |
| 04:00:04 | Norgg leaves the room. | |
| 04:00:04 | nicksieger leaves the room. | |
| 04:00:04 | Fullmoon leaves the room. | |
| 04:00:04 | hassox leaves the room. | |
| 04:00:04 | foysavas leaves the room. | |
| 04:00:04 | anonuser leaves the room. | |
| 04:00:04 | rbx_buildbot leaves the room. | |
| 04:00:04 | xmlhacker leaves the room. | |
| 04:00:04 | gnufied leaves the room. | |
| 04:00:38 | agardiner enters the room. | |
| 04:00:43 | obiejuan leaves the room. | |
| 04:02:33 | Norgg enters the room. | |
| 04:05:50 | dewd enters the room. | |
| 04:06:11 | xmlhacker enters the room. | |
| 04:06:39 | nicksieger enters the room. | |
| 04:07:24 | moofbong enters the room. | |
| 04:07:30 | Fullmoon enters the room. | |
| 04:07:53 | hassox enters the room. | |
| 04:08:05 | cremes enters the room. | |
| 04:10:34 | srbaker enters the room. | |
| 04:11:14 | ezmobius leaves the room. | |
| 04:14:10 | foysavas enters the room. | |
| 04:16:40 | anonuser enters the room. | |
| 04:19:24 | ttmrichter enters the room. | |
| 04:20:35 | srbaker leaves the room. | |
| 04:21:41 | gnufied enters the room. | |
| 04:30:29 | krisps enters the room. | |
| 04:40:52 | ezmobius enters the room. | |
| 04:47:20 | jinjing enters the room. | |
| 04:56:50 | rue | Hola |
| 04:57:03 | rue | I am surprised headius has not chimed in on the kwargs discussion |
| 04:57:07 | headius enters the room. | |
| 04:57:13 | rue | Uh-oh |
| 04:57:15 | agardiner | howdy |
| 04:57:24 | drbrain | kwargs |
| 04:57:32 | rue | headius: You have a magical offline nick highlighting, dontcha? |
| 04:58:11 | rue | headius: I just sent my feeble thoughts on the keyword arg issue from the MacRuby ANN |
| 04:58:12 | headius | I see all |
| 04:58:22 | headius | ahh, very good |
| 05:01:13 | agardiner | man, this profiler sigsegv is a bitch... for me at least! |
| 05:01:28 | rue | Ah, still fighting with that? |
| 05:01:32 | agardiner | yep |
| 05:01:36 | agardiner | i've made more progress |
| 05:02:02 | agardiner | i've determined that a context that is referenced can be overwritten |
| 05:02:11 | agardiner | but it seems to only happen when the profiler is run |
| 05:02:42 | agardiner | maybe it something to do with signals, but i don't know much about that |
| 05:03:18 | agardiner | it *looks* like some sort of pre-emption issue or something |
| 05:03:31 | rue | All paths to create a new context go through that one guard? |
| 05:04:10 | agardiner | well, there isn't a guard on context allocation |
| 05:04:16 | agardiner | only on retiring a context |
| 05:04:55 | crafterm enters the room. | |
| 05:05:37 | agardiner | basically, 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:58 | agardiner | that logic works fine except when the profiler is run |
| 05:06:40 | agardiner | then i get weird output, e.g. what looks like two retirements of the same reference |
| 05:07:14 | agardiner | i've added asserts to the allocation and retirement blocks, and they don't fire unless the profiler is run |
| 05:09:42 | headius leaves the room. | |
| 05:11:12 | rue | Have you debugged through SIGPROF? |
| 05:11:34 | agardiner | no... |
| 05:11:40 | agardiner | but that's a good idea |
| 05:12:27 | agardiner | (i'm learning a lot from grappling with this, at least! :-) |
| 05:12:38 | rue | Hm, the comment says that recycling should be disabled while sampling (when it is enabled) |
| 05:13:27 | agardiner | well, i read that as saying we don't do recycling yet, but when we do, we should disable it... |
| 05:14:06 | agardiner | wonder if that's still true though? |
| 05:16:07 | agardiner | however, 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:44 | rue | That is what the context stack is for, no? Recycling |
| 05:16:51 | rue | Or is it just preallocated |
| 05:16:58 | rue | Ew, add '?' |
| 05:17:02 | ezmobius leaves the room. | |
| 05:17:02 | agardiner | yeah, it seems to be |
| 05:18:06 | agardiner | contexts are definitely recycled in that sense, but the methctx_reference macro moves the context_bottom to protect any referenced contexts from recycling |
| 05:18:49 | rue | Should move, yeah |
| 05:19:18 | agardiner | lemme pastie some of the output i get when it fails... |
| 05:19:27 | agardiner | pastie: |
| 05:20:10 | pastie | http://pastie.org/159162 by agardiner. |
| 05:22:19 | agardiner | the weird bit in there is the duplication in lines 12/13 |
| 05:24:20 | agardiner | that comes from a single macro that prints the Before retire bit, does the guard logic, and then prints the After retire bit |
| 05:24:37 | agardiner | so it should not be possible to get an after without a corresponding before |
| 05:29:48 | agardiner | so, lemme check an assumption here |
| 05:30:42 | agardiner | when 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:27 | agile enters the room. | |
| 05:36:55 | rue | Yep, should be |
| 05:48:22 | squeegy leaves the room. | |
| 05:50:57 | Ingmar leaves the room. | |
| 05:51:18 | Ingmar enters the room. | |
| 05:52:18 | srbaker enters the room. | |
| 06:02:34 | therealadam leaves the room. | |
| 06:03:50 | twbray enters the room. | |
| 06:05:23 | agardiner | hmmm... i'm not sure it does work that way |
| 06:05:25 | squeegy enters the room. | |
| 06:06:54 | agardiner | i think the profiler is setting up SIGPROF outside libev |
| 06:07:23 | rue | That would be a problem |
| 06:08:06 | agardiner | its using signal(SIGPROF, _cpu_sampler_record_context) |
| 06:08:12 | agardiner | that's not using libev, right? |
| 06:09:31 | boyscout | 4 commits by Brian Ford |
| 06:09:32 | boyscout | * Specs for Hash.allocate. Fix awaits replacing Hash with LookupTable in core.; 9bd2f07 |
| 06:09:33 | boyscout | * Specs and fixes for Module.allocate.; c1d9796 |
| 06:09:34 | boyscout | * Specs and fixes for Array.allocate.; 904fd61 |
| 06:09:35 | boyscout | * Specs for String.allocate and fixes to make them pass.; 776a24f |
| 06:18:34 | rue | agardiner: Nope, no no. I think cpu_event_wait_for_signal() is the place to go |
| 06:18:40 | srbaker leaves the room. | |
| 06:20:08 | _ADS enters the room. | |
| 06:20:35 | agardiner | yeah, that makes sense to me too |
| 06:20:56 | agardiner | ok, i'll try making that change later and see if it solves the problem |
| 06:21:04 | agardiner | thanks for your help! :-) |
| 06:21:33 | rue | Sure |
| 06:21:34 | rubuildius | Brian Ford: 9bd2f0740; 1723 files, 5812 examples, 19794 expectations, 0 failures, 0 errors; http://rafb.net/p/Qt3nqp81.html |
| 06:22:57 | ezmobius enters the room. | |
| 06:23:53 | brixen | some trivia: a full bin/mspec ci run created 1718076 instances with the allocate primitive |
| 06:24:00 | tmornini enters the room. | |
| 06:24:01 | brixen | the distribution: 1718076 |
| 06:24:06 | brixen | blast |
| 06:24:12 | brixen | http://pastie.org/159175 |
| 06:24:35 | ezmobius | wow thats a lot of LongReturnException |
| 06:24:38 | twbray leaves the room. | |
| 06:24:41 | ezmobius | what does that do? |
| 06:24:43 | brixen | yep, that's what I'm thinking |
| 06:24:49 | tmornini leaves the room. | |
| 06:25:03 | rue | ezmobius: It is there to facilitate block returns |
| 06:25:34 | rue | I 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:53 | rue | It should be every single method call there |
| 06:25:59 | brixen | yeah |
| 06:27:26 | brixen | the number of Range objects actually surprised me |
| 06:30:16 | brixen | there must be a way to get those File::Stat's down too |
| 06:30:30 | brixen | 31k when there's only 1700 spec files |
| 06:30:39 | drbrain | Range not having a custom Marshal loader/dumper suprised me |
| 06:36:01 | agardiner leaves the room. | |
| 06:36:11 | gdagley leaves the room. | |
| 06:41:23 | krisps leaves the room. | |
| 06:41:40 | squeegy leaves the room. | |
| 06:48:15 | squeegy enters the room. | |
| 06:52:20 | wycats | don't we already do this: http://www.infoq.com/news/2008/02/ruby-mvm-research |
| 06:53:45 | tarcieri | nice |
| 06:53:46 | tarcieri | and yes |
| 06:54:01 | wycats | so why aren't we involved? |
| 06:54:11 | wycats | "In short, the expected outcome is a common API that will allow to launch and use multiple Ruby VMs." |
| 06:54:56 | squeegy leaves the room. | |
| 06:55:04 | tarcieri | yeah, I'd be interested in what they have in mind |
| 06:55:25 | radarek leaves the room. | |
| 06:56:37 | wycats | I'd be interested in having Rubinius personnel involved in developing a "common API" |
| 06:56:38 | wycats | :P |
| 06:57:20 | tarcieri | MVM will be integral to a common Actor implementation |
| 06:57:53 | tarcieri | although that's only one way to leverage it |
| 06:58:03 | sfaxon enters the room. | |
| 07:00:26 | brixen | hmm, 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:38 | brixen | where's headius? |
| 07:02:48 | squeegy enters the room. | |
| 07:14:12 | Fullmoon_ enters the room. | |
| 07:15:11 | RyanTM leaves the room. | |
| 07:21:37 | rue | Neh, this is the thing headius wrote about a few days ago |
| 07:23:19 | _ADS | So I'm working on filling out Array#pack... |
| 07:23:33 | _ADS | and I see a lot of: item = Type.coerce_to(self[arr_idx], Integer, :to_i) |
| 07:23:56 | _ADS | why isn't this simply: self[arr_idx].to_i |
| 07:25:06 | rue | Specific error type, usually |
| 07:25:34 | _ADS | Type.coerce_to raises, while to_i doesn't? |
| 07:25:45 | _ADS | that would make sense. |
| 07:26:29 | _ADS | I just wanted to make sure I wasn't blindly copying voodoo code |
| 07:28:08 | rue | Well, #to_i can raise |
| 07:28:41 | rue | Usually it would be a NoMethodError, right? The implementation probably requires the TypeError |
| 07:28:45 | flori_ enters the room. | |
| 07:29:10 | Fullmoon_ leaves the room. | |
| 07:29:27 | _ADS | that's it exactly. Thanks |
| 07:32:24 | flori leaves the room. | |
| 07:46:32 | wifelette leaves the room. | |
| 07:46:42 | wycats_ leaves the room. | |
| 07:55:22 | lstoll leaves the room. | |
| 08:03:35 | dctanner enters the room. | |
| 08:04:05 | aotearoa enters the room. | |
| 08:05:13 | wycats enters the room. | |
| 08:12:15 | wifelette enters the room. | |
| 08:17:33 | Fullmoon_ enters the room. | |
| 08:21:25 | krisps enters the room. | |
| 08:21:48 | Fullmoon_ leaves the room. | |
| 08:22:29 | dctanner leaves the room. | |
| 08:23:20 | cavalle enters the room. | |
| 08:27:20 | thehcdreamer enters the room. | |
| 08:27:25 | mae enters the room. | |
| 08:31:03 | aotearoa_ leaves the room. | |
| 08:39:55 | w1rele55 enters the room. | |
| 08:40:51 | jinjing_ enters the room. | |
| 08:45:18 | crafterm leaves the room. | |
| 08:49:47 | crossblaim enters the room. | |
| 08:50:36 | wifelette leaves the room. | |
| 08:56:54 | jinjing leaves the room. | |
| 09:08:24 | ezmobius leaves the room. | |
| 09:14:44 | VVSiz | morning, guys! |
| 09:18:12 | octopod enters the room. | |
| 09:18:19 | drbrain | gah, Hash seems broken in a strange and mysterious way |
| 09:19:20 | rue | Morning |
| 09:19:37 | drbrain | whoa whoa whoa! |
| 09:20:02 | drbrain | yes, it is |
| 09:20:10 | drbrain | at least, Hash arguments |
| 09:22:52 | drbrain | hrm, maybe it's Array#shift |
| 09:23:24 | drbrain | oh, it's order-of-evaluation |
| 09:23:34 | drbrain | goddamnit |
| 09:32:52 | cavalle leaves the room. | |
| 09:40:20 | rue | Well there you go, all solved |
| 09:47:09 | manveru | wonders when the loop{} thing will be fixed |
| 09:50:24 | dctanner enters the room. | |
| 09:52:07 | GMFlash leaves the room. | |
| 09:52:12 | GMFlash enters the room. | |
| 09:52:25 | drbrain | manveru: ?? |
| 09:54:44 | manveru | drbrain: http://rubinius.lighthouseapp.com/projects/5089/tickets/368-kernel-loop-raises-if-block-has-no-con tent |
| 09:55:04 | drbrain | ah |
| 09:55:23 | drbrain | well, not by me, tonight |
| 09:55:53 | drbrain | I'm off to bed |
| 10:00:11 | rue | I should probably go too |
| 10:02:50 | Fullmoon_ enters the room. | |
| 10:03:12 | cavalle enters the room. | |
| 10:04:31 | jtoy enters the room. | |
| 10:32:01 | crossblaim leaves the room. | |
| 10:35:39 | sfaxon leaves the room. | |
| 10:38:23 | jtoy leaves the room. | |
| 10:44:53 | mernen leaves the room. | |
| 11:10:48 | probablycorey enters the room. | |
| 11:20:49 | crossblaim enters the room. | |
| 11:24:25 | probablycorey leaves the room. | |
| 11:49:02 | ragnard enters the room. | |
| 11:50:12 | ragnard leaves the room. | |
| 11:53:56 | ragnard enters the room. | |
| 11:58:46 | moofbong leaves the room. | |
| 11:59:52 | moofbong enters the room. | |
| 12:09:40 | pietia enters the room. | |
| 12:13:43 | imajes enters the room. | |
| 12:28:45 | headius enters the room. | |
| 12:34:03 | skaar enters the room. | |
| 12:41:36 | headius | g'day |
| 13:01:35 | mutle leaves the room. | |
| 13:02:52 | mutle enters the room. | |
| 13:03:05 | pietia leaves the room. | |
| 13:10:03 | headius | wycats, brixen, tarcieri: evan is already involved in the MVM stuff...I had ko1 include him on the MVM mailing lists |
| 13:29:16 | imajes leaves the room. | |
| 13:29:34 | cavalle leaves the room. | |
| 14:07:20 | rubymaverick enters the room. | |
| 14:08:07 | AndrewO enters the room. | |
| 14:10:42 | headius leaves the room. | |
| 14:12:15 | cavalle enters the room. | |
| 14:18:02 | RyanTM enters the room. | |
| 14:30:35 | moofbong leaves the room. | |
| 14:43:49 | wmoxam enters the room. | |
| 14:46:37 | headius enters the room. | |
| 14:58:24 | moofbong enters the room. | |
| 14:58:49 | imajes enters the room. | |
| 15:01:10 | peglegrot enters the room. | |
| 15:01:28 | rue | Bleh |
| 15:01:48 | headius | Bleh! |
| 15:02:20 | srbaker enters the room. | |
| 15:04:01 | langenberg enters the room. | |
| 15:04:41 | boyscout | 1 commit by Vladimir Sizikov |
| 15:04:42 | boyscout | * New rubyspecs for IO#ungetc.; b6e9532 |
| 15:06:56 | rue | That whole sleeping thing did not go so well |
| 15:13:39 | srbaker leaves the room. | |
| 15:13:47 | agile leaves the room. | |
| 15:15:21 | macournoyer enters the room. | |
| 15:15:58 | femtowin enters the room. | |
| 15:16:42 | rubuildius | Vladimir Sizikov: b6e95321d; 1723 files, 5812 examples, 19794 expectations, 0 failures, 0 errors; http://rafb.net/p/lYmhbt74.html |
| 15:17:09 | headius | down with sleeping! |
| 15:17:28 | rue | And stuff! |
| 15:17:30 | headius | rubiniites must transcend such pleasures of the flesh |
| 15:23:36 | chris2 enters the room. | |
| 15:25:51 | Defiler | Yeah. We just pray, code, and brew beer |
| 15:25:58 | Defiler | Oh, and mortify this sinful flesh |
| 15:33:38 | thehcdreamer leaves the room. | |
| 15:35:03 | mutle leaves the room. | |
| 15:36:06 | thehcdreamer enters the room. | |
| 15:36:10 | ragnard leaves the room. | |
| 15:37:23 | mutle enters the room. | |
| 15:37:34 | jacen_ enters the room. | |
| 15:38:02 | femtowin leaves the room. | |
| 15:59:35 | ragnard enters the room. | |
| 16:02:00 | langenberg leaves the room. | |
| 16:02:31 | langenberg enters the room. | |
| 16:06:33 | therealadam enters the room. | |
| 16:07:13 | d2dchat enters the room. | |
| 16:17:49 | VVSiz | zenspider: are you there? |
| 16:18:26 | VVSiz | I just wanted to talk about that new Kernel#catch spec |
| 16:20:33 | jacen_ leaves the room. | |
| 16:29:28 | jacen_ enters the room. | |
| 16:29:46 | enebo enters the room. | |
| 16:30:12 | cavalle leaves the room. | |
| 16:31:16 | cavalle enters the room. | |
| 16:32:12 | ragnard leaves the room. | |
| 16:33:06 | Defiler | VVSiz: It is still a little early in Pacific time |
| 16:33:20 | rue | Pacific time is for pansies |
| 16:33:27 | Defiler | Indeed |
| 16:37:11 | rue | Is evan supposed to be back today? |
| 16:39:01 | octopod leaves the room. | |
| 16:39:02 | octopod_ enters the room. | |
| 16:40:54 | sholden enters the room. | |
| 16:42:23 | octopod_ leaves the room. | |
| 16:49:34 | cavalle leaves the room. | |
| 16:53:11 | nitay_ enters the room. | |
| 16:53:49 | agile enters the room. | |
| 17:00:59 | cavalle enters the room. | |
| 17:01:39 | ragnard enters the room. | |
| 17:01:51 | evan | morning bitches |
| 17:02:01 | evan leaves the room. | |
| 17:02:21 | evan enters the room. | |
| 17:02:32 | evan | stupid dircproxy. |
| 17:02:40 | Defiler | Morning bitch |
| 17:03:07 | evan | hows things? |
| 17:03:18 | evan | been going over the commits from when I was gone |
| 17:03:20 | imajes | hey evan |
| 17:03:47 | evan | Defiler: got libffi working great |
| 17:03:49 | evan | about to commit it. |
| 17:04:13 | Defiler | evan: You are pretty good at this. Heh. |
| 17:04:31 | Defiler | Excellent news |
| 17:05:10 | headius | so libffi worked out after all eh? |
| 17:05:20 | headius | good to hear it |
| 17:05:22 | headius | bbiab |
| 17:05:23 | headius leaves the room. | |
| 17:06:23 | dodecaphonic enters the room. | |
| 17:07:45 | Fullmoon_ leaves the room. | |
| 17:08:27 | probablycorey enters the room. | |
| 17:08:48 | evan | I also rewrote FFI's struct access |
| 17:09:08 | Defiler | drbrain: ping, re: getsockname |
| 17:09:08 | evan | should be less brittle now. |
| 17:09:17 | Defiler | How do you like libffi? |
| 17:09:30 | evan | it's nice, the api is simple. |
| 17:09:41 | evan | our ffi_call isn't nearly as pretty now though. |
| 17:10:08 | evan | because there is a for() with a switch() inside it, to convert all the args |
| 17:10:11 | Defiler | Doesn't suprise me that the most platform-divergent piece will end up pretty ugly, though |
| 17:10:46 | nitay leaves the room. | |
| 17:10:50 | boyscout | 1 commit by Evan Phoenix |
| 17:10:51 | boyscout | * Pull in libffi and retrofit the VM to use it solely.; bbb1af1 |
| 17:11:08 | srbaker enters the room. | |
| 17:11:10 | evan | i'm going to yank out our custom stub code and lightning now. |
| 17:13:04 | srbaker leaves the room. | |
| 17:14:01 | evan | all the code to interface to libffi is in subtend/ffi_libffi.c |
| 17:14:20 | evan | it's pretty verbose, but thats good, since it's fairly sensitive |
| 17:15:12 | wmoxam leaves the room. | |
| 17:15:32 | wmoxam enters the room. | |
| 17:16:58 | probablycorey leaves the room. | |
| 17:17:34 | probablycorey enters the room. | |
| 17:17:52 | Defiler | Cool |
| 17:18:05 | Defiler | brixen: ping, re: test_array.rb |
| 17:18:42 | cremes | fyi i disabled rubuildius_ppc while waiting for libffi to be committed; i will re-enable it tonight |
| 17:18:50 | evan | ok |
| 17:22:28 | Defiler | evan: When you feel like a change of pace, could you take a look at getsockname in socket.rb? |
| 17:22:48 | evan | what am I looking at/for? |
| 17:23:16 | Defiler | From 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:27 | Defiler | Our version returns EINVAL when that happens |
| 17:23:36 | murphee enters the room. | |
| 17:23:38 | jluxenberg enters the room. | |
| 17:23:41 | Defiler | ..and I was wondering if it looked right to you |
| 17:24:20 | evan | what line in socket.rb and socket.c? |
| 17:24:46 | jtoy enters the room. | |
| 17:25:14 | Defiler | 230 in socket.rb |
| 17:25:59 | Defiler | ..and starting at 2210 in socket.c (our copy) |
| 17:26:10 | evan | not bsock_getsockname? |
| 17:26:36 | Defiler | Nope. I am working on UNIXSocket#addr and UNIXSocket#peeraddr |
| 17:26:52 | evan | ah, ok. |
| 17:27:05 | rubuildius | Evan Phoenix: bbb1af1ca; 1723 files, 5812 examples, 19794 expectations, 0 failures, 0 errors; http://rafb.net/p/WxEkzE70.html |
| 17:27:14 | evan | rubuildius: say yay! |
| 17:27:14 | rubuildius | yay! |
| 17:27:17 | evan | :D |
| 17:27:44 | evan | Defiler: so, whats your question? |
| 17:27:52 | evan | you call getsockname, passing in an fd |
| 17:27:56 | evan | that fd can be any socket. |
| 17:28:42 | jluxenberg | can anyone give me an overview of what the GlobalVariables core class is, or where I can find documentation about it? |
| 17:28:57 | Defiler | evan: Yeah, I get EINVAL when I pass it a unix socket, though |
| 17:29:10 | evan | jluxenberg: GlobalVariables has one instance, located at Globals |
| 17:29:20 | Defiler | evan: 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:23 | evan | jluxenberg: all global variables ($blah) are stored in it |
| 17:29:26 | jluxenberg | interesting |
| 17:29:36 | djwhitt | evan: build is not so happy on my box (amd64 gentoo) |
| 17:29:44 | evan | djwhitt: pastie? |
| 17:29:59 | jluxenberg | evan: I have some code that seems to be invoking GlobalVariables#[] even though the code doesn't involve globals |
| 17:30:05 | djwhitt | http://pastie.caboo.se/159374 |
| 17:30:07 | evan | jluxenberg: which? |
| 17:30:15 | jluxenberg | evan: I'll pastie, one sec |
| 17:30:22 | evan | djwhitt: crap. |
| 17:30:27 | evan | djwhitt: go remove .libs in libffi |
| 17:30:39 | evan | my commit might have had that in there |
| 17:30:45 | evan | if so, libffi's make distclean is busted. |
| 17:30:56 | jluxenberg | evan: http://pastie.caboo.se/159377 |
| 17:31:08 | murphee | evan: 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:40 | jluxenberg | evan: in my redef-ed [] function, when I call __get_item, execution ends up GlobalVariables#[] |
| 17:31:43 | djwhitt | evan: remove .lib, rebuilding now |
| 17:31:45 | djwhitt | *removed |
| 17:31:46 | evan | jluxenberg: where you see it accessing GlobalVariables#[]? |
| 17:32:08 | evan | murphee: there is one, seems like it's for people implementing MVM |
| 17:32:15 | evan | it's pretty quiet currently |
| 17:32:19 | jluxenberg | evan: and then __get_item returns 0 for keys that are not in the hash, rather than nil in Matz's ruby |
| 17:33:03 | evan | jluxenberg: that doesn't sound right. how are you running this file? |
| 17:33:08 | evan | just rubinius file.rb |
| 17:33:09 | evan | ? |
| 17:33:10 | jluxenberg | evan: rbx file.rb |
| 17:33:12 | jluxenberg | yeah |
| 17:33:18 | evan | thats.. very odd. |
| 17:33:36 | jluxenberg | evan: maybe subclassing a core class makes it unhappy? |
| 17:33:40 | evan | how do you know that __get_item is calling GlobalVariables#[]? |
| 17:34:01 | jluxenberg | I put a call to "debugger" in my [] |
| 17:34:11 | jluxenberg | (left that out when I pasted it) |
| 17:34:13 | evan | Defiler: the manpage for getsockname says that you get EINVAL if the socket has been shutdown |
| 17:34:17 | evan | Defiler: what is your test case for this? |
| 17:34:18 | Defiler | Yeah, I saw that |
| 17:34:37 | Defiler | u = UNIXSocket.new '/tmp/mysql.sock' |
| 17:34:40 | Defiler | u.peeraddr |
| 17:34:52 | evan | maybe it's closed. |
| 17:35:06 | Defiler | It works in mri |
| 17:35:14 | evan | well yeah |
| 17:35:16 | Defiler | So either my UNIXSocket impl is busted, or etc |
| 17:35:16 | evan | i mean |
| 17:35:24 | evan | your connect is broken |
| 17:35:32 | Defiler | Yeah |
| 17:35:46 | Defiler | Care to code-review 'unix_setup'? |
| 17:35:50 | evan | sure |
| 17:35:51 | evan | where? |
| 17:35:54 | Defiler | socket.rb line uhh |
| 17:36:03 | Defiler | 453 |
| 17:36:20 | thehcdreamer leaves the room. | |
| 17:36:21 | murphee leaves the room. | |
| 17:36:31 | jptix enters the room. | |
| 17:38:24 | evan | Defiler: seems ok |
| 17:38:39 | evan | jluxenberg: hm, you should be able to subclass Hash |
| 17:38:48 | evan | jluxenberg: i know that there was some work just the other day to deal with that |
| 17:38:51 | evan | jluxenberg: when did you try this code? |
| 17:39:36 | jluxenberg | evan: I downloaded rubinius-daily.tgz yesterday |
| 17:39:42 | djwhitt | evan: didn't fix it |
| 17:39:43 | djwhitt | http://pastie.caboo.se/159380 |
| 17:39:55 | jluxenberg | evan: I could try the GIT version, is it significantly newer? |
| 17:40:40 | Defiler | Should only be at most 23:59 hours newer |
| 17:41:50 | wifelette enters the room. | |
| 17:42:23 | jluxenberg | any idea why it would end up in GlobalVariables#[] though? that seems odd. |
| 17:42:57 | Defiler | jluxenberg: Can you paste where you are seeing that? |
| 17:43:21 | jluxenberg | defiler: yeah, one sec |
| 17:44:22 | jluxenberg | ah, stupid mistake |
| 17:44:23 | evan | djwhitt: run 'file external_libs/libffi/.libs/libffi.a' |
| 17:44:35 | jluxenberg | was looking at the wrong line. something's still wrong though |
| 17:44:37 | evan | djwhitt: also, could you paste the output of the build? |
| 17:45:11 | langenberg leaves the room. | |
| 17:45:26 | djwhitt | evan: all of it? |
| 17:46:03 | jluxenberg | ah!!! |
| 17:46:05 | jluxenberg | I see the problem |
| 17:46:19 | srbaker enters the room. | |
| 17:46:27 | jluxenberg | I use an instance variable called @default |
| 17:46:42 | jluxenberg | the core class also uses an instance variable called @default |
| 17:46:57 | jluxenberg | how am I supposed to avoid that? |
| 17:47:48 | Defiler | Rename yours or the one in core, I guess |
| 17:47:59 | jluxenberg | eww. this creates subtle bugs. |
| 17:48:10 | jluxenberg | is that really the accepted solution? |
| 17:48:22 | Defiler | Can you think of a better way? |
| 17:48:24 | jluxenberg | I guess this wasn't a problem in Matz Ruby because Hash is in C? |
| 17:48:29 | Defiler | Right |
| 17:48:38 | Defiler | Well, it was a problem in that you couldn't really subclass Hash |
| 17:48:40 | Defiler | heh |
| 17:49:15 | Defiler | With great power comes great responsibility |
| 17:49:21 | jluxenberg | so 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:33 | evan | djwhitt: yeah |
| 17:49:35 | jluxenberg | this seems like a big problem. |
| 17:49:35 | jtoy leaves the room. | |
| 17:50:26 | djwhitt | evan: build output: http://spcom.org/~djwhitt/rbx_build_output |
| 17:50:30 | Defiler | It's regular old OOP, in my opinion |
| 17:50:48 | Defiler | Subclassing requires you to understand the API of the superclass |
| 17:51:00 | jluxenberg | yeah but the instance variables are not part of the API |
| 17:51:00 | Defiler | I mean.. it would be cool to not have that problem, but I can't think of a fix, myself |
| 17:51:08 | Defiler | Sure they are. |
| 17:51:12 | jluxenberg | in a language like Java, you don't have this problem because each subclass gets its own instance variable "namespace", right? |
| 17:51:22 | evan | they are part of the subclass API. |
| 17:51:27 | Defiler | Java has this same problem |
| 17:51:39 | Defiler | if you repurpose a 'field' in a subclass, you have to reimplement everything that relies on it |
| 17:51:44 | djwhitt | evan: file outputs: external_libs/libffi/.libs/libffi.a: current ar archive |
| 17:51:56 | evan | odd. |
| 17:52:04 | jluxenberg | oh |
| 17:52:12 | jluxenberg | this is what private instance variables are for |
| 17:52:13 | Defiler | It 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:32 | jluxenberg | ah, yes, and this can be checked statically in java, presumably |
| 17:52:34 | Defiler | That being said, I am open to the idea of a naming convention for core class ivars |
| 17:52:44 | evan | well, we could add private ivars |
| 17:52:54 | Defiler | I have run into this in a ton of libraries, Rails and Merb included |
| 17:52:58 | evan | use the same technique python does, ie, compile time name mangling |
| 17:53:04 | Defiler | @base = something was a Rails-breaker for a long time |
| 17:53:09 | jluxenberg | ah |
| 17:53:11 | evan | but yes, it's not a rubinius specific problem |
| 17:53:25 | jluxenberg | maybe we need an "extra_private" macro |
| 17:53:34 | jluxenberg | that will mangle instance vars or something |
| 17:53:34 | evan | djwhitt: oh oh. |
| 17:53:44 | evan | djwhitt: libffi wasn't compile with -fPIC |
| 17:54:21 | evan | djwhitt: in shotgun/Makefile |
| 17:54:47 | evan | add to line 119, after the ;, CFLAGS=-fPIC |
| 17:54:56 | evan | like was done above there |
| 17:55:38 | djwhitt | ok, done, rebuilding |
| 17:55:40 | olabini enters the room. | |
| 17:56:10 | dc_ leaves the room. | |
| 17:56:59 | Defiler | evan: 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:22 | Defiler | evan: Should I try to make the inliner smarter, or just detect control flow in the body and skip inlining? |
| 17:57:34 | jluxenberg | is there any way to hook accesses to instance variables in the same way "$" works? |
| 17:57:41 | evan | Defiler: probably easier to make the inlining smarter. |
| 17:57:52 | evan | Defiler: i'll bet I just put a label in the wrong place. |
| 17:57:58 | jluxenberg | because if there was it'd be easy to do run-time mangling |
| 17:58:09 | evan | jluxenberg: no |
| 17:58:18 | evan | there are no hooks for ivars |
| 17:58:30 | jluxenberg | evan: I suppose that would require some compiler changes. |
| 17:58:51 | evan | jluxenberg: hooking ivars? would require VM changes too |
| 17:59:02 | jluxenberg | evan: ah, so totally non-trivial. |
| 17:59:14 | evan | and likely having all ivar access go through methods |
| 17:59:15 | jluxenberg | might be too slow, too |
| 17:59:21 | Defiler | Also, we probably don't want to do anything to slow down ivar access |
| 17:59:32 | Defiler | I am already about to have to dramatically slow down block yielding =( |
| 17:59:36 | evan | thats not really a solution to this problem |
| 18:00:04 | evan | Defiler: so, i was thinking a little about that |
| 18:00:32 | evan | perhaps we should put some code at the send site |
| 18:00:36 | evan | not just in the method thats called |
| 18:00:55 | evan | for the BlockPass code |
| 18:01:07 | evan | then we wouldn't slow down code in the form of |
| 18:01:13 | evan | 100.times { ... } |
| 18:01:19 |