Index

Show enters and exits. Hide enters and exits.

18:34:04jvoorhishello
18:34:52jvoorhisevan et al: may i solicit some more feedback on ruby-llvm? :)
18:34:57jvoorhishttp://github.com/jvoorhis/ruby-llvm/blob/master/samples/factorial.rb
18:38:01rueMorning
18:39:09evanjvoorhis: i think with_block should yield the builder
18:39:28evanbuilder.with_block(block) { |b| b.cond(b.icmp(..)) }
18:44:41dbussinkevening :)
18:49:46jvoorhisevan: i was iffy on that one
18:49:50jvoorhisit makes a lot of sense
18:50:40evanwhy iffy?
18:50:55jvoorhisbut in my example, the with_block blocks would have two locals for the same object
18:50:59evanadditionally, because you must use with_block first
18:51:09evanwhy not just have Block#build
18:51:13jvoorhisyeah
18:51:14evanthat yields a builder
18:51:21evanwhich is for that block
18:51:30jvoorhisbuilders are inexpensive to create and destroy, right?
18:51:38evanblock.build { |b| b.cond b.icmp() }
18:51:39evanyeah
18:51:46jvoorhisthat resolves the cognitive dissonance :)
18:52:19evanor, optionally,
18:52:25evanallow #build to take the builder
18:52:30jvoorhisi'll be nice and have BasicBlock#build do ensure; Builder#destroy
18:52:35evanwhich will be assigned to the block and then yielded
18:52:35jvoorhishm
18:52:42jvoorhisthat works also
18:52:43evanthat gives people the flexibility
18:52:51jvoorhisand dispose if it's block-local
18:53:05evandef build(builder=Builder.new) builder.set_block(self); yield builder; end
18:53:48jvoorhisexcept if i construct it in the default, then i can't know whether it's local and disposable unless i use e.g. AutoPointer :)
18:54:19jvoorhisbut the method signature looks good
18:55:18jvoorhisdef build(builder=nil) builder, dispose = builder ? [builder,false] : [Builder.new,true]; yield builder; ensure builder.dispose if dispose end :)
18:56:14jvoorhismy Builder#with_block implementation also has a little magic that restores the builder's original position
18:56:37jvoorhisand Builder#with_block is not at all primitive, it just uses wrapped api calls
18:57:01jvoorhisso maybe Block#build could work in terms of Builder#with_block
18:57:14evanhuh?
18:57:20evanyou're build is confusing.
18:57:34evanoh, i see.
18:57:41evanyou're disposing of it if you created it.
18:57:45jvoorhisexactly
18:57:53jvoorhisi won't golf the real version :)
18:58:17jvoorhisand this is the state-restoring part i mentioned: http://github.com/jvoorhis/ruby-llvm/blob/master/lib/llvm/core/builder.rb#L32
18:58:40evan#build can certainly do that too
18:58:43jvoorhisit should probably take the current instruction into account as well, instead of just using position_at_end
18:58:46jvoorhisyeah
18:58:54evansince you now have logic you can run if the user passed in an external builder
18:59:14jvoorhiswell, BasicBlock#build could just use Builder#with_block
18:59:33jvoorhisand layer the auto-dispose logic on top
18:59:34evanseems needless, but sure.
18:59:40jvoorhisyeah, maybe
18:59:40evani'd just get rid of #with_block all together.
18:59:49jvoorhissure
18:59:59jvoorhisand if anyone wants a shared builder, they can fall back on api primitives
19:00:12evanexactly.
19:00:16evanthis is icing anyway.
19:00:18jvoorhisi like it
19:00:26jvoorhisyeah, it is icing
19:00:31jvoorhisbut i think it counts for something
19:00:40evanit definitely does
19:00:54evana cake without icing is useless!
19:00:54evan:D
19:01:09jvoorhispoints to pound cake as a counter example
19:01:15evanuseless!
19:01:16evan:D
19:01:18evanMORE ICING!
19:01:22jvoorhishaha
19:01:34rueEw, American cakes
19:01:40jvoorhisi definitely want this to have a good look and feel
19:02:33jvoorhisif the api suggests a sensible usage, and the examples are very straightforward, then people might find LLVM less intimidating
19:03:47jvoorhisdocumentation would also help :) i'll probably just find a way to generate cross-references to the LLVM docs
19:04:16evanwe should probably write it up ourselves
19:04:22evanand reference the original LLVM docs
19:04:31jvoorhisyeah, the builder methods would cross-reference
19:05:22jvoorhisis that the royal we, or do you want to write some docs? :)
19:05:56jvoorhisevan: also, it's not running on rbx yet, but now it does run on MRI 1.8.x and JRuby, so hopefully it's not far off
19:06:43evani'll help
19:06:44evansure.
19:06:58jvoorhisawesome
19:07:15jvoorhisthis thing has legs :)
19:11:05jvoorhisevan: would you rather be added to the github project, or just fork?
19:11:19evanthats up to you.
19:11:28evanhowever you want the workflow to work
19:11:32evani'm fine with.
19:12:44jvoorhisi just added evanphx as a collaborator
19:12:55evansounds good!
19:13:07evani'll poke at getting it running on rbx
19:13:08evanshould be easy.
19:13:12jvoorhisexcellent
19:13:26jvoorhisi *did* make a bit of use of Wayne's implicit #to_ptr hack
19:13:33jvoorhisit may take a little work to undo that
19:13:49jvoorhisand i also use FFI enums
19:14:20jvoorhiswhich afaict rubinius doesn't support yet
19:14:29evani'm ok with #to_ptr at this point
19:14:33slavaevan: I removed my primitive table, they're looked up by name now :)
19:14:35evani've seen people use it enough
19:14:43evanthat i think it's probably here to stay
19:14:46evanso i need to add support for it.
19:14:47jvoorhisok
19:14:58jvoorhishow do you feel about enums?
19:15:03evanwe should support them
19:15:09evanjust haven't bother to fold in the implementation
19:15:11evani'll do that.
19:15:15jvoorhismakes sense
19:15:54jvoorhisi'm happy to motivate some of that – i'd really like to see wider uptake of FFI
19:17:16evanme too.
19:17:58dbussinkevan: did you find some time to take a look at the issues i had or digging into something else atm?
19:18:06evani'll tell ya when i look
19:18:08evani haven't yet.
19:18:20evanno need to keep nagging :)
19:18:37dbussinkevan: hehe, i'll shut up for a while then :P
19:18:46dbussinkor find new stuff ;)
19:19:14evanan easier repro would be great
19:19:16evanif you can find that.
19:19:30dbussinkevan: i have tested the onig update that was recently released, seems to pass all specs
19:19:40dbussinkreleased 5.9.2 not too long ago
19:19:54dbussinkevan: i've been trying, but haven't been able too :(
19:20:11dbussinkevan: although the issue happens pretty fast now and you only need a few gems installed
19:20:18dbussinkevan: it was a lot worse actually
19:21:05evanis the ticket up to date?
19:21:10evanyou mentioned it not happening in some cases
19:21:32dbussinkevan: well, it happens for me now, so it should be up to date
19:22:05evank
19:22:18evani got a SIGSEGV yesterday running the activesupport spes
19:23:40dbussinkevan: ah ok, well it seems to happen when compiling a lot of stuff and subsequently jitting in the compiler
19:23:48dbussinkthat's at least where it failed for me when it failed
19:24:03dbussinkevan: so it could very well be the same or a very similar issue
19:24:23dbussinkevan: is that segsegv reproducable?
19:25:01evangot it once
19:25:05evani was trying to get to something else
19:25:10evanso ran again and it was gone
19:25:17evanbut i know the scenario it was produced in
19:25:22evanso i'm going to investigate.
19:25:35dbussinkevan: did you remove rbc's intermittently?
19:25:52evanthats what i'm going to do to reproduce it
19:27:59dbussinkevan: ah, then it's also probably related, so if you are able to fix that, i'll test again first
19:28:15evank
19:29:24dbussinkevan: you're ok with upgrading oniguruma? http://www.geocities.jp/kosako3/oniguruma/
19:29:33evanyeah
19:29:36evanesp if it's faster
19:29:37evan!
19:29:44dbussinkevan: or do we have local changes to it? i couldn't find any in the history
19:29:52evanno, we don't.
19:29:56evani've been strict on that
19:29:56dbussinkit has fixes for memory leaks
19:30:01evansince i know we would upgrade.
20:26:58dbussinkevan: hmm, upgrading breaks a few specs though :(
20:27:06evandamn.
20:30:05slavamorning
20:30:10dbussinkevan: hmm, mri doesn't have the change that breaks it either
20:30:20dbussinkevan: do you know if 1.9 and onig are kept in sync?
20:30:25evani don't think they are.
20:30:29evanslava: allo!
20:35:16evandbussink: just found a bug running the specs that was causing a crash.
20:35:23evancould very well be the same thing you saw.
20:35:33dbussinkevan: ah, cool, something jit related?
20:35:37evanyep.
20:35:48evanthe completely broken way that a JIT'd function is cleaned up.
20:43:31boyscoutRemove Undefined constant all together - 0d65b32 - Evan Phoenix
20:43:31boyscoutCall StringValue in Dir.mkdir and Dir.rmdir - caff583 - Evan Phoenix
20:43:31boyscoutFix Time#+ rounding microseconds - 50372bb - Evan Phoenix
20:43:31boyscoutFix how Kernel.require creates a LoadError (rails fix) - c5cbca3 - Evan Phoenix
20:43:31boyscoutAdd specs for cases found running active_support - 0e5a0cc - Evan Phoenix
20:43:32boyscoutDisable JIT'd code cleanup, it's totally broken - 173dac2 - Evan Phoenix
20:44:29evanlunch!
20:45:43dbussinkevan: i'm going to test it a bit :)
20:47:12evank
20:47:25boyscoutCI: rubinius: 173dac2 successful: 3024 files, 11752 examples, 35958 expectations, 0 failures, 0 errors
21:59:38evandbussink: any luck?
21:59:57dbussinkevan: still seeing the same kind of issues, so doesn't look like it solves it for me
22:00:30evank
22:23:53evandbussink: what ticket number has the info?
22:23:56evani'm going to look into it now?
22:24:00evans/now?/now.
22:24:26dbussinkevan: http://github.com/evanphx/rubinius/issues#issue/171
22:24:51dbussinkevan: problem is that it doesn't fail like that now for me anymore
22:25:03evanthats why I asked you to update the ticket
22:25:06evanplease do that.
22:25:18dbussinkevan: well, it's not reliable now anymore
22:25:37evanstill needs to be updated
22:25:43dbussinkthere are always some specs that fail, and sometimes a segfault, i haven't been able to reliably do it now after your last changes
22:25:46evansince your ticket says it's reliable.
22:26:18dbussinkevan: it was for that revision then
22:26:32evanhuh?
22:26:51dbussinkevan: this was before your last few changes
22:26:59evanwhat revision?
22:27:02evanle sigh.
22:27:11evanthis is what I meant by keeping the ticket up to date.
22:27:51dbussinkevan: well, i'm pretty busy with something else atm, if i have time i'll update it again with more information on how to repro
22:27:58evank
22:28:05evani'll try what you've got
22:28:08evansee what happens
22:28:10evanUG.
22:28:21evangot a .rbc compile error.
22:29:25evanthe ticket also doesn't saw what to run it under
22:29:32evanis this git master of datamapper?
22:29:35dbussinkyeah
22:29:41dbussinki'll add a link
22:29:58evanedit the ticket
22:30:00evanand fix it
22:30:03evanrather than leaving it in a comment.
22:30:07slavawow, I didn't know skype was peer to peer
22:32:01evanyou didn't?
22:32:44evandbussink: looks like all those collection specs pass
22:33:08dbussinkevan: yeah, i'm trying with an older revision to see whether that one still shows it
22:33:39dbussinkevan: if you run ADAPTERS="in_memory" ../rubinius/bin/rbx -S rake spec you'll see stuff fail after some time
22:33:48dbussinkevan: and those pass if run seperately
22:33:55dbussinkbut that's a real bitch to debug like that
22:34:06dbussinkevan: not something you'd want to get into ;)
22:35:48evani'll run them all
22:35:50evansee what happens.
22:36:42evanthat doesn't seem to work
22:36:51evanit just complains about
22:36:52evanMissing some dependencies. Install them with the following commands:
22:36:52evan gem install rspec --version "~> 1.2.9"
22:37:02evanand rspec 1.3 is installed
22:37:53dbussinkevan: hmm, probably a dev requirement, haven't tested if 1.3.0 breaks stuff on mri
22:37:58dbussinkevan: but i have 1.2.9 here locally
22:38:13dbussinkevan: i've got the repro, but that's with an older revision, not with the latest rubinius master
22:38:31dbussinkevan: so it could be that that's your change that fixed that specific case
22:39:50dbussinkevan: i've updated the issue with more information on the specific rubinius revision etc.
22:39:53dbussinkhttp://github.com/evanphx/rubinius/issues/issue/171
22:39:59evanok
22:51:48evani'm getting a bunch of failures
22:51:55evanno segfaults
22:52:03evanand a whole screen of yellow *'s
22:52:08evani don't know what that means
22:52:13dbussinkyeah, the yellow ones are fine, pending stuff
22:52:20evangeez
22:52:21dbussinkit should be all green
22:52:23evanis the whole thing pending?!
22:52:36evanit's been just doing pending ones here for the last few minutes
22:52:42dbussinknot every driver supports every part (yet)
22:52:48dbussinkso those are shown as pending
22:52:58evanwhat does pending mean?
22:53:25dbussinkthat some feature is pending, not supported / working yet, but will be implemented in the future
22:53:35evanbut to the specs
22:53:46evanbecause it appears to be running something for all those pending things
22:53:51evannot just skipping them
22:54:01dbussinkevan: that's rspec's magic doing things i guess
22:54:04evanif it were skipping them
22:54:09evani'd expect them to fly by
22:54:30dbussinkevan: there could be setup / teardown stuff in there
22:54:39evanif so
22:54:44evanthere is a shitton of that.
22:54:45dbussinki can also setup something that fails on elle if that would be more helpful?
22:55:00evanonly slightly
22:55:04evani'll still have to repro it here.
22:56:10dbussinkhmm, maybe try aborting it? it fails really fast in like half of the cases for me here now
22:56:33dbussinkwith that huge command that loads up all specs and probably puts a strain on the compiler
22:56:44evani'm going to let it finish
22:56:47evanit isn't stuck
22:57:37evanFinished in 762.211625 seconds
22:57:37evan9368 examples, 322 failures, 3445 pending
22:57:52evanthose pending numbers seem right?
22:58:02dbussinkyeah, for in memory that's seems about right
22:58:20dbussinkdo you have a dev build
22:58:21dbussink?
22:58:52dbussinkbecause it's often a usz what i get and i saw that check is only enabled with dev enabled
22:58:58evanno, no dev build
22:59:04evanbecause i was hoping for the crash.
22:59:09evanwait
22:59:14evanyou ONLY see it in dev mode?
22:59:48dbussinki see a sporadic crash during the spec runs, but far more often an usz with dev mode
22:59:51evanyour ticket doesn't mention a usz.
23:02:35dbussinkevan: i've added the usz i'm seeing now reasonably reliable (not always but like half of the time when running that command)
23:02:43dbussinkwhen it happens, it happens at the very beginning
23:02:57evanok, i just got a crash.
23:03:19dbussinkah ok, does it make any sense?
23:03:50evani see it
23:03:56evanthey never make sense at first
23:04:04evangdb didn't get it
23:04:08evanbecause i ran it under rake
23:04:10evanso i'm trying again.
23:09:04dbussinkevan: ah ok, hopefully you can get something useful out of it
23:09:10dbussinki really need to get some sleep
23:09:14evanit disappeared again
23:09:16evanok, nite.
23:09:46dbussinkevan: i can really understand the frustration, it's not a nice clean way to reproduce but i really haven't been able to properly isolate it further
23:09:57dbussinkif you want to focus on other things, please do so :)
23:09:58evani know.
23:10:03evan:)
23:10:11evani'm frusterated with the crash
23:10:12evannot you
23:10:12evan:)
23:10:22dbussinkhehe, ok, that's good to hear ;)
23:10:24dbussinkgood hunting!
23:10:27dbussinknite
23:11:30evannite!