Index

Show enters and exits. Hide enters and exits.

00:00:27toulmeanbrixen: oh yeah. Give me the most reluctant task you did today ?
00:01:36toulmeanI'm not sure I can communicate what I did today actually
00:01:37toulmeannm
00:05:51evanbrixen: so, i'm going to bootstrap FFI the same way cola is bootstrapped
00:06:20evanby injecting 2 preexisting values, FFI::MemoryPointer::CURRENT_PROCESS and FFI::MemoryPointer::DLSYM
00:06:40evanthose + create_backend taking a MemoryPointer for the function instead of searching
00:06:59evanmeans we can move a bunch of functionality into ruby
00:07:06brixenawesome
00:07:21brixenhow do you get the memory pointer for the function?
00:07:46evanfor any function? you call dlsym
00:07:50brixenok
00:08:27brixenI'm trying to see where is this dlsym you call... FFI::MemoryPointer::DLSYM ?
00:08:37evani'll show you
00:08:38evanone sec.
00:10:04evanhttp://gist.github.com/416554
00:10:21evanhttp://gist.github.com/416556
00:11:03evani've changed attach_function to take a MemoryPointer for the address of a function
00:11:08evaninstead of just the name of a function
00:11:14evanthats the key.
00:11:27brixenI see
00:12:02evanthis should allow the FFI system to build the rest of itself.
00:12:50brixenbut this now takes 2 lines for every one previous attach_function
00:12:55brixenam I missing something?
00:13:00evanyep
00:13:01evan:)
00:13:05brixenok :)
00:13:13evanattach_function stays as is.
00:13:18evanAPI wise
00:13:59evanbut inside attach_function, we'll use the bootstrap open_library and find_symbol
00:14:06evanyou'll see.
00:14:10brixenok, I see
00:14:25brixendiffs are hard, let's have manhattans
00:14:30evantots.
01:09:06cremesmaybe one more episode... best. show. ever.
09:02:11duncanmvevan: any idea what could be crashing the vm on recent gcc/glibc?
09:02:28duncanmvhttp://pastebin.com/z1MUVghc
13:52:14jlecourHi
13:52:35jlecourI've tried to install rubinius on Mac OS X 10.6 through rvm
13:52:41jlecourand I got errors
13:52:55jlecourwayneeseguin (from rvm) told me to ask here
13:53:04jlecourhttp://gist.github.com/416899
13:57:00Defilerjlecour: huh.. looks like 'configure' didn't go well.. it shouldn't try to proceed after failing to find llvm
13:57:25jlecourI thought this had to do with LLVM but I wasn't sure
13:57:42jlecourso I have to install LLVM first ?
13:58:19jlecourwayneeseguin: I'm not 100% sure, but I didn't see this dependency in `rvm notes`
13:58:56jlecourLLVM is mentioned only for MacRuby
13:58:57cremesjlecour: there is a binary distribution of llvm for rbx; the rbx configure step should download the right one
13:59:24jlecourcremes: it seems that it didn't download it
13:59:25cremesrbx has dependencies on a specific llvm tag so it isn't recommended to use a system-wide version of llvm
13:59:32jlecourok
14:00:18cremesi *think* the configure script is pretty simple; you might want to check the last few commits against it to see what has changed and potentially borked rvm
14:00:37wayneeseguinjlecour: no, it downloads it's ownLLVM iirc
14:00:41Defilerjlecour: try changing to the source directory where rvm was trying to build it..
14:00:46Defiler..and run "./configure"
14:01:04wayneeseguin./configure --prefix=$HOME/.rvm/rubies/rbx-1.0.0
14:01:33Defilerthat too; just wanted to see the error, if any, where it looks for llvm, or a prebuilt version
14:02:33jlecourthe ./configure went well
14:04:26jlecourI've wipped the whole thing and trying again
14:08:29jlecourit's not better
14:08:50jlecourIt's not a big deal for me, I just wanted to try rubinius
14:09:10jlecourbut if you want me to try something, let me know
14:09:15cremesi'm getting the same problem...
14:09:30cremesyou can still try rbx; it's just broken under rvm at the moment
14:09:37jlecour:-)
14:09:42cremesclone the repository and build it manually; takes two commands
14:09:48cremes./configure && rake
14:09:59jlecourok, i'll try
14:10:01jlecourthanks
14:10:51wayneeseguintries on a fresh rvm
14:12:40wayneeseguinok installed 1.8.7 fine, it's now downloading rubinius
14:12:49wayneeseguinit's running ++ eval 'ruby configure --prefix=/Users/wayne/.rvm/rubies/rbx-1.0.0-20100514 --skip-system'
14:13:17wayneeseguinnow running rake install
14:13:45cremesi tried rbx-head and it barfed
14:14:29wayneeseguinahh -head, that's not the one I'm trying
14:15:07cremesjlecour: which rbx did you try to install? 1.0 or head?
14:15:24wayneeseguinjlecour: YOu made sure to 'rvm install 1.8.7' first ?
14:16:15jlecourwayneeseguin: I have 1.8.7-p249 but right now I'm on ree-1.8.7-2010.01
14:16:25jlecourcremes: I just did `rvm install rbx`
14:16:35cremesthat's for 1.0
14:16:41jlecourok
14:16:46jlecourI'll try head
14:20:10jlecoursame errors with rbx-head
14:20:54wayneeseguinI'm still waiting for it to compile
14:21:02wayneeseguinjlecour: you are on latest head right? rvm update --head
14:22:20cremeswayneeseguin: 1.0 worked for me but head did not; i did a --head update yesterday, any changes since?
14:22:38jlecourwayneeseguin: Yes I am up to date
14:24:27wayneeseguincremes: yes -head fails the compile step ('/Users/wayne/.rvm/bin/ruby-1.8.7-p249 -S rake install --trace)
14:25:25cremeswayneeseguin: i can confirm head fails on osx 10.6.3
14:25:32cremesos related?
14:25:45wayneeseguinThis is the actual error
14:25:45wayneeseguinhttps://gist.github.com/32f64228539d0f925a51
14:25:51wayneeseguinI'm on OSX 10.6.3
14:26:01cremeshold the phone; my last attempt just succeeded
14:26:06cremeshere's my theory...
14:26:09wayneeseguinalmost looks like make is trying to do this: /Users/wayne/.rvm/rubies/rbx-head/bin/rbx
14:26:12wayneeseguinbefore it exists
14:26:34cremesi think the install prerequisites step is broken for head; it did not download anything and then failed with the same error you pasted
14:26:49cremeshowever, i installed rbx 1.0 and it did download some prereq
14:26:56cremesmy next try on rbx-head succeeded
14:27:05wayneeseguinI haven't changed anything recently with RVM except for calling 'ruby configure' vs './configure' as evan suggested
14:27:09cremesany merit to my theory?
14:27:37wayneeseguinit's possible it doesn't have a prereq downlaoded
14:27:57wayneeseguinexcept the actual 'download rubinius, configure install' rvm does the prereq of 1.8.7 first
14:28:37cremesi already have 1.8.7 installed; so what did rbx 1.0 download? llvm?
16:01:23evanthe failure on install with head we should have fixed shortly if not already
16:04:10evanand I guess everyone else left.
16:04:17evani need to see rvm's output from running configure...
16:07:02brixenmorning
16:07:45evanhow are you this morning?
16:08:14brixengood
16:08:25brixen~1/2 done editing capi specs
16:08:34brixenmust. finish. them.
16:08:35brixen:)
16:08:43wayneeseguinevan: https://gist.github.com/32f64228539d0f925a51
16:09:08evanwhy does it say you're not in this channel for me...
16:09:12evanthats... bizarre.
16:09:18evanbrb.
16:09:40evanwayneeseguin: ok, thats better.
16:09:42evanwayneeseguin: yeah, i'll fix that shortly.
16:09:57evando you have the output of configure? seems like the guy before had some error with that.
16:39:26brixenevan: heh, you tweeted the line before my line
16:39:39evanwe're on the same wavelength!
16:39:43brixenI wanted to get the tattoo line in there, but not enough room
16:39:51brixenheh
16:41:06evan:)
16:58:09evanok, getting callback's massaged in.
16:58:20brixenawesome!
16:58:21evanI'm on my second meat tenderizer though.
16:58:27brixenheh
17:09:50brixenevan: are we planning to support rb_define_hooked_variable?
17:09:59evanonly if we have to.
17:10:03brixenk
17:10:09evani've never seen them used in extensions.
17:10:14brixenI'll just guard it not_supported_on for now
17:10:39evanrad.
17:10:41evancallbacks work.
17:10:51brixensweet
17:11:01evanthe rewire of the FFI system yesterday paid off
17:11:05evanas slava indicated
17:11:10brixenmost excellent
17:11:16evanbeing able to attach a pointer as a method is key
17:11:41evani'm glad we waited though
17:11:50evanbecause I can reuse a bunch of capi stuff to make it easier.
17:12:31brixennice
17:15:40cremesevan: started looking at fixing up the struct layout code to handle the newer syntax
17:15:47evanok
17:16:07cremesany issue with reusing chunks of ruby from the ffi gem?
17:16:29cremes(assuming it has specs, of course)
17:16:48cremesi hate reinventing the wheel when i can avoid it
17:19:29evanwell.
17:19:36evanit will probably have to be cleaned up
17:19:49evanthe style in the ffi gem isn't to my liking.
17:21:12cremesdon't tell me they're using included hooks in there too... ;)
17:24:09evannothing surprises me anymore.
17:26:02brixenevan: I'm thinking about allowing arbitrary operators in Poison so you can def methods like 8============>
17:26:13evanhah
17:26:20tarcierineeds more 8=========================D
17:26:24brixenis roflmao
17:26:40brixenevan: did I surprise you? :)
17:26:55evanwell, then you can have the tie bomber operator: <o-O>
17:27:11brixentarcieri: they are arbitrary, so yours can definitely be bigger than mine :)
17:27:11evanalso, popular, the Y wing: <O-O>
17:27:20brixenevan: yep
17:27:40brixenI could warn based on the size of the operator
17:27:53brixen"yo dawg, looks like you likes some operatorz"
17:29:11evanhah
17:29:20evanyou saw the stuff about -Xzibit, right?
17:29:20JamesKilton|-o-| >.> ^.^ (-.-) the possibilities are endless
17:29:25brixenevan: yeah
17:29:56brixenI was going to write a classification of languages based on whether they allow the (.)(.) operator
17:30:05evanhehe
17:30:09brixenthere are two types of languages, explicit and prude
17:30:11brixenhehe
17:30:12tarcieribrixen: I was more concerned about the conical tip
17:30:29brixentarcieri: oh, I know what you're concerned about ;)
17:30:34brixentarcieri: mine was a rocket btw
17:31:33evanwhat should happen when a callback raises an exception?
17:31:50tarcieri:( @ callbacks raising exceptions
17:31:51evani'm tempted to just eat it.
17:32:00evantarcieri: mega.
17:32:09BrianRice-workhm
17:32:34BrianRice-workso, ideally, you could turn the exception into a signal
17:32:47cremesevan: eat it
17:32:54brixencall a special method on the recv you invoked the callback on
17:33:16evanI really don't want to have to support unwinding through an FFI function.
17:33:22cremeshow does factor handle it?
17:33:25cremes:)
17:33:26evanit will slow down the JIT inlining of FFI a bunch.
17:33:29evanslava: ?
17:34:12dbussinkdoes the ffi gem handle it?
17:34:50brixenevan: are you using meissner's syntax? (callback :qsort_cmp, ...)
17:34:52cremesdbussink: i don't know what it does with exceptions in callbacks; i should try it
17:35:09evanbrixen: yeah, i have to.
17:35:16evanruby-ffi doesn't do anything with this
17:35:23brixenadd an optional arg to #callback to take a method name to call on this module
17:35:29evanwhich means that it unwinds through the FFI called function
17:35:36evanbecause thats what rb_raise will do.
17:35:45evansince rb_raise uses setjmp
17:37:19evanif a callback can only be called from the function it's past to
17:37:29evani can support unwinding without effecting the JIT inlining code
17:37:37evanpassed to, rather.
17:39:51evanok,
17:39:54brixenI think assuming the callback does not raise an exception is not unreasonable
17:39:55evani'm going to just eat it
17:39:56evanfor now.
17:39:58brixenyeah
17:40:08evani'll print out an error.
17:40:10evanand eat it.
17:40:13brixenlet someone show a good case for needing to raise an exception
17:40:16evaner. warning.
17:40:49brixen"yo dawg, weird shit is happening under the covers here, did you mean to be stirring shit up"
17:41:18brixenthinks be eod evan will have added -Xzibit
17:41:24brixener s/be/by/
17:41:36evani might!
17:41:41brixenheh
17:41:43evanI told mattly about Rubinius::Config
17:41:46evani'm waiting for his patch
17:41:49brixenahh
17:44:24evanbrixen: what was your comment about the optional arg to callback?
17:44:50brixenjust wondering if there's a way to take a method to call directly
17:44:59brixenwhen an exception is raised
17:45:42brixencallback :fun, :fritz, [:pointer], :int
17:45:51brixenhere :fritz is a method on that module
17:46:04brixenhere, where
17:46:11evani can do that, sure.
17:46:12cremesbrixen: what do you do when your exception handling method raises?
17:46:18evanatm, it will take anything that responds to call
17:46:26brixencremes: you email that person's mothed
17:46:26cremeseat it
17:46:29brixener mother
17:47:11cremesi knew it! rbx is achieving its next level of consciousness by getting email built in
17:47:14evani'm eating it
17:47:18evanand printing out a stern warning.
17:47:19cremesit's almost as cool as lisp now
17:48:14brixen(mailto 'cremes-mom, (message ("he's been a baaaad boy")))
17:48:42brixenfail, that , snuck in there
17:48:43cremesadding that text to my mom's spam filter so she never sees it
17:48:47brixencus I'm not a true lispy
17:48:55BrianRice-workonce you know lisp, the lisp code of people who don't know lisp always looks like the worst code in the world :)
17:49:06brixenBrianRice-work: haha
17:49:41BrianRice-workprobably second only to "fake cobol" (except that fake cobol always looks better than real cobol)
18:03:02wayneeseguinevan: I was at lunch, do you still need the full configure output?
18:03:19evanwayneeseguin: if you have it from that guy, it would help
18:03:28evanhe didn't seem to be able to download LLVM
18:03:30evannever seen that.
18:04:02wayneeseguinevan: ahh... no I don't have his, just the one I encountered which I gisted to you
18:04:25evanok, no prob.
18:04:28evanif/when he shows up
18:04:30evani'll get it.
18:17:08dbussinkwhat would -Xzibit do?
18:17:45dbussinksuch a think should surpassed by what it does
18:17:52dbussinkstupid sentence
18:17:55BrianRice-workit would pimp your ride
18:18:10evanmattly wants to make it pimp your error messages
18:20:06evanI wish libffi's trampolines didn't confuse gdb so much.
18:20:20evanthey don't use frame pointers, so gdb can't walk up through them.
18:27:51jaribwould 1.size be a safe cross-impl. way of checking if ruby is 32- or 64-bit?
18:28:06evanjarib: i think so.
18:28:13evani'd prefer something more obvious
18:28:16evanpersonally.
18:28:24evanlike
18:28:32evanIS32BIT = (1.size == 4)
18:28:33brixenjarib: that's what I do in mspec
18:28:45brixenyeah, I have a helper for it
18:28:53jaribok, cool
19:03:40jaribbrixen: 1.size == 8 #=> true on JRuby with 32-bit JVM though
19:05:25brixenthey use 63 bit fixnums afaik
19:05:30brixenyou should ask #jruby though
19:05:46jaribi am :)
19:06:11jaribjust to let you know that 1.size is not a safe cross-impl. way of detecting the arch
19:06:33brixenthat's not really the use of it though
19:06:44brixenit behaves correctly with the 32 vs 64bit specs
19:07:10brixenwhat are you doing that you need to see whether the platform is 32/64bit from Ruby code?
19:07:44jaribbrixen: which .dll to load through FFI
19:07:56brixenyeah, that info should be in FFI
19:08:05brixendoing 1.size would not be a good test for that
19:09:05jaribbut it should be enough on mri/rbx, right?
19:09:25brixenprobably, but that's not really the point
19:09:38brixenif that info is needed no use FFI, it needs to be *in* IIF
19:09:41brixener FFI
19:10:06brixenug to use FFI*
19:10:19jaribright
19:10:24jaribi'll push for that :)
19:10:32brixenindeed
19:10:43brixenevan: ^^^
19:11:21evan10-4
19:11:31evanit shall be done.
19:11:35brixen:)
19:13:33jaribi guess FFI.type_size(:int) might be enough
19:13:41jaribwhich is already working on jruby
19:13:45evanshould be.
19:13:45evanyes.
19:13:59brixenbut would be nice to have that as a constant directly
19:14:05evansure.
19:30:25slavacremes: how does factor handle unwinding through C frames?
19:30:29slavacremes: it doesn't :-)
19:30:34evanoh good.
19:30:52cremesslava: cheater
19:31:25slavacremes: if you wrap an FFI call in an exception handler, and the FFI call makes a callback, the callback won't invoke your handler if it throws an exception
19:31:43cremesunderstood
19:31:50slavathere's a default handler at the top level of each callback
19:41:42slavajarib: int is always 32 bits though
19:43:42jaribslava: yeah, evan mentioned that in #jruby, using :pointer for now
19:59:52evanwoo!
19:59:56evani've earned lunch!
20:00:02evanthe callback syntax works
20:00:10evanand a block is passed as the callback.
22:14:17evani wonder if cardinal is completely dead at this point.
22:18:45brixenprobably?
22:19:26brixenit's been another year, looking forward to hearing about parrot at oscon
22:19:27evani just tried to find any trace ofit
22:19:35brixenit's the only place I hear about it
22:19:36evanit's nearly impossible
22:19:42evanpeople talked about it last year?
22:19:54brixenI mean parrot, not cardinal
22:20:18brixenI never hear anything about cardinal
22:20:20evanoh
22:20:23evanright
22:20:49evani saw some interview that said perl6 would be out within a year.
22:21:01brixeninteresting
22:21:05evani wonder if thats still pie-in-the-sky
22:21:07evanmy guess is yes
22:21:11brixenprobably
22:37:52Defilerwithin a year of what?
22:38:05Defilermaybe a light-year
22:39:53evancremes: you around?
22:40:55brixenDefiler: that would make now a long time ago, in a galaxy far away...
22:41:00brixenalmost
23:23:39evanok
23:23:41evancallbacks are ready.
23:25:14cremesevan: around for just a short time. what's up?
23:25:27evanI didn't see in github where you use FFI::Function
23:25:44cremesi'll find it...
23:26:05evani've got it working though.
23:26:15cremesevanhttp://github.com/chuckremes/ffi-rzmq/blob/master/lib/ffi-rzmq/wrapper.rb#L49
23:26:35cremesincredibly good news
23:26:48evanweird, i must have had an old version loaded.
23:26:53cremeswhat would take a mortal man 1 week to do, you finish in 24 hours
23:27:16cremesnote that it is not used under RBX
23:27:22evanjust so you know
23:27:25cremesi added that yesterday so i could get further
23:27:30evanFFI::Function#autorelease is a noop.
23:27:32evanon ruby-ffi
23:27:39evanit does nothing.
23:27:47cremesnoted
23:28:06cremesi'll clean that up when i get to the specs on that file; thanks for pointing it out
23:28:10evanack, i've got an old ruby-ffi checkout. :?
23:28:12evan:l
23:28:13evan:/
23:28:25cremestry "git pull" :)
23:28:37evanit's for a private version of mine.
23:28:56evanI wonder how off i'm going to be...
23:28:58evan:/
23:29:44evanwelp, still a noop.
23:29:45evananyway.
23:29:54cremesrun the ruby-ffi specs against your stuff; perhaps that will shine a light
23:30:00evanum.
23:30:05evannot yet.
23:30:13evanthey scare the shit out of me.
23:31:35evanoh, i see
23:31:40evanautorelease is used if FFI::Function
23:31:43evannevermind.
23:31:58evanbut i don't see why you wouldn't set it
23:32:04evanit's defaulted to true
23:33:13cremesi forget my reasoning; it's fuzzy now; i might have just been playing around with it to see if i could divine its effect
23:33:23evanit's true by default
23:33:29evansetting it to false would cause a memory leak.
23:33:31evanso it's pretty useless.
23:34:13cremesah, that's why i did it. i was trying to measure the size of the memory leak and then forgot to pull it
23:34:22cremesi should have put a comment on it
23:34:39evani'd just remove it
23:34:52cremesi will if i can't spec it
23:35:05cremesi'm rolling out the door soon; anything more you need this fine evening?
23:36:15evannope
23:36:19evanhave a nice weekend.
23:36:29cremescool; ttyl