Index

Show enters and exits. Hide enters and exits.

00:10:06slavaevan: no more LLVMWorkhorse? :(
00:10:16evanhehe
00:10:16evannope
00:10:33evanrefactored it into better pieces
00:50:15boyscoutMake sure SHA1 is available. Fixes #92. - e568524 - Evan Phoenix
00:50:15boyscoutdefined?(super) support, served with a side of crow. Fixes #100. - 90d6311 - Evan Phoenix
00:50:15boyscoutUnmask defined?(super) specs for rubinius - 4b8eb15 - Evan Phoenix
00:50:24evanto understand that 2nd commit
00:50:30evanyou have to read the diff of the 3rd
00:50:48brixenhmm
00:51:40evanspecificly, the comment I deleted
00:51:47brixenpulling...
00:53:03brixenhm ok, I will sync rubyspec probably tomorrow
00:53:04boyscoutCI: 4b8eb15 success. 3005 files, 11483 examples, 35626 expectations, 0 failures, 0 errors
00:53:08evank
00:53:35evani need to write a spec i'm dreading
00:53:55evanclass A < B; define_method(:foo) { defined?(super) }; end
00:54:06brixenugh
00:58:12evanhey!
00:58:17evanthe define_method one works!
00:58:22evanthats..
00:58:22evanwow.
00:58:26evana miracle.
00:58:33evanbut i did find a breakage
01:02:02justin-georgewow, that's a pretty twisted line of code. awesome stuff.
01:03:29evanheh
01:07:22brixenevan: @todo: discuss how to set up an offline CI that does stuff like configure for install, check preinstalled gems, etc
01:07:35evan10-4
01:07:44brixenohh
01:07:54brixenwe should have boyscout track @todo's in channel
01:07:59brixenand make us a list! :)
01:08:13evanwe could certainly do that
01:08:20brixenhey, what about @issues too
01:08:40brixenlike @issue: It doesn't work: http://gist.github.com/xxx
01:08:40seydarboyscouts are supposed to be good at organization
01:08:46brixenseydar!!!!
01:08:49seydarso this could be the equivalent of his eagle project
01:08:49brixenlurker!!
01:08:56seydarbrixen!!!!!
01:09:20brixenhow's amp going?
01:09:48seydarswimmingly. i'm in a licensing debate with mpm of mercurial, but we're knocking off some good bugs in amp while we're at it
01:09:59brixennice!
01:10:06brixendid you get it running on rbx?
01:10:32seydari still can't find the IP of my linux box. like it was sitting right next to me, but i don't know its IP
01:10:49seydarbut once i do, i will inform you of its results
01:10:53brixenum, do you have a terminal hooked up?
01:10:54justin-georgethat's better than being able to ping it, but not knowing where it physically is.
01:11:04brixenjustin-george: heh
01:11:21justin-george"I know it's connected to this switch... hmmm"
01:11:47brixenjustin-george: isn't that when you just start powercycling and pinging iteratively? :)
01:12:02justin-georgeyeah I'm sure the customers would be *thrilled*.
01:12:06brixenheh
01:12:12brixenoh customers..
01:25:05boyscoutFix a few defined?(super) edge cases - 3f371a3 - Evan Phoenix
01:25:05boyscoutMore defined?(super) specs - e468c99 - Evan Phoenix
01:25:33evanthats pretty thorough
01:25:40evanchecks all edge cases I could think of
01:25:48seydarthis deserves to be retold. mcilroy just said "ceci n'est pas une |"
01:25:55evanin a block, in a define_method, in a block in a define_method
01:26:06evanhah
01:27:52boyscoutCI: e468c99 success. 3005 files, 11489 examples, 35632 expectations, 0 failures, 0 errors
01:29:29evanhello brian.
01:32:58brianmarioyo
01:39:39brianmarioevan: you ever go to the github meetups?
01:39:48evanwhen i'm in SF, yes.
01:39:57brianmariooh yeah :P
01:40:01brianmarioforgot your in LA, yeah?
01:40:09evanyep
01:47:12brixenheh, I think I made configure --show for myself, I use it all the time
01:47:52boyscoutChanged require paths for compiler to avoid RUBYOPT complications. - 771381c - Brian Ford
01:47:52boyscoutEnsure kernel is recompiled after compiler changes. - d60fc51 - Brian Ford
01:47:52boyscoutFixed installing pre-installed gems. - ae4b893 - Brian Ford
01:48:14brixenevan: that should fix the recompile kernel if compiler is changed issue, but not recompile .rbc's in general
01:48:23brixenthe signature check will fix that
01:48:28brixencoming up...
01:48:39evan10-4
01:48:51brixenand install is fixed for pre-installed gems
01:49:02brixenwe really need to get something in CI though
01:49:24brixensince I discovered by accident it was broken...
01:50:30brixensnap snap boyscout, geez
01:50:47boyscoutCI: ae4b893 success. 3005 files, 11489 examples, 35632 expectations, 0 failures, 0 errors
01:50:53brixenty
03:53:28evanman the openssl extension has a shitton of compiler warnings.
03:53:37evanones that I didn't create.
08:13:29brixenpretty funny in this readme where it says you aren't allowed to override a class's .name method http://github.com/superchris/rubyjs
08:13:45brixen"But you wouldn't do that anyways in Ruby,
08:13:53brixenso that's no big restriction!"
08:13:58brixenheh
08:15:33brixenwe definitely need a js backend for llvm
08:16:03brixenhmm, ohh someone has worked on that
08:21:46evanhehe
08:24:21evanbrixen: if you wanna try your hand at it
08:24:29evanthe Marshal code for dealing with Floats needs some math love.
08:24:39evanthere is some code to save the mantissa
08:24:43evanthats been ported from MRI
08:24:46evanthat doesn't work
08:37:16brixenok
08:37:50evani'm poking at OpenSSL
08:38:01evangoing to work on that a little more tomorrow
08:38:05evanit's terribly tedious though.
08:38:15evanso on a Friday, I might get distracted :)
08:47:39evanthere also needs to be a long term project to reformat and review all of the openssl extension
08:47:51evanit needs to be cleaned up and modernized.
08:47:53evanit's a mess.
08:52:20dbussinkbrixen: could it be that kernel/bootstrap/rubinius_config.rb and kernel/bootstrap/ruby_config.rb should be added to the gitignore?
08:53:19brixendbussink: no, they should not
08:53:25brixenthey should be deleted
08:53:57dbussinkbrixen: ah ok
08:54:08brixengit clean or something
08:54:24brixengoes to sleep
08:58:36dbussinkevan: nice to see that the ci is a bunch faster now again :)
09:54:24ruedbussink: I noticed those two too, but they do not exist anymore :)
09:57:35dbussinkrue: yeah, i removed them and they didn't came back, so that's a good thing then :)
09:57:37rueHrm. The compiler being in lib/ is kind of awkward but I suppose the workarounds are not too bad
15:15:08rueApplying the patches from the ML if they work out...
15:15:19rueLooks the first could also use changes on the Ruby side
16:02:31dwaitegood morning
16:17:21rueYou are WAY late
16:22:06jammigood morning, it's 18.22 here and I just woke up :)
16:22:23rueArgh, damn it I hate git-am failure not aborting it :/
16:39:36boyscoutTry handling negative indexes in Array#aset (Michael Neumann.) - f2b9fe5 - Eero Saynatkari
16:39:36boyscoutImprove Array resizing with Tuple shifting (Michael Neumann.) - d56b6a1 - Eero Saynatkari
16:39:36boyscoutModify Tuple::lshift_inplace() slightly. - a9ed65b - Eero Saynatkari
16:44:59boyscoutCI: a9ed65b success. 3005 files, 11489 examples, 35632 expectations, 0 failures, 0 errors
17:24:08evanhm.
17:24:22evani'm thinking that capi implemented methods need to show up in the backtrace.
17:24:27evanit's confusing without them there
17:24:33evansince we show everything else
17:32:01rueYes, they should
17:34:45brixenyes, that would be nice
17:35:25brixenrue: what issues are you having with compiler in lib?
17:36:40evanrad.
17:36:44evanopenssl is working.
17:37:00evanjust encrypted and decrypted some text
17:38:30ruebrixen: It is too tightly required (coupled is not really a good word here) with the kernel to not be in kernel
17:38:44rueRequired by...
17:38:49brixenevan: woot!
17:39:10brixenrue: I disagree...
17:39:15evanrue: it's used by MRI just fine
17:39:19evanand MRI doesn't have the kernel.
17:40:37brixenevan: could you elaborate on the Float marshal issue, it was ported from MRI but doesn't work?
17:40:42brixenI don't follow
17:40:47brixenare there failing specs?
17:40:54evanyes
17:40:58evanyou'll see if you check them out
17:41:08evanbasically, jroach tried to port the mantissa saving code from MRI
17:41:10evanbut never got it working.
17:41:21evanif you check out the code in MRI
17:41:25evanyou'll notice it's a direct port
17:41:36evanhe FFI'd in all the relevent float manip functions to try and make it work
17:41:38evanbut it doesn't work.
17:42:16brixenok
17:42:35slavahi guys
17:44:55ruebrixen: Does the kernel work without a compiler?
17:45:38brixenrue: yes
17:45:49rueThen we should not need to rebuild it if the compiler changes
17:45:55brixenor it will soon as I rewrite #require
17:46:04brixenthose are 2 totally different things
17:46:12brixendefine "work"
17:46:36brixenmy definition, kernel runs fine without a compiler with the necessary prereqs
17:46:46brixenI've written a bridge to run hash, array in MRI before
17:47:03brixenin rbx, kernel runs fine from the rbc's without a compiler
17:47:04rueIs there anything else in lib/ that is used by kernel?
17:47:14brixenwhat does that matter?
17:47:26brixenwhy is that a relevant criteria for you undefined "work"?
17:48:45evanthe rebuild on complier changes has nothing to do with the kernel using the compiler
17:48:48evanthats just a convience
17:48:53brixenoh, and we never compile the kernel inside rbx anyway, as it is running
17:48:56evanbecause often the compiler changes the bytecode being emitted
17:49:06evanand you want to be sure you get everything using the new bytecode
17:49:24rueWhat about mixing old and new bytecode?
17:49:33evanthere is no such thing.
17:49:44evanI misspoke
17:49:59evanby new bytecode i mean "fixes a bug in the compiler"
17:50:19evana new pattern
17:50:25evana fix
17:50:39evanthe old pattern runs fine, but in that case, it would probably be buggy
17:50:42evanthus the change.
17:52:19rueBy and large, I would formulate the objection such that nothing in lib/ should be required for kernel to run. Perhaps that is fulfilled, it just does not feel quite right.
17:52:41evanand i'd say that is currently true.
17:55:06evanyour comments have been taken into account
17:55:15evanbrixen and I talked through this earlier this week
17:55:24evanhe made a good case for having it in lib
17:55:38evanand it's not that big of a deal
17:55:42evanso we're going to stick with that for now.
18:02:26evanoh openssl.
18:02:30evanyou're so crazy.
18:12:34dwaitewhats up with openssl evan?
18:12:52evanthe code is just crazy.
18:12:58evanand it should be conservative.
18:13:30rueAh, I was not aware this was already discussed
18:13:31dwaiteit was a long road to 1.0.0
18:13:39dwaitewith lots of casualties
18:16:33evanthere are tons of warnings and such
18:16:41evanfor a library thats focused on security
18:16:44evanit worries me.
18:16:57evanbut it's still the most complete impl.
18:17:02evanso we'll do what we do.
18:17:04evanmake it better.
18:19:51rueOpenSSL itself, or the rather questionable bindings thereof?
18:20:02evanhehe
18:20:04evanwell really both
18:20:08evanbut in this case, the bindings.
18:20:35rueI think Jamis was actually on here one day asking about SSL
18:20:40evanhe was
18:20:44evanthats why i'm working on it.
18:20:55evana ticket was entered for it
18:21:29rueAh
18:21:48rueThought he might have been feeling up for redoing it himself
18:21:58evanwe discussed that at rubyconf
18:22:04evanneither of us have time to reimplement it
18:22:18evanand since capi is getting really complete
18:22:29evani figured we'd try and see about using the existing one
18:22:32evanit's going well
18:22:42evanfleshing out things we haven't done yet in capi
18:22:46evanlike rb_call_super :)
18:30:50rueWhat is the thought on exposing an rbx extension API? Just enforcing FFI is of course an option for most things
18:33:56evanrue: i've thought about it a few times
18:34:04evanwe're actually sort of moving that direction already
18:34:14evanin that capi is a superset of MRI's functionality
18:34:27evanwe provide functions for things that people have to dig around for normally
18:41:10rueYes, but the MRI API is terrible...I would not want to force it on anyone writing a new extension.
18:41:31rueJust exposing one is not terribly tricky, if it seems like a good idea to do so
18:41:47evanit's mainly a question of what it would look like.
20:11:13justin-georgea new design pattern: instead of a new object, just use a big case statement.
20:13:07rueSounds brilliant
20:13:30justin-georgeone giant method becomes a new object and a 'Object.new.send(key)'
20:14:20scooprdesign pattern or anti-pattern? :P
20:14:57justin-georgethis file had 1800 flog. anti-pattern.
20:15:51justin-george(side note: since rubinius produces low-level compiled instructions, one can estimate the complexity of a file by looking at the .rbc with wc -l)
20:24:46evanjustin-george: are you refering to code in rubinius?
20:26:01justin-georgeno, I am not, but I was using rubinius as a sort of a poor man's flog
20:26:27evanaah
20:26:28evangotcha.
20:28:11scoopraah, how about rb/rbc ratio as a 'compression' ratio :P
20:38:53agardinerhmm... is the doc regarding the specs organisation out of date, or am I just missing the spec/ruby directory?
20:50:26evanagardiner: out of date it sounds like.
20:51:23agardinerhey evan!
20:51:41evanhey hey!
20:51:45agardinerso, what's the procedure now for updating a ruby spec?
20:51:56evanbrixen was going to sync them today
20:52:04evanso you can either change it in frozen if it's minor
20:52:10evanor you just change it in rubyspec
20:52:15evanand we'll pick it up on the sync
20:52:36agardinerah, ok - so the sync is two-way, not just rubyspec->frozen.
20:52:43evanyep
20:52:47agardinercoolio
20:52:56evanbut be sure to do any commits to frozen in their own commit
20:53:05agardineryeah, will do
21:34:47boyscoutAdd examples for String#% with string args - 7f55db4 - Adam Gardiner
21:34:47boyscoutFix String#% with empty string arg - d9ea513 - Adam Gardiner
21:37:39boyscoutCI: d9ea513 success. 3005 files, 11489 examples, 35634 expectations, 0 failures, 0 errors
22:00:22VVSizbrixen: ping?
22:04:41brixenVVSiz: sup yo?
22:05:07VVSizbrixen: hi there. I'm a bit confused about these commitss to spec/frozen in rbx repo
22:05:26VVSizi thought that you use rubyspecs directly without changes
22:05:30brixenwe do
22:05:34brixenbut ppl are lazy
22:05:39brixenso I try to make it easier
22:05:40evanme specificly
22:05:44brixenI merge back to rubyspec
22:05:45evanis lazy.
22:05:45VVSizahhh
22:05:49evanand brixen is awesome.
22:05:49brixenand then sync back here
22:05:52evanso he humors me.
22:05:59VVSizheheheheh
22:06:00brixenVVSiz: are you having a problem with somethingL
22:06:03brixen?
22:06:05VVSizbrixen is da man!
22:06:28VVSiznot really, I just noticed plenty of new specs in rbx's spec/frozen and was confused
22:06:49brixenyeah, there are about 20 some commits
22:07:01brixenI have to vett them and merge back
22:08:18VVSizsweet! if there are periodic sync-ups, then there is no problem at all ;)
22:09:22brixenyep, periodically
22:09:36brixenI didn't want to try to manage that before 1.0rc1 but I'll do it now
22:17:45rue*chomp, chomp* I will have eaten 7200kcal today
22:19:01evanyou going for a record?
22:19:17evanor are you trying to match the energy output of a food stove
22:19:28evanwood stove
22:19:29evanrather.
22:19:31rueTrying to avoid a grisly starvation
22:19:59evani do like in chemistry class when you convert kcal's to joules
22:20:06evanand joules to all kinds of fun things
22:20:44rueYes, I use J natively...what with this 'science' thing it works out nicely for Watts for example ;)
22:20:44brixenjoules sound so much sexier than kcalories
22:21:12evan"my sandwich is worth 10000 turns of a hamster wheel!"
22:21:15rueReally, kJ and kcal
22:21:36evansbryant``: is that real?!
22:21:41rueEasy rule of thumb, 1kcal = 4kJ and change
22:22:27brixenI've heard of sumo eating > 12-15k calories a day
22:22:55evanphelps was eating like 20k or something
22:22:58evanduring the olympics
22:23:14evanbut he was burning 18k or 19k per day
22:23:32evanthe 400 fly or something is like 3k calories to swim.
22:23:37evanat the pace they do.
22:23:46rueI think Phelps is around 12k
22:24:02evanit was a lot.
22:24:07rueEven the pro cyclists are not much more than 8-9k per race day
22:24:11evanbut he had zero delta
22:24:16evanbetween days
22:24:36ruesbryant``: For vastly shorter periods of time :)
22:25:35evanwell
22:25:40evanhe was doing like 5 races per day
22:25:51rueYeah
22:26:01evanand swiming like 3x the distance of the races per day
22:26:06evanto warm up and cool down
22:26:50rueYeah, I could see 10-13k or so at 0 delta
22:27:04evanyeah
22:27:10evani don't recall the exact numbers
22:27:22rueAlthough he could have been overstuffing a little, it does not matter that much for a relatively short period
22:27:35evanyeah
22:28:10rueStill, ways to go :)
22:28:43evanheh
22:30:44VVSizbrixen: am I doing something wrong?: http://pastie.org/728274 has just compiled rbx, and the tests during the build are OK. but standalone rubyspecs can't start
22:31:54brixenVVSiz: looks like stale rbc files
22:32:09brixenmake sure you rm all the .rbc files in that dir
22:32:29VVSizahhhhh, I *always* forget about those damn stale files
22:32:38agardinerhi brixen!
22:32:39brixenyeah, I'm fixing right now :/
22:32:43brixenagardiner!!!
22:32:46brixenhow goes man?
22:32:53agardinerwassup!
22:32:57agardiner:-)
22:33:05brixennuttin much :)
22:33:16brixenbeing harrassed by VVSiz, but what's new :D
22:34:22VVSizheheheh
22:34:36VVSizdo you guys ever run rubyspecs' optional/ffi?
22:34:58VVSizso far seems no-go with rbx
22:34:59brixenI haven't yet...
22:35:08brixenrbx ffi isn't quite the same
22:35:09agardinerso i'm trying to dig into the debugger again...
22:35:15brixenagardiner: sweet!
22:35:27brixenagardiner: I was wondering about using irb as the command shell for the debugger
22:35:33agardinerman, its such a long time since i touched it
22:35:38brixenagardiner: wycats was doing a nice refactoring of the irb code...
22:35:44evanVVSiz: ruby-ffi and jruby-ffi have strayed pretty far rom my original API
22:35:45agardineryeah, that might be cool
22:35:54evanand we haven't yet resolved the differences.
22:35:57justin-georgehttp://pastie.org/728281 any thoughts?
22:36:10brixenagardiner: I figured it'd be a nice way to integrate and save duplication
22:36:15VVSizevan: got it. but is there a hope? :) it would be pretty *sweet* to have the same FFI for MRI/JRuby/RBX
22:36:15evanjustin-george: wierd
22:36:17agardinerwhere does he find the time!?!
22:36:20evanjustin-george: run with --debug
22:36:23evansee if you get a backtrace
22:36:28justin-georgecan do
22:36:29brixenagardiner: so we could easily drop into the debugger whenever
22:36:29evanVVSiz: well, there was
22:36:38VVSizoh?
22:36:39evanimho, the rbx FFI API is the base level one
22:36:42evanthe original one
22:36:55evanthat ruby-ffi diverged is sad
22:37:05evanbecause it did not need to diverge alone
22:37:38justin-georgeno love, same message
22:37:43evanum
22:37:48evanhow do you get the backtrace from rubygems?
22:37:54agardineranyway, i'm trying to understand how the instruction.def stuff works now...
22:37:57evando you have to do that with the .gemrc?
22:38:05agardineri see that iseq.rb is gone
22:38:58brixenjustin-george: you could try bin/rbx --dl -S gem install rails
22:38:59justin-georgeevan: wait, I'm retarded, I need to update *everything* before I even talk more.
22:39:11evank
22:39:21brixenagardiner: you should check out instructions.def and the rake tasks in vm.rake
22:39:32brixenagardiner: everything is gen'd from instructions.def now
22:39:50brixenagardiner: rakelib/instruction_parser.rb
22:39:55agardineris there a ruby class gen'd, or is it all in the VM?
22:40:09brixenI just installed rails 2.3.5 btw
22:40:15brixenit was pretty damn fast...
22:40:36brixenagardiner: there's ruby structures created for the opcodes used by the compiler
22:41:02agardineryeah, that's what i'm looking for...
22:41:06brixenagardiner: look at instruction_parser.rb, it's really simple...
22:41:09agardinerthere used to be a flow attrib on iseq
22:41:32evanagardiner: yeah, we didn't know what it did
22:41:39VVSizevan: anything that needs to be done to resolve the FFI differences? this mismatch between the APIs is realy an unfortunate one
22:41:40agardinerah!
22:41:41evanso it got removed
22:41:43agardinerhehe
22:41:54agardineri used it to determine whether an opcode could branch or not
22:41:58evanVVSiz: ruby-ffi could conform back to the rbx API
22:42:02agardineri need that to know how to step
22:42:10VVSizheh
22:42:10evanbut that means removing features.
22:42:27evanthe long and short of it is that I think there needs to be a full stop on the FFI API
22:42:45evanall impls were really experiments on an idea
22:42:50evanwithout much direction of what was needed
22:42:55evanwe've got a better idea now
22:43:02evanso it might be time to break API compat for all
22:43:07evanand unify them.
22:43:19evanthere are a few things I was thinking about last night
22:43:25evanthat would cleanup a lot of things.
22:43:25brixenagardiner: so, one idea I had was annotations preceding the instruction def to add flags
22:43:40brixenagardiner: we were able to put everything we needed into the args and stack effect
22:43:49brixenagardiner: but feel free to experiment
22:44:23brixenagardiner: also, I was thinking about trying out Yard doc style for the opcode docs...
22:44:26brixenjust a thought
22:44:34VVSizevan: OK, got it. will keep watching where it goes
22:44:40evanVVSiz: the big thing is that ruby-ffi was making unilateral changes
22:44:53agardineri'm not familiar with Yard, so i don't have any thoughts on that... :-S
22:44:57evanand not contributing them back
22:45:01evanwhich caused the current situation.
22:45:41VVSizso, the "main" or "canonical" repo, where it should be? where to contribute back to?
22:46:02evanthats the thing
22:46:08VVSizmy understanding is that it should be http://wiki.github.com/ffi/ffi , no?
22:46:13evanwhy?
22:46:24evanagain, that was all setup unilaterally
22:46:38evantries to not show his frusteration with the ruby-ffi situation too much
22:46:51justin-georgeyou should poke them with pointy sticks.
22:46:56evanif anywhere is going to be canonical
22:47:08VVSizI understand, I just figuring this stuff out
22:47:08evanall implementers need to be explicited invited into it
22:47:13evanand there needs to be coordination.
22:47:23evanthats not what has occured thus far.
22:47:29evanthats no fault of anyone
22:47:37evani certainly didn't try and take the reigns of it
22:47:42evanI just wanted an FFI to use within rbx
22:48:07VVSizsometimes it is hard to move forward and at the same time to have everybody onboard and in agreement, yeah.
22:48:45evannow people expect that all the FFI impls have perfect sync
22:48:49evanbut that was never a goal
22:48:51VVSizbut it *is* useful for rbx to have unified FFI that can be used without changes in JRuby and MRI, right? Is that still a goal?
22:48:54evanif we want sync
22:48:56evanthen we have to work for it
22:48:59evanit doesn't come for free.
22:49:11evanif want it to be a goal
22:49:12evansure
22:49:22evanbut it has be defined as a goal!
22:49:26evanit hasn't been thus far.
22:49:32evanthats why everyone makes incompatible changes
22:50:14VVSizit is clearer now
22:50:43evanif you wanna help, i'd love that.
22:50:55evanwanna here my current take on the APIs themselves?
22:51:51VVSizevan: that would be nice, yeah. but maybe it needs to be in some more permanent format? like mail posting or something?
22:52:02VVSizor blog post
22:52:04evanwell, lets discuss
22:52:10evanthen we can write it up
22:52:16rueYespees
22:52:19evansbryant``: well, what additions
22:52:21evanso
22:52:28evanthere are WAY too many Pointer classes.
22:52:31evanruby-ffi has 4 of them
22:52:36evanand no one knows which to use
22:52:47evanactually, it has 6
22:53:00evanrbx FFI has one
22:53:00evanyes
22:53:05brixenVVSiz: the specs are at rubyspec/optional/ffi
22:53:13evansbryant``: go for it
22:53:20evansbryant``: adding callback support
22:53:25evanwe'll need that anyways
22:53:45evanso, I think there needs to be 2 pointer classes
22:53:51evanPointer and TypedPointer
22:54:02evanTypedPointer is a subclass of Pointer that knows the type of the thing pointed at
22:54:21evanyou can create a Pointer from a TypedPointer
22:55:03evanruby-ffi has an AutoPointer
22:55:08evanwhich needs to go entirely
22:55:41VVSizbut I don't see 6/4 different pointers in the API
22:55:47evanruby-ffi's AutoPointer lets you register cleanup
22:55:49VVSizMemoryPointer/AutoPointer
22:56:05evanVVSiz: Pointer, MemoryPointer, AutoPointer, NullPointer, Buffer, AbstractMemory
22:56:45evanAutoPointer's cleanup uses finalizers.
22:56:56evanit's way too unreliable to be used with C memory management.
22:57:13evanand it luls users into thinking that it is reliable 100% of the time
22:57:47evaneh?
22:58:06evanno
22:58:09evanbe more verbose
22:58:12evani don't know what you're commenting on.
22:58:34VVSizbut that AutoPointer is handy ;)
22:58:43evanbut it's wrong.
22:59:00evanno matter how handy it is
22:59:13evanautomatic cleanup of external resources can be done
22:59:17evanbut using finalizers is not the answer.
22:59:31evanI think the answer has to be managed cleanup pools
22:59:42evanwith a simple, clean API for users
23:00:30evanthat solves the fast majority of the use cases of AutoPointer
23:00:38evanand still gives you the nicity
23:01:38evanok, well i guess we'll have to discuss another time
23:01:46evanlooks like everyone has wandered off.
23:02:19VVSizI'm still here. :) Trying to figure out what is NullPointer, never used it, not seeing in the sources.
23:02:33evanwayne created it as a singleton
23:02:39evanto provide Pointer::NULL
23:02:44evanhe said he copied the java way of doing it
23:02:48evanbut it's needless
23:02:54evanit should be just removed
23:04:38VVSizOK, what I'm getting is that some sync-up is needed for sure :)
23:04:56evansome sync up, yes
23:05:03evanbut i disagree with the some APIs in ruby-ffi
23:05:24evanso thats a sticking point.
23:05:52rueIt would probably be better to just define a working API and then proffer that
23:08:00justin-georgereligious wars! 0_o
23:08:35evansomething that I really want to convey is that in my mind, FFI is a quite conservative API
23:08:52brixenand very very thin
23:08:55evanyes
23:08:57evanthe thinner the better.
23:09:09brixenmaybe we should try the documentation-driven approach to the api
23:09:17brixenjust write out the description of each method
23:09:29rueThe 'work' for a FFI extension should be done in Ruby, or in the library, not in FFI.
23:09:29justin-georgedare I say a ruby-ffi-spec project?
23:09:41VVSizbut there is also a need for user-friendly "thick" API too. so, multi-level APis?
23:09:46brixenjustin-george: there's already specs
23:09:52evanVVSiz: I disagree.
23:09:59evani've yet to see where those are needed
23:10:05brixenjustin-george: rubyspec/optional/ffi, but they do not conform to the style guide in many places
23:10:05evani'm open to examples
23:10:10evanbut i've yet to see them.
23:10:15evanrubinius is still the biggest FFI user
23:10:22evanand we haven't needed them.
23:10:23rueBut, for the sake of argument, we could stipulate that such an additional API could be a separate library
23:10:29evansure
23:10:31rueOr would be, rather
23:10:35brixenI'm missing the need for a thick api too
23:10:44evanall impls should share some ruby code
23:10:46brixenthat's called an FFI client app in my mind
23:10:48evanthat implements parts of the API
23:10:53evanthat should be a goal.
23:11:06rueAlso, but it is not something that needs to be addressed if it is assumed to be a separate entity, if anything
23:11:15evani'm cloudy on what a thick API is
23:11:18rueIdeally the "thick" API would be pure-Ruby
23:11:19evanso i'll just ignore the idea
23:11:24evanuntil someone shows me an example.
23:11:50VVSizfor example, current ffi_lib is very "thin", it just tries to load the lib
23:12:05VVSizno way to specify extra places where to look for, and things like thaty
23:12:23rueSo, basic stuff needed are function calls, callbacks/"function pointers", the limited set of basic types
23:12:45evanVVSiz: got an example?
23:12:47VVSizalso, platform dependent things, different lib names and extensions, this all needs to be done in client code
23:12:47evanof that
23:12:49evanbeing a problem
23:13:03VVSizyeah, nokogiri on Windows with JRuby
23:13:05evanffi_lib delegates to dlopen()
23:13:22evanwhich searchs in the proper platform dependent way.
23:13:27VVSizyeah, bare-bones delegate to dlopen
23:13:34evanso
23:13:42evanyou've put libxml.dll some random place
23:13:47evanand you want to pick it up?
23:14:04evanseems like a simple ffi_library_path
23:14:06evanwould solve this.
23:14:20evani don't consider that a "thick" API
23:15:12brixenright
23:15:26evani'm totally open to looking at examples
23:15:38evanand figuring out how we come up with solutions
23:15:43brixenthere could be more machinery resolving the path
23:15:50evanbut some examples will require solutions i don't think should be in the base FFI
23:15:54evanwhich is fine
23:15:55brixenbut the thin part is that it just uses one syscall to load the library
23:16:02evanthose can easily go somewhere else if someone really needs them.
23:17:07brixencould conceivably have #require_ffi with it's own load path data
23:17:18evansure
23:17:18brixenif we really need a complex path resolver
23:17:35evanways of loading libraries should probably be in base
23:17:41evannone of that is very complex.
23:17:42rueIf you need a really complex path resolver, your LD env is fucked up.
23:17:53VVSizthen again, on Windows, it is not just ffi_lib "libxml2", it must be "libxml2.dll"
23:17:55rueOr you put your library in the wrong place
23:18:17VVSizrue: nokogiri comes with dll's in gem itself
23:18:55justin-georgehmm. Kernel#exec is broken. I make test.
23:18:57brixenVVSiz: why should the .dll be specified? can't the loader API know it's running on windows?
23:19:07VVSizso this all complicated the user code a bit.
23:19:18VVSizbecause it is currently a dump/thin API doing minimal work
23:19:32justin-georgewhat's a cross-platform command to exec? hmmm
23:19:43VVSizand when it comes to features/functionality everybody has different boundaries what is thin and what is an extended functionality
23:20:24brixenVVSiz: that's true, but then there is an aesthetic to making useful APIs
23:20:35rueVVSiz: Yeah...in that case, I think the Gem should either install the library in the correct place
23:20:37brixenwe, of course, have many examples of horrid APIs hehe
23:20:52evanok
23:20:54rueErm -either
23:20:59evanthe idea of thin vs thick is useless
23:21:02evanno more discussion of it
23:21:16evanexamples should be evaluated on their own merit.
23:21:35evanVVSiz: ffi_lib was always supposed to try and load the library in the best possible way fo the platform
23:21:40evanthan it requires .dll is a bug
23:22:04evanthat you can't specify additional places is a simple enhancement request.
23:22:13evanlets fix those 2 things
23:22:55VVSizit might not require in simple case, but when you do ffi_lib "full/path/to/lib.dll", on must use proper slashes and extension, etc. because that's how LoadLibrary on windows works
23:23:09evanok
23:23:09evanhold on.
23:23:15evanlets take a step backward.
23:23:32evanimho, FFI must be platform independent
23:23:50evanso if ffi_lib needs to have a bunch of code do deal with windows, then it should have it
23:24:06evanplatform independency is different than very high level APIs
23:24:12evanwhich was the original discussion point.
23:25:01slavahi evan
23:25:04evanthan LoadLibrary has certain rules is fine
23:25:13rueTo expand on earlier, there could for example be a conventional location to put libraries "imported" by/for a FFI binding
23:25:20evanffi_lib should take it's argument and transform it properly do hand to LoadLibrary
23:25:26evanthats basic API requirements.
23:25:39evanslava: hi hi
23:26:21VVSizOK, I clarified the situation for myself a bit, thanks.
23:29:53evanwelcome back.
23:30:38evanyeah
23:30:41evan2 in my eyes
23:30:54evanthe callback work is unrelated
23:30:56evanif you do it now.
23:31:13slavaevan: I think its time I stopped using gcc extensions for global register variables
23:31:24evanhuzzah
23:31:25evan!
23:32:56justin-georgehey what's the schedule for rc2?
23:33:08evanjustin-george: out in 3 weeks.
23:33:12evanright before the holidays.
23:33:25justin-georgeand that's going to be 2.3.5 compatible?
23:33:30evanyep
23:33:32justin-georgeI can't even get rails to boot :(
23:33:38evanyou should be able to
23:33:41evani can on master
23:33:57evanyou need to open an issue with your details
23:34:01evanso we can figure out why
23:34:14justin-georgeyeah I'm going through the backtraces
23:34:29justin-georgeit's failing on 'require "config/boot.rb"'
23:34:36justin-georgelet me run it and pastie into an issue
23:34:43justin-georgeprobably my error, but still :P
23:35:06dbussinkjustin-george: running rc1 or master?
23:35:10justin-georgemaster
23:35:34dbussinkjustin-george: ok, that's good :)
23:35:42dbussinki need to get some sleep though :P
23:35:45justin-georgehttp://pastie.org/728368
23:36:13evanwtf is with that top line!?
23:36:28evanthe main.script one
23:36:32justin-georgebin/rbx script/server
23:36:41evanum
23:36:44evanis this a big rails app?
23:36:48evanor a blank one?
23:36:48justin-georgeyour guess is as good as mine? let me try clearing everything
23:36:51justin-georgeno, it's fairly small
23:36:58justin-georgeit's our test for New Relic RPM's agent
23:36:59evanplease try a blank one
23:37:03justin-georgebasically a microblog
23:37:03evansee if you can get that up
23:37:08justin-georgekk will do
23:37:10evanrails blah
23:37:16evanbin/rbx blah/script/server
23:37:20justin-georgesorree :)
23:37:23evanno no
23:37:30evani just need to know what does and deosn't work for you.
23:37:51justin-georgeyup, I'm on it
23:40:35justin-georgehmm blank app works... I'm wondering if there are some excess .rbc files hanging around.
23:41:40justin-georgealso, for reference, I hate gems.
23:44:23justin-georgeah now here's the meat of the matter: http://pastie.org/728380
23:44:37justin-georgerails boots fine, btw, much better
23:44:47justin-georgeour plugin is broken but that's to be expected
23:45:15evanhopefully we'll have the bad .rbc problem solved for rc2
23:45:31justin-georgecheck file modified times?
23:46:12evanwe already do that.
23:46:17evanit's because we're fixing compiler bugs.
23:46:40justin-georgeah cool beans ;) good reason for breakage
23:50:11evanoh man
23:50:14evanit's so nice having the heat fixed.
23:50:40brixenit's freakin cold here
23:50:48justin-georgehaha my office was 62 degrees at the beginning of november. Perfect if you like wearing a coat all the time.
23:50:57brixenhigh is supposed to be 34deg on monday
23:51:00justin-georgeit's a balmy 67 now.
23:51:03evanit's not that cold here
23:51:15evanit's just that my condo stays about 10 degrees cooler than outside
23:51:28evanso it's been like 64ish in here for the last few weeks
23:51:35evanwhich is just a little chilly
23:51:50evanheat is fixed, now it's 72
23:53:07brixenheh
23:55:21evanopenssl is sussing out some good capi bugs
23:55:27evanbecause it pushes it hard.