Index

Show enters and exits. Hide enters and exits.

00:01:20boyscoutCI: 1824ab5 success. 3002 files, 11393 examples, 35413 expectations, 0 failures, 0 errors
00:01:35brixensweet
00:14:39brixenok, I'm going to test this on elle now
00:14:46brixenbuilding ext is a little more verbose
00:14:51brixenbut such is life with rake
00:15:06brixenit's good probably, let's you know what is going on
00:15:52evank
00:28:19brixenwell, good thing I checked
00:28:22brixenman POS!
00:28:36brixenwhy are platforms so fucking ridiculous
00:28:56slavabrixen: does your ffi do structs on ppc?
00:29:09slavaI just discovered the alignment rules for fields are super-weird
00:30:12brixenI thought you had a wiki page on struct alignment on ppc?
00:30:24brixensomething about this rings a bell
00:30:49slavano I made a wiki page about passing structs by value
00:30:57slavathis is about accessing the fields themselves
00:31:19slavastruct { long long x; int y; } is 16 bytes but struct { int x; long long y; } is 12
00:32:00brixenahh, that's right
00:32:13brixenthat's wacky
00:32:54slavaso you have code to handle this?
00:39:49brixenslava: I don't know, I'd have to look
00:39:56slavanever mind
00:41:31brixensorry
00:41:45brixentrying to get stupid C to compile and link correctly
00:41:50brixenhorrid language
00:43:00slavaheh
00:48:07evanhuh.
00:48:14evani'm getting that strange env failure thing
00:48:19evanconsistently too.
00:48:34evanit's very wierd.
00:48:43brixendoes is persist through a rake clean?
00:49:15brixenI think I hit it once switching to c-ng, so I figured it was related to stale rbc's or something
00:50:50evannot sure why that would be
00:50:57evanit happened after I changed one file
00:51:00evanpretty randomly too
00:51:02evani'm debugging it.
00:51:41evanit's like ENV itself freakes the fuck out.
00:51:52evani'm poking.
00:52:07evanon the soft underbelly that is the UNIX environment variables
00:53:25brixenheh
00:56:33evanseems to be something with running them via rake
00:56:33evanbin/mspec ci -B full
00:56:33evanis fine.
00:56:52evannow, why it just started, thats a mystery.
01:01:14brixenweird
01:04:09brixenseriously g++?! seriously!
01:04:29brixenon linux I have to have the .o before the .a
01:04:34brixensomething like this rings a bell
01:04:47brixenfrom maybe FIFTEEN years ago
01:04:49brixenman
01:07:39evanyeah
01:07:42evanlame-o
01:07:43evani know.
01:07:52brixenI can't decide which is more lame
01:07:57brixenthat it's not that way on os x
01:08:02brixenor it is that way on linux
01:08:10brixenasinine is what it is
01:08:16slavawhat's the problem exactly?
01:08:38brixeng++ has to get the .o files before the .a files on linux
01:08:48brixenor it just silently ignores that you asked it to link
01:08:55brixenSILENTLY
01:09:25brixen"oh, what's this .a doing here? <toss>"
01:09:27slavaI think I've found another gcc bug
01:09:29evanyeah, the silently thing is the problem
01:09:35brixenit's like homer simpson or something
01:56:47evanoops!
01:56:51evanthink I found the ENV problem
01:56:55evantesting now.
01:57:14evanseems that the JIT's inline FFI dispatcher didn't properly check that the return value of a :string type was NULL and return nil
01:57:19evanthats probably why it's so random
01:57:31evanbecause if the method that is calling getenv happens to heat up
01:57:32evanyou see it
01:57:35evanotherwise you don't
01:57:59slavaand stuff that calls getenv is rarely hot
01:58:04slavathis is what scares me about JITs
01:58:09evanyep
01:59:09brixeninteresting
01:59:12evanwelcome to very late dispatched!
01:59:16brixenwe could write a heater-upper
01:59:34brixenactually just force jit compile everything and run the specs
01:59:36evanmight be useful to have a CI run that runs the specs over and over again
01:59:54brixenah yeah, cus you wouldn't get the same inlining decisions
01:59:59evanright
02:00:01brixenjust doing a forced upfront jit
02:00:08evanforce jit doesn't actually test any runtime behavior
02:00:13evanbut you need ICs to fill up
02:00:19brixenyeah
02:02:10brixenwouldn't be hard to run mspec repeatedly on a set of files
02:02:19brixenmspec --loop :files :)
02:02:38brixenmspec --repeat=10 :files
02:02:49evanheh
02:02:53evansure
02:02:55evanadd it
02:02:58evanwe'll add a CI run
02:03:07evanadd a rake target for it
02:03:12evanrake vm:horror
02:04:11brixenheh
02:06:59ddubrants on twitter
02:07:21ddubkeynote literally crashed on the last line of my last slide
02:07:49evan:(
02:08:30ddubfeels very disappointed @ apple right now
02:11:21brixenwow, no autosave in keynote?
02:11:25brixenthat's crazy
02:11:29brixenwhat version?
02:11:33ddubstill, after how many releases?
02:11:33ddub09
02:11:47brixenhuh, I didn't know that
02:11:49ddublike I bitched on twitter, apple added autosave to cocoa in 10.4
02:11:59brixengood thing I'm an obsessive cmd-s'er
02:12:23ddubthe built-in autosave for cocoa kinda sucks in that it doesn't auto-save unless you have an actual _file_
02:12:31ddubso you need to make sure you at least save a new file once :)
02:13:21evanoh yeah
02:13:24evani always do that first
02:13:32evansave right after I open it
02:13:35brixenevan: oh, is the packed object stuff generic? should I try to add compiler support for it?
02:14:01ddubwell iwork doesn't autosave even if you have a file
02:14:23ddubso i lost about 45 minutes of work, but worse - I have to work on this over the day off tomorrow now :P
02:16:15evanddub: :( :(
02:16:23evanbrixen: yeah, if you emit the calls to add_ivar
02:16:28evanthen we can make it auto
02:18:24brixenk
02:19:21ddubevan: it is actually an intro to ruby for my team
02:20:13evanoh cool!
02:20:30evanso, i'm exposing a new way to use a FFI attached function
02:20:42evani'm tweaking they're attachment slightly
02:20:53evanthey're going to go into the Modules instance methods table as well
02:20:55evanmarked private
02:21:04evanso they're just like module_function style methods
02:21:08evanie, you can include the Module
02:21:17evanand access the FFI functions directly
02:21:21evanprivatly
02:21:38evanwe can use that to speed things up a little bit too
02:21:55evanbecause you don't have to go through some long constant lookup path to get to an FFI function everytime you want to use it
02:22:37ddubhmm
02:22:56ddubfor security, one might want to make their imports private as well
02:23:15evantrue
02:23:49evanwell, what kind of security were you thinking?
02:24:00boyscoutCleanup Binding#eval spec - 95e35c4 - Evan Phoenix
02:24:00boyscoutUpdate Binding tags - 3550f4b - Evan Phoenix
02:24:00boyscoutAdd RUBY_DESCRIPTION - 68cff4b - Evan Phoenix
02:24:00boyscoutAdd RUBY_COPYRIGHT - 2c9a41f - Evan Phoenix
02:24:00boyscoutUpdate builtin constants tags - 84622fe - Evan Phoenix
02:24:01boyscoutFix JIT FFI inliner bug (NULL => nil) - 7e4600d - Evan Phoenix
02:24:03boyscoutGet @method_table and @constants setup entirely in allocate - 9d24b92 - Evan Phoenix
02:24:05boyscoutUpdate Class tags - 3de9a08 - Evan Phoenix
02:24:07boyscoutTaint strings coming back over FFI - 967e4e0 - Evan Phoenix
02:24:09boyscoutExpose FFI functions as private instance methods also - 84c5c7f - Evan Phoenix
02:24:11boyscoutChang how ENV gets to the FFI functions - f9fccb7 - Evan Phoenix
02:25:07ddubevan: probably doesn't matter so much for ruby. In CLR, you create types around pointers in order to enforce type safety, then expose methods to take those in rather than an API with raw pointers
02:25:30evanah
02:25:34evanyou can certainly still do that
02:25:41ddubthey have a native_int type which is like an intptr_t, with the added constraint that only unsafe code is allowed to do any integer math on them
02:25:43evanthats typically how people use FFI
02:26:47boyscoutCI: f9fccb7 success. 3002 files, 11397 examples, 35420 expectations, 0 failures, 0 errors
02:27:04ddubyeah, but more to put an object oriented flavour around non-object API calls, am i right?
02:27:25ddubtype safety would be bonus points :)
02:28:05ddubman, I lost a dozen slides. Do I really have to explain regexp again?
02:28:17ddubdecides to take a break for dinner
02:28:25evangood plan.
02:34:18ddubmaybe I should have someone review my slides to make sure I'm not setting people up for failure ;-)
02:34:52ddub"Ruby is just like Java except you don't always have to use parenthesis when calling methods"
02:35:01slavahaha
02:35:15boyscoutBe more discriminating about arguments when checking AST transforms. - bf832d0 - Brian Ford
02:35:15boyscoutA little cleanup for transforms specs. - 68de861 - Brian Ford
02:35:15boyscoutReworked compiling C extensions. - 9ed0630 - Brian Ford
02:35:15boyscoutRemoved old extension compiler. - ac10d93 - Brian Ford
02:35:15boyscoutMV lib/bin/compile-ng.rb lib/bin/compile.rb - 9e38179 - Brian Ford
02:35:15boyscoutPatched up capi spec helper. - fc96a0a - Brian Ford
02:35:41ddubbrixen, you are making it very hard for me to maintain a compiler fork
02:35:49brixenddub: sorry :(
02:35:56ddub*grin* no problem
02:35:58brixenyou should consider not forking me :P
02:36:25ddubwell that doesn't sound fun
02:36:43brixenI wouldn't say anything related to rake is particularly "sane"
02:36:45ddubmaybe I should just finish some of it up and see if you want it?
02:36:54ddubdoes rake do file dependencies?
02:36:55brixenbut building exts is now at least somewhat standardized
02:37:01brixenand comprehensible
02:37:06ddubor is it pure task based?
02:37:15brixennope, it does files
02:37:21brixenpretty nicely too
02:37:33brixenrake's biggest problem is that it's like make
02:37:36ddubfun, then why isn't there a mkrf lib?
02:37:43evanthere is!
02:37:43brixenand that's the wrong way to structure an app
02:37:45evango look
02:37:48dduboooh
02:37:52evanbut sadly, it doesn't do what you think it does.
02:37:57ddubok, after dinner
02:37:59evanit doesn't supplant the usage of mkmf
02:38:12boyscoutPolish a few unfinished corners in Dir - 13a11aa - Evan Phoenix
02:38:12boyscoutUpdate Dir tags - d989302 - Evan Phoenix
02:38:21ddubI still seem to read that internally as "make mf'er"
02:38:23brixen:(
02:38:25evanbrixen: i'm into D!
02:38:30brixensweet!
02:38:36brixenI wonder if boyscout is going to break
02:38:42boyscoutCI: fc96a0a success. 3002 files, 11399 examples, 35422 expectations, 0 failures, 0 errors
02:38:45brixennope!
02:38:47brixenyay!
02:38:54slavaevan: are you doing a big rubyspec passing effort?
02:39:03ddubslava: was just going to ask that :)
02:42:22evanyeah, far too many specs are tagged
02:42:49evanand a huge percentage of them are trivial.
02:44:04slavagood stuff
02:45:17brixenI love that the compiler and parser are now 100% userland
02:45:31brixenthat's where they belong
02:45:42brixenmade it easier to hammer out the ext compiling stuff
02:45:47slavaparser too? cool
02:45:48brixencus at least rbx could run
02:45:56brixenslava: the parser is a C ext
02:46:04slavauserland in the sense that its not in the vm?
02:46:09brixenyeah
02:46:16brixennot linked/loaded directly in
02:46:23slavayeah
02:46:24brixennot loaded in our bootstrapping .rbc files
02:46:32slavaso when you ruby guys come up with a sane syntax
02:46:37slavait will be easy to switch right
02:46:38slavaI kid, I kid
02:46:41brixenI need to fix up #require
02:46:47brixenheh
02:46:48slavaany plans to dust off that pure ruby parser you had once?
02:46:51brixensane syntax?!
02:47:00brixennot any plans of mine
02:47:09brixenI plan on writing a peg parser :)
02:47:24brixenthe ruby_parser needs all it's productions fixed
02:47:27brixenit emits sexps
02:47:31brixenI've banned them
02:47:35slavacool, using the lpeg algorithm?
02:47:42brixenyeah, I want to
02:47:53slavaso that would be the first non-MRI derived ruby parser
02:47:58slavasounds like a challenge
02:48:00brixenit's already got a name: pegarus
02:48:04brixenactually not
02:48:10slavapackrat then?
02:48:16brixenthere's a guy who's got a pretty complete peg in scheme
02:48:24brixenbased on his own peg framework
02:48:42slavatime to add car and cdr keywords to ruby then
02:48:51brixengood idea! :)
02:49:11slavahow do you guys generate identity hashcodes? incrementing counter, RNG, address?
02:49:31evanincrementing counter
02:49:33brixenobject_id is a monotonic counter
02:50:32boyscoutGoodbye vm/parser. - 43341b5 - Brian Ford
02:50:37brixenoops, dang
02:50:44brixenI was going to test that on elle first
02:51:00evanwell here we go!
02:51:03brixenheh
02:51:16brixenit either works or it doesn't
02:51:37brixenwhich is not a 50/50 chance, contrary to rue's brand of probability
02:52:54evanheh
02:55:52evan raise ArgumentError, "Improper spaceship value", e
02:55:53evanhehehe
02:55:54evanlove it.
02:55:55boyscoutCI: Build 43341b5 failed. http://ci.rubini.us/rubinius/builds/43341b532420ebd8058d6a20474fd29c7dfbfee9
02:56:00brixendammit
02:56:20brixenhmm
03:02:00brixenwait, what? why are we using bstring if it's gpl'd?
03:04:00brixenI just compiled head on elle and I get no such error
03:04:09brixenevan: can you force a clean build, please
03:04:13evansurely
03:14:21boyscoutCI: 43341b5 success. 3002 files, 11404 examples, 35428 expectations, 0 failures, 0 errors
03:14:57evanbrixen: there ya go.
03:15:16evanand i recall the bstring/gpl issue
03:15:21evanwe probably need to remove it.
03:15:30evanbecause of that.
03:15:46brixenevan: thanks
03:30:36evanMAN there are some silly fucking specs.
03:30:50evan SystemCallError.new(-2**24).errno.should == -2**24
04:00:48ddubwhat, bstring is GPL?
04:01:57ddubI thought it was dual-licensed
04:02:51brixenah, it is I think
04:03:09brixenthe gpl.txt stands out more than license.txt :P
04:03:33ddubwhew
04:03:59ddubnow all you have to worry about is libmpa, libmquark, etc.
04:04:09ddubi.e. be nice to me
04:05:58brixenI'm not worried, I'm determined :)
04:06:03brixenok, bbiab...
04:06:14brixenfor your viewing pleasure http://i.usatoday.net/tech/graphics/iss_timeline/flash.htm
04:06:36ddubooh
04:06:41ddubNASA's version of voltron!
04:07:40ddubthey have voltron on hulu. I thought I would watch it, but it was too painful
05:11:19brixenhmm, we really need to implement frozen with self.extend FrozenWhatever
05:11:52brixenbecause switching the class in Array gives a.class => Array::Frozen
05:12:02brixenwhich makes self.class.new not work
05:12:11brixenand a.instance_of? Array => false
05:12:33brixenthe cost of #extend is born by whoever is freezing
05:12:51brixenI think actually shifting the class will lead to many issues
05:13:42ddubso freezing would be done with metaclasses?
05:14:03brixenbasically def freeze; self.extend Frozen; end
05:14:19brixenwhere Frozen is a module that redefines the mutator methods to raise
05:14:36brixenbut the cost of #extend is big because it blows away caches
05:14:42brixenbut too bad IMO
05:15:24brixenthe approach of switching the class doesn't blow away caches, but causes problems based on the expected real class of an obj
05:15:37brixenthat's a bigger problem I think
05:16:25brixenbecause we have to code stuff in Array with self.class.new to work with class MyClass < Array
05:16:34ddubI might not understand what extend does, if it blows away caches
05:16:36brixensome methods have to return an instance of the subclass
05:16:40brianmarioany chance for a pre-built llvm-x86_64-apple-darwin10.2.0.tar.bz2 ? ;)
05:17:01brixenbrianmario: sure, if you can build one, evan will make it available
05:17:12brixenbrianmario: or are you hoping not to have to build it?
05:17:45ddub10.2.0? is that the ver. of 10.6.2?
05:17:50brianmarioI don't *really* mind either way, but compiling definitely takes longer than downloading a binary (I think the difference is I'm on 10.6.2 now)
05:17:54brianmarioyeah
05:17:55ddubahh
05:18:06ddubhmm, I'll build one if someone tells me the magical command line
05:18:14brianmarioI'll happily build whatever you guys need
05:18:16brianmarioor that
05:22:57ddubeww, yeah extend does something different than I expected
05:23:46ddubat least from the object interface p.o.v.
05:33:12ddubbrixen: if extend makes another metaclass, won't it not invalidate the caches?
05:33:37dduberr, will it not then keep caches valid
05:43:34brixenbrianmario: you can ./configure --enable-llvm=svn; rake build; rake package:llvm
05:43:48brixenthat'll build you the .tar.bz2
05:44:09brianmariorunning through the rake compile right now, I'll do the llvm build when it's done
05:44:15brixencool
05:47:44brixenddub: the IC is the actual module and selector at that send site
05:48:14brixenif you do obj.extend mod, and mod defines a new method with that selector, the IC is invalid
06:23:46brianmariobrixen: built and packaged llvm, not sure if you have access to add this to the prebuilt dir on asset.rubini.us or not but - http://files.me.com/brianmario/oggrb4
06:24:04brianmariowtf is up with the password on that... sec
06:25:00brianmariook the pass is "rubinius"
06:25:11brianmariodunno why I even needed it, but...
06:26:03brixenbrianmario: I don't have access, but I'll let evan know
06:27:54brianmariocool
06:31:20brixenthanks for building it
06:33:20evanbrixen: ah damn (changing the class)
06:33:33evani'll switch it to using extend later
06:33:36evanoff to play ps3
06:35:34brixenevan: oki
06:35:38scooprevan, what's your psn id? :P
06:45:04ddubattempts a build with mri 1.9.1
06:45:15slavaevan: I tried doing the incrementing counter thing and got really bad hash collisions
08:41:29boyscoutDetect if <=> is correct in Enumerable#sort - e1b1344 - Evan Phoenix
08:41:29boyscoutUpdate Enumerable tags - a32481f - Evan Phoenix
08:41:29boyscoutFix ENV.clear spec - db0630d - Evan Phoenix
08:41:29boyscoutUpdate ENV tags - f792b62 - Evan Phoenix
08:41:29boyscoutPolish Exception up a little - 9c5b1f1 - Evan Phoenix
08:41:29boyscoutUpdate Exception tags - 6e7cf79 - Evan Phoenix
08:42:15slavaevan phoenix is a machine that turns specs and coffee into code
08:42:21brixenheh
08:42:24evanhehe
08:42:28brixenspecs, coffee, and ps3
08:42:30evanand now it turns code into sleep.
08:42:47brixenevan: did some GC params tweaking
08:42:53brixenI'll show ya in the morning
08:43:03evanok
08:43:06evani'm all the way through e!
08:43:06brixengot a full CI run from ~93 sec to ~83 sec
08:43:13brixenawesome!
08:43:20slavaweren't you on 40 secs or so a while back?
08:43:23slavaor did the amount of work increase?
08:43:32brixenslava: we're running a ton more specs
08:43:36slavaah
08:43:40evanthats also compiling i'm assuming
08:43:44brixenevan: yeah
08:43:50evana precompiled run is about 54s here
08:43:54brixenyep
08:44:05brixengot the % GC to 22.9%
08:44:18evansweet!
08:44:23brixenonly thing is, I don't have a stat on the total mem load
08:44:27evanlets discuss GC stuff in the morning
08:44:30evanperhaps with a brief call
08:44:33brixenyep
08:44:34brixenok
08:44:39slavabrixen: what did you change?
08:45:15evannite!
08:45:15brixenslava: basically, young lifetime=1, "malloc" trigger 20M, and immix trigger ever chunks_.size() % 4 == 0
08:45:18brixenevan: nite!
08:45:31slavabrixen: I got a nice win today by changing freelist strategy
08:45:46brixenslava: I saw your tweet, what did you change?
08:45:47slavabrixen: so I have freelists for various small sizes
08:45:53brixenahh neat
08:45:59brixenkinda like hole size?
08:46:00slavabrixen: previously if a free list was empty, it would go up to the next largest one
08:46:03slavaand so on
08:46:05slavayeah
08:46:09brixencool
08:46:21slavanow, if a free list of a given size is empty, it allocates 1kb and splits it up into chunks of that size
08:46:32brixeninteresting
08:46:48slavaso before, the case right after a compaction, where there's one big free block, was the worst for small object allocation
08:47:01slavait would check each small free list in turn, then go to the large free list, split that block, and add the second piece back
08:47:19brixenah, do you have a histogram of obj sizes during a bench?
08:47:25boyscoutCI: Build 6e7cf79 failed. http://ci.rubini.us/rubinius/builds/6e7cf7929fd05dc13666e3be948d01b4813ca953
08:47:30slavaits much better now -- suppose a request is made for 32 bytes, if that list has entries it pops one off, otherwise it allocates 1kb and chops it up
08:47:32brixen:/
08:47:53slavabrixen: a histogram of all objects allocated during a test suite run or something?
08:48:09brixenyeah, during a benchmark or app
08:48:19brixentheir sizes
08:48:28slavaunfortunately I don't
08:48:39slavaI can get a histogrma of sizes of objects in the heap at a given point
08:49:02slavabut I don't have allocation profiling of any kind; it would take a bit of work to instrument that in because the compiler generates allocation sequences inline for small objects
08:49:12brixenahh
08:49:36brixenwould be interesting to compare with rbx
08:50:00brixenI have a stat for builtin class instances that I could derive sizes from
08:50:01slavahttp://paste.factorcode.org/paste?id=1025
08:50:12slavathis is a snapshot from a running instance that I've done a bunch of random stuff in over the last few hours
08:50:22slavafirst column is size in bytes, second column is # of objects that have this size
08:50:32brixenoh cool
08:51:07slava32 bytes seems very popular
08:51:24brixenyeah it does
08:52:10brixeninteresting spikes in the long tail
08:53:17brixenrad, GC % during non-compiling full CI run 17.0% !
08:53:30brixencompiling stresses the GC pretty good
08:54:26brixenbut the difference is only ~5 %
08:54:46brixenwhile the total obj alloc'd is 33% running vs running + compiling
08:55:11brixenso 2/3 more obj created due to compiling
08:56:09brixen30 nanoseconds min time to alloc in immix, 280n avg
08:56:26brixen26n min, 45n avg in young
08:57:55brixen16 millisecond avg young GC collect times
08:58:50brixenwelp, to sleep, perchance to dream of being a sanitation engineer
11:00:34weepyis there a big release coming up this fri ?
11:03:58dbussinkweepy: why do you ask?
11:07:01weepyi read somewhere on the logs
11:07:27weepybut perhaps i was mistaken -
11:11:25dbussinkweepy: ah, well, i think there is a plan to do it on the short term afaik
11:11:31dbussinkdunno if friday is a hard target though
11:25:46weepyyes probz not !
11:25:57weepydo u know what the release is going to be / do /
11:25:59weepy?
11:27:46dbussinkwell, a lot of stuff has been fixed and there is a whole new compiler now
11:28:00dbussinkbut i have to go now
16:38:17brixenmorning folks
16:42:05wayneeseguinohio!
16:43:59brixenwayneeseguin: hey, I'm working on install today!
16:44:07brixenI promise we'll get it right this time :)
16:44:15wayneeseguinbrixen: that is hardcore awesome :D
16:44:21brixenheh
16:44:43brixenddub is working on getting rbx to build with 1.9.1 too
16:57:20Defilerbrixen: This is a great commit http://github.com/evanphx/rubinius/commit/9ed0630d33746188f77f8479bd7a28232b88b922
16:58:13brixenDefiler: ah cool, glad ya like it :)
16:58:29DefilerI know exactly how much work that way. Heh
17:04:17ddubbtw: I already have rbx building on 1.9.1
17:04:25ddubjust trying to make sure I don't break building on 1.8.7 :)
17:04:50brixenand 1.8.6 ;)
17:05:21ddubthats why I'll give you a diff before I commit
17:05:33ddubalthough it would be nice to spin up a local leopard VM
17:05:44ddubthats just such a cool idea anyway
17:05:53DefilerI've been meaning to try that VMWare feature, yeah
17:06:46ddubso far the two issues I have are the complete inadequacy of Config::CONFIG, and bigdecimal seems to be doing 32-bit things
17:06:58ddubdon't know if that is a building-with-1.9 issue or a SL issue
17:07:50brixenddub: I can try building with 1.9.[12] on L
17:09:28ddubstill have the patch gist from yesterday?
17:10:30brixenddub: I do, but I think those changes need to be tweaked
17:10:35brixenthe ones to find the hdrdir
17:10:43brixenddub: I'll check in a bit
17:16:49ddubman I really don't want to switch this off of the ruby version
17:17:01ddubbut the locations of things are very different
17:17:29brixenyep
17:17:38brixenI think the version conditionals will be needed
17:18:55ddubis there a preferred check?
17:19:21brixenall the checks I've seen are pretty ad hoc
17:19:32brixenin mspec, I have an object for comparing versions
17:22:15ddubjust did if RUBY_VERSION.start_with? "1.9"
17:22:34brixencan't use start_with? on 1.8.6
17:22:39ddubgah.
17:22:47ddub1.8.6 is a POS :P
17:22:55brixenoh well ;)
17:23:05ddubis there an equiv for 1.8?
17:23:16brixenregexp
17:23:23ddubomfg really?
17:23:29brixenhuh?
17:23:30ddubwhy is 1.8.7 a minor release again?
17:23:39brixenum yeah, dunno
17:24:22ddubthere are a lot of things I am surprised are missing under 1.8.6, like really basic things I would have expected to be in over the last 10 years
17:24:54brixenand there's stuff in 1.9 that I can't believe are in there in 100 years
17:25:11brixenahem ->() { puts "you are soo ugly" }
17:26:09Zoxcfaster blocks :)
17:26:25brixenfaster?
17:26:56Zoxcunless it just maps to a lambda call :/
17:34:17ddubyeah I dislike that syntax, seems unruby-like
17:36:32ddubbrixen: that bigdecimal test seems to fail under system mri on SL as well
17:36:59ddubsorry, not under, 'when building with system mri'
17:37:25ddubexpected (32 bit normal value) to equal (64 bit normal value)
17:38:34brixenk
17:41:45ddubwould you like me to submit these changes, assuming the 1.9.1 build I'm verifying now succeeds?
17:43:01brixenwell, I should check it
17:43:22ddubk
17:43:56ddubonce I get this out of my tree, I can look at what is going on with bigdecimal (if you like)
17:44:33brixensure
17:44:40brixenI can check in a minute
17:44:49brixengive me an updated gist if you got it
17:45:02ddubI'm running the ci now, so it will be a minute
17:45:34brixenddub: I need it now, nowwwww!
17:45:36brixenj/k
17:47:01ddubfine, https://gist.github.com/232135/d355bb0ee584c6f6baabfa28216a4634e29584df
17:49:27brixenk, checking
17:49:40brixenanything special you did to build with 1.9?
17:49:47brixenlike what was you cmd line?
17:50:09brixenI'll try it with 1.9.1p129 and 1.9.2 head
17:52:45ddubrvm 1.9.1; ./configure; rake
17:53:37wayneeseguinoh sweet, adding 1.9.1 build support brixen ? :D
17:54:01ddubwayneeseguin, https://gist.github.com/232135/d355bb0ee584c6f6baabfa28216a4634e29584df
17:54:21dbussinkbrixen: quick question, enumerable.rb has a custom sorter method, shouldn't that be private? or is public / private something that needs reviewing anyway?
17:54:30ddubbrix is reviewing it before I commit, because my ability to commit frightens him slightly
17:55:03brixenddub: not true!
17:55:05brixenheh
17:55:19brixendbussink: sec, on a call
17:55:41brixenddub: it worked for me on 1.8.6
17:55:46brixenddub: go ahead and push
17:56:00brixenI'll check 1.9 stuff, but we can continue tweaking that as needed
17:57:37boyscoutadd support for MRI 1.9.x bootstrapping - 5e6630d - David Waite
17:58:18ddubI wonder if I can use 1.9.2 head in rvm
17:58:37dbussinkwayneeseguin: ^^
17:58:52wayneeseguinddub: sure, "rvm install 1.9.1-head"
17:59:07wayneeseguinddub: 1.9.1-head === 1.9.2-head because they haven't branched 1.9.2 yet
17:59:28boyscoutCI: Build 5e6630d failed. http://ci.rubini.us/rubinius/builds/5e6630d25206cbe467fde936a5464e16123ab193
18:00:05brixenoh, that's left over from last night
18:00:09brixenevan: ^^^
18:02:33evanzoinks!
18:02:49brixendbussink: generally, yes, custom methods in core should be private
18:02:52evanthats weird
18:03:06dbussinkbrixen: ok, if i see them i'll change them
18:03:10brixendbussink: we have Rubinius.privately { ... } to call them with receiver if necessary
18:03:17brixenyou can grep for how that's used
18:03:36dbussinkbrixen: ah, well, this still works if i make it private since it's only used inside enumerable itself
18:03:40ddubwayneeseguin: aha, thats what I was looking for. I was trying 1.9.1 --rev head, but it was replacing my existing 1.9.1 install
18:03:46evanit's pretty easy, any method call inside the block to privately is done as a private method call
18:03:47brixendbussink: ok, sure
18:04:04wayneeseguinddub: ::grin:: yeah it's just "rvm install 1.9.1-head"
18:04:17wayneeseguinddub: also always be sure you are on latest rvm, bugfixes happen fast
18:04:25ddubone of my coworkers is apparently working today, even though we have the day off.
18:04:26wayneeseguinexcept for dbussink :-p
18:04:33ddubso I disabled my work mail account :P
18:04:56dbussinkbrixen: privately is for calling from outside the class / module then right?
18:05:18dduboh, is there a way to use rvm with tcsh?
18:05:31evanFAIL.
18:05:40ddubevan?
18:05:41evan-2 ** 30 is a Bignum on 32bit
18:05:59evanwhy would you assume that -2 ** 30 is a valid errno.
18:06:04evanstabs specs
18:06:14brixendbussink: for calling a private method with a receiver
18:06:22ddub-2**30 is a fixnum on mri, is it not?
18:06:22brixendbussink: see Hash.allocate
18:07:00evanhuh, why is that a Bignum actually..
18:07:16evanwe should be only using one tag bit...
18:07:38brixenis that supposed to be -2**30 or (-2)**30 ?
18:07:47ddub-(2**30)
18:07:52ddub** > unary -
18:07:58brixenI know
18:08:02brixenhence my question
18:08:13brixenbecause the classes are different
18:08:13evanit's parsed as -(2 ** 30)
18:08:13ddubalso, -2**30 would be pointless
18:08:14evanit seems
18:08:22evanbecause (-2) ** 30 is 1073741824
18:08:24ddubsince 30 is even
18:08:36brixen-2**30 is a fixnum on mri 32bit, (-2)**30 is a bignum
18:08:45evanyeah
18:08:47evanthats weird.
18:08:54evanthats the boundary
18:08:56evanas I recall.
18:08:59ddubthe largest fixnum on 32 bit is 2**30 -1
18:09:20dbussinkbrixen: like 8 bit signed goes from -128 to 127
18:09:42brixenyah, I know how bits work :P
18:09:49brixenI'm trying to clarify what the spec meant
18:09:51ddubthey can either be on, or off
18:09:56ddub;-)
18:10:12evanyeah -2 ** 30 is the negative boundary
18:10:21evanwe must have a bug there actually
18:10:27evanbecause that should be a Fixnum for us too.
18:10:45brixenwell, we do have a difference at that boundary
18:10:50brixenit should be explained in a comment
18:11:05evanhm, ok.
18:11:18brixenoop.hpp
18:11:28brixenwe actually discussed this a bit
18:11:40dduboops, bug in 1.9.1-head ;)
18:11:46ddubguess I'll try that again later
18:11:46evanah
18:11:47evani see.
18:11:48evanyes
18:11:50evanthe comment makes sense.
18:12:39brixenheh, we should have named oop.hpp oops.hpp :)
18:12:45brixenimagine the questions
18:12:49ddubkinda a shame that fixnum doesn't have max and min constants
18:12:49evanit shuold be noted that passing -2**30 to SystemCallError results in a very strange message
18:13:00ddubwould greatly simplify these sorts of things
18:13:01evanirb(main):023:0> SystemCallError.new("", -2**30)
18:13:01evan=> #<SystemCallError: Unknown error 3221225472 - >
18:13:09evanreally? 3221225472? really?
18:13:15evani smell a casting error.
18:13:25brixenddub: you mean like Fixnum::MAX in rbx :)
18:13:33ddubbrixen: yeah, something like that :)
18:14:16boyscoutOnly consider Fixnum errnos in SystemCallError - 1829ef3 - Evan Phoenix
18:15:00evanI find it highly unlikely that -2**30 is a valid errno.
18:16:07boyscoutCI: 1829ef3 success. 3002 files, 11411 examples, 35443 expectations, 0 failures, 0 errors
18:19:56ddubE_ERRNO_TOO_LARGE
18:20:50brixenyeah, I guess ETOOLRG could be misunderstood
18:24:19ddubI think I got a spam about that
18:25:03dbussinkddub: wasn't that ETOOSML?
18:26:00brixenhaha
18:27:13ddubreally odd re: bigdecimal
18:29:37ddubbrixen: could this test be wrong?
18:29:54ddubI'm curious because when the word size is 64, I would expect the number to be more accurate, not less
18:33:59brixenddub: it could be wrong, yes
18:34:07brixenit merely states what MRI does
18:42:05dbussinkddub: seeing a bigdecimal failure? (i'm having it too_
18:47:20ddubdbussink: yeah, seems 64 bit only
18:47:46luislavenahey guys
18:47:48luislavename again :)
18:48:04luislavenadid someone made progress on the configure/build tasks?
18:54:03brixenhey luislavena
18:54:15brixenyeah, I reworked the C ext compiling
18:54:33brixenI looked at rake-compiler, but not sure I understood how to use it correctly
18:54:42brixenappears to work still with mkmf and extconf files
18:54:59brixenwhile I would like to see mkmf.rb disappear from the face of the universe
18:55:21luislavenabrixen: if you need anything on rake-compiler front, shoot me an email
18:55:35luislavenabrixen: was thinking on rbx complete building process, not just the C ext part.
18:55:42brixenah sure
18:55:56brixenwell, we are piece by piece improving it
18:56:03brixenno longer requires ParseTree
18:56:18brixenwe have a custom dependency grapher
18:56:23brixena configure script
18:56:32brixenand I'm working on improving the rakefiles
18:57:09brixenI'd really like to take a shot at cross-compiling rbx for windows using your setup in rake-compiler
18:57:19brixenbut so far, that's just on my wish list
18:58:17ddubis there an eventual goal to be able to build rubinius without having another ruby implementation present?
18:58:29ddub(a Rakefile based build system conflicts with that obviously)
18:59:24brixenyes
18:59:26luislavenabrixen: well, working in the cross port system stuff...
18:59:27brixenand no it doesn't
18:59:33brixenrbx will be able to bootstrap rbx
18:59:50brixenluislavena: ok, cool
19:00:15brixenluislavena: I'll look at what you've got and see where we need to fix stuff
19:00:38brixenluislavena: we've been steadily reducing the deps in rbx, so hopefully it will compile without too much trouble
19:01:48luislavenabrixen: wanted to take a look again since we completed the RC1 milestone... and now getting 1.9.2dev build
19:01:55brixenddub: the goal is to 1. build rbx with mri, 2. build rbx with rbx, 3. have binary distros, 4. goto 2
19:02:27brixenluislavena: sure, were you looking at cross-compile or compile directly on windows?
19:03:00luislavenabrixen: first compile directly, to know the issues first hand. then cross-compile will be more easier.
19:03:08brixenok
19:03:18brixenthe reverse would probably be easier for me :)
19:03:32brixenI haven't compiled anything on windows since about '02
19:03:53brixenluislavena: just let us know if you have issues
19:04:01brixener rather, what the issues are :)
19:04:03luislavenabrixen: well, both can be done pretty easily, will keep you posted :)
19:04:09brixenexcellent
19:04:12brixenthanks!
20:22:16dbussinkbrixen: rspec is actually starting to work too now :)
20:22:25dbussinkbrixen: i can run projects with rspec specs :
20:22:26dbussink:)
20:22:34dbussinkrun the specs that is
20:39:51brixendbussink: that's awesome :)
20:40:00brixendbussink: we're fixing the frozen issue too
20:40:16dbussinkbrixen: seems something is still up with pending things though, looking into it a bit
20:40:23dbussinkbrixen: ah cool
20:40:34dbussinkbrixen: guess there are no optparse specs then ;)
20:40:54brixenguess not
20:41:27brixenfood, bbiab...
20:44:52dbussinkbrixen: i've abstracted a funny case for you :)
20:48:25dbussinkbrixen: http://github.com/evanphx/rubinius/issues/#issue/72
21:01:36evanso, Go's interfaces are duck type interfaces.
21:01:39evanthats pretty cool.
21:15:51scottI really like what they do with the methods on structs
21:17:24benschwarzevan: Any thing in particular that you want to see for the MO?
21:17:45benschwarzI got a $100 donation last night
21:17:53evanwoo!
21:18:10evansmoking a cigar
21:18:20evanmaybe in a pool, with a drink
21:18:32evanthose are seperate
21:18:40evanin a hat.
21:20:30boyscoutPort fnmatch over from MRI 1.8.7 - 6a529fd - Evan Phoenix
21:20:30boyscoutUpdate File tags - 12339de - Evan Phoenix
21:27:07boyscoutCI: 12339de success. 3002 files, 11416 examples, 35482 expectations, 0 failures, 0 errors
21:27:56brixenevan: could you fix frozen? can't run gem under rbx because optparse fails
21:28:03evanoops
21:28:04evanok
21:33:31boyscoutUse extend rather than changing the class to freeze an Array - dd361f7 - Evan Phoenix
21:33:47evanok
21:33:57evangem runs now.
21:34:08brixenheh, nice
21:35:22boyscoutCI: dd361f7 success. 3002 files, 11416 examples, 35482 expectations, 0 failures, 0 errors
21:35:57brixenevan: working on rake install
21:36:22brixenevan: I think the GC needs some abstraction around the config and triggers
21:36:32evanhow so?
21:36:52brixenwell, like the static values for immix parameters could be a config object, no?
21:36:58brixentwiddled by -X flags
21:37:07brixen-Xgc.chunk_size=N
21:37:21evansure.
21:37:24brixenand in OM, a trigger object like immix uses
21:37:39evanah, for when stuff happens. sure.
21:37:45brixenlike om->trigger()->bytes_malloced() or something
21:37:50evanmmm
21:37:55evandon't go overboard on them though.
21:37:57brixenI was just unsure where to start adding this stuff
21:38:04brixenyeah, I didn't want to
21:38:07evanthat works in immix largely because it's passed in as a template
21:38:13brixenk
21:38:21evanwhich means it gets flattened out to be a simple code sequence
21:38:35brixenmakes sense
21:38:47brixenwell, I figured I'd put the bug in your ear
21:39:04brixenit would be good to encapsulate it a bit better I think
21:39:09evank
21:39:13evani think you're right
21:39:16evansomething in there would be good.
21:39:19brixenI end up looking in like 5 files going "where is this"
21:39:19evanlet me think about it.
21:39:22brixenk
22:07:20boyscoutAdd generation lifetime autotuning - f080f9a - Evan Phoenix
22:07:31evana quick test shows it working
22:07:44evanwe'll need to try it out in different scenarios to see if the logic is what we want
22:07:49evanit's fairly "soft" now
22:08:01evanmeaning that it adjusts the lifetime nicely
22:09:30brixensweet!
22:10:06evanoh hm.
22:10:10evani missed something in the logic.
22:10:29evanactually, no, it's fine.
22:10:37boyscoutCI: f080f9a success. 3002 files, 11416 examples, 35482 expectations, 0 failures, 0 errors
22:10:45evanif, say, your filled over 95% 3 times in a row
22:10:50evanthe lifetime is decremented
22:11:02evanif the next is also 95%, lifetime is decremented again
22:11:15brixenahh, down to the base limit
22:11:16evanso basically it forces a warm up period of GC behavior
22:11:20brixenthat makes sense
22:11:42evanthe threshold starts at 0
22:11:46evanoverfull? threshold++
22:11:51evanunderfull? threshold--
22:12:08evannorminal? Adjust threshold towards 0 by one
22:12:46evanthreshold == 0? adjust lifetime towards original lifetime by 1
22:13:14evanso it tries to "right the ship"
22:13:30evanwhich seems pretty good.
22:14:00brixenreads
22:15:21brixeninteresting
22:15:46brixenso the tune_threshold acts like a counter-balance almost
22:16:02brixena damper
22:16:13brixenkeeps the occupancy from thrashing the tuner
22:18:55evanright
22:19:25evanany and return to normality adjusts the tune_threshold
22:19:41brixenneat
22:20:00evanwhen the threshold itself has normalized
22:20:01brixenyou should really start picking titles for these academic papers you need to write
22:20:06evanthen the lifetime is normalized
22:20:10brixenone on the jit, one on the gc...
22:20:11evanhah
22:20:17brixenI'll think of some more ;)
22:21:44brixenwe probably need to fix super in a define_method block soon
22:21:56brixenI'm sure some rails apps will hit that
22:22:09brixenI'm surprised LazyArray didn't
22:22:24brixenLazyArray == grab bag of ewww
22:22:36evanyeah
22:22:39evani was just thinking that.
22:22:43evani'll just do it now.
22:23:03brixenI'm fixing def f(*) super end now
22:23:06brixendbussink: hit that
22:23:11evanah
22:23:14evanthe * with no name
22:23:18brixenyeah
22:23:20evanyeah, we need to fix that
22:23:22brixenI missed that
22:23:30evanthere are 2 things with that
22:23:32evanactually
22:23:35evanoh oh
22:23:35evanyeah
22:23:37evanyou're doing the super case
22:23:38evangotcha
22:23:40brixenyeah
22:23:42evanyeah, i used a hidden local
22:23:44brixenthere were no specs
22:23:48brixenyeah, works fine
22:23:51brixentiny patch
22:24:07brixenunless you want to do it a different way
22:24:32evannope
22:24:33evanthats fine.
22:24:43brixenk
22:24:43evanwhat would be rad though
22:24:52evanalthough not necessary
22:25:00evanis only emit the hidden local if super is used
22:25:03evanso that
22:25:06evandef f(*); end
22:25:12evandoesn't use the hidden local
22:25:17brixenok
22:25:27evanthe reason for that is we don't have to allocate the Array then
22:25:36brixengotcha
22:25:47evanthats a nice to have
22:25:53evannot necessary right now though.
22:26:13brixenyeah, I'd have to think a bit on it
22:26:16brixenI'll push this
22:26:18evank
22:27:07slavayo
22:27:26evanhey slavs
22:28:23brixenslava: hey, do you keep download stats on factor binaries?
22:29:45slavabrixen: no, but there's probably been 3 downloads in the last 2 years or something
22:29:57brixenheh
22:30:00brixenoh c'mon
22:30:15brixenI downloaded os x 32bit this morning
22:30:19slavaI have logs on the dreamhost that hosts the downloads
22:30:20slavadoes it work?
22:30:23brixenyep
22:30:26brixenit's slick
22:30:36brixenyou've done so much to the gui in a year
22:31:17slavaI'll try to find a way to analyze the logs
22:31:30brixenslava: oh, but gc-stats. gets a stack underflow
22:31:45brixenif I invoke it right off in the listener
22:31:51slavabrixen: the new gc stuff hasn't made its way through the build farm yet, because of crash bugs
22:31:57brixenahh ok
22:32:08slavaI'm going to be working on those today
22:32:15brixencool
22:32:45evanslava: did ya see I just commited generational age autotuning?
22:32:54slavaevan: no, what's that?
22:33:11evanusing some stat data to see if the young GC is starting to thrash
22:33:16evanif so, it lowers the lifetime
22:33:20evanso it promotes earlier
22:33:23slavaoh, cool
22:33:26evanto try and eliminate the thrash
22:33:33slavaany perf boost?
22:33:35evanand if there isn't enough surviving
22:33:39evanit raises the lifetime
22:33:50evannot sure yet on the perf change
22:33:57evanjust commited the initial attempt
22:34:00evanit's pretty simple.
22:34:12evanbrixen was going to run some GC benchmarks for me :)
22:34:13brixenevan: I'll run the stats
22:34:20brixenheh
22:34:26slavalet me know how it turns out
22:34:35slavagenerational policy is still black magic to me
22:34:39brixengc benchmarks == running full CI compiling
22:34:47brixenslava: http://gist.github.com/231803
22:34:52evanit's black magic to everyone.
22:34:57brixenthat's some experimenting I was doing last night
22:35:16brixenslava: you can see quite a bit of improvement relative to total objects copied
22:35:31brixenand the behavior of immix
22:36:55slavabrixen: how do you do nanosecond timing?
22:37:13evanslava: vm/util/timing.hpp
22:37:22slavaI'll check it out, thanks
22:37:35evanoh, nm
22:37:38evanvm/instruments/timing.hpp
22:37:52brixenslava: yeah, check out all of vm/instruments/
22:37:57brixenthere's some fun stuff
22:39:07evanwell, thats dumb.
22:39:17evanyou can pass a Method object to define_method
22:39:27brixenheh
22:39:32evanbut it actually treats it like an UnboundMethod
22:39:37evani guess thats fine.
22:39:41evanjust... kinda bleh.
22:39:47brixenyeah
22:56:39brixenhmm, well this is a mess
22:56:52brixenFile.umask 2**30 is failing
22:57:08brixenbut investigating a bit, the mess appears
22:57:24brixensee eg line 147 of kernel/common/file.rb
22:57:31brixenand the comment above it
22:58:55evanfun.
22:59:03evansorry about that
22:59:12evani updated all file tags and that one slipped in
22:59:17brixenthat's ok
22:59:18evanfeel free to retag it.
22:59:20brixenwe need to fix it
22:59:33evanwhats the failure?
22:59:37brixenso, basically, mri ignores values > 2**16 for mode_t
22:59:44brixencheck out that line in the file
22:59:47evanright
22:59:48evanyep
22:59:49evani see it
22:59:54evanso 2**30 becomes 0
22:59:57brixenbut we don't do that for umask
23:00:16evanah
23:00:17brixenbut we also shouldn't litter file.rb with these
23:00:18evanwe should
23:00:32evanadd a mode_clamp or something method
23:00:32brixenis there a better place to do this clamping?
23:00:48brixenshould we do it on mode_t types in the FFI layer?
23:01:05evanwell, it would have the same problem MRI does
23:01:12evanit would give you the random low bits
23:01:56brixenhm
23:02:41brixenok, well a private #clamp_mode is a simple fix
23:02:59brixenwell, maybe not private
23:03:21evanseems like this code should be coercing the argument anyway
23:03:30evanso we should have a single method that uses Type.coerce_to
23:03:32evanand then clamps it
23:03:35evanand returns the value
23:03:38brixenmakes sense
23:16:31brixenwell that was a total github fail
23:16:38evaneh?
23:16:40brixenlost my edit to a gist
23:16:48evanoop.s
23:16:53brixenbut, since they are just git repos, I fixed it!
23:16:54brixenhttp://gist.github.com/231803
23:17:02brixenupdate with stats from autotuning
23:17:41brixengithub actually overwrote a file even though I added a new file and gave it a totally different name
23:17:57brixenanyway, manually worked
23:18:32brixenso, just with the autotuning, young gen performed better
23:19:12brixen244M copied vs 394M
23:19:31brixenbut maybe the damper is a little too dampening?
23:20:28brixencould add config vars for over/under times
23:20:52evanyep
23:20:56evanthis is just a rough cut
23:20:58evanto let us play with it.
23:21:02brixenyeah
23:21:05brixenit works!
23:22:15evansuccess!
23:22:17evanso yeah
23:22:28evanfeel free to go in there and play around with that logic
23:22:35evanmove some of those things out to config vars
23:22:36evanetc.
23:23:47brixenk
23:35:48jvoorhisso i heard you guys plan to edit the FFI api a little bit
23:36:35jvoorhiswhat changes were you planning to make? i have some FFI libs and it would be cool if i could support more than just MRI
23:37:01evanalready did it
23:37:28jvoorhiswhat did you remove?
23:37:28evanattached methods are available as public class methods and private instance methods
23:37:42evanso you can include a module and call the FFI attached methods
23:37:45evani added something.
23:37:58jvoorhiscool, that's convenient
23:38:23evanthere are parts of ruby-ffi i'm not happy with
23:38:33jvoorhisbrixen mentioned some possible changes to Pointer
23:38:38evanlike, i'm not happy with the requirement of using finalizers with AutoPointer
23:38:40evanthats bad news.
23:39:24jvoorhisi like AutoPointer in principle, but it's pretty unpredictable
23:39:32evanthats because of the finalizers.
23:39:46evanit's not a robust solution for managing external cleanup.
23:40:12evanAutoPointer originally just free'd the pointer
23:40:46evanbut it got extended to do too much.
23:40:54jvoorhisi've been using it to call DisposeBlah()-style functions, but i'm not too happy with it
23:41:11evaneven free'ing pointers is really the way to go
23:41:48brixenjvoorhis: I showed evan your llvm ffi bindings
23:42:33jvoorhisi really want a way to create a lib that frees the user from having to interact directly with ffi, including that sort of cleanup
23:42:51evanok
23:42:56evanthats exactly the way FFI is meant to be used
23:43:13evanthe idea was never that you pass out FFI::Structs and such.
23:43:22jvoorhisyeah, exactly
23:43:30brixenevan: oh! here's a 10.6.2 build of llvm that brianmario built
23:43:31brixenhttp://files.me.com/brianmario/oggrb4
23:43:37brixenpassword is "rubinius"
23:43:40evank
23:43:43brianmariooh
23:43:44brianmariosec
23:43:44brianmariol)
23:43:46brianmario;)
23:43:55brianmariotook it down cause i was gonna throw it up on my webserver
23:44:03evanjvoorhis: for cleanup, the best is to use a begin;ensure wrapper around the operations
23:44:08evanand force the user to go through that.
23:44:25evanfor mass cleanup of resources
23:44:35brianmariohttp://sharpercoding.com/projects/rubinius/llvm-x86_64-apple-darwin10.2.0.tar.bz2
23:44:38evani'll probably add a Pool class
23:44:41jvoorhisevan: what about something you'll hold onto for a while? like an LLVM Context for example
23:44:48brianmariothat password thing on my idisk was retarded
23:44:59evanjvoorhis: for something like that you probably don't ever need to clean it up.
23:45:11evanbut if you do, you should require the user call a method when they're done with it.
23:45:25evanthat does expose some cleanup logic, i know.
23:45:33evanwhich is why people use AutoPointer
23:45:52jvoorhisevan: so you would just define #dispose whenever it's needed? and maybe freeze it?
23:46:11evanfreeze is nothing
23:46:15evanfreeze means shit.
23:46:28jvoorhisok :)
23:46:44evani don't get why people think freeze is the answer to any question
23:46:44evananyways.
23:46:49evanNOT talknig about freeze
23:47:00evanthe context is an external resource
23:47:14evanso either you force them to call a #dispose method when they're done
23:47:22evanor you wrap usage in a begin;ensure
23:47:23jvoorhisit communicates something – it says "don't touch me!" :) but yeah, it won't enforce anything
23:47:34evanit doesn't communicate that though.
23:47:39evanin my mind.
23:47:40evananyway.
23:47:41jvoorhisnot very effectively
23:48:02jvoorhisevan: but those patterns sound right to me, now that i think about it
23:48:12jvoorhisone thing i really did like about the FFI api is #to_ptr
23:48:24evanthats not me
23:48:28evanthis is the problem with the API
23:48:38evanwayne went off and added a shitton of stuff
23:48:43evanand never really synced it up with rubinius
23:48:52evanhe did both the jruby and mri versions
23:48:56jvoorhisright
23:49:03evanbut didn't really run anything by me
23:49:07evanso it's a mess.
23:49:17evanand there are hundreds of unimplemneted behaviors
23:49:19jvoorhisyeah, and underdocumented and somewhat opaque
23:49:38evanit's not wayne's fault
23:49:43evani didn't have time to push back
23:49:48evanbut it needs to be fixed soon.
23:50:04jvoorhisare you unhappy with #to_ptr?
23:50:35evanno, it's fine
23:50:40evanbut i honestly don't even know what it is.
23:50:45evanthis is the first i'm hearing of it
23:50:46evanwhich is a problem.
23:50:49jvoorhisyeah
23:51:23jvoorhisbasically, you can substitute any object that implements #to_ptr for an FFI::Pointer in calls to attached methods
23:51:50evanright, it's a coerce.
23:51:56jvoorhisexactly
23:51:57evani'm not a huge fan of that
23:52:06evanbecause now you have to check and call back into ruby code
23:52:08evanat any point.
23:52:20evanif you want to coerce
23:52:25evanyou should be wrapping the attached method
23:52:29evanand doing the coerce there.
23:52:42brixenyeah, that's pushing too much under the covers of FFI
23:52:49brixenFFI is supposed to be *thin*
23:52:55jvoorhisright
23:52:56evanyes, razor thin.
23:53:08evanbecause it's supposed to be fast
23:53:15evanthe more it's burdoned with coercions
23:53:17evanthe slower it gets.
23:53:45jvoorhisthe wrapper is still really convenient
23:54:10evanregardless
23:54:16evani don't think it's FFI's business to do it.
23:54:50evana big reason for me pushing back on that kind of thing is the simplicity of the FFI dispatch
23:55:00evanfor most of the life of the FFI impl. in rbx
23:55:06evanthere was no way for it to call back into ruby
23:55:16evanbecause it's implemented as a leaf primitive
23:55:20evanwhich can't call back into ruby code.
23:55:30evana big restriction, but one that keeps everything fast and sane.
23:55:53evanthats the reason we don't support callbacks
23:56:31jvoorhisare there plans to?
23:56:46evanit's on the list
23:57:03jvoorhisand i didn't realize attach_function was the primitive – i assumed it would be a wrapper to a primitive
23:57:04evanbut i'm hoping i don't have to dit
23:57:09evani'm hoping that some interested in FFI helps.
23:57:23evanno
23:57:25evanattach_function isn't
23:57:37evanbut when you call the attached function itself
23:57:41evanthats a primitive
23:57:46evanand it's at that point that #to_ptr is called
23:57:47evani'm assuming
23:57:53jvoorhissorry, i was conflating the two
23:57:56evani don't know why you'd pass a pointer to attach_function
23:58:05jvoorhisno, you wouldn't
23:58:11jvoorhisi meant attach_function-generated methods
23:59:03evanright
23:59:08evansee, in RBX
23:59:13evanthose are very, very fast.
23:59:21evanbecause they're extremely thin
23:59:33evanthey perform the data conversions
23:59:39evanand call out
23:59:45evanand they can be inlined by the JIT
23:59:53evanwhich makes them as fast as calling a C function directly